Opened 14 years ago

Closed 13 years ago

Last modified 12 years ago

#1648 closed patch (fixed)

Firewire Recorder missing signal monitor (get's stuck)

Reported by: xris Owned by: jwestfall
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: yes

Description

I changed channels to a nonexistent firewire channel, and myth spit me back to the menu. However, it remembered that channel as the last one visited, so now I can't get back into live tv without manually editing the database.

Should probably wait for a successful channel change before updating cardinput.startchan to something that may not work.

Attachments (15)

firewire-sm-v10.patch (84.7 KB) - added by danielk 13 years ago.
Initial implementation of signal monitoring for Linux Firewire recorders.
firewire-sm-v14.patch (85.3 KB) - added by danielk 13 years ago.
Updated patch (fixes STB power issue)
firewire-sm-v15.patch (47.3 KB) - added by danielk 13 years ago.
Updated patch, I tried to remove the power state check when the signal monitor starts up to bad effect with my HD4200 in the last patch.
firewire-sm-v18.patch (87.6 KB) - added by danielk 13 years ago.
Updated patch, this monitors the PAT for changes so that we can short circuit the 5 second STB buffer flush.
firewire-sm-v21.patch (90.0 KB) - added by danielk 13 years ago.
Updated patch, adds locking to LinuxFirewireDevice? and restores auto-reset
firewire-sm-v28.patch (124.5 KB) - added by danielk 13 years ago.
Updated patch, better channel change detection + some refactoring
firewire-sm-v29.patch (175.3 KB) - added by danielk 13 years ago.
Updated version of patch
firewire-sm-v30.patch (176.3 KB) - added by danielk 13 years ago.
Update, fixes bug 3 in the last TODO
firewire-sm-v31.patch (176.7 KB) - added by danielk 13 years ago.
Fixes another bug, the Firewire recorder was tuning on the channum instead of the freqid
firewire-sm-v32.patch (177.5 KB) - added by danielk 13 years ago.
Updated patch fixes TODO 7 & fixes a problem with Motorolla channel changer
firewire-sm-v33.patch (177.2 KB) - added by danielk 13 years ago.
Updated to apply to latest SVN
firewire-sm-v36.patch (180.2 KB) - added by danielk 13 years ago.
Addresses TODO 2, adds Firewire Bus reset handlers for Linux & OSX
firewire-sm-v37.patch (180.4 KB) - added by danielk 13 years ago.
Fix for compilation with --disable-firewire
firewire-sm-v41.patch (185.5 KB) - added by danielk 13 years ago.
Adds self-resetting ability to OSX recorder, so it can recover after switching from a 5C channel.
1648-guid-timeout.patch (1.1 KB) - added by danielk 13 years ago.
Fix to avoid getting stuck when we can't get a devices GUID (untested).

Download all attachments as: .zip

Change History (50)

comment:1 Changed 14 years ago by anonymous

Agreed, This is also an issue in the UK where 'BBC THREE' (and such) doesn't transmit during daytime hours.

One nasty solution is to set a recording, then stop it - this will update the the cardinput.startchan.

I think a proper solution to this was made, but i don't know if it's in SVN Head.

comment:2 Changed 13 years ago by danielk

xris, there are some ways to reset this:

  • Start a recording on another channel with this recorder
  • Reset the start channel in mythtv-setup

But the real problem here is that there is no signal monitor for the firewire recorder, like we have most of the other digital recorders.

When there is a working signal monitor the start channel doesn't get set until we have seen data on the newly tuned channel. And if we do start on an off-air channel we can switch to another channel.

comment:3 Changed 13 years ago by danielk

(In [10434]) Fixes #1702. 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 #1702. H.264 (aka MPEG-4 AVC) support could be added without much work, if there is any interest in it.

comment:4 Changed 13 years ago by danielk

Milestone: 0.20
Owner: changed from Isaac Richards to jwestfall
Summary: No way to override "last channel" if it doesn't workFirewire Recorder missing signal monitor (get's stuck)

