Ticket #6597: 6597-transcode-win32.patch
File 6597-transcode-win32.patch, 6.2 KB (added by , 16 years ago) |
---|
-
programs/programs.pro
18 18 SUBDIRS += mythtranscode 19 19 } 20 20 21 mingw: SUBDIRS -= mythtranscode mythtranscode/replex -
programs/mythtranscode/replex/replex.pro
23 23 LIBS += -lmythavcodec-$$LIBVERSION -lmythavformat-$$LIBVERSION -lmythavutil-$$LIBVERSION 24 24 LIBS += $$EXTRA_LIBS 25 25 26 mingw:LIBS += -lws2_32 27 26 28 isEmpty(QMAKE_EXTENSION_SHLIB) { 27 29 QMAKE_EXTENSION_SHLIB=so 28 30 } -
programs/mythtranscode/mythtranscode.pro
9 9 target.path = $${PREFIX}/bin 10 10 INSTALLS = target 11 11 12 mingw:LIBS += -lws2_32 13 12 14 QMAKE_CLEAN += $(TARGET) 13 15 14 16 # Input -
programs/mythtranscode/main.cpp
812 812 if (gContext->GetNumSetting("TruncateDeletesSlowly", 0)) 813 813 return slowDelete(filename); 814 814 815 return unlink(filename.toLocal8Bit().constData()); 815 QFile ftarget(filename.toLocal8Bit().constData()); 816 return !ftarget.remove(); 816 817 } 817 818 818 819 void CompleteJob(int jobID, ProgramInfo *pginfo, bool useCutlist, int &resultCode) … … 854 855 const QString newfile = cnf; 855 856 const QByteArray anewfile = newfile.toLocal8Bit(); 856 857 857 if (rename(fname.constData(), aoldfile.constData()) == -1) 858 QFile srcQFile(fname.constData()); 859 if (!srcQFile.rename(aoldfile.constData())) 858 860 { 859 861 VERBOSE(VB_IMPORTANT, 860 862 QString("mythtranscode: Error Renaming '%1' to '%2'") 861 863 .arg(filename).arg(oldfile) + ENO); 862 864 } 863 865 864 if (rename(atmpfile.constData(), anewfile.constData()) == -1) 866 QFile tmpQFile(atmpfile.constData()); 867 if (!tmpQFile.rename(anewfile.constData())) 865 868 { 866 869 VERBOSE(VB_IMPORTANT, 867 870 QString("mythtranscode: Error Renaming '%1' to '%2'") … … 966 969 QFile checkFile(oldfileprev); 967 970 968 971 if ((oldfileprev != newfileprev) && (checkFile.exists())) 969 rename(aoldfileprev.constData(),anewfileprev.constData());972 checkFile.rename(anewfileprev.constData()); 970 973 } 971 974 } 972 975 -
programs/mythtranscode/transcode.cpp
1201 1201 fifow->FIFODrain(); 1202 1202 } 1203 1203 delete newFrame; 1204 // HACK? - destructor apparently never called (Qt3/Qt4 deleteLater issue?) 1205 // Pointers not reset; shouldn't dtor segfault if it was working properly? 1204 1206 if (player_ctx) 1205 1207 delete player_ctx; 1208 // HACK - delete ringbuffer else outfile is open when we try to rename it 1209 // As before, destructor is supposed to take care of these deletes for us! 1210 if (nvr) 1211 delete nvr; 1212 if (outRingBuffer) 1213 delete outRingBuffer; 1214 1206 1215 return REENCODE_OK; 1207 1216 } 1208 1217 -
libs/libmythtv/NuppelVideoRecorder.cpp
10 10 #elif HAVE_SOUNDCARD_H 11 11 #include <soundcard.h> 12 12 #endif 13 #ifndef USING_MINGW 13 14 #include <sys/ioctl.h> 14 15 #include <sys/mman.h> 16 #endif 15 17 #include <cerrno> 16 18 #include <cmath> 17 19 … … 778 780 */ 779 781 bool NuppelVideoRecorder::MJPEGInit(void) 780 782 { 783 #ifndef USING_MINGW 781 784 bool we_opened_fd = false; 782 785 int init_fd = fd; 783 786 if (init_fd < 0) … … 819 822 hmjpg_maxw = 640; 820 823 return true; 821 824 } 822 825 #endif // !USING_MINGW 823 826 VERBOSE(VB_IMPORTANT, LOC_ERR + "MJPEG not supported by device"); 824 827 return false; 825 828 } … … 966 969 967 970 void NuppelVideoRecorder::ProbeV4L2(void) 968 971 { 972 #ifndef USING_MINGW 969 973 usingv4l2 = true; 970 974 971 975 struct v4l2_capability vcap; … … 995 999 QString driver = (char *)vcap.driver; 996 1000 if (driver == "go7007") 997 1001 go7007 = true; 1002 #endif // !USING_MINGW 998 1003 } 999 1004 1000 1005 void NuppelVideoRecorder::StartRecording(void) … … 1073 1078 1074 1079 void NuppelVideoRecorder::DoV4L(void) 1075 1080 { 1081 #ifndef USING_MINGW 1076 1082 struct video_capability vc; 1077 1083 struct video_mmap mm; 1078 1084 struct video_mbuf vm; … … 1255 1261 1256 1262 recording = false; 1257 1263 close(fd); 1264 #endif // !USING_MINGW 1258 1265 } 1259 1266 1260 1267 void NuppelVideoRecorder::DoV4L2(void) 1261 1268 { 1269 #ifndef USING_MINGW 1262 1270 struct v4l2_format vfmt; 1263 1271 struct v4l2_buffer vbuf; 1264 1272 struct v4l2_requestbuffers vrbuf; … … 1612 1620 recording = false; 1613 1621 close(fd); 1614 1622 close(channelfd); 1623 #endif // !USING_MINGW 1615 1624 } 1616 1625 1617 1626 void NuppelVideoRecorder::DoMJPEG(void) 1618 1627 { 1628 #ifndef USING_MINGW 1619 1629 struct mjpeg_params bparm; 1620 1630 1621 1631 if (ioctl(fd, MJPIOC_G_PARAMS, &bparm) < 0) … … 1748 1758 1749 1759 recording = false; 1750 1760 close(fd); 1761 #endif // !USING_MINGW 1751 1762 } 1752 1763 1753 1764 int NuppelVideoRecorder::SpawnChildren(void) … … 2647 2658 2648 2659 void NuppelVideoRecorder::doVbiThread(void) 2649 2660 { 2661 #ifndef USING_MINGW 2650 2662 //VERBOSE(VB_IMPORTANT, LOC + "vbi begin"); 2651 2663 struct VBIData vbicallbackdata; 2652 2664 struct vbi *pal_tt = NULL; … … 2793 2805 cc_close(ntsc_cc); 2794 2806 2795 2807 //VERBOSE(VB_RECORD, LOC + "vbi end"); 2808 #endif // !USING_MINGW 2796 2809 } 2797 2810 2798 2811 -
libs/libmythtv/libmythtv.pro
581 581 DEFINES += USING_D3D 582 582 583 583 HEADERS += videoout_d3d.h 584 SOURCES -= NuppelVideoRecorder.cpp585 584 SOURCES += videoout_d3d.cpp 586 585 587 586 LIBS += -lpthread