Mailing List Archive

How to identify physical capture card in event handler
Hi,

When %CARDID% is passed to an event handler, the value passed in can
refer to any one of the virtual capture cards corresponding with a
multirec-capable capture card. How can I determine from within the event
handler which physical capture card a given cardid value corresponds with?

Or is there some other %PARAMETER% I should be passing to the event handler?

Many thanks, Jan
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to identify physical capture card in event handler [ In reply to ]
On Sat, Feb 25, 2023 at 11:05 AM Jan Ceuleers <jan.ceuleers@gmail.com> wrote:

> When %CARDID% is passed to an event handler, the value passed in can
> refer to any one of the virtual capture cards corresponding with a
> multirec-capable capture card. How can I determine from within the event
> handler which physical capture card a given cardid value corresponds with?
>
> Or is there some other %PARAMETER% I should be passing to the event handler?
>

I had thought there was a VIDEODEVICE parameter
which was added quite a number of years ago,
although I do not see it documented in the wiki or
release notes (and I have not checked the
source).

Alternatively, another way you should be able to
determine it is that you can use the services API
(Capture Service, GetCaptureCard) and retrieve
the videodevice from within your script.

I have not used them in a long time, but I believe
the MythTV python bindings also have a method
to obtain the CaptureCard information.

And, of course, there is the brute force method
of directly accessing the mythconverg table and
'select videosource from capturecard where cardid=...'
although that would not be recommended.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to identify physical capture card in event handler [ In reply to ]
On 25/02/2023 13:35, Gary Buhrmaster wrote:
> On Sat, Feb 25, 2023 at 11:05 AM Jan Ceuleers <jan.ceuleers@gmail.com> wrote:
>
>> When %CARDID% is passed to an event handler, the value passed in can
>> refer to any one of the virtual capture cards corresponding with a
>> multirec-capable capture card. How can I determine from within the event
>> handler which physical capture card a given cardid value corresponds with?
>>
>> Or is there some other %PARAMETER% I should be passing to the event handler?
>>
>
> I had thought there was a VIDEODEVICE parameter
> which was added quite a number of years ago,
> although I do not see it documented in the wiki or
> release notes (and I have not checked the
> source).

You are right: I do see VIDEODEVICE in the source.

I just tried adding it to the wiki, but I don't know how to edit the
thing that {{Event_and_Job_Parameters}} refers to on page [[MythTV
System Events]]. There isn't a page of that name.

I will give VIDEODEVICE a go.

By the way, it would be useful for a special parameter to exist that
could be passed to the "any event" event, showing which parameters are
valid for that event, such that logging $* from the "all events" handler
would yield something like:

REC_PENDING CARDID %2 CHANID %3 STARTTIME %4 RECSTATUS %5 VIDEODEVICE %6
VBIDEVICE %7

with the %{1-7} parameters filled in.

Cheers, Jan
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to identify physical capture card in event handler [ In reply to ]
On Saturday 25 February 2023 07:30:44 AM (-06:00), Jan Ceuleers wrote:

> On 25/02/2023 13:35, Gary Buhrmaster wrote:
> > On Sat, Feb 25, 2023 at 11:05 AM Jan Ceuleers wrote:
...
> I just tried adding it to the wiki, but I don't know how to edit the
> thing that {{Event_and_Job_Parameters}} refers to on page [[MythTV
> System Events]]. There isn't a page of that name.

Hi, it's a template, not a page (the same text is used by 2 pages.)
Check for templates at the bottom of the page when trying to edit
it.
--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to identify physical capture card in event handler [ In reply to ]
On 25/02/2023 14:36, Bill Meek wrote:
>> I just tried adding it to the wiki, but I don't know how to edit the
>> thing that {{Event_and_Job_Parameters}} refers to on page [[MythTV
>> System Events]]. There isn't a page of that name.
>
> Hi, it's a template, not a page (the same text is used by 2 pages.)
> Check for templates at the bottom of the page when trying to edit
> it.

Thanks.

I added a %VIDEODEVICE% entry to the table, but I don't know what to put
in the used by and released in columns so I left those blank.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: How to identify physical capture card in event handler [ In reply to ]
On Saturday 25 February 2023 07:50:42 AM (-06:00), Jan Ceuleers wrote:

> On 25/02/2023 14:36, Bill Meek wrote:
> >> I just tried adding it to the wiki, but I don't know how to edit the
> >> thing that {{Event_and_Job_Parameters}} refers to on page [[MythTV
> >> System Events]]. There isn't a page of that name.
> >
> > Hi, it's a template, not a page (the same text is used by 2 pages.)
> > Check for templates at the bottom of the page when trying to edit
> > it.
>
> Thanks.
>
> I added a %VIDEODEVICE% entry to the table, but I don't know what to put
> in the used by and released in columns so I left those blank.

v30 (at least). I didn't see if it was backported. Updated the template and
added VBIDEVICE which was done is the same commit back in Aug. 2017.

Thanks Jan and Gary (good memory).
--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org