comment:5 Changed 13 years ago by jwestfall

Milestone: 0.200.21

comment:6 Changed 13 years ago by msebast

But the real problem here is that there is no signal monitor for the firewire recorder, like we have most of the other digital recorders.

Could signal monitoring be implemented by checking the file size of the recording? A zero byte file means the recording never started. If the file size stops growing that means the recording must have stopped. Ocasionaly checks the file size durring the recording process. If the file size stops growing then you know that the signal has stopped. Not sure if this would work, just my 2 cents...

comment:7 Changed 13 years ago by wilso027

This is just a temporary fix but when this happened to me you can change it in mythtv-setup so that the next time the frontend starts it goes to the new default channel.

comment:8 Changed 13 years ago by danielk

(In [12222]) Refs #1648. Extends signal monitoring flags from 32 bits to 64 bits so that more things can be monitored.

This is needed to add support for STB power monitoring for Firewire set top boxes.

Changed 13 years ago by danielk

Attachment: firewire-sm-v10.patch added

Initial implementation of signal monitoring for Linux Firewire recorders.

comment:9 Changed 13 years ago by danielk

The "firewire-sm-v10.patch" patch still has some problems.

1/ To deal with internal buffering in the STB we pause for 5 seconds before trying to check the data we are getting. I haven't found a way to reset my STB reliably, but I'm still testing potential solutions for this problem.

2/ If the firewire bus needs resetting this version of the patch does not perform the reset. I need to add some safety checks to this code and make it optional. The point of the reset is to be able to leave encrypted channels if we accidentally change to one (important durning a channel scan).

3/ I haven't added any channel scan capability using the firewire signal monitor. But the plan is to add this so that firewire setup is a little more automatic for users where some of the channels are encrypted.

4/ So far this is Linux only, I'm working getting a Mac development environment working so that I can add support for OS X as well.

5/ The firewire recorders really need some refactoring after adding signal monitoring, I plan to do this after I get that Mac development environment up and running.

Otherwise I've been running a version of this patch for a couple weeks and it seems to work ok other than the longer channel switching time.

Changed 13 years ago by danielk

Attachment: firewire-sm-v14.patch added

Updated patch (fixes STB power issue)

Changed 13 years ago by danielk

Attachment: firewire-sm-v15.patch added

Updated patch, I tried to remove the power state check when the signal monitor starts up to bad effect with my HD4200 in the last patch.

Changed 13 years ago by danielk

Attachment: firewire-sm-v18.patch added

Updated patch, this monitors the PAT for changes so that we can short circuit the 5 second STB buffer flush.

Changed 13 years ago by danielk

Attachment: firewire-sm-v21.patch added

Updated patch, adds locking to LinuxFirewireDevice? and restores auto-reset

Changed 13 years ago by danielk

Attachment: firewire-sm-v28.patch added

Updated patch, better channel change detection + some refactoring

comment:10 Changed 13 years ago by danielk

I've attached an updated patch it basically does everything that is listed in the TODO for version 10 of the patch except for adding a channel scanner. However, I've identified some additional problems (1-5):

1/ There is currently no way to uniquely identify an STB in the OS X Firewire recorder, and the Linux port + node method is not robust (the node sometimes changes on STB reboot). It would be better to identify the STB by GUID when you configure it initially, then we can always find it again when it is on the bus.

2/ Neither the Linux or OS X Firewire recorder deal with bus resets properly; both APIs provide the means to detect and reset the state properly after a bus reset, we just need to implement this.

3/ The previous channel is not saved with the Firewire recorder. This was probably a workaround for getting stuck on a bad channel, but we should fix this once the signal monitor is in place.

4/ By default the cable box model is set to "Other" this should be set to the current cable box model automagically when we know this from the vendor and model IDs. (We already use these in the external channel changers).

5/ The external channel changers should link to the equivalent code in libmythtv. This will avoid code duplication and allow both the internal and external firewire channel changers to benefit from improvements made by people using one or the other.

