NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 305 306 307 308 309 … 433 Next »
Question on C# libs regarding EPG 'serviceType'

Question on C# libs regarding EPG 'serviceType'
fjbpchristiaens
Offline

Member

Posts: 75
Threads: 6
Joined: May 2012
#1
2012-05-18, 11:45 AM
Hello,

Using C# classes 'Channel' and 'EPGEvent', is there a(n easy) way to detect whether the channel is a radio channel or a TV channel through the provided DLLs? I have a C# class that browses through a Dictionary<Channel, List<EPGEvent> list and would like to filter out all radio channels? I failed to see a 'typeOfService' member in either of the aforementioned classes (where I would expect a value '02' standing for digital radio). What comes close is the member "channel.GetChannelMapping(<captureSourceOID>).serviceType, but I am not sure this is the correct member nor do I know what to specify as <captureSourceOID>.

Does anybody has some advise on how this could be done?

Tanks in advance
Frederic
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#2
2012-05-18, 05:12 PM
You would have to look at the mappings for each channel to determine it's types.

The reasons it is on the channel mapping is because different mappings can carry different types of content. For example, one channel might be MPEG2 from one capture device, and H.264 from another. Another example might a radio station being MPEG1 audio from one device and AAC audio from another. That said, its unlikely to be a radio type from one source and video from another, so you can just do this to tell:

Code:
if (channel.Mappings.Count > 0)
                                    {
                                        int serviceType = channel.Mappings[0].serviceType;
                                        if (serviceType == 0x02 || serviceType == 0x0A)
                                        {
                                            ...radio...
                                        }
                                    }
fjbpchristiaens
Offline

Member

Posts: 75
Threads: 6
Joined: May 2012
#3
2012-05-19, 05:53 AM
works like a charm, thanks!
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  changing channels in guide - stupid user question mt900spg 2 1,622 2019-12-19, 01:30 PM
Last Post: mvallevand
  Question about Channel Changing hdpvr-doug8796 6 2,555 2019-10-09, 06:24 PM
Last Post: hdpvr-doug8796
  Series/Episode question Bobins 4 1,781 2019-06-27, 08:50 PM
Last Post: sub
  Archive question Bobins 3 1,581 2019-05-23, 12:30 PM
Last Post: ElihuRozen
  Another Skinning question - Ready Recordings bar Rage321 11 2,999 2019-04-26, 12:51 PM
Last Post: mvallevand
  Skinning question - Adding more listings, making it fit Rage321 3 1,562 2019-04-21, 01:05 AM
Last Post: Rage321
  Rebuilt on New Hardware // Decoder Question rowle1jt 8 2,503 2019-03-14, 12:06 PM
Last Post: rowle1jt
  Weird Question // Cutting Commercials rowle1jt 2 1,447 2019-02-01, 10:57 PM
Last Post: meccano
  ITV HD UK weirdness - general question Pbathuk 0 858 2019-01-14, 09:56 PM
Last Post: Pbathuk
  Scheduling Question jcole998 10 3,092 2018-12-13, 02:23 PM
Last Post: jcole998

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode