vdr  2.2.0
descriptor.c
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (c) 2003 by Marcel Wiesweg *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  * $Id: descriptor.c 3.1 2013/10/30 10:16:18 kls Exp $
10  * *
11  ***************************************************************************/
12 
13 #include <string.h>
14 #include "descriptor.h"
15 
16 namespace SI {
17 
19  int offset=0;
20  const descr_short_event *s;
21  data.setPointerAndOffset<const descr_short_event>(s, offset);
23  languageCode[1]=s->lang_code2;
24  languageCode[2]=s->lang_code3;
25  languageCode[3]=0;
26  name.setDataAndOffset(data+offset, s->event_name_length, offset);
27  const descr_short_event_mid *mid;
29  text.setData(data+offset, mid->text_length);
30 }
31 
33  return s->descriptor_number;
34 }
35 
37  return s->last_descriptor_number;
38 }
39 
41  int offset=0;
44  languageCode[1]=s->lang_code2;
45  languageCode[2]=s->lang_code3;
46  languageCode[3]=0;
47  itemLoop.setDataAndOffset(data+offset, s->length_of_items, offset);
48  const descr_extended_event_mid *mid;
50  text.setData(data+offset, mid->text_length);
51 }
52 
54  int offset=0;
55  const item_extended_event *first;
56  data.setPointerAndOffset<const item_extended_event>(first, offset);
57  itemDescription.setDataAndOffset(data+offset, first->item_description_length, offset);
58  const item_extended_event_mid *mid;
60  item.setData(data+offset, mid->item_length);
61 }
62 
63 /*int ExtendedEventDescriptors::getTextLength() {
64  int ret=0;
65  for (int i=0;i<length;i++) {
66  ExtendedEventDescriptor *d=(ExtendedEventDescriptor *)array[i];
67  if (!d)
68  continue;
69  ret+=d->text.getLength();
70  ExtendedEventDescriptor::Item item;
71  for (Loop::Iterator it; d->itemLoop.hasNext(it); ) {
72  item=d->itemLoop.getNext(it);
73  ret+=item.item.getLength();
74  ret+=item.itemDescription.getLength();
75  ret+=2; //the blanks
76  }
77  }
78  return ret;
79 }*/
80 
81 int ExtendedEventDescriptors::getMaximumTextLength(const char *separation1, const char *separation2) {
82  //add length of plain text, of itemized text with separators, and for one separator between the two fields.
83  return getMaximumTextPlainLength()+getMaximumTextItemizedLength(separation1, separation2)+strlen(separation2);
84 }
85 
86 char *ExtendedEventDescriptors::getText(const char *separation1, const char *separation2) {
87  int size = getMaximumTextLength(separation1, separation2);
88  char *text=new char[size];
89  return getText(text, size, separation1, separation2);
90 }
91 
92 char *ExtendedEventDescriptors::getText(char *buffer, int size, const char *separation1, const char *separation2) {
93  int index=0, len;
94  for (int i=0;i<length;i++) {
96  if (!d)
97  continue;
98  d->text.getText(buffer+index, size);
99  len = strlen(buffer+index);
100  index += len;
101  size -= len;
102  }
103 
104  int sepLen1 = strlen(separation1);
105  int sepLen2 = strlen(separation2);
106  bool separated = false;
107  for (int i=0;i<length;i++) {
109  if (!d)
110  continue;
111 
113  for (Loop::Iterator it; d->itemLoop.getNext(item, it); ) {
114  if (!separated && size > sepLen2) {
115  strcpy(buffer+index, separation2); // let's have a separator between the long text and the items
116  index += sepLen2;
117  size -= sepLen2;
118  separated = true;
119  }
120 
121  item.itemDescription.getText(buffer+index, size);
122  len = strlen(buffer+index);
123  index += len;
124  size -= len;
125  if (size > sepLen1) {
126  strcpy(buffer+index, separation1);
127  index += sepLen1;
128  size -= sepLen1;
129  }
130 
131  item.item.getText(buffer+index, size);
132  len = strlen(buffer+index);
133  index += len;
134  size -= len;
135  if (size > sepLen2) {
136  strcpy(buffer+index, separation2);
137  index += sepLen2;
138  size -= sepLen2;
139  }
140  }
141  }
142 
143  buffer[index]='\0';
144  return buffer;
145 }
146 
148  int ret=0;
149  for (int i=0;i<length;i++) {
151  if (!d)
152  continue;
153  ret+=d->text.getLength();
154  }
155  return ret;
156 }
157 
159  int size = getMaximumTextPlainLength();
160  char *text=new char[size];
161  return getTextPlain(text, size);
162 }
163 
164 char *ExtendedEventDescriptors::getTextPlain(char *buffer, int size) {
165  int index=0, len;
166  for (int i=0;i<length;i++) {
168  if (!d)
169  continue;
170  d->text.getText(buffer+index, size);
171  len = strlen(buffer+index);
172  index += len;
173  size -= len;
174  }
175  buffer[index]='\0';
176  return buffer;
177 }
178 
179 int ExtendedEventDescriptors::getMaximumTextItemizedLength(const char *separation1, const char *separation2) {
180  int ret=0;
181  int sepLength=strlen(separation1)+strlen(separation2);
182  for (int i=0;i<length;i++) {
184  if (!d)
185  continue;
186  //The length includes two 8-bit length fields which have already been subtracted from sepLength //XXX kls 2004-06-06: what does this mean???
187  ret+=d->itemLoop.getLength()+sepLength;
188  }
189  return ret;
190 }
191 
192 char *ExtendedEventDescriptors::getTextItemized(const char *separation1, const char *separation2) {
193  int size = getMaximumTextItemizedLength(separation1, separation2);
194  char *text=new char[size];
195  return getTextItemized(text, size, separation1, separation2);
196 }
197 
198 char *ExtendedEventDescriptors::getTextItemized(char *buffer, int size, const char *separation1, const char *separation2) {
199  int index=0, len;
200  int sepLen1 = strlen(separation1);
201  int sepLen2 = strlen(separation2);
202  for (int i=0;i<length;i++) {
204  if (!d)
205  continue;
206 
208  for (Loop::Iterator it; d->itemLoop.getNext(item, it); ) {
209  item.itemDescription.getText(buffer+index, size);
210  len = strlen(buffer+index);
211  index += len;
212  size -= len;
213  if (size > sepLen1) {
214  strcpy(buffer+index, separation1);
215  index += sepLen1;
216  size -= sepLen1;
217  }
218 
219  item.item.getText(buffer+index, size);
220  len = strlen(buffer+index);
221  index += len;
222  size -= len;
223  if (size > sepLen2) {
224  strcpy(buffer+index, separation2);
225  index += sepLen2;
226  size -= sepLen2;
227  }
228  }
229  }
230  buffer[index]='\0';
231  return buffer;
232 }
233 
234 //returns the itemized text pair by pair. Maximum length for buffers is 256.
235 //Return value is false if and only if the end of the list is reached.
236 bool ExtendedEventDescriptors::getTextItemized(Loop::Iterator &it, bool &valid, char *itemDescription, char *itemText, int sizeItemDescription, int sizeItemText) {
237  //The iterator has to store two values: The descriptor index (4bit)
238  //and the item loop index (max overall length 256, min item length 16 => max number 128 => 7bit)
239  valid=false;
240 
241  int index=(it.i & 0x780) >> 7; // 0x780 == 1111 000 0000
242  it.i &= 0x7F; //0x7F == 111 1111
243 
244  for (;index<length;index++) {
246  if (!d)
247  continue;
248 
250  if (d->itemLoop.getNext(item, it)) {
251  item.item.getText(itemDescription, sizeItemDescription);
252  item.itemDescription.getText(itemText, sizeItemText);
253  valid=true;
254  break;
255  } else {
256  it.reset();
257  continue;
258  }
259  }
260 
261  it.i &= 0x7F;
262  it.i |= (index & 0xF) << 7; //0xF == 1111
263 
264  return index<length;
265 }
266 
268  return HILO(s->reference_service_id);
269 }
270 
272  return HILO(s->reference_event_id);
273 }
274 
277 }
278 
280  //this descriptor is only a header and a loop
281  nibbleLoop.setData(data+sizeof(descr_content), getLength()-sizeof(descr_content));
282 }
283 
285  return s->content_nibble_level_1;
286 }
287 
289  return s->content_nibble_level_2;
290 }
291 
293  return s->user_nibble_1;
294 }
295 
297  return s->user_nibble_2;
298 }
299 
301  s=data.getData<const nibble_content>();
302 }
303 
305  //this descriptor is only a header and a loop
306  ratingLoop.setData(data+sizeof(descr_parental_rating), getLength()-sizeof(descr_parental_rating));
307 }
308 
310  return s->rating;
311 }
312 
314  s=data.getData<const parental_rating>();
315  languageCode[0]=s->lang_code1;
316  languageCode[1]=s->lang_code2;
317  languageCode[2]=s->lang_code3;
318  languageCode[3]=0;
319 }
320 
322  //this descriptor is only a header and a loop
323  teletextLoop.setData(data+sizeof(descr_teletext), getLength()-sizeof(descr_teletext));
324 }
325 
327  s=data.getData<const item_teletext>();
328  languageCode[0]=s->lang_code1;
329  languageCode[1]=s->lang_code2;
330  languageCode[2]=s->lang_code3;
331  languageCode[3]=0;
332 }
333 
335  return s->type;
336 }
337 
339  return s->magazine_number;
340 }
341 
343  return s->page_number;
344 }
345 
347  return HILO(s->CA_type);
348 }
349 
351  return HILO(s->CA_PID);
352 }
353 
355  int offset=0;
356  data.setPointerAndOffset<const descr_ca>(s, offset);
357  if (checkSize(getLength()-offset))
358  privateData.assign(data.getData(offset), getLength()-offset);
359 }
360 
362  return s->component_tag;
363 }
364 
367 }
368 
371 }
372 
374  identifiers.setData(data+sizeof(descr_ca_identifier), getLength()-sizeof(descr_ca_identifier));
375 }
376 
378  return (HILO(s->carousel_id_hi) << 16) | HILO(s->carousel_id_lo);
379 }
380 
382  return s->FormatId;
383 }
384 
387 }
388 
390  serviceLoop.setData(data+sizeof(descr_service_list), getLength()-sizeof(descr_service_list));
391 }
392 
394  return HILO(s->service_id);
395 }
396 
398  return s->service_type;
399 }
400 
403 }
404 
406  return (HILO(s->frequency_hi) << 16) | HILO(s->frequency_lo);
407 }
408 
410  return HILO(s->orbital_position);
411 }
412 
414  return s->west_east_flag;
415 }
416 
418  return s->polarization;
419 }
420 
422  return s->modulation_system;
423 }
424 
426  return s->modulation_type;
427 }
428 
430  return s->roll_off;
431 }
432 
434  return (HILO(s->symbol_rate_hi) << 12) | (s->symbol_rate_lo_1 << 4) | s->symbol_rate_lo_2;
435 }
436 
438  return s->fec_inner;
439 }
440 
443 }
444 
446  return (HILO(s->frequency_hi) << 16) | HILO(s->frequency_lo);
447 }
448 
450  return s->fec_outer;
451 }
452 
454  return s->modulation;
455 }
456 
458  return (HILO(s->symbol_rate_hi) << 12) | (s->symbol_rate_lo_1 << 4) | s->symbol_rate_lo_2;
459 }
460 
462  return s->fec_inner;
463 }
464 
467 }
468 
470  return (HILO(s->frequency_hi) << 16) | HILO(s->frequency_lo);
471 }
472 
474  return s->priority;
475 }
476 
478  return s->time_slicing_indicator;
479 }
480 
482  return s->mpe_fec_indicator;
483 }
484 
486  return s->bandwidth;
487 }
488 
490  return s->constellation;
491 }
492 
494  return s->hierarchy;
495 }
496 
498  return s->code_rate_HP;
499 }
500 
502  return s->code_rate_LP;
503 }
504 
506  return s->guard_interval;
507 }
508 
510  return s->transmission_mode;
511 }
512 
514  return s->other_frequency_flag;
515 }
516 
519 }
520 
522  return s->service_type;
523 }
524 
526  int offset=0;
527  data.setPointerAndOffset<const descr_service>(s, offset);
528  providerName.setDataAndOffset(data+offset, s->provider_name_length, offset);
529  const descr_service_mid *mid;
530  data.setPointerAndOffset<const descr_service_mid>(mid, offset);
531  serviceName.setData(data+offset, mid->service_name_length);
532 }
533 
535  serviceLoop.setData(data+sizeof(descr_nvod_reference), getLength()-sizeof(descr_nvod_reference));
536 }
537 
539  return HILO(s->transport_stream_id);
540 }
541 
543  return HILO(s->original_network_id);
544 }
545 
547  return HILO(s->service_id);
548 }
549 
551  s=data.getData<const item_nvod_reference>();
552 }
553 
555  return HILO(s->reference_service_id);
556 }
557 
560 }
561 
563  return s->stream_content;
564 }
565 
567  return s->component_type;
568 }
569 
571  return s->component_tag;
572 }
573 
575  int offset=0;
576  data.setPointerAndOffset<const descr_component>(s, offset);
577  languageCode[0]=s->lang_code1;
578  languageCode[1]=s->lang_code2;
579  languageCode[2]=s->lang_code3;
580  languageCode[3]=0;
581  description.setData(data+offset, getLength()-offset);
582 }
583 
586 }
587 
589  return (HILO(s->private_data_specifier_hi) << 16) | HILO(s->private_data_specifier_lo);
590 }
591 
593  subtitlingLoop.setData(data+sizeof(descr_subtitling), getLength()-sizeof(descr_subtitling));
594 }
595 
597  return s->subtitling_type;
598 }
599 
601  return HILO(s->composition_page_id);
602 }
603 
605  return HILO(s->ancillary_page_id);
606 }
607 
609  s=data.getData<const item_subtitling>();
610  languageCode[0]=s->lang_code1;
611  languageCode[1]=s->lang_code2;
612  languageCode[2]=s->lang_code3;
613  languageCode[3]=0;
614 }
615 
617  return HILO(s->new_original_network_id);
618 }
619 
621  return HILO(s->new_transport_stream_id);
622 }
623 
625  return HILO(s->new_service_id);
626 }
627 
629  s=data.getData<const descr_service_move>();
630 }
631 
633  return s->coding_type;
634 }
635 
637  int offset=0;
639  frequencies.setData(data+offset, getLength()-offset);
640 }
641 
643  textualServiceIdentifier.setData(data+sizeof(descr_service_identifier), getLength()-sizeof(descr_service_identifier));
644 }
645 
647  identifierLoop.setData(data+sizeof(descr_content_identifier), getLength()-sizeof(descr_content_identifier));
648 }
649 
651  int offset=0;
653  if (s->crid_location == 0) {
654  identifier.setData(data+(offset-1), s->crid_length);
655  }
656  else {
657  identifier.setData(data+(offset-1), 2);
658  }
659 }
660 
662  return s->crid_type;
663 }
664 
666  return s->crid_location;
667 }
668 
670  DefaultAuthority.setData(data+sizeof(descr_default_authority), getLength()-sizeof(descr_default_authority));
671 }
672 
675 }
676 
678  int offset=0;
679  const entry_multilingual_name *s;
681  languageCode[0]=s->lang_code1;
682  languageCode[1]=s->lang_code2;
683  languageCode[2]=s->lang_code3;
684  languageCode[3]=0;
685  name.setData(data+offset, s->text_length);
686 }
687 
689  return s->component_tag;
690 }
691 
693  int offset=0;
695  nameLoop.setData(data+sizeof(descr_multilingual_component), getLength()-sizeof(descr_multilingual_component));
696 }
697 
700 }
701 
703  int offset=0;
704  const entry_multilingual_name *s;
706  languageCode[0]=s->lang_code1;
707  languageCode[1]=s->lang_code2;
708  languageCode[2]=s->lang_code3;
709  languageCode[3]=0;
710  providerName.setDataAndOffset(data+offset, s->text_length, offset);
713  name.setData(data+offset, mid->service_name_length);
714 }
715 
717  localTimeOffsetLoop.setData(data+sizeof(descr_local_time_offset), getLength()-sizeof(descr_local_time_offset));
718 }
719 
721  return s->country_region_id;
722 }
723 
725  return s->local_time_offset_polarity;
726 }
727 
729  return (s->local_time_offset_h << 8) | s->local_time_offset_m;
730 }
731 
733  return DVBTime::getTime(s->time_of_change_mjd_hi, s->time_of_change_mjd_lo, s->time_of_change_time_h, s->time_of_change_time_m, s->time_of_change_time_s);
734 }
735 
737  return (s->next_time_offset_h << 8) | s->next_time_offset_m;
738 }
739 
742  countryCode[0]=s->country_code1;
743  countryCode[1]=s->country_code2;
744  countryCode[2]=s->country_code3;
745  countryCode[3]=0;
746 }
747 
749  int offset=0;
750  s1 = NULL;
751  data.setPointerAndOffset<const descr_linkage>(s, offset);
752  if (checkSize(getLength()-offset)) {
753  if (getLinkageType() == LinkageTypeMobileHandover)
754  data.setPointerAndOffset<const descr_linkage_8>(s1, offset);
755  privateData.assign(data.getData(offset), getLength()-offset);
756  }
757 }
758 
760  return HILO(s->transport_stream_id);
761 }
762 
764  return HILO(s->original_network_id);
765 }
766 
768  return HILO(s->service_id);
769 }
770 
772  return (LinkageType)s->linkage_type;
773 }
774 
776  return s1 == NULL ? 0 : s1->hand_over_type;
777 }
778 
780  return s1 == NULL ? 0 : s1->origin_type;
781 }
782 
784  return s1 == NULL ? 0 : HILO(s1->id);
785 }
786 
788  languageLoop.setData(data+sizeof(descr_iso_639_language), getLength()-sizeof(descr_iso_639_language));
789 
790  //all this is for backwards compatibility only
791  Loop::Iterator it;
792  Language first;
793  if (languageLoop.getNext(first, it)) {
794  languageCode[0]=first.languageCode[0];
795  languageCode[1]=first.languageCode[1];
796  languageCode[2]=first.languageCode[2];
797  languageCode[3]=0;
798  } else
799  languageCode[0]=0;
800 }
801 
804  languageCode[0]=s->lang_code1;
805  languageCode[1]=s->lang_code2;
806  languageCode[2]=s->lang_code3;
807  languageCode[3]=0;
808 }
809 
811  return (AudioType)s->audio_type;
812 }
813 
815  int offset=0;
816  data.setPointerAndOffset<const descr_pdc>(s, offset);
817 }
818 
820  return ((s->pil0 & 0x0F) << 1) | ((s->pil1 & 0x80) >> 7);
821 }
822 
824  return (s->pil1 >> 3) & 0x0F;
825 }
826 
828  return ((s->pil1 & 0x07) << 2) | ((s->pil2 & 0xC0) >> 6);
829 }
830 
832  return s->pil2 & 0x3F;
833 }
834 
836  int offset=0;
838 }
839 
841  return s->ancillary_data_identifier;
842 }
843 
845  int offset=0;
846  input_stream_identifier=0;
851  input_stream_identifier = *data.getData(offset++);
852 }
853 
855  return s->scrambling_sequence_selector;
856 }
857 
859  return s->multiple_input_stream_flag;
860 }
861 
863  return s->backwards_compatibility_indicator;
864 }
865 
867  return sss == NULL ? 0 : (sss->scrambling_sequence_index_hi_lo << 16) | HILO(sss->scrambling_sequence_index_lo);
868 }
869 
871  int offset=0;
872  data.setPointerAndOffset<const descr_extension>(s, offset);
873 }
874 
876  return s->descriptor_tag_extension;
877 }
878 
880  int offset=0;
882  extended_data_flag = s->descriptor_length > 0x04;
883 }
884 
886  return extended_data_flag;
887 }
888 
890  return s->descriptor_tag_extension;
891 }
892 
894  return s->plp_id;
895 }
896 
898  return HILO(s->t2_system_id);
899 }
900 
902  return extended_data_flag ? s->siso_miso : -1;
903 }
904 
906  return extended_data_flag ? s->bandwidth : -1;
907 }
908 
910  return extended_data_flag ? s->guard_interval : -1;
911 }
912 
914  return extended_data_flag ? s->transmission_mode : -1;
915 }
916 
918  return extended_data_flag ? s->other_frequency_flag : -1;
919 }
920 
922  return extended_data_flag ? s->tfs_flag : -1;
923 }
924 
926  //this descriptor is only a header and a loop
927  logicalChannelLoop.setData(data+sizeof(descr_logical_channel), getLength()-sizeof(descr_logical_channel));
928 }
929 
931  return HILO(s->service_id);
932 }
933 
935  return s->visible_service_flag;
936 }
937 
939  return HILO(s->logical_channel_number);
940 }
941 
943  s=data.getData<const item_logical_channel>();
944 }
945 
947  //this descriptor is only a header and a loop
948  hdSimulcastLogicalChannelLoop.setData(data+sizeof(descr_hd_simulcast_logical_channel), getLength()-sizeof(descr_hd_simulcast_logical_channel));
949 }
950 
952  return HILO(s->service_id);
953 }
954 
956  return s->visible_service_flag;
957 }
958 
960  return HILO(s->logical_channel_number);
961 }
962 
965 }
966 
968  return HILO(s->original_network_id);
969 }
970 
972  return HILO(s->transport_stream_id);
973 }
974 
976  return HILO(s->service_id);
977 }
978 
982 }
983 
985  return HILO(s->mjd);
986 }
987 
989  return s->start_time_loop;
990 }
991 
993  return sizeof(item_premiere_content_transmission_day)+getLoopLength();
994 }
995 
998  startTimeLoop.setData(data+sizeof(item_premiere_content_transmission_day), getLoopLength());
999 }
1000 
1002  return DVBTime::getTime(mjd >> 8, mjd & 0xff, s->start_time_h, s->start_time_m, s->start_time_s);
1003 }
1004 
1007 }
1008 
1010  entryLoop.setData(data+sizeof(descr_application_signalling), getLength()-sizeof(descr_application_signalling));
1011 }
1012 
1014  return HILO(s->application_type);
1015 }
1016 
1018  return s->AIT_version_number;
1019 }
1020 
1023 }
1024 
1026  return s->service_bound_flag;
1027 }
1028 
1030  return s->visibility;
1031 }
1032 
1034  return s->application_priority;
1035 }
1036 
1038  int offset=0;
1039  const descr_application *dapp;
1040  data.setPointerAndOffset<const descr_application>(dapp, offset);
1041  profileLoop.setDataAndOffset(data+offset, dapp->application_profiles_length, offset);
1043  transportProtocolLabels.setData(data+offset, getLength()-offset);
1044 }
1045 
1047  return HILO(s->application_profile);
1048 }
1049 
1051  return s->version_major;
1052 }
1053 
1055  return s->version_minor;
1056 }
1057 
1059  return s->version_micro;
1060 }
1061 
1064 }
1065 
1067  nameLoop.setData(data+sizeof(descr_application_name), getLength()-sizeof(descr_application_name));
1068 }
1069 
1074  languageCode[0]=s->lang_code1;
1075  languageCode[1]=s->lang_code2;
1076  languageCode[2]=s->lang_code3;
1077  languageCode[3]=0;
1078 }
1079 
1081  return HILO(s->protocol_id);
1082 }
1083 
1085  return s->transport_protocol_label;
1086 }
1087 
1089  return remote;
1090 }
1091 
1093  return componentTag;
1094 }
1095 
1096 char *MHP_TransportProtocolDescriptor::getUrlBase(char *buffer, int size) {
1097  return UrlBase.getText(buffer, size);
1098 }
1099 
1101  int offset=0;
1102  remote=false;
1103  componentTag=-1;
1105  if (getProtocolId() == ObjectCarousel) {
1106  const transport_via_oc *oc;
1107  data.setPointerAndOffset<const transport_via_oc>(oc, offset);
1108  remote=oc->remote;
1109  if (remote) {
1110  const transport_via_oc_remote_end *rem;
1112  componentTag=rem->component_tag;
1113  } else {
1114  const transport_via_oc_end *rem;
1115  data.setPointerAndOffset<const transport_via_oc_end>(rem, offset);
1116  componentTag=rem->component_tag;
1117  }
1118  } else if (getProtocolId() == HTTPoverInteractionChannel) {
1119  const transport_via_http *http;
1120  data.setPointerAndOffset<const transport_via_http>(http, offset);
1121  UrlBase.setDataAndOffset(data+offset, http->url_base_length, offset);
1122 
1123  // fill URL Extension,
1124  UrlExtensionLoop.setData(data+offset, getLength()-offset);
1125  } else {
1126  //unimplemented
1127  }
1128 }
1129 
1131  const descr_url_extension_entry *s;
1133  UrlExtension.setData(data, s->url_extension_length);
1134 }
1135 
1137  applicationLoop.setData(data+sizeof(descr_dvbj_application), getLength()-sizeof(descr_dvbj_application));
1138 }
1139 
1142  parameter.setData(data+sizeof(descr_dvbj_application_entry), entry->parameter_length);
1143 }
1144 
1146  int offset=0;
1147  const descr_dvbj_application_location *first;
1149  baseDirectory.setDataAndOffset(data+offset, first->base_directory_length, offset);
1152  classPath.setDataAndOffset(data+offset, mid->classpath_extension_length, offset);
1153  initialClass.setData(data+offset, getLength()-offset);
1154 }
1155 
1157  return HILO(s->icon_flags);
1158 }
1159 
1161  int offset=0;
1164  iconLocator.setDataAndOffset(data+offset, first->icon_locator_length, offset);
1166 }
1167 
1169  return location.getText(buffer, size);
1170 }
1171 
1173  int offset=0;
1176  location.setDataAndOffset(data+offset, loc->descriptor_length, offset);
1177 }
1178 
1180  return HILOHILO(s->format_identifier);
1181 }
1182 
1184  int offset=0;
1185  data.setPointerAndOffset<const descr_registration>(s, offset);
1186  if (checkSize(getLength()-offset))
1187  privateData.assign(data.getData(offset), getLength()-offset);
1188 }
1189 
1191  return s->profile_idc;
1192 }
1193 
1195  return s->constraint_set0_flag;
1196 }
1197 
1199  return s->constraint_set1_flag;
1200 }
1201 
1203  return s->constraint_set2_flag;
1204 }
1205 
1207  return s->constraint_set3_flag;
1208 }
1209 
1211  return s->constraint_set4_flag;
1212 }
1213 
1215  return s->constraint_set5_flag;
1216 }
1217 
1219  return s->avc_compatible_flags;
1220 }
1221 
1223  return s->level_idc;
1224 }
1225 
1227  return s->avc_still_present;
1228 }
1229 
1231  return s->avc_24_hour_picture_flag;
1232 }
1233 
1235  return s->frame_packing_sei_not_present_flag;
1236 }
1237 
1239  int offset=0;
1240  data.setPointerAndOffset<const descr_avc>(s, offset);
1241  if (checkSize(getLength()-offset))
1242  privateData.assign(data.getData(offset), getLength()-offset);
1243 }
1244 
1245 } //end of namespace
virtual void Parse()
Definition: descriptor.c:870
int getOriginalNetworkId() const
Definition: descriptor.c:763
u_char service_name_length
Definition: headers.h:1035
void setDataAndOffset(CharArray d, int l, int &offset)
Definition: si.h:293
int getExtensionDescriptorTag() const
Definition: descriptor.c:889
char * getLocation(char *buffer, int size)
Definition: descriptor.c:1168
int getNewTransportStreamId() const
Definition: descriptor.c:620
char * getText()
Definition: si.c:222
int getConstraintSet1Flag() const
Definition: descriptor.c:1198
int getAncillaryDataIdentifier() const
Definition: descriptor.c:840
int getConstraintSet3Flag() const
Definition: descriptor.c:1206
time_t getTime(unsigned char date_hi, unsigned char date_lo, unsigned char timehr, unsigned char timemi, unsigned char timese)
Definition: util.c:190
int getHandOverType() const
Definition: descriptor.c:775
u_char lang_code2
Definition: headers.h:1970
virtual int getLength()
Definition: si.h:294
int getConstraintSet2Flag() const
Definition: descriptor.c:1202
u_char crid_length
Definition: headers.h:1692
Definition: headers.h:1968
int getTransportStreamId() const
Definition: descriptor.c:759
int getServiceType() const
Definition: descriptor.c:521
virtual void Parse()
Definition: descriptor.c:525
Definition: headers.h:1989
int getCaPid() const
Definition: descriptor.c:350
int getApplicationPriority() const
Definition: descriptor.c:1033
#define HILOHILO(x)
Definition: util.h:22
virtual void Parse()
Definition: descriptor.c:18
int getComponentTag() const
Definition: descriptor.c:570
int getAVCCompatibleFlags() const
Definition: descriptor.c:1218
int getOtherFrequencyFlag() const
Definition: descriptor.c:917
int getExtensionDescriptorTag() const
Definition: descriptor.c:875
int getNewOriginalNetworkId() const
Definition: descriptor.c:616
LinkageType
Definition: si.h:204
virtual void Parse()
Definition: descriptor.c:574
u_char country_code2
Definition: headers.h:1302
int getId() const
Definition: descriptor.c:783
virtual void Parse()
Definition: descriptor.c:321
u_char event_name_length
Definition: headers.h:1120
Definition: descriptor.c:16
void setPointerAndOffset(const T *&p, int &offset) const
Definition: util.h:56
u_char crid_location
Definition: headers.h:1686
Definition: headers.h:1622
virtual int getLength()
Definition: si.c:96
int getCaType() const
Definition: descriptor.c:346
int getMinute() const
Definition: descriptor.c:831
bool checkSize(int offset)
Definition: si.c:37
Definition: headers.h:2044
int getContentNibbleLevel2() const
Definition: descriptor.c:288
int getFormatIdentifier() const
Definition: descriptor.c:1179
Definition: headers.h:1300
int getOriginType() const
Definition: descriptor.c:779
u_char application_profiles_length
Definition: headers.h:1928
virtual void Parse()
Definition: descriptor.c:748
u_char parameter_length
Definition: headers.h:2045
virtual void Parse()
Definition: descriptor.c:1238
virtual void Parse()
Definition: descriptor.c:814
virtual void Parse()
Definition: descriptor.c:369
int getConstraintSet5Flag() const
Definition: descriptor.c:1214
Definition: headers.h:1683
int getConstraintSet4Flag() const
Definition: descriptor.c:1210
u_char lang_code3
Definition: headers.h:1971
Definition: headers.h:1949
LinkageType getLinkageType() const
Definition: descriptor.c:771
int getContentNibbleLevel1() const
Definition: descriptor.c:284
void setData(CharArray d, int l)
Definition: si.h:291
int getNewServiceId() const
Definition: descriptor.c:624
int getConstraintSet0Flag() const
Definition: descriptor.c:1194
int getFramePackingSEINotPresentFlag() const
Definition: descriptor.c:1234
u_char item_description_length
Definition: headers.h:1153
int getMaximumTextItemizedLength(const char *separation1="\t", const char *separation2="\n")
Definition: descriptor.c:179
int getHour() const
Definition: descriptor.c:827
int getMonth() const
Definition: descriptor.c:823
virtual void Parse()
Definition: descriptor.c:628
u_char country_code1
Definition: headers.h:1301
virtual void Parse()
Definition: descriptor.c:354
u_char url_extension_length
Definition: headers.h:1990
virtual void Parse()
Definition: descriptor.c:389
u_char lang_code3
Definition: headers.h:1271
u_char provider_name_length
Definition: headers.h:1031
int getReferenceServiceId() const
Definition: descriptor.c:267
u_char lang_code1
Definition: headers.h:1969
int getProfileIdc() const
Definition: descriptor.c:1190
int getStreamContent() const
Definition: descriptor.c:562
int getLevelIdc() const
Definition: descriptor.c:1222
u_char country_code3
Definition: headers.h:1303
CharArray data
Definition: si.h:241
char * getText(const char *separation1="\t", const char *separation2="\n")
Definition: descriptor.c:86
int getDay() const
Definition: descriptor.c:819
virtual void Parse()
Definition: descriptor.c:279
AudioType
Definition: si.h:217
u_char lang_code2
Definition: headers.h:1270
StructureLoop< Item > itemLoop
Definition: descriptor.h:43
int getTeletextMagazineNumber() const
Definition: descriptor.c:338
char * getUrlBase(char *buffer, int size)
Definition: descriptor.c:1096
char * getTextItemized(const char *separation1="\t", const char *separation2="\n")
Definition: descriptor.c:192
int getComponentType() const
Definition: descriptor.c:566
int getServiceId() const
Definition: descriptor.c:767
int getAVCStillPresent() const
Definition: descriptor.c:1226
const unsigned char * getData() const
Definition: util.h:51
u_char application_name_length
Definition: headers.h:1972
int getAVC24HourPictureFlag() const
Definition: descriptor.c:1230
#define HILO(x)
Definition: util.h:21
int getMaximumTextLength(const char *separation1="\t", const char *separation2="\n")
Definition: descriptor.c:81
void reset()
Definition: si.h:326
virtual void Parse()
Definition: descriptor.c:592