6/ I still need to implement a channel scanner for firewire.

7/ I still need to do resolve the Linux libavc pre/post v 5.3 incompatibilities.

comment:11 Changed 13 years ago by anonymous

patch doesn't work with DCT-6200 receiver. Don't have log anymore but message says that it can't determine STB power status or something. All channels come up with the error that the data isn't being received.

comment:12 Changed 13 years ago by anonymous

anon, please attach a "-v record,channel" log from the startup of the backend.

Changed 13 years ago by danielk

Attachment: firewire-sm-v29.patch added

Updated version of patch

comment:13 Changed 13 years ago by danielk

Type: defectpatch

I've attached an updated patch. This removes your existing firewire cards, so you will need to run MythTV setup to re-add them.

This addresses problem #1 in the last TODO, it allows you to specify which Firewire STB to control with each recorder in both Linux and OS X.

This also addresses #4, the STB model is detected for all known vendor and model IDs. This also adds a "Generic" channel changer which should work with an modern STB.

All the other problems remain.

Changed 13 years ago by danielk

Attachment: firewire-sm-v30.patch added

Update, fixes bug 3 in the last TODO

Changed 13 years ago by danielk

Attachment: firewire-sm-v31.patch added

Fixes another bug, the Firewire recorder was tuning on the channum instead of the freqid

Changed 13 years ago by danielk

Attachment: firewire-sm-v32.patch added

Updated patch fixes TODO 7 & fixes a problem with Motorolla channel changer

comment:14 Changed 13 years ago by danielk

(In [12321]) Refs #1648. Allow default signal and channel timeout to be more conservative than the minimums. I noticed that firewire performance can differ markedly when working on #1648.

Changed 13 years ago by danielk

Attachment: firewire-sm-v33.patch added

Updated to apply to latest SVN

Changed 13 years ago by danielk

Attachment: firewire-sm-v36.patch added

Addresses TODO 2, adds Firewire Bus reset handlers for Linux & OSX

comment:15 in reply to:  12 Changed 13 years ago by anonymous

Replying to anonymous:

anon, please attach a "-v record,channel" log from the startup of the backend.

DCT-6200 works now with patch 36. Thanks for the great work.

Changed 13 years ago by danielk

Attachment: firewire-sm-v37.patch added

Fix for compilation with --disable-firewire

Changed 13 years ago by danielk

Attachment: firewire-sm-v41.patch added

Adds self-resetting ability to OSX recorder, so it can recover after switching from a 5C channel.

comment:16 Changed 13 years ago by danielk

(In [12402]) Refs #1648. Further improvements for FireWire? Recorders.

  • Reworks avcinfo to remove some code duplication.
  • Starts port handling thread when thread is opened, not when streaming is started. This is needed to handle status messages such as bus resets.
  • removes QString::toULongLong() call for older Qt implementations.

comment:17 Changed 13 years ago by danielk

(In [12404]) Refs #1648. Initializes model and description fields for FireWire? Recorder config. Without this these fields are never set if you don't change the device from the initial value.

comment:18 Changed 13 years ago by danielk

(In [12471]) Refs #1648. Delays Firewire bus reset handling and fixes a bug resetting broadcast connections.

The Scientific Atlanta HD4200 is a bus master, like a PC on the firewire bus, and it performs gapcount optimization. This results in extra bus resets whenever the bus is reset. If we try to reconnect the plugs while these resets are in flight the iec61883 library calls can get stuck. With this commit we only find the devices in the reset handler and start a 100 ms timer whenever we see a reset. When the timer expires we reconnect the plugs. Since we have 1000 ms to do this according to the specs the streaming should resume properly.

The other problem fixed was with resuming broadcast connections. Here we were just calling OpenBroadcastNode?(), but this stops the A/V streaming, which we don't want to do on a reset.

comment:19 Changed 13 years ago by danielk

(In [12472]) Refs #1648. See commit [12471] description, that committed an earlier version of the same change..

