Log in Register FAQ Memberlist Search pcHDTV Forum Index
pcHDTV Forum

pcHDTV Forum Index -> General pcHDTV topics -> Check for Broadcast Flag
Post new topic  This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic 
Check for Broadcast Flag
PostPosted: Thu Mar 03, 2005 2:48 pm Reply with quote
kb7oeb
 
Joined: 23 Mar 2004
Posts: 32




Is there a way to tell if a broadcaster is transmiting the broadcast flag?
View user's profile Send private message AIM Address
How to spot the broadcast flag
PostPosted: Sat Mar 05, 2005 10:49 am Reply with quote
decourl
 
Joined: 26 Jan 2005
Posts: 7




Obtain the NIST DASE ATSC/MPEG2 parser from www.itl.nist.gov and build it.

Code:

decourl@post src $ wget http://www.itl.nist.gov/div895/cmr/dase/src/parser.tar.gz
decourl@post src $ tar zxf parser.tar.gz
decourl@post src $ cd parser
decourl@post src $ gcc -o parser rt_atsc_parser.c
rt_atsc_parser.c:4498:13: warning: unknown escape sequence '\D'


Obtain the ATSC transport stream to investigate:

In the following step, you will need to interrupt the getatsc command after a short period of time (hit [CNTRL]-[C] after several seconds).
Code:

decourl@post opt $ getatsc /dev/dtv0 45 > ~/out.ts
getatsc version 0.2: argc 3 argv[1] /dev/dtv0
channel 45
freq*16 = 10516
main: ioctl 1 rtn 0
main: ioctl 2 rtn 0
atscpackets ver 0.1 - by Jack Kelliher (c) 2002


Use the NIST DASE ATSC/MPEG2 parser to examine the captured transport stream:
The ATSC standard requires that, for terrestrial broadcast, one place that the Redistribution Control Descriptor (broadcast flag) must be placed (only if its presence is desired) is the Program Map Table (which is instantiated by the TS_program_map_section() structure).

Code:

decourl@post bin $ ./parser < ~/out.ts | grep -e PMT -e Tag
PMT table - sect_len=0x4b prog #=0x2 ver=0xd last_sect=0x0 tbl_len=0x4e PRC_PID=0x21
    Tag=0xb (syst_clk_descr), Len=0x2  0x42 0x3f
    Tag=0x5 (registration_descr), Len=0x4  0x47 0x41 0x39 0x34
    Tag=0xe (max_bitrate_descr), Len=0x3  0xc0 0xae 0x12
    Tag=0x86 (caption_serv_descr), Len=0x7  0xe1 0x65 0x6e 0x67 0xc1 0x3f 0xff
    Tag=0x10 (smoothing_buf_descr), Len=0x6  0xc0 0x2 0x71 0xc0 0x4 0x0
    Tag=0x6 (data_stream_align_descr), Len=0x1  0x2
    Tag=0x5 (registration_descr), Len=0x4  0x41 0x43 0x2d 0x33
    Tag=0xa (ISO_639_lang_descr), Len=0x4  0x65 0x6e 0x67 0x0
    Tag=0x81 (n/a), Len=0x3  0x8 0x28 0x5
    Tag=0x81 (n/a), Len=0x8  0xe8 0x0 0x3 0xff 0x1f 0x0 0x0 0x0
    Tag=0x86 (caption_serv_descr), Len=0x7  0xe1 0x65 0x6e 0x67 0xc1 0x9f 0x0
    Tag=0x87 (content_advisory_descr), Len=0x12  0xc1 0x1 0x1 0x5 0xf1 0xc 0x1 0x65 0x6e 0x67 0x1 0x0 0x0 0x4 0x54 0x56 0x2d
    Tag=0x81 (n/a), Len=0x8  0x8 0x38 0x5 0xff 0x1f 0x0 0x0 0x0
    Tag=0x86 (caption_serv_descr), Len=0x7  0xe1 0x65 0x6e 0x67 0xc1 0x1f 0x0


Note that if the Redistribution Control Descriptor (broadcast flag) was set, the parser would indicate that:
Code:

decourl@post parser $ sed -n '7218,7220p' < rt_atsc_parser.c
       case 0xAA:
         printf("Content_Protect_Copy_Mngt_descr");
         break;
decourl@post parser $


Links of interest:
View user's profile Send private message Send e-mail
Check for Broadcast Flag
  pcHDTV Forum Index -> General pcHDTV topics
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 vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 1  

  
  
 Post new topic  This topic is locked: you cannot edit posts or make replies.  


Powered by phpBB © 2001-2003 phpBB Group
Theme created by Vjacheslav Trushkin