[mythtv] [patch] mythtranscode minor patch

Craig Longman craigl at begeek.com
Wed Jun 4 04:31:12 EDT 2003


this patch just does three things:
1) although the new parm stuff seems to work well, it was still the 
values found with arg[1], arg[2] and arg[3] (the old way of doing it)
2) added passing the database and the program info objects to the 
nupplevideoplayer so that the cutlist, etc. can be loaded.
3) calls the ProgramInfo::GetProgramFromRecorded() as i think was 
discussed doing on this list.  i honestly don't remember if this was the 
final thing decided, but most of the programs i'm trying to reencode 
aren't in the programs table anymore, and this got it working for me.

cheers,

    CraigL->Thx();

-------------- next part --------------
Index: main.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythtranscode/main.cpp,v
retrieving revision 1.3
diff -d -u -r1.3 main.cpp
--- main.cpp    2 Jun 2003 01:37:05 -0000       1.3
+++ main.cpp    4 Jun 2003 07:20:43 -0000
@@ -90,10 +90,6 @@
          return -1;
     }

-    chanid = a.argv()[1];
-    starttime = a.argv()[2];
-    profilename = a.argv()[3];
-
     db = QSqlDatabase::addDatabase("QMYSQL3");
     if (!db)
     {
@@ -117,7 +113,7 @@
     }

     QDateTime startts = QDateTime::fromString(starttime, Qt::ISODate);
-    ProgramInfo *pginfo = ProgramInfo::GetProgramAtDateTime(chanid, startts);
+    ProgramInfo *pginfo = ProgramInfo::GetProgramFromRecorded(chanid, startts.toString("yyyyMMddhhmm00"));

     if (!pginfo)
     {
@@ -131,7 +127,7 @@
     tmpfile += ".tmp";

     StoreTranscodeState(pginfo, 1);
-    NuppelVideoPlayer *nvp = new NuppelVideoPlayer;
+    NuppelVideoPlayer *nvp = new NuppelVideoPlayer( db, pginfo );

     cout << "Transcoding from " << infile << " to " << tmpfile << "\n";


More information about the mythtv-dev mailing list