[mythtv] Refactored OSX backend firewire patch
Jim Westfall
jwestfall at surrealistic.net
Tue Jan 10 02:48:07 UTC 2006
Jim Westfall <jwestfall at surrealistic.net> wrote [01.09.06]:
> David Abrahams <dave at boost-consulting.com> wrote [01.09.06]:
> >
> > I've tried to address Isaac's code structure concerns by factoring out
> > the common parts of firewire support for MacOS and linux.
> > Unfortunately, not having a Linux MythTV installation here it surely
> > means I've broken something. I'd be indebted if someone using
> > firewire on Linux could test this patch.
> >
>
> attached patch fixs some compile errors on the linux side. I will have
> to wait till I get home to test that its functioning correctly.
>
> jim
Here is an updated version, fixes a double free() issue. Recording and
channel change are functioning fine for me.
jim
-------------- next part --------------
diff -ur mythtv.old/libs/libmythtv/firewirechannelbase.cpp mythtv/libs/libmythtv/firewirechannelbase.cpp
--- mythtv.old/libs/libmythtv/firewirechannelbase.cpp 2006-01-09 14:00:19.000000000 -0800
+++ mythtv/libs/libmythtv/firewirechannelbase.cpp 2006-01-09 17:31:33.000000000 -0800
@@ -57,6 +57,7 @@
{
if (this->isopen)
CloseFirewire();
+ this->isopen = false;
}
bool FirewireChannelBase::SwitchToInput(const QString &input, const QString &chan)
diff -ur mythtv.old/libs/libmythtv/firewirerecorder.cpp mythtv/libs/libmythtv/firewirerecorder.cpp
--- mythtv.old/libs/libmythtv/firewirerecorder.cpp 2006-01-09 14:00:19.000000000 -0800
+++ mythtv/libs/libmythtv/firewirerecorder.cpp 2006-01-09 14:54:23.000000000 -0800
@@ -108,7 +108,7 @@
this->no_data_message("time");
}
-void FirewireRecorder::no_data_message(char const* id)
+void FirewireRecorder::no_data_message(char const* id) const
{
VERBOSE(
VB_IMPORTANT,
diff -ur mythtv.old/libs/libmythtv/firewirerecorder.h mythtv/libs/libmythtv/firewirerecorder.h
--- mythtv.old/libs/libmythtv/firewirerecorder.h 2006-01-09 14:00:19.000000000 -0800
+++ mythtv/libs/libmythtv/firewirerecorder.h 2006-01-09 16:12:32.000000000 -0800
@@ -8,6 +8,9 @@
#define FIREWIRERECORDER_H_
#include "firewirerecorderbase.h"
+#include <libraw1394/raw1394.h>
+#include <libiec61883/iec61883.h>
+
#define FIREWIRE_CONNECTION_P2P 0
#define FIREWIRE_CONNECTION_BROADCAST 1
@@ -29,19 +32,13 @@
fwchannel(-1), fwspeed(-1), fwbandwidth(-1),
fwfd(-1), fwconnection(FIREWIRE_CONNECTION_P2P),
fwoplug(-1), fwiplug(-1), fwmodel(""), fwnode(0),
- fwhandle(NULL), fwmpeg(NULL),
+ fwhandle(NULL), fwmpeg(NULL), isopen(false)
{;}
~FirewireRecorder() { this->Close(); }
- void StartRecording(void);
bool Open(void);
void ProcessTSPacket(const TSPacket &tspacket);
- void SetOptionsFromProfile(RecordingProfile *profile,
- const QString &videodev,
- const QString &audiodev,
- const QString &vbidev);
-
void SetOption(const QString &name, const QString &value);
void SetOption(const QString &name, int value);
QString FirewireSpeedString(int speed);
diff -ur mythtv.old/libs/libmythtv/firewirerecorderbase.h mythtv/libs/libmythtv/firewirerecorderbase.h
--- mythtv.old/libs/libmythtv/firewirerecorderbase.h 2006-01-09 14:00:19.000000000 -0800
+++ mythtv/libs/libmythtv/firewirerecorderbase.h 2006-01-09 15:25:08.000000000 -0800
@@ -4,8 +4,8 @@
* Distributed as part of MythTV under GPL v2 and later.
*/
-#ifndef FIREWIRERECORDER_H_
-#define FIREWIRERECORDER_H_
+#ifndef FIREWIRERECORDERBASE_H_
+#define FIREWIRERECORDERBASE_H_
#include "dtvrecorder.h"
#include "mpeg/tspacket.h"
More information about the mythtv-dev
mailing list