Opened 20 years ago
Closed 20 years ago
Last modified 19 years ago
#368 closed patch (fixed)
Teletext patch for DVB/IVTV cards
Reported by: | Frank Muenchow (beebof -at- gmx dot de) | Owned by: | danielk |
---|---|---|---|
Priority: | minor | Milestone: | 0.20 |
Component: | mythtv | Version: | 0.20 |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
Here you can find a patch for displaying teletext with ivtv and dvb cards. (against r7297):
http://mitglied.lycos.de/beebof/myth.html
Note that this patch for the "analogue" teletext (as defined in ETSI EN 300 706).
Important! This patch breaks the definition of TOGGLECC (Toggle CC / Toggle Teletext). My intention was to recognize automatically what type of card is used (ivtv/dvb or another) but I actually don't know how to realize that and even if I would, I couldn't test, because I only have a DVB card.
Thanks to Martin Barnasconi who did the initial patch for IVTV cards.
Attachments (17)
Change History (52)
by , 20 years ago
Attachment: | mythtv_teletext_20050923.tar.bz2 added |
---|
by , 20 years ago
Attachment: | mythdvb_teletext.tbz added |
---|
comment:1 by , 20 years ago
Milestone: | → 0.20 |
---|---|
Owner: | changed from | to
Severity: | medium → low |
Status: | new → assigned |
Type: | enhancement → patch |
Version: | → head |
I've fixed a few things in the patch, but it still needs some care.
First, you can't inherit two QObject's, nor can you use virtual inheritance for the QObject. So I've disabled the signals and slots in the TeletextView class. The affected areas are marked with "FIXME" ifdef's. Try to just use direct calls when possible, it is too easy to make mistakes like this with Qt signals.
There was also a logic error in one of the switch statements because you didn't use bracing for the loops, and then commented out the statement, so it put the next couple case's inside the loops. This is fixed.
Also no TAB characters are allowed... this messes up the formatting of the patches and makes them harder to read. I think I got rid of most of them.
For the ivtv/dvb/other test look at TV::GetLockTimeout(), if you replace the query with "SELECT cardtype FROM capturecard WHERE cardid = :CARDID" then you will have the card type.
Part of the mpegts.c patch was rejected, and I didn't know what you were doing so please look at that.
comment:2 by , 20 years ago
Oh, and please doxygen document all the new methods, classes, and variables. Thx.
comment:3 by , 20 years ago
Looks good, but I don't think I'll be able to review this fully before 0.19.
But on a cursory review it looks ok. I did some renaming of functions and added some const correctness. The only thing you really have to look at is the variables at the end of VBIDecoder. These were global and I made them instance variables.
Also what version of ivtv is needed to test this? I noticed you changed the VBI encoding for ivtv. What was the problem with the existing encodings? My hope was that old recordings would have decodable captions...
comment:4 by , 20 years ago
I downloaded this patch (mythtv_teletext_20050923.tar.bz2) and applied to revision 7827 (as shown in the patch file). It applies OK, Myth compiles OK, but on trying to see subtitles, I get nothing at all. Maybe it is something related to the ivtv driver version, because I get some error in the myth console output saying that it was not able to record (not sure about the exact word used) VBI. I use the stable release 0.4 of ivtv driver, with a Hauppage PVR-250 card. There is something I can try? Which version of ivtv driver did you use? Maybe it is another key to access teletext (not "T")? Thanks. Joaquin.
comment:5 by , 20 years ago
I don't know if it works with ivtv cards (I don't have one), but I know that it had worked, and I didn't change anything of the encoding/decoding part for ivtv cards. Maybe, somebody with an ivtv card could test it again?
Joaquin: Teletext should start with your key for "TOGGLECC" (normally T) - then, you should see either the teletext start page or (if no data is present) "teletext page unavailable".
comment:6 by , 20 years ago
More testing with IVTV (version 0.4.0). Two cards (250 and 350) are set up with VBI device /dev/vbi0 and /dev/vbi1.
During recording, mythbackend spits out some:
vbi: Invalid argument
mythfrontend doesn't report anything relevant even with the vbi verbose flag. With one of the cards recording i got a "Teletext page unavailable" when hitting T.
If i cat /dev/vbi0 during recording I get alot of data, allthough nothing on vbi1..
comment:7 by , 20 years ago
Also just found this in dmesg:
ivtv0 warning: Starting VBI after starting an encoding, seems to not work.
comment:8 by , 20 years ago
I've tryed the patch before a few days, but i can't view a few of my recordings after that, myth quitts with a segfault!
comment:9 by , 20 years ago
comment:10 by , 20 years ago
comment:11 by , 20 years ago
Wanted to try this out, but I get the following in the backend log:
2005-12-12 12:20:56.254 Can't enable VBI recording (2) vbi: Invalid argument
This is with ivtv 0.4.0
comment:13 by , 20 years ago
More of Frank Muenchow's patch.
This adds decoding for field 2 w/ivtv, so we can now decode XDS. XDS tells you about the channel, program name, V-Chip, time, etc.
This also adds decoding for VPS and WSS; these are printed out when you run with '-v vbi'. The VPS info would of course be more useful on the backend, but that is left as an exersize for people in PAL land. The WSS info could be very useful on the frontend as it tells you the aspect ratio of analog transmissons...
comment:14 by , 20 years ago
updated patch
Decoding and caching should work like requested. OSDTypeTeletext::PageUpdated() and OSDTypeTeletext::HeaderUpdated() segfaults - I don't know why yet (I'm not very familiar in OSD Programming) - maybe somebody take a look on this :)
And: I cannot test the IVTV part - but it *should* work.
by , 20 years ago
Attachment: | osdsurface.diff added |
---|
adds protection to the usedRegions to make it thread safe
comment:15 by , 20 years ago
The osdsurface patch fixes the regular segfaults in PageUpdated() and HeaderUpdated() when using the teletext patch.
Something seems to be broken with the last teletext patch in the page caching. The headers are all being cached ok but the rest of the page is either missing completely (just a black background) or there are a few lines at the top with the lines below missing. The v3 patch didn't have this problem so the reorganising has changed something. I'm using the IVTV driver.
comment:16 by , 20 years ago
paulh, I believe that code is commented out in v3, I sent Frank Muenchow an e-mail with the info on the things that are broken. If you want to work on this contact him directly, he didn't have much time the last time I e-mailed him (before X-Mas), but he may have more time now.
comment:17 by , 20 years ago
paulh, your patch works fine. :)
I've attached the newest patch - with some changes in AddTeletextData. Please try it - hopefully, it will work now.
comment:19 by , 20 years ago
Hey All
I have try the mythtv_teletext.tar.2.bz2 (against 8930) on Canal Digital Nordig and it works :-) but I get “NVP: prebuffering pause” on the frontend :-(
/Mark
comment:20 by , 20 years ago
I am also experiencing frontend crashes with the new teletext patch applied (“NVP: prebuffering pause”). I'm using svn 8730. Great work though! I have been using your old patch since this summer and it has helped me countless times while watching asian moviews.
/Peter
comment:21 by , 20 years ago
updated patch including changes from Paul H.
Changes (most of them by Paul H. - thanks!): It determines the stream type and adds it only if it's teletext (reference: Changeset 8517).
Resets the page cache when changing channel.
Fix the drawing of the header only the last 32 characters are printable unlike other rows where 40 characters are printable.
Only draw the header for pages that are in the current magazine and try to only update the page when necessary to try to reduce flicker.
Add a status line above the header that shows available subpages or an error message like "Page Not Available".
Make moving to the next/previous page and subpage a little smarter.
Update SetBackgroundColor() to accept TTColor::TRANSPARENT used by the subtitle and news flash stuff.
Update DrawLine() to use the 'start box' and 'end box' codes used by subtitle pages. Not quite working 100% right yet.
Add support for the reveal function used by some teletext pages that hide the answers to a quiz until you press the reveal key.
Add some defines for the page flags.
Change a lot of tabs to spaces to make the source more in line with the rest of myth.
A few fixes to the Fast Text stuff. (not working 100% yet)
Other fixes I have forgot about.
comment:22 by , 20 years ago
Type: | patch → task |
---|
Just for completing my attachement. I got segmentation fault when I activating second instance of teletext viewing (LiveTV -> Teletext on -> Teletext off -> channel change -> Teletext on = segmentation fault). I'm trying to dig into this myself, but any shortcuts are welcome...
comment:23 by , 20 years ago
comment:24 by , 20 years ago
(In [9040]) References #368. Adds DVB Teletext decoder by applying patch.
This adds DVB Teletext decoding to MythTV.
To enable just press 'T' when watching a DVB recording. F2 -> F6 switches between colored menus, and F12 reveals hidden text.
I'm not closing the ticke because I only have a couple test streams to test this with, and I've fixed a couple segfaults... But since this unstability is only exposed when you enable this previously unimplemented feature, I'm applying to SVN now.
Please attach any DVB Teletext crash backtraces to #368 for Frank and me to look at.
by , 20 years ago
Attachment: | processdvbdatapacket.diff added |
---|
Patch to handle data_unit for stuffing without hitting VERBOSE(...)
comment:25 by , 20 years ago
Attached a bt of teletext with ivtv. Sometimes works a couple of page changes, sometimes dies at once..
by , 20 years ago
Attachment: | teletext.diff added |
---|
fixes problems with doubleheighted characters / teletext key bindings
comment:26 by , 20 years ago
Attached a patch that fixes a possible problem with displaying doubleheighted characters. (hopefully)
Also adds Teletext keybindings. You have to delete the "TV Playback" keybindings for MENURED, MENUGREEN, MENUYELLOW, MENUBLUE, MENUWHITE and REVEAL as they are not used anymore.
comment:27 by , 20 years ago
It seems that [9291] breaks DVB teletext. To get it working again, apply the attached patch.
- I changed NVP->GetCaptionMode(): It's used to determine which type of caption is used - but textDisplayMode is set because of the result of this function - Daniel, please have a look at this, it may be dirty (and I only changed the TeletextMode A)
- The OSDTypeTeletext has to be initialized before the TV starts - because the decoded date in TeletextDecoder is passed to this and otherwise it doesn't work (and doesn't cache)
comment:28 by , 20 years ago
(In [9346]) References #368. Fixes a few problems with DVB/IVTV teletext decoder.
I have not re-enabled this decoder as the default decoder, when it is possible to run it. The code for doing this is in NVP::SetCaptionsEnabled(), but I commented it out on purpose in the last commit. First, because it doesn't decode captions (at least when you first enable it), and second because it is still very very unstable. But, this teletext decoder can be accessed by binding "NEXTCC" and pressing that key until you get past the subtitle streams.
comment:29 by , 20 years ago
The patch splits captions and teletext. You need to bind "TOGGLETT" to get teletext working.
comment:30 by , 20 years ago
Update my latest patch:
- enable teletext with "TOGGLETT"
- teletext captions are recognized and can be enabled in playback menu.
This is experimental! Please test and let me know if it works for you. Take a look at the frontend log with -v playback, you should get something like this when you have teletext captions:
2006-03-25 22:40:15.359 AFD: Teletext caption #4 is in the Finnish language on page 6 153.
comment:31 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:32 by , 20 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Attached a fix for teletext captions and teletext is jusdt called "Teletext", not "Teletext Menu" (at least here in Germany)
comment:33 by , 20 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:34 by , 19 years ago
Version: | head → 0.20 |
---|
comment:35 by , 19 years ago
Type: | task → patch |
---|
updated patch