comment:20 Changed 13 years ago by danielk

(In [12533]) Refs #1648. Merges -r12383:12532 from svn head to mythtv-firewire

Changed 13 years ago by danielk

Attachment: 1648-guid-timeout.patch added

Fix to avoid getting stuck when we can't get a devices GUID (untested).

comment:21 Changed 13 years ago by danielk

(In [12561]) Refs #1648. Applies GUID timeout patch.

This adds a timeout for reading the GUID from the IEEE 1394 devices configuration ROM. Some IEEE 1394 devices, especially IEEE 1394 'hubs' don't allow you to read their GUID from the configuration ROM.

comment:22 Changed 13 years ago by curtis@…

Summary: Firewire Recorder missing signal monitor (get's stuck)DCT-6200 problem

The mythtv-firewire branch has stopped working on my DCT-6200 again. Works fine with mythtv-20. Here is the -v record,channel log from the backend:

2007-01-20 13:21:45.343 LAVCInfo(): Getting raw1394 handle for port 0
2007-01-20 13:21:45.349 LFireDev(0014E8FFFE1D4773): Subunit Types: Tuner, Panel, 
2007-01-20 13:21:45.350 LFireDev(0014E8FFFE1D4773): Starting port handler thread
2007-01-20 13:21:45.352 LFireDev(0014E8FFFE1D4773): Waiting for port handler thread to start
2007-01-20 13:21:45.352 LFireDev(0014E8FFFE1D4773): RunPortHandler -- start
2007-01-20 13:21:45.353 LFireDev(0014E8FFFE1D4773): RunPortHandler -- got first lock
2007-01-20 13:21:45.365 LFireDev(0014E8FFFE1D4773): Port handler thread started
2007-01-20 13:21:45.367 External channel change: /usr/local/bin/change_channel.fw 3
2007-01-20 13:21:45.377 Waiting for External Tuning program to exit
2007-01-20 13:21:46.385 ret_pid(0) child(10636) status(0x0)
2007-01-20 13:21:47.393 ret_pid(10636) child(10636) status(0x0)
2007-01-20 13:21:47.395 External Tuning program no longer running
2007-01-20 13:21:47.396 External Tuning program exited with no error
2007-01-20 13:21:47.417 TVRec(2): SetFlags(RunMainLoop,) -> RunMainLoop,
2007-01-20 13:21:47.418 TVRec(2): ClearFlags(ExitPlayer,FinishRecording,) -> RunMainLoop,
2007-01-20 13:21:47.420 New DB scheduler connection
2007-01-20 13:21:47.422 Connected to database 'mythconverg' at host: localhost
2007-01-20 13:21:47.427 Main::Starting HttpServer
2007-01-20 13:21:47.438 Main::Registering HttpStatus Extension
2007-01-20 13:21:47.461 mythbackend version: 0.20.20070111-1 www.mythtv.org
2007-01-20 13:21:47.463 Enabled verbose msgs:  important general record channel
2007-01-20 13:21:47.466 AutoExpire: Found max recording rate of 138 MB/min
2007-01-20 13:21:47.470 AutoExpire: CalcParams(): Required Free Space: 2.0 GB w/freq: 10 min
2007-01-20 13:21:49.473 Reschedule requested for id -1.
2007-01-20 13:21:51.205 Scheduled 721 items in 1.7 = 0.52 match + 1.21 place
2007-01-20 13:21:51.212 scheduler: Scheduled items: Scheduled 721 items in 1.7 = 0.52 match + 1.21 place
2007-01-20 13:21:51.219 Recording starts soon, AUTO-Startup assumed
2007-01-20 13:21:54.665 mythbackend: Running housekeeping thread
2007-01-20 13:22:07.436 Expiring 0 MBytes for 1003 @ Sat Jan 20 13:00:00 2007 => PLAN Canada "Destination Hope"
2007-01-20 13:22:07.442 autoexpire: Expiring Program: Expiring 0 MBytes for 1003 @ Sat Jan 20 13:00:00 2007 => PLAN Canada "Destination Hope"
2007-01-20 13:22:21.381 MainServer::HandleAnnounce Monitor
2007-01-20 13:22:21.383 adding: butters as a client (events: 0)
2007-01-20 13:22:21.385 MainServer::HandleAnnounce Monitor
2007-01-20 13:22:21.386 adding: butters as a client (events: 1)
2007-01-20 13:22:22.808 Getting next free recorder after : -1
2007-01-20 13:22:22.813 Checking card 2. Best card so far 2
2007-01-20 13:22:22.818 MainServer::HandleAnnounce Playback
2007-01-20 13:22:22.820 adding: butters as a client (events: 0)
2007-01-20 13:22:22.823 TVRec(2): Changing from None to WatchingLiveTV
2007-01-20 13:22:22.825 TVRec(2): ClearFlags(FrontendReady,CancelNextRecording,) -> RunMainLoop,
2007-01-20 13:22:22.826 TVRec(2): SetFlags(AskAllowRecording,) -> RunMainLoop,AskAllowRecording,
2007-01-20 13:22:22.827 TVRec(2): Request: Program(no) channel() input() flags(LiveTV,)
2007-01-20 13:22:22.828 TVRec(2): HW Tuner: 2->2
2007-01-20 13:22:22.830 TVRec(2): ClearFlags(PENDINGACTIONS,) -> RunMainLoop,AskAllowRecording,
2007-01-20 13:22:22.831 FireChan(0014E8FFFE1D4773): Open()
2007-01-20 13:22:22.833 External channel change: /usr/local/bin/change_channel.fw 3
2007-01-20 13:22:22.844 Waiting for External Tuning program to exit
2007-01-20 13:22:23.852 ret_pid(0) child(10653) status(0x0)
2007-01-20 13:22:24.860 ret_pid(10653) child(10653) status(0x0)
2007-01-20 13:22:24.862 External Tuning program no longer running
2007-01-20 13:22:24.863 External Tuning program exited with no error
2007-01-20 13:22:24.864 TVRec(2): CreateLiveTVRingBuffer()
2007-01-20 13:22:24.865 TVRec(2): GetProgramRingBufferForLiveTV()
2007-01-20 13:22:24.945 TVRec(2): StartedRecording(0x8227430) fn(/media/video/1003_20070120132224.mpg)
2007-01-20 13:22:24.960 Chain: Appended@0 '1003_20070120132224'
2007-01-20 13:22:24.970 TVRec(2): Starting Signal Monitor
2007-01-20 13:22:24.972 TVRec(2): SetupSignalMonitor(1, 1)
2007-01-20 13:22:24.974 FireChan(0014E8FFFE1D4773): Open()
2007-01-20 13:22:24.975 FireSM(0014E8FFFE1D4773): ctor
2007-01-20 13:22:24.976 SM(0014E8FFFE1D4773)::AddFlags: Seen() Match() Wait(Sig,)
2007-01-20 13:22:24.977 FireDev(0014E8FFFE1D4773): Requesting STB Power State
2007-01-20 13:22:24.979 FireDev(0014E8FFFE1D4773): STB Power State: On
2007-01-20 13:22:24.980 TVRec(2): Signal monitor successfully created
2007-01-20 13:22:24.982 TVRec(2): Setting up table monitoring.
2007-01-20 13:22:24.983 TVRec(2) Error: No valid DTV info, ATSC maj(0) min(0), MPEG pn(-1)
2007-01-20 13:22:24.984 TVRec(2) Error: Failed to setup digital signal monitoring
2007-01-20 13:22:24.985 TVRec(2) Error: Failed to setup signal monitor
2007-01-20 13:22:24.986 FireSM(0014E8FFFE1D4773): Stop() -- begin
2007-01-20 13:22:24.987 SM(0014E8FFFE1D4773)::Stop: begin
2007-01-20 13:22:24.987 SM(0014E8FFFE1D4773)::Stop: end
2007-01-20 13:22:24.988 FireSM(0014E8FFFE1D4773): Stop() -- end
2007-01-20 13:22:24.989 TVRec(2): SetFlags(SignalMonitorRunning,) -> RunMainLoop,AskAllowRecording,SignalMonitorRunning,
2007-01-20 13:22:24.991 TVRec(2): ClearFlags(WaitingForSignal,) -> RunMainLoop,AskAllowRecording,SignalMonitorRunning,
2007-01-20 13:22:24.992 TVRec(2): SetFlags(DummyRecorderRunning,) -> RunMainLoop,AskAllowRecording,SignalMonitorRunning,DummyRecorderRunning,
2007-01-20 13:22:24.993 DummyDTVRecorder -- started
2007-01-20 13:22:24.993 TVRec(2): SetFlags(RingBufferReady,) -> RunMainLoop,AskAllowRecording,SignalMonitorRunning,DummyRecorderRunning,RingBufferReady,
2007-01-20 13:22:24.994 TVRec(2): SetFlags(CancelNextRecording,) -> RunMainLoop,CancelNextRecording,AskAllowRecording,SignalMonitorRunning,DummyRecorderRunning,RingBufferReady,
2007-01-20 13:22:25.582 TVRec(2): SetFlags(FrontendReady,) -> FrontendReady,RunMainLoop,CancelNextRecording,AskAllowRecording,SignalMonitorRunning,DummyRecorderRunning,RingBufferReady,
2007-01-20 13:23:03.132 StopLiveTV(void) curRec: 0x8227430 pseudoRec: 0
2007-01-20 13:23:03.136 TVRec(2): Changing from WatchingLiveTV to None
2007-01-20 13:23:03.137 TVRec(2): ClearFlags(FrontendReady,CancelNextRecording,) -> RunMainLoop,AskAllowRecording,SignalMonitorRunning,DummyRecorderRunning,RingBufferReady,
2007-01-20 13:23:03.138 TVRec(2): SetFlags(AskAllowRecording,) -> RunMainLoop,AskAllowRecording,SignalMonitorRunning,DummyRecorderRunning,RingBufferReady,
2007-01-20 13:23:03.140 TVRec(2): Request: Program(no) channel() input() flags(KillRec,KillRingBuffer,)
2007-01-20 13:23:03.141 TVRec(2): ClearFlags(SignalMonitorRunning,) -> RunMainLoop,AskAllowRecording,DummyRecorderRunning,RingBufferReady,
2007-01-20 13:23:03.142 TVRec(2): ClearFlags(DummyRecorderRunning,) -> RunMainLoop,AskAllowRecording,RingBufferReady,
2007-01-20 13:23:03.145 TVRec(2): FinishedRecording(PLAN Canada) in recgroup: LiveTV
2007-01-20 13:23:03.148 Chain: Updated endtime for '1003_20070120132224' to 20070120132303
2007-01-20 13:23:03.151 Finished recording PLAN Canada "Destination Hope": channel 1003
2007-01-20 13:23:03.158 scheduler: Finished recording: PLAN Canada "Destination Hope": channel 1003
2007-01-20 13:23:03.162 FireChan(0014E8FFFE1D4773): Close()
2007-01-20 13:23:03.163 LFireDev(0014E8FFFE1D4773): Stopping Port Handler Thread
2007-01-20 13:23:03.164 LFireDev(0014E8FFFE1D4773): Stopping Port Handler Thread -- locked
2007-01-20 13:23:03.165 LFireDev(0014E8FFFE1D4773): ClosePort()
2007-01-20 13:23:03.166 LFireDev(0014E8FFFE1D4773): Waiting for port handler thread to stop
2007-01-20 13:23:03.203 LFireDev(0014E8FFFE1D4773): RunPortHandler -- end
2007-01-20 13:23:03.211 LFireDev(0014E8FFFE1D4773): Joining port handler thread
2007-01-20 13:23:03.212 LAVCInfo(): Releasing raw1394 handle
2007-01-20 13:23:03.213 TVRec(2): Tearing down RingBuffer
2007-01-20 13:23:03.214 TVRec(2): ClearFlags(PENDINGACTIONS,) -> RunMainLoop,AskAllowRecording,RingBufferReady,

comment:23 Changed 13 years ago by anonymous

Summary: DCT-6200 problemFirewire Recorder missing signal monitor (get's stuck)

Sorry, didn't mean to change the Summary

comment:24 Changed 13 years ago by danielk

Curtis, why are you using an external channel changer? Does tuning work when you use the built in one?

comment:25 Changed 13 years ago by curtis@…

Sorry, I filled that in out of habit. If I leave it out, things are fine.

Thanks!

comment:26 Changed 13 years ago by danielk

(In [12585]) Refs #1648. Merges -r12532:12584 from svn head to mythtv-firewire

comment:27 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [12618]) Fixes #1648. Fixes #2209. Fixes #2722. Fixes various Firewire problems.

This is a sync from the mythtv-firewire branch, see it for detailed descriptions.

This removes any existing Firewire cards, these must be recreated with GUID. The Linux firewire recorder used the port and node on the bus the STB was on to identify a recorder, this is not unique across bus resets and is not unique in the presence of firewire hubs. The Mac firewire recorder just randomly selected STB's for the recorders. This changes the code to use the GUID, which is unique to each firewire device, to identify which one to use for each recorder.

We required the user to select the STB model, even when we knew this from the vendor and model ID. This automatically selects the proper STB model if we know it, otherwise we default to a channel changer that will work with any AV/C compliant recorder (though it may be slower).

IEEE-1394 Bus resets were not handled properly, particularly in the Linux firewire recorder. This adds a reset handler which will find the recorder if it is still on the bus and resume recording.

We always leaked memory when using libavc later than 5.3, configure will now detect the version and if MythTV is compiled with 5.3 present it will require it and will not leak memory. MythTV will still compile with older versions, but we will still leak memory if the user later upgrades to 5.3 without updating MythTV.

This also merges the IPTV & Firewire TS packet listener classes to a single class in mpeg/streamlisteners.h and merges some Mac & Linux Firewire classes to avoid code duplication.

There is still no channel scanner for firewire and the automatic bus reset code (to deal with 5C channels) has been disabled in the merge due to remaining problems, use the mythtv-firewire branch if you want the latest and greatest.

comment:28 Changed 13 years ago by danielk

(In [12625]) Refs #1648. Syncs mythtv-firewire tree to svn trunk [12624].

comment:29 Changed 13 years ago by danielk

(In [12630]) Refs #1648. Use a foolproof ifdef construction for firewire ifdef's in firewirechannel.cpp

comment:30 Changed 13 years ago by curtis@…

Working pretty well on my dct-6200 now. However, noticed twice that a HD recording was cut off after about 20 minutes or so. The recording screen still showed that the show was recording but the timer on the recording stopped. So I stopped the recording, went to "Watch TV", noticed channel was not working. Changed to another channel and back again. Then, it started working again. Resumed recording and finished successfully.

Another time this happened, I wasn't watching at the time, so ended up with a partial recording. Didn't seem to affect subsequent recordings.

Backend log showed a lot of messages like this repeated:

2007-01-24 21:27:10.594 LFireDev(0014E8FFFE1D4773), Warning: No Input in 150 msec...
2007-01-24 21:27:10.670 LFireDev(0014E8FFFE1D4773), Warning: No Input in 200 msec...
2007-01-24 21:27:10.722 LFireDev(0014E8FFFE1D4773), Warning: No Input in 250 msec...
2007-01-24 21:27:10.774 LFireDev(0014E8FFFE1D4773), Warning: No Input in 300 msec...
2007-01-24 21:27:10.826 LFireDev(0014E8FFFE1D4773), Warning: No Input in 350 msec...
2007-01-24 21:27:10.878 LFireDev(0014E8FFFE1D4773), Warning: No Input in 400 msec...
2007-01-24 21:27:10.930 LFireDev(0014E8FFFE1D4773), Warning: No Input in 450 msec...
2007-01-24 21:27:10.982 LFireDev(0014E8FFFE1D4773), Warning: No Input in 500 msec...
2007-01-24 21:27:11.034 LFireDev(0014E8FFFE1D4773), Warning: No Input in 550 msec...
2007-01-24 21:27:11.086 LFireDev(0014E8FFFE1D4773), Warning: No Input in 600 msec...
2007-01-24 21:27:11.138 LFireDev(0014E8FFFE1D4773), Warning: No Input in 650 msec...
2007-01-24 21:27:11.190 LFireDev(0014E8FFFE1D4773), Warning: No Input in 700 msec...
2007-01-24 21:27:11.242 LFireDev(0014E8FFFE1D4773), Warning: No Input in 750 msec...
2007-01-24 21:27:11.294 LFireDev(0014E8FFFE1D4773), Warning: No Input in 800 msec...
2007-01-24 21:27:11.346 LFireDev(0014E8FFFE1D4773), Warning: No Input in 850 msec...
2007-01-24 21:27:11.398 LFireDev(0014E8FFFE1D4773), Warning: No Input in 900 msec...
2007-01-24 21:27:11.450 LFireDev(0014E8FFFE1D4773), Warning: No Input in 950 msec...
2007-01-24 21:27:11.502 LFireDev(0014E8FFFE1D4773), Warning: No Input in 1000 msec...
2007-01-24 21:27:11.554 LFireDev(0014E8FFFE1D4773), Warning: No Input in 1050 msec...
2007-01-24 21:27:11.556 LFireDev(0014E8FFFE1D4773): ResetBus() -- begin
2007-01-24 21:27:11.560 LFireDev(0014E8FFFE1D4773): ResetBus() -- end
2007-01-24 21:27:11.561 LFireDev(0014E8FFFE1D4773): SignalReset(2746->2747)
2007-01-24 21:27:11.563 LFireDev(0014E8FFFE1D4773): SignalReset(2746->2747): Updating device list -- begin
2007-01-24 21:27:11.566 LFireDev(0014E8FFFE1D4773): SignalReset(2746->2747): Updating device list -- end

comment:31 Changed 13 years ago by danielk

Curtis, which version of the branch are you using?

I disabled this code when I merged this code to SVN head because of the problems this was causing. Dan Dennedy, the writer of the firewire libs we are using, is trying to figure out what the problem is. So far I haven't had much luck.

comment:32 Changed 13 years ago by curtis@…

I'm using the mythtv-firewire branch version 12624. I tried the latest 12639 but it didn't work at all. Which branch do you think I should use if I want to test the latest firewire changes, mythtv-firewire or the HEAD?

comment:33 Changed 13 years ago by ryebrye@…

When I try to set up a 6200 card, in mythtv-setup the GUID is a popup list and it doesn't have any options for me to select. When I looked at adding an entry manually to a column on the capturecard in the database, I only see firewire_port, firewire_node, firewire_speed, firewire_model, firewire_connection - and all of those columns are int(10) except for firewire_model which is varchar(32)

I can see the GUID just fine when I run plugreport - and when I try to start mythbackend, I see:

2007-03-14 14:05:00.499 LFireDev(0000000000000000), Error: No IEEE-1394 device with our GUID

comment:34 in reply to:  33 Changed 13 years ago by anonymous

Replying to ryebrye@gmail.com:

Strange. The problem was that I was running setup via VNC. When I had my friend whose box I'm working on try to run mythtv-setup on his box, he saw the GUID immediately. From looking at the table, I can see now that the GUID is stored in 'videodevice' in the capturecard table.

comment:35 Changed 12 years ago by stuartm

Ticket locked: set
Note: See TracTickets for help on using tickets.