Opened 18 years ago

Closed 18 years ago

#1704 closed task (fixed)

Finish Freebox recorder

Reported by: mythtv@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: low Keywords:
Cc: laurent@… Ticket locked: no

Description

See ticket #1458.

I reformat the patch of laurent@….

This one should be conform to mythtv coding standard.

Moreover this patch does not introduces new nonconditional external dependencies. Those dependencies are only needed when you want the freebox support.

I also changed the patch, removing the need to alter the database schema. Indead having to configure the host is not that useful knowing that the URL to get the different channel is not configurable.

Attachments (11)

patch-freebox (38.9 KB) - added by mythtv@… 18 years ago.
FreeBox? support patch
patch.freebox.v1.15.9838.diff (44.8 KB) - added by mythtv@… 18 years ago.
patch.freebox.v1.17.9856.diff (44.2 KB) - added by mythtv@… 18 years ago.
The patch
patch.freebox.v1.23.9974.diff (48.0 KB) - added by laurent@… 18 years ago.
Patch against last SVN
patch.freebox.v1.23.10095.diff (46.3 KB) - added by mythtv@… 18 years ago.
Updated patch against r10095
1704-v1.patch (43.6 KB) - added by danielk 18 years ago.
updated patch
1704-v2.patch (43.5 KB) - added by danielk 18 years ago.
Fixes a few things in freebox recorder header
patch.freebox.v1.28.10247.diff (48.0 KB) - added by mythtv@… 18 years ago.
freebox.readme (1.5 KB) - added by mythtv@… 18 years ago.
Explains how to use it with VLC as a VOD server
patch.freebox.v1.29.10258.diff (47.7 KB) - added by mythtv@… 18 years ago.
fb-scan-v1.patch (19.5 KB) - added by danielk 18 years ago.
Basic "Channel Scanner" for freebox, this only downloads the channels, no verification is done.

Download all attachments as: .zip

Change History (32)

Changed 18 years ago by mythtv@…

Attachment: patch-freebox added

FreeBox? support patch

comment:1 Changed 18 years ago by anonymous

Severity: mediumlow

Changed 18 years ago by mythtv@…

comment:2 Changed 18 years ago by mythtv@…

New version of the patch :

  • allow to configure the url instead of just the host
  • fixed bug in live's callback
  • refactorings
  • upgraded to svn r9838

comment:3 Changed 18 years ago by mythtv@…

New version 1.17.9856 :

Changed 18 years ago by mythtv@…

The patch

comment:4 Changed 18 years ago by laurent@…

Hi,

This is laurent, the original writer of this patch. I saw you post a new patch this morning, removing the thread from FreeboxRecorder?. Have you done test on this modification.

When I Write the original patch, I was unable to make it work without using a separate thread, "has the env->taskScheduler().doEventLoop(&_abort_rtsp);" is a blocking function, and blocking in StartRecording? function, seems to block channel change & mythbackend normal processing of user interaction.

I also not understand the "while(!_abort_recording && Open())" loop in the StartRecording? as do_event_loop while block until the record finish !

I would like to have better coordination on the dev of this patch, as there is another patch from Mickaël, patch which is quite different from yours. Can you please tell us your email so we can talk of this.

Laurent.

comment:5 Changed 18 years ago by mythtv@…

Laurent : I'm not sure who you are talking to.

I'm the one that provide the first of the 3 patches. I did not provide the 2 others.

I'm quite open to discuss of this patch. My e-mail is mythtv@… (the one I register the patch with).

comment:6 Changed 18 years ago by mythtv@…

Hi, this is Mickaël,

I provided the two patches v1.15 & v1.17. They both contain the changes made on "configure" to avoid external dependencies. They do not contain the "hard-coded" url, but an oposite implementation : the url is configurable to allow "vlc hackers" to add their own streams.

The v1.17 patch (without aditional thread) works for me, but it still have problems when the channel names in the playlist.m3u and in the database are differents (backend was segfaulting with all versions prior to 1.17, and since 1.17 it "just" stop responding :-/ ).

I stop the discussion here and agree to continue in private email instead of "poluting" trac.

Mickaël.

comment:7 Changed 18 years ago by anonymous

Hello everybody,

I submit this new patch, thunks to Mickaël Remars & Benjamin Lerman who make a great work rewriting my original path. They do many changes, most important are :

  • Rework the patch to comply with mythtv coding standard.
  • Add conditional for external dependancies.
  • Review threads (remove useless threads) and add locks where they need.

Also, I would like to advice people interest in this patch that a new Web site is avaible at http://mythtv.clae.net. The site will be in sync with last version of the patch.

Laurent.

comment:8 Changed 18 years ago by danielk

(In [9966]) Fixes #1485. Refs #1704. Adds an MPEG1/MPEG2/MPEG4-AVC IP network recorder.

This is another contribution from the Queen of Canada and the good folks at CRC.

There are instructions in crcipnetworkrecorder.cpp on how to broadcast your own channel using vlc.

The MPEG4-AVC keyframe detection code is in DTVRecorder so it could be used by the DVBRecorder to generate a correct keyframe map for the UK HDTV trial streams.

Changed 18 years ago by laurent@…

Patch against last SVN

comment:9 Changed 18 years ago by anonymous

Hi Daniel,

We take a look to you patch (IP network recorder). This is an interesting work. I install it last weekend, and I would like to look to it closer, to see if the two patch can be merge, or something else. Mpeg4 would be interesting because our providers may decide in near futur to broadcast Hi-definition programs in mpeg4 in replacement of mpeg2.

There are few diffs between the two patch:

Your patch : Our patch :

  • Support Mpeg1/2/4. - Only Mpeg2 for now.
  • Must feed mythtv using vlc. - Can request the stream with RSTP server.
  • Basic channel support. - Try to map channel give by the box.

