Opened 10 years ago

Closed 8 years ago

#6597 closed patch (Fixed)

win32 patches for backend, HDHR, datadirect, transcode

Reported by: Jeff Lu <jll544@…> Owned by: markk
Priority: minor Milestone: 0.25
Component: Ports - Windows Version: head
Severity: medium Keywords: win32 backend hdhr
Cc: stuartm Ticket locked: no

Description

The attached patches enable core backend functionality for win32. With these applied, a windows backend can scan channels and record from an HDHomeRun, download listings from SchedulesDirect?, and transcode recordings. There are still bugs, no doubt, but I have run the port as both standalone and slave backends with good results. There are four patches:

backend-win32.patch - allows mythtv-setup to detect backend running, fixes creation of temp directories, enables mythsystem calls to get exit codes, and fixes recording file corruption.

hdhr-win32.patch - minor updates to allow HDHR support to compile and run on win32.

datadirect-win32.patch - various updates to handle windows command line syntax.

transcode-win32.patch - enable mythtranscode to compile on win32, use QFile for file renaming (MinGW's own routines don't seem to handle filename extensions > 3 chars), and extend the existing hacks to prevent files being open after the transcode finishes.

Attachments (11)

6597-backend-win32.patch (2.4 KB) - added by Jeff Lu <jll544@…> 10 years ago.
6597-hdhr-win32.patch (4.4 KB) - added by Jeff Lu <jll544@…> 10 years ago.
6597-datadirect-win32.patch (3.2 KB) - added by Jeff Lu <jll544@…> 10 years ago.
6597-transcode-win32.patch (6.2 KB) - added by Jeff Lu <jll544@…> 10 years ago.
6597-backend-win32.2.patch (3.2 KB) - added by Jeff Lu <jll544@…> 10 years ago.
Replaces previous patch; uses explicit paths; adds mythsocket fix
6597-datadirect-win32.2.patch (2.3 KB) - added by Jeff Lu <jll544@…> 10 years ago.
Replaces previous DD patch; simplified to use QStrring.replace
6597-datadirect-win32.3.patch (2.3 KB) - added by Jeff Lu <jll544@…> 10 years ago.
Oops - Ignore previous DD patches. This is the right one.
6597-transcode-win32.2.patch (8.9 KB) - added by Jeff Lu <jll544@…> 10 years ago.
Replaces previous transcode patch; adds fixes for corruption and unclosed filedescriptor for lossless MPEG2
6597-hdhr-win32.2.patch (4.4 KB) - added by Jeff Lu <jll544@…> 10 years ago.
Updated to r20837
6597-backend-win32.3.patch (3.2 KB) - added by Jeff Lu <jll544@…> 10 years ago.
Updated to r21056
6597-hdhr-win32.3.patch (4.5 KB) - added by Jeff Lu <jll544@…> 10 years ago.
Updated to r21056

Download all attachments as: .zip

Change History (22)

Changed 10 years ago by Jeff Lu <jll544@…>

Attachment: 6597-backend-win32.patch added

Changed 10 years ago by Jeff Lu <jll544@…>

Attachment: 6597-hdhr-win32.patch added

Changed 10 years ago by Jeff Lu <jll544@…>

Attachment: 6597-datadirect-win32.patch added

Changed 10 years ago by Jeff Lu <jll544@…>

Attachment: 6597-transcode-win32.patch added

comment:1 Changed 10 years ago by davidbuzz@…

HI Jeff, visual review of these looks good!.

some possible improvements might include:

backend patch relies on the %PATH% being set correctly. If a unix/mingw/msys/cygwin find.exe command is in the path before the default windows one, then this breaks the backend code supplied. may I suggest full path definition of %SystemRoot?$/System32/find.exe be used.

From memory, I thin a lot of win32 code in mythtv uses #ifdef _WIN32 instead of #ifdef USING_MINGW. No biggie either way, I'm just thinking of standardising on one of them

A lot of single Vs double quoting issues - unix = ' windows = \" Perhaps using a QString.replace finction to convert single quote to backquoted double quotes on-the-fly on windows only might be more future-proof.?

