[mythtv] How is cardinputid chosen?

Jack Perveiler perveilerj at yahoo.com
Tue Oct 3 00:11:55 UTC 2006


I recently switched one of my pvr500 tuners to use s-video instead of the
tuner.  I made sure it was the lower card number because I'd like it to be used
in case of a tie with the other card.  I want it favored, but not so much that
I'd want something recorded later instead of on the other card so I'd rather
not set the input priority.

When I schedule a recording, however, the second card is used instead of the
first.  Here's my car descriptions:

mysql> select cardid,cardtype,defaultinput from capturecard;

+--------+----------+--------------+
| cardid | cardtype | defaultinput |
+--------+----------+--------------+
|      1 | DVB      | DVBInput     |
|      2 | DVB      | DVBInput     |
|      3 | MPEG     | S-Video 1    |
|      4 | MPEG     | Tuner 1      |
+--------+----------+--------------+

Everything looks ok there to me (lower cardid has the S-Video attached to it).

Now for the cardinputid:

mysql> select cardinputid,cardid,sourceid,inputname,preference from cardinput;
+-------------+--------+----------+-----------+------------+
| cardinputid | cardid | sourceid | inputname | preference |
+-------------+--------+----------+-----------+------------+
|           1 |      1 |        1 | DVBInput  |          0 |
|           2 |      0 |        0 |           |          0 |
|           3 |      0 |        0 |           |          0 |
|           4 |      0 |        0 |           |          0 |
|           5 |      2 |        1 | DVBInput  |          0 |
|           6 |      0 |        0 |           |          0 |
|           8 |      0 |        0 |           |          0 |
|           9 |      4 |        3 | Tuner 1   |          0 |
|          10 |      3 |        2 | S-Video 1 |          0 |
+-------------+--------+----------+-----------+------------+

Odd, the lower cardid with the lower sourceid ended up with a higher
cardinputid...

And finally a snippet from mythbackend --printsched (I only kept today's items,
and snipped out previously recordeds, repeats, and inactives):

--- print list start ---
Title - Subtitle                    Chan ChID Day Start  End   C I  T N   Pri
The Class - "The Class Learns About    4 3004  02 20:00-20:30  0 0  A E   3/0
The Class - "The Class Learns About  4_1 1012  02 20:00-20:30  1 1  A 1   4/0
How I Met Your Mother - "Brunch"       4 3004  02 20:30-21:00  0 0  A E   3/0
How I Met Your Mother - "Brunch"     4_1 1012  02 20:30-21:00  1 1  A 1   4/0
Two and a Half Men - "The Sea Is a     4 3004  02 21:00-21:31  0 0  A E   4/0
Heroes - "Don't Look Back"            10 3010  02 21:00-22:00  0 0  A E   3/0
Vanished - "Resurrection"           25_1 1025  02 21:00-22:00  2 5  A 2   4/0
Two and a Half Men - "The Sea Is a   4_1 1012  02 21:00-21:31  1 1  A 1   5/0
Vanished - "Resurrection"              6 3006  02 21:00-22:00  0 0  A E   3/0
Heroes - "Don't Look Back"             7 3007  02 21:00-22:00  4 9  A 4   3/0
Heroes - "Don't Look Back"           7_1 1071  02 21:00-22:00  0 0  A E   4/0
The New Adventures of Old Christine    4 3004  02 21:31-22:00  0 0  A E   3/0
The New Adventures of Old Christine  4_1 1012  02 21:31-22:00  1 1  A 1   4/0
Studio 60 on the Sunset Strip - "Th    7 3007  02 22:00-23:00  0 0  A E   3/0
Studio 60 on the Sunset Strip - "Th   10 3010  02 22:00-23:00  0 0  A E   3/0
Studio 60 on the Sunset Strip - "Th  7_1 1071  02 22:00-23:00  1 1  A 1   4/0
Good Eats - "Apple Family Values"     62 3062  02 23:00-23:30  4 9  C 4   2/0

Heroes and Good Eats both selected card 4 instead of card 3.  The wiki says
that the scheduler will use a lower input id over a higher, so I'm guessing the
fact that cardid 3 gets the larger carinputid is my real problem.  

Which leads me to my question... how is cardinputid chosen?  I see it's an
autoincrement field, so it's assigned when the insert is made into the table. 
So how is the insert order determined?  Nothing jumped out at me in
mythtv-setup... is it just the order in which video sources are mapped to
inputs?  

And, since mine seems funky, is it as simple for me to fix as just switching
the cardid and sourceid's between those cardinputids?

Thanks,

--Jack


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the mythtv-dev mailing list