00001 // -*- Mode: c++ -*- 00002 // Copyright (c) 2003-2004, Daniel Thor Kristjansson 00003 #ifndef _DISH_DESCRIPTORS_H_ 00004 #define _DISH_DESCRIPTORS_H_ 00005 00006 #include <cassert> 00007 00008 using namespace std; 00009 #include <qstring.h> 00010 00011 #include "mythcontext.h" 00012 #include "atscdescriptors.h" 00013 00014 class DishEventNameDescriptor : public MPEGDescriptor 00015 { 00016 public: 00017 DishEventNameDescriptor(const unsigned char* data) 00018 : MPEGDescriptor(data) 00019 { 00020 // Name bits loc expected value 00021 // descriptor_tag 8 0.0 0x91 00022 assert(DescriptorID::dish_event_name == DescriptorTag()); 00023 // descriptor_length 8 1.0 00024 } 00025 // unknown 8 2.0 00026 // event_name dlen-1 3.0 00027 bool HasName(void) const { return DescriptorLength() > 1; } 00028 QString Name(uint) const; 00029 }; 00030 00031 class DishEventDescriptionDescriptor : public MPEGDescriptor 00032 { 00033 public: 00034 DishEventDescriptionDescriptor(const unsigned char* data) 00035 : MPEGDescriptor(data) 00036 { 00037 // Name bits loc expected value 00038 // descriptor_tag 8 0.0 0x92 00039 assert(DescriptorID::dish_event_description == DescriptorTag()); 00040 // descriptor_length 8 1.0 00041 } 00042 // unknown 8/16 2.0 00043 // event_name dlen-2 3.0/4.0 00044 const unsigned char *DescriptionRaw(void) const; 00045 uint DescriptionRawLength(void) const; 00046 bool HasDescription(void) const { return DescriptionRawLength(); } 00047 QString Description(uint) const; 00048 }; 00049 00050 #endif // _DISH_DESCRIPTORS_H_
1.5.5