str.replace(QString("'"), QString("
"")); (or similar )

A bunch of functions in NuppelVideoRecorder?.cpp are basically a no-op under mingw. Rather than #ifndef USING_MINGW inside all these functions, maybe you could supply these MINGW versions as a separate implementation, or move the null-op-mingw-versions to the end of the file? not sure.hhmmmm.

like I said though, the rest of it looks good from here ( untested). Buzz.

Changed 10 years ago by Jeff Lu <jll544@…>

Attachment: 6597-backend-win32.2.patch added

Replaces previous patch; uses explicit paths; adds mythsocket fix

Changed 10 years ago by Jeff Lu <jll544@…>

Replaces previous DD patch; simplified to use QStrring.replace

comment:2 Changed 10 years ago by Jeff Lu <jll544@…>

Thanks to David for the good suggestions. I've attached a couple revised patches: Backend patch now uses full paths and adds a new fix for mythsocket not setting socket buffer size for incoming connections. Also, the datadirect patch is now much simpler by using string replace.

For now, I've left the #ifdef's alone, as I seem to be seeing USING_MINGW more often in the code than _WIN32. I agree it would be best to standardize on one, though.

Changed 10 years ago by Jeff Lu <jll544@…>

Oops - Ignore previous DD patches. This is the right one.

Changed 10 years ago by Jeff Lu <jll544@…>

Replaces previous transcode patch; adds fixes for corruption and unclosed filedescriptor for lossless MPEG2

Changed 10 years ago by Jeff Lu <jll544@…>

Attachment: 6597-hdhr-win32.2.patch added

Updated to r20837

Changed 10 years ago by Jeff Lu <jll544@…>

Attachment: 6597-backend-win32.3.patch added

Updated to r21056

Changed 10 years ago by Jeff Lu <jll544@…>

Attachment: 6597-hdhr-win32.3.patch added

Updated to r21056

comment:3 Changed 10 years ago by markk

Component: MythTV - GeneralPorts - Windows
Milestone: unknown0.22
Owner: changed from Isaac Richards to markk
Status: newaccepted

comment:4 Changed 10 years ago by markk

(In [21543]) win32 fixes for mythbackend and hdhomerun support. Refs #6597. Not extensively tested but I have encountered no obvious MythTV issues setting up a backend on Vista using a dvb-t hdhomerun. N.B. For some reason Vista does not ask if you want to allow mythtv-setup through the firewall (as it does for the frontend and backend). I had to manually add it to get hdhomerun channel scanning working.

comment:5 Changed 10 years ago by stuartm

Cc: stuartm added

The datadirect patch is ok, but I'd like to see if we can't use httpcomms instead and remove the need for these platform specific fixes. If no-one wants to do that for 0.22 then we can use the patch for now and I'll look at it after the release.

comment:6 Changed 10 years ago by markk

(In [21545]) win32 fixes for the Schedules Direct code. Refs #6597. The wget dependancy will likely be removed for 0.23.

comment:7 Changed 10 years ago by markk

Milestone: 0.220.23

Push the last, uncommitted patch for mythtranscode to 0.23.

I'm getting numerous compilation issues and there are more general, unresolved issues related to PlayerContext? that need addressing first. As David noted, the numerous #ifdef's in NuppelVideoRecorder? should probably be handled more elegantly as well.

comment:8 Changed 9 years ago by markk

Milestone: 0.230.24

Push back (again) to 0.24

Jeff has stated that he is no longer maintaining the transcode patch but I'd rather not lose sight of it.

comment:9 Changed 9 years ago by markk

Milestone: 0.240.25

comment:10 Changed 9 years ago by stuartm

Milestone: 0.25

Milestone 0.25 deleted

comment:11 Changed 8 years ago by markk

Resolution: Fixed
Status: acceptedclosed

I can't see myself actually doing anything with the last transcode patch and it is relatively invasive, so marking as fixed for the other patches applied.

Note: See TracTickets for help on using tickets.