vdr
2.2.0
|
#include <remux.h>
Public Member Functions | |
cTsPayload (void) | |
cTsPayload (uchar *Data, int Length, int Pid=-1) | |
void | Setup (uchar *Data, int Length, int Pid=-1) |
bool | AtTsStart (void) |
bool | AtPayloadStart (void) |
int | Available (void) |
int | Used (void) |
bool | Eof (void) const |
void | Statistics (void) const |
uchar | GetByte (void) |
bool | SkipBytes (int Bytes) |
bool | SkipPesHeader (void) |
int | GetLastIndex (void) |
void | SetByte (uchar Byte, int Index) |
bool | Find (uint32_t Code) |
Protected Member Functions | |
void | Reset (void) |
Private Member Functions | |
uchar | SetEof (void) |
Private Attributes | |
uchar * | data |
int | length |
int | pid |
int | index |
int | numPacketsPid |
int | numPacketsOther |
cTsPayload::cTsPayload | ( | uchar * | Data, |
int | Length, | ||
int | Pid = -1 |
||
) |
|
inline |
Returns true if this payload handler is currently pointing to the first byte of a TS packet that starts a new payload.
Definition at line 247 of file remux.h.
References TsPayloadStart().
Referenced by cMpeg2Parser::Parse().
|
inline |
Returns true if this payload handler is currently pointing to first byte of a TS packet.
Definition at line 244 of file remux.h.
References TS_SIZE.
Referenced by cMpeg2Parser::Parse().
|
inline |
|
inline |
Returns true if all available bytes of the TS payload have been processed.
Definition at line 257 of file remux.h.
Referenced by cMpeg2Parser::Parse().
bool cTsPayload::Find | ( | uint32_t | Code | ) |
Searches for the four byte sequence given in Code and returns true if it was found within the payload data.
The next call to GetByte() will return the value immediately following the Code. If the code was not found, the read index will remain the same as before this call, so that several calls to Find() can be performed starting at the same index.. The special code 0xFFFFFFFF can not be searched, because this value is used to initialize the scanner.
Definition at line 321 of file remux.c.
References EMPTY_SCANNER.
Referenced by cMpeg2Parser::Parse().
uchar cTsPayload::GetByte | ( | void | ) |
Gets the next byte of the TS payload, skipping any intermediate TS header data.
Definition at line 267 of file remux.c.
References MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION, PATPID, TS_SIZE, TS_SYNC_BYTE, TsHasPayload(), TsPayloadOffset(), TsPayloadStart(), and TsPid().
Referenced by cMpeg2Parser::Parse().
int cTsPayload::GetLastIndex | ( | void | ) |
Returns the index into the TS data of the payload byte that has most recently been read.
If no byte has been read yet, -1 will be returned.
Definition at line 310 of file remux.c.
Referenced by cMpeg2Parser::Parse().
void cTsPayload::SetByte | ( | uchar | Byte, |
int | Index | ||
) |
void cTsPayload::Setup | ( | uchar * | Data, |
int | Length, | ||
int | Pid = -1 |
||
) |
Sets up this TS payload handler with the given Data, which points to a sequence of Length bytes of complete TS packets.
Any incomplete TS packet at the end will be ignored. If Pid is given, only TS packets with data for that PID will be processed. Otherwise the PID of the first TS packet defines which payload will be delivered. Any intermediate TS packets with different PIDs will be skipped.
Definition at line 259 of file remux.c.
References TsPid().
bool cTsPayload::SkipBytes | ( | int | Bytes | ) |
bool cTsPayload::SkipPesHeader | ( | void | ) |
Skips all bytes belonging to the PES header of the payload.
Definition at line 305 of file remux.c.
References PesPayloadOffset(), and TsPayloadOffset().
Referenced by cMpeg2Parser::Parse().
void cTsPayload::Statistics | ( | void | ) | const |
May be called after a new frame has been detected, and will log a warning if the number of TS packets required to determine the frame type exceeded some safety limits.
Definition at line 338 of file remux.c.
References dsyslog, WRN_TS_PACKETS_FOR_FRAME_DETECTOR, and WRN_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION.
Referenced by cMpeg2Parser::Parse().
|
inline |
Returns the number of raw bytes that have already been used (e.g.
by calling GetByte()). Any TS packet of which at least a single byte has been delivered is counted with its full size.
Definition at line 253 of file remux.h.
References TS_SIZE.
Referenced by cMpeg2Parser::Parse().