[mythtv] Remote encoder channel change.
Bruce Markey
bjm at lvcm.com
Thu Mar 6 15:17:16 EST 2003
Isaac Richards wrote:
> On Tuesday 04 March 2003 10:14 pm, you wrote:
>
>>Is the multi-backend stuff to a point where it might be
>>worthwhile to setup a test env for 'good' testing (verify
>>that thing work as opposed to 'bad' testing for obscure
>>bugs)? I'd need to swap around some hardware but would like
>>to try to fix bugs and give feedback.
>
>
> Yeah, it all seems to be working ok now. Most things seem to work with slave
> backends for me, though I haven't tested out the scheduler interaction all
> that much. I'd appreciate more testing with setups other than mine =) It
> should be pretty easy to set up, all you have to do is point it at the right
> mysql server, run the setup program on the new slave backend to setup the IP
> and video cards, then just run mythbackend. It should auto-connect to the
> master server (and reconnect if the connection ever goes away).
adding: nordvid as a slave backend server
Slave backend: nordvid has left the building
Very funny =).
So I've added tuner card and setup a new database on my
desktop (moktoo) and changed the mysql.txt for both this
system and my dual tuner test machine (nordvid). I can
switch back to single backend, multi-frontend by simply
changing mysql.txt to point to the DB on nordvid.
I now have one tuner on the master backend and two on one
slave backend. I could point my 'production' machine at
this for three backends and four tuners but there's not
much to gain by testing this just yet.
Frontends on either machine interact with the master as
expected. If I record one show then Watch TV from the two
backends, all the right things happen! The show is recorded
on card 1 at the master, LiveTV for the frontend on the
master host gets ringbuf2.nuv from the slave backend.
LiveTV from the slave host frontend gets ringbuf3.nuv(!)
from the slave and since this happens to be the same host,
treats it as a local ring buffer file.
If no tuners are in use and the the frontend on the slave
host goes to LiveTV, it correctly chooses card 1 on the
master backend. A low priority enhancement may be to check
the hostname column from capturecard and prefer the first
available local encoder else the next available.
If I choose three or more show to record at the same time
the scheduler and/or conflicts still only allow two shows
at a time even though there are three tuners available.
I'll look into this but I expect you'll fix this the right
way before I even grasp what's going on ;-).
The only obvious bug I've found so far is that, when recording
two shows, the channel change on the remote encoder fails.
On the slave backend console:
read: 276 // ...QUERY_REMOTEENCODER[]:[]START_RECORDING...
2 OK
DB Error (SetChannel):
Query was:
SELECT channel.channum,cardinput.inputname FROM
channel,capturecard,cardinput WHERE channel.chanid = 1016 AND
cardinput.cardid = capturecard.cardid AND cardinput.sourceid = -1 AND
capturecard.cardid = -1;
Driver error was:
(null)
Database error was:
(null)
Changing from None to RecordingOnly
strange error flushing buffer ...
The recording succeeds but it records the previous channel
(3 rather than 16 in this case).
The DB tables look correct and liveTV works so I assume the
sourceid and cardid aren't being correctly looked up or
passed into TVRec::SetChannel().
-- bjm
mysql> select * from capturecard;
+--------+-------------+-------------+----------+----------------+----------+--------------+-----------+
| cardid | videodevice | audiodevice | cardtype | audioratelimit |
hostname | defaultinput | vbidevice |
+--------+-------------+-------------+----------+----------------+----------+--------------+-----------+
| 1 | /dev/video | /dev/dsp | V4L | 0 |
moktoo | Television | /dev/vbi |
| 2 | /dev/video | /dev/dsp | V4L | 0 |
nordvid | Television | /dev/vbi |
| 3 | /dev/video1 | /dev/dsp1 | V4L | 0 |
nordvid | Television | /dev/vbi1 |
+--------+-------------+-------------+----------+----------------+----------+--------------+-----------+
3 rows in set (0.14 sec)
mysql> select * from cardinput;
+-------------+--------+----------+------------+-----------------+------------+-----------+
| cardinputid | cardid | sourceid | inputname | externalcommand |
preference | shareable |
+-------------+--------+----------+------------+-----------------+------------+-----------+
| 1 | 1 | 1 | Television | |
NULL | N |
| 2 | 2 | 1 | Television | |
NULL | N |
| 3 | 3 | 1 | Television | |
NULL | N |
+-------------+--------+----------+------------+-----------------+------------+-----------+
3 rows in set (0.02 sec)
mysql> select * from videosource;
+----------+----------+--------------+
| sourceid | name | xmltvgrabber |
+----------+----------+--------------+
| 1 | CoxCable | tv_grab_na |
+----------+----------+--------------+
1 row in set (0.01 sec)
More information about the mythtv-dev
mailing list