Avalpa Community

The place where we can talk freely about Avalpa product and services
It is currently Thu Aug 11, 2022 12:35 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Thu May 07, 2015 2:52 pm 
Offline

Joined: Thu Feb 13, 2014 12:48 pm
Posts: 5
think I've managed to add a descriptor "Frequency list descriptor":

Code:
#######################################################################
class frequency_descriptor_loop_item(DVBobject):

    def pack(self):
   fmt = "!l"
   return pack(fmt,
       self.centre_frequency,
   )

class frequency_list_descriptor(Descriptor):

    descriptor_tag = 0x62

    def bytes(self):
        dvb_frequency_bytes = string.join(
       map(lambda x: x.pack(),   
                self.dvb_frequency_descriptor_loop),
            "")                           

        FMT = "!B%ds"  % len(dvb_frequency_bytes)
        print FMT
        return pack(FMT,
          self.coding_type, #int
                    dvb_frequency_bytes,
                    )
                   
######################################################################


example:


Code:
      transport_stream_loop_item(
      transport_stream_id = 1,
      original_network_id = 0,
      transport_descriptor_loop = [
          frequency_list_descriptor(
              coding_type = 254, # cable = 2 -> FE -> 254
         dvb_frequency_descriptor_loop = [
             frequency_descriptor_loop_item(
                      centre_frequency = 0x3060000,
             ),
             frequency_descriptor_loop_item(
                      centre_frequency = 0x3780000,
             ),
             frequency_descriptor_loop_item(
                      centre_frequency = 0x3940000,
             ),
             frequency_descriptor_loop_item(
                      centre_frequency = 0x4100000,
             ),
             frequency_descriptor_loop_item(
                      centre_frequency = 0x6260000,
             ),
         ],
          ),
          service_list_descriptor(
...




Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group