[mythtv] [patch] tiny fix for multiple pchdtv cards

sbower at cisco.com sbower at cisco.com
Sun Nov 2 11:58:54 EST 2003


Howdy folks,

This patch moves the hdtv recording buffer from a static (cross-instance)
buffer to a member of the HDTVRecorder class.  It allows two recordings
to happen without stepping all over each other...  :-)

I also renamed BUFFER_SIZE to HD_BUFFER_SIZE, since there are several other
*_BUFFER_SIZE constants already.

If this isn't the right solution, then hopefully it'll at least prod
Doug and/or Jason to do the Right Thing.  :-)

  Thanks,
    Steve.
-------------- next part --------------
Index: libs/libmythtv/hdtvrecorder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/hdtvrecorder.cpp,v
retrieving revision 1.9
diff -u -r1.9 hdtvrecorder.cpp
--- libs/libmythtv/hdtvrecorder.cpp	1 Nov 2003 18:08:35 -0000	1.9
+++ libs/libmythtv/hdtvrecorder.cpp	2 Nov 2003 16:50:24 -0000
@@ -61,10 +61,7 @@
 #include "../libavformat/mpegts.h"
 }
 
-//#define BUFFER_SIZE 4096
-//#define BUFFER_SIZE 256001
-#define BUFFER_SIZE 255868
-#define PACKETS (BUFFER_SIZE / 188)
+#define PACKETS (HD_BUFFER_SIZE / 188)
 
 #define SYNC_BYTE 0x47
 
@@ -132,8 +129,6 @@
         return;
     }
 
-    static uint8_t buffer[BUFFER_SIZE];
-
     if (!SetupRecording())
     {
         cerr << "HD Error initializing recording\n";
Index: libs/libmythtv/hdtvrecorder.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/hdtvrecorder.h,v
retrieving revision 1.7
diff -u -r1.7 hdtvrecorder.h
--- libs/libmythtv/hdtvrecorder.h	1 Nov 2003 18:08:35 -0000	1.7
+++ libs/libmythtv/hdtvrecorder.h	2 Nov 2003 16:50:24 -0000
@@ -81,6 +81,8 @@
 
     int lowest_video_pid;
     int video_pid_packets;
+#define HD_BUFFER_SIZE 255868
+    unsigned char buffer[HD_BUFFER_SIZE];
 };
 
 #endif


More information about the mythtv-dev mailing list