Permalink
Browse files

add constructor for PSIPTables from byte arrays

  • Loading branch information...
dekarl committed Jul 17, 2013
1 parent 555d030 commit e69f79df3fb318b0198cd20b065fd27c1801a665
Showing with 10 additions and 0 deletions.
  1. +10 −0 mythtv/libs/libmythtv/mpeg/mpegtables.h
@@ -371,6 +371,13 @@ class MTV_PUBLIC PSIPTable : public PESPacket
PSIPTable(const PESPacket& pkt, bool)
: PESPacket(reinterpret_cast<const TSPacket*>(pkt.tsheader()), false)
{ ; }
/// Constructor for viewing a section, does not create it's own data
PSIPTable(const unsigned char *pesdata, bool)
: PESPacket(pesdata, false)
{
// fixup wrong assumption about length for sections without CRC
_pesdataSize = SectionLength();
}
public:
PSIPTable(const PSIPTable& table) : PESPacket(table)
{
@@ -395,6 +402,9 @@ class MTV_PUBLIC PSIPTable : public PESPacket
static PSIPTable View(TSPacket& tspacket)
{ return PSIPTable(PESPacket::View(tspacket), false); }
static const PSIPTable ViewData(const unsigned char* pesdata)
{ return PSIPTable(pesdata, false); }
// Section Bits Start Byte sbit
// -----------------------------------------
// table_id 8 0.0 0

0 comments on commit e69f79d

Please sign in to comment.