added init_fields for TransportPacket
tho [Wed, 12 Mar 2008 08:15:34 +0000 (08:15 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@742 270642c3-0616-0410-b53a-bc976706d245

Packets/MPEGDVBBundle/TransportPacket.cc
Packets/MPEGDVBBundle/TransportPacket.hh

index 59b3d5f..bb065ea 100644 (file)
 #define prefix_
 ///////////////////////////////cc.p////////////////////////////////////////
 
+prefix_ void senf::TransportPacketParser::init_fields()
+    const
+{
+    sync_byte() = TransportPacketType::SYNC_BYTE;
+    transport_error_indicator() = 0;
+    transport_scrmbl_ctrl() = 0;
+    adaptation_field_ctrl() = 0x1u;
+}
+            
 prefix_ void senf::TransportPacketType::dump(packet p, std::ostream & os)
 {
     os << "TransportPacket:\n"
index ab9d495..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 );