Howdy!

Revision 52 of the libiec61883 trunk made a change in the declarations
of iec61883_cmp_connect/reconnect/disconnect(), which are used in
libs/libmythtv/firewirerecorder.cpp.  These functions now take two more
parameters - the input and output plugs to be used.  Passing a -1 for
the plug values to iec61883_cmp_connect results in the library picking
available plugs and then returning the ones it used.

That seemed like the proper behavior, so attached is a small patch which
adds fwoplug and fwiplug members to the FirewireRecorder class,
initializes them to -1 in the constructor, and then passes them to the
iec61883_cmp_* functions accordingly.

It may not be the right time to apply this however, since this will make
the requirement for compiling with firewire support at least rev 52 of
the libiec61883 svn tree and libraw1394 >= 1.2.0 (just released to help
prepare for the first libiec61883 release).

-- 
Nathan Poznick <[EMAIL PROTECTED]>

"Education...has produced a vast population able to read but unable to
distinguish what is worth reading." -- George Macaulay Trevelyan

Index: libs/libmythtv/firewirerecorder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/firewirerecorder.cpp,v
retrieving revision 1.2
diff -u -r1.2 firewirerecorder.cpp
--- libs/libmythtv/firewirerecorder.cpp 8 Feb 2005 07:35:43 -0000       1.2
+++ libs/libmythtv/firewirerecorder.cpp 20 Feb 2005 22:06:55 -0000
@@ -39,18 +39,18 @@
     fwhandle = NULL;
     fwmpeg = NULL;
     fwfd = -1;
-           
+    fwoplug = -1;
+    fwiplug = -1;
 }
 
 FirewireRecorder::~FirewireRecorder() {
-
     if(isopen) {
         VERBOSE(VB_GENERAL,QString("FireWire: releasing iec61883_mpeg2 
object"));
         iec61883_mpeg2_close(fwmpeg);
         if(fwchannel > -1) {
               VERBOSE(VB_GENERAL,QString("FireWire: disconnecting channel 
%1").arg(fwchannel));
-             iec61883_cmp_disconnect (fwhandle, fwnode | 0xffc0,
-                   raw1394_get_local_id (fwhandle), fwchannel, fwbandwidth);
+             iec61883_cmp_disconnect (fwhandle, fwnode | 0xffc0, fwoplug,
+                   raw1394_get_local_id (fwhandle), fwiplug, fwchannel, 
fwbandwidth);
         }
         VERBOSE(VB_GENERAL,QString("FireWire: releasing raw1394 handle"));
         raw1394_destroy_handle(fwhandle);
@@ -74,8 +74,8 @@
          return false;
      }
 
-     fwchannel = iec61883_cmp_connect (fwhandle, fwnode | 0xffc0,
-                        raw1394_get_local_id (fwhandle), &fwbandwidth);
+     fwchannel = iec61883_cmp_connect (fwhandle, fwnode | 0xffc0, &fwoplug, 
+                        raw1394_get_local_id (fwhandle), &fwiplug, 
&fwbandwidth);
 
      if(fwchannel > -1) {
        VERBOSE(VB_GENERAL,QString("FireWire: Created Channel: %1, Bandwidth 
Allocation: %2").arg(fwchannel).arg(fwbandwidth));
Index: libs/libmythtv/firewirerecorder.h
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/firewirerecorder.h,v
retrieving revision 1.1
diff -u -r1.1 firewirerecorder.h
--- libs/libmythtv/firewirerecorder.h   2 Feb 2005 07:11:10 -0000       1.1
+++ libs/libmythtv/firewirerecorder.h   20 Feb 2005 22:06:55 -0000
@@ -41,6 +41,8 @@
     nodeid_t fwnode;
     raw1394handle_t fwhandle;
     iec61883_mpeg2_t fwmpeg;
+    int fwoplug;
+    int fwiplug;
     bool isopen;
     time_t lastpacket;
     TSPacket tpkt;

Attachment: signature.asc
Description: Digital signature

_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to