Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Channel handling

 

 

MythTV dev RSS feed   Index | Next | Previous | View Threaded


hdtv at silicondust

Jan 14, 2006, 5:16 PM

Post #1 of 7 (1128 views)
Permalink
Channel handling

Hi Guys,

The HDHomeRun code is now finding and connecting to the box ok. When a
recording starts it configures the target parameters and streams video.

Next on the list of things to get working is changing channel... it
looks like I need to implement SetChannelByString?

How do I convert the display channel number into the RF channel number?
(or frequency would be ok too). Do I need to write a query to get this
information from the database or is there common code already to do this?

Also, is there code already to process the TS to determine which PIDs
are required for a given sub-channel?

Thanks,

Nick

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


ijr at case

Jan 14, 2006, 5:43 PM

Post #2 of 7 (1086 views)
Permalink
Re: Channel handling [In reply to]

On Saturday 14 January 2006 20:16, jafa wrote:
> Hi Guys,
>
> The HDHomeRun code is now finding and connecting to the box ok. When a
> recording starts it configures the target parameters and streams video.
>
> Next on the list of things to get working is changing channel... it
> looks like I need to implement SetChannelByString?
>
> How do I convert the display channel number into the RF channel number?
> (or frequency would be ok too). Do I need to write a query to get this
> information from the database or is there common code already to do this?

See channel.cpp, line 455-ish.

Isaac
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


hdtv at silicondust

Jan 14, 2006, 7:55 PM

Post #3 of 7 (1084 views)
Permalink
Re: Channel handling [In reply to]

Thanks - that was what I was looking for.
(resending to avoid size limit)

Am I correct in thinking the "channelnames" and "currentcapchannel"
relate to the input selection? (choosing between a list of inputs such
as antenna, composite, and s-video?)

This box has only one input (it has two tuners but they both run at the
same time so show up as two different devices). At the moment I have the
following in my constructor:
channelnames[0] = "MPEG2TS";
currentcapchannel = 0;

I also don't quite get the sourceid side of things... channel.cpp uses
sourceid based on the current input.
"WHERE videosource.sourceid = channel.sourceid AND "
" channum = '%1' AND channel.sourceid = '%2'")
.arg(chan).arg(sourceid[currentcapchannel]);

DBox2 does something different:
"WHERE "
"channel.sourceid = cardinput.sourceid AND "
"cardinput.cardid = :CARDID AND "
"channel.channum = :CHANNUM");
query.bindValue(":CARDID", m_cardid);
query.bindValue(":CHANNUM", channelnumber);

The attached patch is the latest code I am working with. It changes
channel now but the channel query is a hack and doesn't look right.

This is turning out to be quite interesting :-)

Nick

Isaac Richards wrote:
> *This message was transferred with a trial version of CommuniGate(r) Pro*
> On Saturday 14 January 2006 20:16, jafa wrote:
>
>> Hi Guys,
>>
>> The HDHomeRun code is now finding and connecting to the box ok. When a
>> recording starts it configures the target parameters and streams video.
>>
>> Next on the list of things to get working is changing channel... it
>> looks like I need to implement SetChannelByString?
>>
>> How do I convert the display channel number into the RF channel number?
>> (or frequency would be ok too). Do I need to write a query to get this
>> information from the database or is there common code already to do this?
>>
>
> See channel.cpp, line 455-ish.
>
> Isaac
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>
Attachments: hdhomerun.20060114.patch.tar.gz (10.2 KB)


danielk at cuymedia

Jan 15, 2006, 7:36 AM

Post #4 of 7 (1082 views)
Permalink
Re: Channel handling [In reply to]

On Sat, 2006-01-14 at 19:55 -0800, jafa wrote:
> Thanks - that was what I was looking for.
> (resending to avoid size limit)

> Am I correct in thinking the "channelnames" and "currentcapchannel"
> relate to the input selection? (choosing between a list of inputs such
> as antenna, composite, and s-video?)
Yes.

> This box has only one input (it has two tuners but they both run at the
> same time so show up as two different devices). At the moment I have the
> following in my constructor:
> channelnames[0] = "MPEG2TS";
> currentcapchannel = 0;
>
> I also don't quite get the sourceid side of things... channel.cpp uses
> sourceid based on the current input.
> "WHERE videosource.sourceid = channel.sourceid AND "
> " channum = '%1' AND channel.sourceid = '%2'")
> .arg(chan).arg(sourceid[currentcapchannel]);
>
> DBox2 does something different:
> "WHERE "
> "channel.sourceid = cardinput.sourceid AND "
> "cardinput.cardid = :CARDID AND "
> "channel.channum = :CHANNUM");
> query.bindValue(":CARDID", m_cardid);
> query.bindValue(":CHANNUM", channelnumber);

I would recommend keeping the input stuff in there, this allows for
easier refactoring of channel classes later on. And if at some point
multiple inputs are added to a future rev of the hardware you won't
have to rewrite everything (Say you want to support OTA and Cable
with the same device without the user needing to change the wiring).

