Skip to content

Commit

Permalink
add constructor for PSIPTables from byte arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
dekarl committed Jul 18, 2013
1 parent 555d030 commit e69f79d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mythtv/libs/libmythtv/mpeg/mpegtables.h
Expand Up @@ -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)
{
Expand All @@ -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
Expand Down

0 comments on commit e69f79d

Please sign in to comment.