Utils: String join utility
[senf.git] / Packets / MPEGDVBBundle / TransportPacket.hh
index 36fd10f..2bf00b3 100644 (file)
@@ -56,6 +56,12 @@ namespace senf {
         SENF_PARSER_BITFIELD ( continuity_counter,          4, unsigned );
 
         SENF_PARSER_FINALIZE( TransportPacketParser );
+        
+        void init_fields() const;
+        SENF_PARSER_INIT() {
+            defaultInit();
+            init_fields();
+        }
     
 //        UInt8Parser payload_pointer() const {
 //            return parse<UInt8Parser>( TransportPacketParser::fixed_bytes ); 
@@ -119,13 +125,11 @@ namespace senf {
         using mixin::initSize;
         
         static void dump(packet p, std::ostream & os);
+        static const byte SYNC_BYTE = 0x47;
     };
     
     /** \brief Transport packet typedef */
-    typedef TransportPacketType::packet TransportPacket;
-    
-    #define TRANSPORT_PACKET_SYNC_BYTE 0x47
-  
+    typedef ConcretePacket<TransportPacketType> TransportPacket;
 }