Opened 13 years ago

Closed 11 years ago

#2096 closed enhancement (wontfix)

Mac OS X Plextor ConvertX USB Video Capture support

Reported by: awk@… Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords: OSX GO7007 Capture
Cc: nigel@… Ticket locked: no

Description

With mythbackend now building and running on Mac OS X, and the work done to enable Firewire capture support from Settop Boxes it should now be possible to expand support for other Capture devices.

The ConvertX box from Plextor is already sold as a 'macintosh compatible' device (meaning it comes with EyeTV which supports it), there are also already available opensource Linux USB drivers for this device. It should be possible to work with the linux code to establish basic support (a la Linux) for this device (and possibly other GO7007 based USB devices).

Attachments (1)

configure.diff (2.0 KB) - added by awk@… 13 years ago.
patch to top level configure to enable Mac OS X GO7007 support

Download all attachments as: .zip

Change History (9)

comment:1 Changed 13 years ago by Isaac Richards

Resolution: invalid
Status: newclosed

Trac is not for external feature requests.

comment:2 Changed 13 years ago by awk@…

Keywords: GO7007 Capture added; media monitor mtd removed

I actually have initial code working for this task. It's still rather early days but it is capable of watching live tv in mythfrontend (and recording for subsequent replay).

At this point there's no audio support (I have test code for audio that works but I haven't yet integrated it into myth), the system is also a little 'fragile' in that due to some initialization issues the ConvertX box needs to be reset before mythbackend is launched after a previous successful run. Both these issues are on my list to be fixed shortly.

The changes made so far are 'modest' with some additional code in NuppelVideoRecorder?, cardutil, videosource, jobqueue, channelbase and the configure script. There are also 5 (or so) additional files for the new functionality in the libs/libmythtv folder. The implementation uses V4L2 as a model but it is NOT a reimplementation of V4L2 for Mac OS X, this code is really only enough at this point to get the GO7007 driver working. Other USB capture devices are feasible if the specs/docs are available but a PCI based card would not work with this approach due to needing kernel space support on Mac OS X to access the PCI bus.

What's the best mechanism for attaching my work to this ticket now and as it progresses ? I can create a zip archive of the svn diffs and new files as one attachment and revise that each time, or I can attach the individual diffs and new files (though that would be a lot of attachments - probably nearly 15 or 20 given the headers etc.)

Isaac - is it appropriate to reopen the ticket on this basis ?

comment:3 Changed 13 years ago by Isaac Richards

Only reopen when you have a final patch ready to apply. Use the dev mailing list otherwise.

comment:4 Changed 13 years ago by awk@…

Resolution: invalid
Status: closedreopened
Type: taskpatch

In addition to the attached configure patch you need the tar archive of the patches and new files for libs/libmythtv required from :

http://www.awkward.org/downloads/darwin-go7007.tar.gz

This is quite a bit of new code - the patches to current source files are :

NuppelVideoRecorder?.cpp.diff cardutil.h.diff videodev2_myth.h.diff NuppelVideoRecorder?.h.diff libmythtv.pro.diff videosource.cpp.diff cardutil.cpp.diff tv_rec.cpp.diff

I can upload all these individually - but that seems overkill for trac, especially if I have to keep making changes.

There are also a number of new files to support the hardware (including some firmware files from the original linux project that are copied to /usr/local/lib/mythtv/firmware)

I've been using the patch for a while without any real problems, and I don't believe I've broken anything for Linux/V4L/GO7007 users, however it's possible that one of my ifdef's is misplaced.

Some other notes on the patch - it's only been tested with the TV402 device (with the tuner) it probably works with the 'non-tuner' version but it may well need some tweaks. It's feasible to make it work with other GO7007 based (non-Plextor) devices, but more work will probably be required (and I don't have anything else for testing).

The implementation 'parallels' the V4L api's (reusing the same ioctls for example) - this isn't the cleanest approach but it does make the integration with myth simpler and 'more obvious'. In time I'd like to do away with that approach and move to something a little more straightforward and more 'C++' like. This code may also serve as a model for other people looking to integrate other hardware on the Mac for which V4L devices already exist.

A final note for 'new Mac OS X Backend users' - you need to configure your viewing profiles for this device after you've added it to the list of devices on the backend. This stumped me for a bit until I realised that Linux is the same way !

Changed 13 years ago by awk@…

Attachment: configure.diff added

patch to top level configure to enable Mac OS X GO7007 support

comment:5 Changed 13 years ago by Isaac Richards

Did a quick once-over of the patch:

  • I'm not very comfortable with the amount of ifdefs in there. Some refactoring into other classes would probably be significantly cleaner.
  • I'm even more unsure about including the driver & firmware in the mythtv source/build process. Seems rather odd to me.
  • Please don't make tarballs that extract into the current directory.
  • svn diff will create diffs for all changed files, you don't have to make separate patches for each file.

comment:6 Changed 13 years ago by danielk

Milestone: unknown
Owner: changed from Isaac Richards to danielk
Status: reopenednew
Type: patchenhancement
Version: head

comment:7 Changed 11 years ago by Dibblah

Status: newassigned

comment:8 Changed 11 years ago by danielk

Resolution: wontfix
Status: assignedclosed

Problematic code for old device that seems to have been abandoned by it's author...

Note: See TracTickets for help on using tickets.