Also, you will find latest version of the patch, and other informations at http://mythtv.clae.net.

Laurent.

comment:10 Changed 18 years ago by danielk

Milestone: unknown
Version: head

Laurent, I'm not up to date on how your patch works. I just thought the CRC recorder would make a good reference point. If you can merge the recorders, all the better. The CRC recorder was made to support services like FreeBox?, but doesn't implement the freebox specific stuff.

And it is not my patch, it's from these people:

http://www.crc.ca/fr/html/crc/home/home

comment:11 Changed 18 years ago by Isaac Richards

Owner: changed from Isaac Richards to danielk

Changed 18 years ago by mythtv@…

Updated patch against r10095

Changed 18 years ago by danielk

Attachment: 1704-v1.patch added

updated patch

comment:12 Changed 18 years ago by danielk

Resolution: invalid
Status: newclosed

I took a look at the patch.

In particular I rewrote the FreeBoxChannel? code. It inherited from QObject which it shouldn't have. It didn't obey the 80 column limit. It didn't implement one of the SwitchToInput?() methods, IsOpen?() returned true even if it Open failed, and SetChannelByString?() didn't return false if it failed to find the channel in the list of valid channels.

There are a few things that need to be done.

I didn't fix many similar problems in FreeBoxRecorder? and FreeboxMediaSink?(). There is no mythtv-setup code to add a FreeBoxRecorder?. There is no signal monitor to determine if the media server is running and returning data. There is no 'channel scan' to add the channels fetched by FreeBoxChannel? to the DB. The livemedia library should be added to MythTV as libmythlivemedia, especially since the Live555 folks do not yet have any "make install" to install the headers and libraries in proper locations. Methods not implemented in base classes should have doxygen documentation. FreeboxRecorder? does nothing to filter the PAT/PMT, and runs video keyframe finding code on all the streams, not just the main video stream; see HDHRRecorder, FirewireRecorderBase?, HDTVRecorder or DVBRecorder for different approaches to this.

Reopen the ticket when the patch is ready.

Changed 18 years ago by danielk

Attachment: 1704-v2.patch added

Fixes a few things in freebox recorder header

Changed 18 years ago by mythtv@…

Changed 18 years ago by mythtv@…

Attachment: freebox.readme added

Explains how to use it with VLC as a VOD server

comment:13 Changed 18 years ago by mythtv@…

Changes since 1704-v2.patch :

  • 80 columns limit
  • fixed the mythtv-setup code to add a FreeboxRecorder?
  • fixed FreeboxChannel::Open() ( replaced InitializeInputs?() by InitializeInputs() )
  • fixed dbchecks.cpp (finished removal of freebox_mrl)
  • http downloads based on HttpComms? (from libmyth)
  • removed hacks on channel names
  • PAT/PMT filtering (based on the Firewire one)

comment:14 Changed 18 years ago by danielk

Milestone: unknown0.20
Resolution: invalid
Status: closedreopened

Changed 18 years ago by mythtv@…

comment:15 Changed 18 years ago by mythtv@…

New patch (1.29.10258) now uses libmythlivemedia (Refs #1980).

comment:16 Changed 18 years ago by danielk

(In [10281]) Closes #1985. Refs #1704. Some cleanups of the FreeBox? recorder code.

  • Due to an as-yet undiagnosed locking problem this reverts to caching the current channel info.
  • gcc 4.x needs some superflous braces to fool it into not to complaining about an assignment whose value we subsequently test.
  • One of the comments exceeded 80 chars after I moved a variable from one class to another to avoid the sharing of privates.

comment:17 Changed 18 years ago by danielk

Summary: Patch to use freebox set top box ADSL modem as a TV sourceFinish Freebox recorder
Type: patchtask

Needed:

  • Signal Monitor
  • Channel Scanner

comment:18 Changed 18 years ago by danielk

(In [10372]) Refs #1701. Refs #1704. Refs #1787. Adds recording profiles for recently added recorders, and makes RecordingProfile? show an appropriate set of options for these recorders.

Basically, the UI for enabling auto-transcoding for these recorders was not there.

comment:19 Changed 18 years ago by danielk

(In [10380]) Refs #1701. Refs #1704. Refs #1787. Makes dbcheck SQL from [10372] work with MySQL 4.0 and older which didn't support subqueries.

Changed 18 years ago by danielk

Attachment: fb-scan-v1.patch added

Basic "Channel Scanner" for freebox, this only downloads the channels, no verification is done.

comment:20 Changed 18 years ago by danielk

(In [10432]) Refs #1704. Adds Channel Scan to the FreeBox? recorder.

NOTE: You need to recompile your plugins after installing this. The "scanner" needed a small modification to httpcomms.h which is used by mythmovietime.

comment:21 Changed 18 years ago by danielk

Resolution: fixed
Status: reopenedclosed

(In [10434]) Fixes #1704. Refs #1648. Implements a very basic signal monitor class for the freebox recorder.

This tries once to connect to the streaming server and reports a lock if it succeeds. It then waits for a PAT and a PMT with a program number of 1.

Ideally we would try to reconnect if the connection failed the first time, and we would make rtspcomms.cpp a little more efficient.

This also adds "-v record" debugging to the freebox recorder. When I was testing I found some problems with handling error conditions. I think these are all fixed, but the additional debugging should make any additional problems easier to track down.

BTW The freebox recorder will work with any Internet TV station broadcasting a TS MPEG2 stream using RTSP. You just need to create a m3u file as described the readme on ticket #1704. H.264 (aka MPEG-4 AVC) support could be added without much work, if there is any interest in it.

Note: See TracTickets for help on using tickets.