From: tho Date: Wed, 12 Mar 2008 08:15:34 +0000 (+0000) Subject: added init_fields for TransportPacket X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=c05c8072901783422ac21cd9cc2438cd610b46f1;p=senf.git added init_fields for TransportPacket git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@742 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/Packets/MPEGDVBBundle/TransportPacket.cc b/Packets/MPEGDVBBundle/TransportPacket.cc index 59b3d5f..bb065ea 100644 --- a/Packets/MPEGDVBBundle/TransportPacket.cc +++ b/Packets/MPEGDVBBundle/TransportPacket.cc @@ -32,6 +32,15 @@ #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" diff --git a/Packets/MPEGDVBBundle/TransportPacket.hh b/Packets/MPEGDVBBundle/TransportPacket.hh index ab9d495..2bf00b3 100644 --- a/Packets/MPEGDVBBundle/TransportPacket.hh +++ b/Packets/MPEGDVBBundle/TransportPacket.hh @@ -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( TransportPacketParser::fixed_bytes );