[mythtv] CardUtil::CreateCaptureCard / CardUtil::CreateCardInput and mythconverg.inputgroup

David Engel david at istwok.net
Thu Jul 7 20:17:08 UTC 2022


On Thu, Jul 07, 2022 at 01:33:49PM -0600, John P Poet wrote:
> Hi David,
> 
> After a call to
> CardUtil::CreateCaptureCard()
> and
> CardUtil::CreateCardInput()
> 
> The resulting capturecard and inputgroup tables look like:
> 
> select * from capturecard;
> +--------+----------+------------------------------------------------------------------------+-------------+-----------+----------+--------------+----------------+----------------+--------------+--------------+-----------------------+-------------+---------------+-----------------+----------------+----------------+---------------------+----------------+-----------------+------------------+----------+------------+--------+-----+----------+-------------+-----------+----------+-----------------+----------------+---------------+----------+-----------+-------------+-------------+-------------+-----------+------------+-------------+----------+------------+
> | cardid | parentid | videodevice
>                  | audiodevice | vbidevice | cardtype | defaultinput |
> audioratelimit | hostname       | dvb_swfilter | dvb_sat_type |
> dvb_wait_for_seqstart | skipbtaudio | dvb_on_demand | dvb_diseqc_type |
> firewire_speed | firewire_model | firewire_connection | signal_timeout |
> channel_timeout | dvb_tuning_delay | contrast | brightness | colour | hue |
> diseqcid | dvb_eitscan | inputname | sourceid | externalcommand |
> changer_device | changer_model | tunechan | startchan | displayname |
> dishnet_eit | recpriority | quicktune | schedorder | livetvorder | reclimit
> | schedgroup |
> +--------+----------+------------------------------------------------------------------------+-------------+-----------+----------+--------------+----------------+----------------+--------------+--------------+-----------------------+-------------+---------------+-----------------+----------------+----------------+---------------------+----------------+-----------------+------------------+----------+------------+--------+-----+----------+-------------+-----------+----------+-----------------+----------------+---------------+----------+-----------+-------------+-------------+-------------+-----------+------------+-------------+----------+------------+
> |      1 |        0 | /usr/local/bin/mythexternrecorder --conf
> /home/mythtv/etc/mag-1-2.conf | NULL        | NULL      | EXTERNAL |
> Television   |           NULL | cubic.sobie.us |            0 |
>  0 |                     1 |           0 |             1 |               0
> |              0 | NULL           |                   0 |              0 |
>            4000 |                0 |        0 |          0 |      0 |   0 |
>     NULL |           0 | MPEG2TS   |        2 |                 |
>      |               |          |           | mag/1-2     |           0 |
>         1 |         0 |          1 |           0 |        1 |          1 |
> +--------+----------+------------------------------------------------------------------------+-------------+-----------+----------+--------------+----------------+----------------+--------------+--------------+-----------------------+-------------+---------------+-----------------+----------------+----------------+---------------------+----------------+-----------------+------------------+----------+------------+--------+-----+----------+-------------+-----------+----------+-----------------+----------------+---------------+----------+-----------+-------------+-------------+-------------+-----------+------------+-------------+----------+------------+
> 1 row in set (0.001 sec)
> 
> select * from inputgroup;
> +-------------+--------------+-----------------------------------------------------------------------------------------+
> | cardinputid | inputgroupid | inputgroupname
>                                            |
> +-------------+--------------+-----------------------------------------------------------------------------------------+
> |           0 |            1 | cubic.sobie.us|/usr/local/bin/mythexternrecorder
> --conf /home/mythtv/etc/mag-1-2.conf|1 |
> |           1 |            1 | cubic.sobie.us|/usr/local/bin/mythexternrecorder
> --conf /home/mythtv/etc/mag-1-2.conf|1 |
> +-------------+--------------+-----------------------------------------------------------------------------------------+
> 2 rows in set (0.001 sec)
> 
> I am curious about the entry in inputgroup with a cardinputid of zero (0).
> Is that what you would expect to see or is something amiss?
> 
> I know you did some magic to make "multirec" work without having to create
> a bunch of inputs. Does this happen automatically with a call
> CardUtil::CreateCaptureCard() and/or CardUtil::CreateCardInput(), or are
> extra steps necessary? I see that the default "reclimit" is 1, but did not
> dig enough to see if that is still relevant. Does the multirec magic happen
> when schedgroup is 1?
> 
> To be clear, I am making these calls via the ServicesAPI and want to make
> sure I am not missing any steps. I do want multirec to work.
> 
> Thanks,

I'll have to do an in-depth look at the code later, probably this
evening.  If I recall correctly, and that's not a certainty,
CreatCaptureCard() is the main function for CardUtil users to use and
CreateCardInput() is an internal, helpper function.

Also, multirec support I added for schedule as group still uses an
input in the database for each virtual tuner.  Doing what I originally
wanted to do would break too many, interal APIs take way too long to
put them back together.  I think we're stuck with that approach for
the forseeable future.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-dev mailing list