2 * $Id: container.cpp,v 1.1 2003-10-17 15:36:37 tmbinc Exp $
4 * (C) 2002-2003 Andreas Oberritter <obi@saftware.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #include <lib/dvb_si/ac3_descriptor.h>
23 #include <lib/dvb_si/ancillary_data_descriptor.h>
24 #include <lib/dvb_si/announcement_support_descriptor.h>
25 #include <lib/dvb_si/application_signalling_descriptor.h>
26 #include <lib/dvb_si/audio_stream_descriptor.h>
27 #include <lib/dvb_si/bouquet_name_descriptor.h>
28 #include <lib/dvb_si/ca_descriptor.h>
29 #include <lib/dvb_si/ca_identifier_descriptor.h>
30 #include <lib/dvb_si/ca_system_descriptor.h>
31 #include <lib/dvb_si/cable_delivery_system_descriptor.h>
32 #include <lib/dvb_si/cell_frequency_link_descriptor.h>
33 #include <lib/dvb_si/cell_list_descriptor.h>
34 #include <lib/dvb_si/component_descriptor.h>
35 #include <lib/dvb_si/container.h>
36 #include <lib/dvb_si/content_descriptor.h>
37 #include <lib/dvb_si/country_availability_descriptor.h>
38 #include <lib/dvb_si/data_broadcast_descriptor.h>
39 #include <lib/dvb_si/data_broadcast_id_descriptor.h>
40 #include <lib/dvb_si/extended_event_descriptor.h>
41 #include <lib/dvb_si/frequency_list_descriptor.h>
42 #include <lib/dvb_si/iso639_language_descriptor.h>
43 #include <lib/dvb_si/linkage_descriptor.h>
44 #include <lib/dvb_si/local_time_offset_descriptor.h>
45 #include <lib/dvb_si/mosaic_descriptor.h>
46 #include <lib/dvb_si/multilingual_bouquet_name_descriptor.h>
47 #include <lib/dvb_si/multilingual_component_descriptor.h>
48 #include <lib/dvb_si/multilingual_network_name_descriptor.h>
49 #include <lib/dvb_si/multilingual_service_name_descriptor.h>
50 #include <lib/dvb_si/network_name_descriptor.h>
51 #include <lib/dvb_si/nvod_reference_descriptor.h>
52 #include <lib/dvb_si/parental_rating_descriptor.h>
53 #include <lib/dvb_si/pdc_descriptor.h>
54 #include <lib/dvb_si/private_data_specifier_descriptor.h>
55 #include <lib/dvb_si/satellite_delivery_system_descriptor.h>
56 #include <lib/dvb_si/service_descriptor.h>
57 #include <lib/dvb_si/service_list_descriptor.h>
58 #include <lib/dvb_si/service_move_descriptor.h>
59 #include <lib/dvb_si/short_event_descriptor.h>
60 #include <lib/dvb_si/stream_identifier_descriptor.h>
61 #include <lib/dvb_si/stuffing_descriptor.h>
62 #include <lib/dvb_si/subtitling_descriptor.h>
63 #include <lib/dvb_si/target_background_grid_descriptor.h>
64 #include <lib/dvb_si/telephone_descriptor.h>
65 #include <lib/dvb_si/teletext_descriptor.h>
66 #include <lib/dvb_si/terrestrial_delivery_system_descriptor.h>
67 #include <lib/dvb_si/time_shifted_service_descriptor.h>
68 #include <lib/dvb_si/vbi_data_descriptor.h>
69 #include <lib/dvb_si/vbi_teletext_descriptor.h>
70 #include <lib/dvb_si/video_stream_descriptor.h>
71 #include <lib/dvb_si/video_window_descriptor.h>
72 #include <lib/dvb_si/descriptor_tag.h>
74 DescriptorContainer::~DescriptorContainer(void)
76 for (DescriptorIterator i = descriptorVector.begin(); i != descriptorVector.end(); ++i)
80 void DescriptorContainer::descriptor(const uint8_t * const buffer)
83 case VIDEO_STREAM_DESCRIPTOR:
84 descriptorVector.push_back(new VideoStreamDescriptor(buffer));
87 case AUDIO_STREAM_DESCRIPTOR:
88 descriptorVector.push_back(new AudioStreamDescriptor(buffer));
91 case TARGET_BACKGROUND_GRID_DESCRIPTOR:
92 descriptorVector.push_back(new TargetBackgroundGridDescriptor(buffer));
95 case VIDEO_WINDOW_DESCRIPTOR:
96 descriptorVector.push_back(new VideoWindowDescriptor(buffer));
100 descriptorVector.push_back(new CaDescriptor(buffer));
103 case ISO_639_LANGUAGE_DESCRIPTOR:
104 descriptorVector.push_back(new Iso639LanguageDescriptor(buffer));
107 case NETWORK_NAME_DESCRIPTOR:
108 descriptorVector.push_back(new NetworkNameDescriptor(buffer));
111 case SERVICE_LIST_DESCRIPTOR:
112 descriptorVector.push_back(new ServiceListDescriptor(buffer));
115 case STUFFING_DESCRIPTOR:
116 descriptorVector.push_back(new StuffingDescriptor(buffer));
119 case SATELLITE_DELIVERY_SYSTEM_DESCRIPTOR:
120 descriptorVector.push_back(new SatelliteDeliverySystemDescriptor(buffer));
123 case CABLE_DELIVERY_SYSTEM_DESCRIPTOR:
124 descriptorVector.push_back(new CableDeliverySystemDescriptor(buffer));
127 case VBI_DATA_DESCRIPTOR:
128 descriptorVector.push_back(new VbiDataDescriptor(buffer));
131 case VBI_TELETEXT_DESCRIPTOR:
132 descriptorVector.push_back(new VbiTeletextDescriptor(buffer));
135 case BOUQUET_NAME_DESCRIPTOR:
136 descriptorVector.push_back(new BouquetNameDescriptor(buffer));
139 case SERVICE_DESCRIPTOR:
140 descriptorVector.push_back(new ServiceDescriptor(buffer));
143 case COUNTRY_AVAILABILITY_DESCRIPTOR:
144 descriptorVector.push_back(new CountryAvailabilityDescriptor(buffer));
147 case LINKAGE_DESCRIPTOR:
148 descriptorVector.push_back(new LinkageDescriptor(buffer));
151 case NVOD_REFERENCE_DESCRIPTOR:
152 descriptorVector.push_back(new NvodReferenceDescriptor(buffer));
155 case TIME_SHIFTED_SERVICE_DESCRIPTOR:
156 descriptorVector.push_back(new TimeShiftedServiceDescriptor(buffer));
159 case SHORT_EVENT_DESCRIPTOR:
160 descriptorVector.push_back(new ShortEventDescriptor(buffer));
163 case EXTENDED_EVENT_DESCRIPTOR:
164 descriptorVector.push_back(new ExtendedEventDescriptor(buffer));
167 case COMPONENT_DESCRIPTOR:
168 descriptorVector.push_back(new ComponentDescriptor(buffer));
171 case MOSAIC_DESCRIPTOR:
172 descriptorVector.push_back(new MosaicDescriptor(buffer));
175 case STREAM_IDENTIFIER_DESCRIPTOR:
176 descriptorVector.push_back(new StreamIdentifierDescriptor(buffer));
179 case CA_IDENTIFIER_DESCRIPTOR:
180 descriptorVector.push_back(new CaIdentifierDescriptor(buffer));
183 case CONTENT_DESCRIPTOR:
184 descriptorVector.push_back(new ContentDescriptor(buffer));
187 case PARENTAL_RATING_DESCRIPTOR:
188 descriptorVector.push_back(new ParentalRatingDescriptor(buffer));
191 case TELETEXT_DESCRIPTOR:
192 descriptorVector.push_back(new TeletextDescriptor(buffer));
195 case TELEPHONE_DESCRIPTOR:
196 descriptorVector.push_back(new TelephoneDescriptor(buffer));
199 case LOCAL_TIME_OFFSET_DESCRIPTOR:
200 descriptorVector.push_back(new LocalTimeOffsetDescriptor(buffer));
203 case SUBTITLING_DESCRIPTOR:
204 descriptorVector.push_back(new SubtitlingDescriptor(buffer));
207 case TERRESTRIAL_DELIVERY_SYSTEM_DESCRIPTOR:
208 descriptorVector.push_back(new TerrestrialDeliverySystemDescriptor(buffer));
211 case MULTILINGUAL_NETWORK_NAME_DESCRIPTOR:
212 descriptorVector.push_back(new MultilingualNetworkNameDescriptor(buffer));
215 case MULTILINGUAL_BOUQUET_NAME_DESCRIPTOR:
216 descriptorVector.push_back(new MultilingualBouquetNameDescriptor(buffer));
219 case MULTILINGUAL_SERVICE_NAME_DESCRIPTOR:
220 descriptorVector.push_back(new MultilingualServiceNameDescriptor(buffer));
223 case MULTILINGUAL_COMPONENT_DESCRIPTOR:
224 descriptorVector.push_back(new MultilingualComponentDescriptor(buffer));
227 case PRIVATE_DATA_SPECIFIER_DESCRIPTOR:
228 descriptorVector.push_back(new PrivateDataSpecifierDescriptor(buffer));
231 case SERVICE_MOVE_DESCRIPTOR:
232 descriptorVector.push_back(new ServiceMoveDescriptor(buffer));
235 case FREQUENCY_LIST_DESCRIPTOR:
236 descriptorVector.push_back(new FrequencyListDescriptor(buffer));
239 case DATA_BROADCAST_DESCRIPTOR:
240 descriptorVector.push_back(new DataBroadcastDescriptor(buffer));
243 case CA_SYSTEM_DESCRIPTOR:
244 descriptorVector.push_back(new CaSystemDescriptor(buffer));
247 case DATA_BROADCAST_ID_DESCRIPTOR:
248 descriptorVector.push_back(new DataBroadcastIdDescriptor(buffer));
252 descriptorVector.push_back(new PdcDescriptor(buffer));
256 descriptorVector.push_back(new Ac3Descriptor(buffer));
259 case ANCILLARY_DATA_DESCRIPTOR:
260 descriptorVector.push_back(new AncillaryDataDescriptor(buffer));
263 case CELL_LIST_DESCRIPTOR:
264 descriptorVector.push_back(new CellListDescriptor(buffer));
267 case CELL_FREQUENCY_LINK_DESCRIPTOR:
268 descriptorVector.push_back(new CellFrequencyLinkDescriptor(buffer));
271 case ANNOUNCEMENT_SUPPORT_DESCRIPTOR:
272 descriptorVector.push_back(new AnnouncementSupportDescriptor(buffer));
275 case APPLICATION_SIGNALLING_DESCRIPTOR:
276 descriptorVector.push_back(new ApplicationSignallingDescriptor(buffer));
280 descriptorVector.push_back(new Descriptor(buffer));
285 const DescriptorVector *DescriptorContainer::getDescriptors(void) const
287 return &descriptorVector;