Skip to content

Commit

Permalink
Transport Editor and HDHOMERUN devices
Browse files Browse the repository at this point in the history
A HDHOMERUN device can be DVB-C, DVB-T/T2, ATSC or a combination of those.
The Transport Editor checks, before starting the editor,
if all the capture cards that are connected to that video source
do have the same type.
In this check all HDHOMERUN devices were seen as ATSC devices.
This creates a conflict when a HDHOMERUN device is connected to
a videosource together with e.g. a DVB-C device.
The test now assumes that a HDHOMERUN device can be anything.
  • Loading branch information
kmdewaal committed Dec 4, 2019
1 parent 078eeaf commit fae37d2
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions mythtv/libs/libmythtv/transporteditor.cpp
Expand Up @@ -129,15 +129,22 @@ static CardUtil::INPUT_TYPES get_cardtype(uint sourceid)
if (cardtypes.empty())
return CardUtil::ERROR_PROBE;

// If there are multiple cards connected to this video source
// check if they are the same type or compatible.
for (size_t i = 1; i < cardtypes.size(); i++)
{
CardUtil::INPUT_TYPES typeA = cardtypes[i - 1];
typeA = (CardUtil::HDHOMERUN == typeA) ? CardUtil::ATSC : typeA;
typeA = (CardUtil::MPEG == typeA) ? CardUtil::V4L : typeA;

CardUtil::INPUT_TYPES typeB = cardtypes[i + 0];
typeB = (CardUtil::HDHOMERUN == typeB) ? CardUtil::ATSC : typeB;
typeB = (CardUtil::MPEG == typeB) ? CardUtil::V4L : typeB;

// MPEG devices are seen as V4L (historical)
typeA = (CardUtil::MPEG == typeA) ? CardUtil::V4L : typeA;
typeB = (CardUtil::MPEG == typeB) ? CardUtil::V4L : typeB;

// HDHOMERUN devices can be DVBC, DVBT/T2, DVBT2, ATSC or a combination of those.
// If there are other non-HDHR devices connected to this videosource that
// have an explicit type then assume that the HDHOMERUN is also of that type.
typeA = (CardUtil::HDHOMERUN == typeA) ? typeB : typeA;
typeB = (CardUtil::HDHOMERUN == typeB) ? typeA : typeB;

if (typeA == typeB)
continue;
Expand Down

0 comments on commit fae37d2

Please sign in to comment.