DVBChannel was originally written with only one input in mind and we
are still finding problems with the code now that multiple inputs are
supported.

BTW You may want to look at DVBChannel as well. Everything DVBChannel
does, Channel does as well, but DVBChannel might be map more closely
to your device.

Also, the DB schema for the channel and dtv_multiplex tables is in
dbcheck.cpp.

A couple cotchas: The frequency for BTTV cards (Channel) is the visual
carrier frequency, while the frequency for DVB cards is the center
frequency. There is a 1.75 Mhz or so offset between them. I would
recommend you use the DVB method, as there is no visual carrier with
ATSC so this concept just adds confusion there.

The ATSC major and minor channels are stored in atscsrcid, and the
ATSC source id is not stored in the table at all. It is encoded as
(majorChannel * 256 | minorChannel). This is used to find the
correct program number in the VCT table, which is used to find
the PMT using the PAT.

-- Daniel

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


hdtv at silicondust

Jan 15, 2006, 11:32 AM

Post #5 of 7 (1080 views)
Permalink
Re: Channel handling [In reply to]

Daniel Kristjansson wrote:
> I would recommend keeping the input stuff in there, this allows for
> easier refactoring of channel classes later on. And if at some point
> multiple inputs are added to a future rev of the hardware you won't
> have to rewrite everything (Say you want to support OTA and Cable
> with the same device without the user needing to change the wiring).
>

Hi Daniel,

Each tuner on the box has one physical input but can demodulate 8VSB,
64QAM, and 256QAM.

Would it be better to consider it to have three inputs or to have one
input with three different tv modes?

Nick
_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


danielk at cuymedia

Jan 15, 2006, 11:45 AM

Post #6 of 7 (1083 views)
Permalink
Re: Channel handling [In reply to]

On Sun, 2006-01-15 at 11:32 -0800, jafa wrote:
> Daniel Kristjansson wrote:
> > I would recommend keeping the input stuff in there, this allows for
> > easier refactoring of channel classes later on. And if at some point
> > multiple inputs are added to a future rev of the hardware you won't
> > have to rewrite everything (Say you want to support OTA and Cable
> > with the same device without the user needing to change the wiring).
> >
>
> Hi Daniel,
>
> Each tuner on the box has one physical input but can demodulate 8VSB,
> 64QAM, and 256QAM.
>
> Would it be better to consider it to have three inputs or to have one
> input with three different tv modes?

One input. I'm assuming you could have an 8-vsb channel on 21, and a
QAM-256 channel on 120, so if you had digital cable that used only
channels above 83, you could combine an antenna and cable inputs with
a lowpass and highpass filter, resp. The modulation of each channel
is specified in the dtv_multiplex table so each channel can have it's
own modulation within the same source.

So each tuner has it's own physical input? (i.e. unlike a PVR-500)

Can they issue DiSEqC commands?

-- Daniel

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


hdtv at silicondust

Jan 15, 2006, 1:01 PM

Post #7 of 7 (1049 views)
Permalink
Re: Channel handling [In reply to]

Daniel Kristjansson wrote:
> *This message was transferred with a trial version of CommuniGate(r) Pro*
> On Sun, 2006-01-15 at 11:32 -0800, jafa wrote:
>
>> Daniel Kristjansson wrote:
>>
>>> I would recommend keeping the input stuff in there, this allows for
>>> easier refactoring of channel classes later on. And if at some point
>>> multiple inputs are added to a future rev of the hardware you won't
>>> have to rewrite everything (Say you want to support OTA and Cable
>>> with the same device without the user needing to change the wiring).
>>>
>>>
>> Hi Daniel,
>>
>> Each tuner on the box has one physical input but can demodulate 8VSB,
>> 64QAM, and 256QAM.
>>
>> Would it be better to consider it to have three inputs or to have one
>> input with three different tv modes?
>>
>
> One input. I'm assuming you could have an 8-vsb channel on 21, and a
> QAM-256 channel on 120, so if you had digital cable that used only
> channels above 83, you could combine an antenna and cable inputs with
> a lowpass and highpass filter, resp. The modulation of each channel
> is specified in the dtv_multiplex table so each channel can have it's
> own modulation within the same source.
>
> So each tuner has it's own physical input? (i.e. unlike a PVR-500)
>
Yes - two tuners, two separate inputs. You can put one tuner in 8VSB
mode on one channel and the other in 256QAM mode on a different channel.

The current implementation is to create two devices for MythTV - one for
each tuner. The two devices don't interact with each other so there is
no need to cross-link in software. This approach also allows you to use
one tuner for a MythTV box and the other for something else.
> Can they issue DiSEqC commands?
>
No.
> -- Daniel
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev [at] mythtv
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>

_______________________________________________
mythtv-dev mailing list
mythtv-dev [at] mythtv
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.