vdr
2.2.0
|
Go to the source code of this file.
Classes | |
class | cRemux |
class | cTsPayload |
class | cPatPmtGenerator |
class | cPatPmtParser |
class | cTsToPes |
class | cFrameDetector |
class | cNaluDumper |
struct | cNaluDumper::sPayloadInfo |
class | cNaluStreamProcessor |
Macros | |
#define | TS_SYNC_BYTE 0x47 |
#define | TS_SIZE 188 |
#define | TS_ERROR 0x80 |
#define | TS_PAYLOAD_START 0x40 |
#define | TS_TRANSPORT_PRIORITY 0x20 |
#define | TS_PID_MASK_HI 0x1F |
#define | TS_SCRAMBLING_CONTROL 0xC0 |
#define | TS_ADAPT_FIELD_EXISTS 0x20 |
#define | TS_PAYLOAD_EXISTS 0x10 |
#define | TS_CONT_CNT_MASK 0x0F |
#define | TS_ADAPT_DISCONT 0x80 |
#define | TS_ADAPT_RANDOM_ACC 0x40 |
#define | TS_ADAPT_ELEM_PRIO 0x20 |
#define | TS_ADAPT_PCR 0x10 |
#define | TS_ADAPT_OPCR 0x08 |
#define | TS_ADAPT_SPLICING 0x04 |
#define | TS_ADAPT_TP_PRIVATE 0x02 |
#define | TS_ADAPT_EXTENSION 0x01 |
#define | PATPID 0x0000 |
#define | CATPID 0x0001 |
#define | MAXPID 0x2000 |
#define | PTSTICKS 90000 |
#define | PCRFACTOR 300 |
#define | MAX33BIT 0x00000001FFFFFFFFLL |
#define | MAX27MHZ ((MAX33BIT + 1) * PCRFACTOR - 1) |
#define | MAX_SECTION_SIZE 4096 |
#define | MAX_PMT_TS (MAX_SECTION_SIZE / TS_SIZE + 1) |
#define | MAX_PMT_PIDS 32 |
#define | MIN_TS_PACKETS_FOR_FRAME_DETECTOR 100 |
#define | PATCH_NALUDUMP 100 |
Enumerations | |
enum | ePesHeader { phNeedMoreData = -1, phInvalid = 0, phMPEG1 = 1, phMPEG2 = 2 } |
Functions | |
ePesHeader | AnalyzePesHeader (const uchar *Data, int Count, int &PesPayloadOffset, bool *ContinuationHeader=NULL) |
bool | TsHasPayload (const uchar *p) |
bool | TsSetPayload (const uchar *p) |
bool | TsHasAdaptationField (const uchar *p) |
bool | TsPayloadStart (const uchar *p) |
bool | TsError (const uchar *p) |
int | TsPid (const uchar *p) |
bool | TsIsScrambled (const uchar *p) |
uchar | TsGetContinuityCounter (const uchar *p) |
void | TsSetContinuityCounter (uchar *p, uchar Counter) |
int | TsPayloadOffset (const uchar *p) |
int | TsGetPayload (const uchar **p) |
int | TsContinuityCounter (const uchar *p) |
int64_t | TsGetPcr (const uchar *p) |
void | TsHidePayload (uchar *p) |
void | TsSetPcr (uchar *p, int64_t Pcr) |
int64_t | TsGetPts (const uchar *p, int l) |
int64_t | TsGetDts (const uchar *p, int l) |
void | TsSetPts (uchar *p, int l, int64_t Pts) |
void | TsSetDts (uchar *p, int l, int64_t Dts) |
void | TsExtendAdaptionField (unsigned char *Packet, int ToLength) |
bool | PesLongEnough (int Length) |
bool | PesHasLength (const uchar *p) |
int | PesLength (const uchar *p) |
int | PesPayloadOffset (const uchar *p) |
bool | PesHasPts (const uchar *p) |
bool | PesHasDts (const uchar *p) |
int64_t | PesGetPts (const uchar *p) |
int64_t | PesGetDts (const uchar *p) |
void | PesSetPts (uchar *p, int64_t Pts) |
void | PesSetDts (uchar *p, int64_t Dts) |
int64_t | PtsAdd (int64_t Pts1, int64_t Pts2) |
int64_t | PtsDiff (int64_t Pts1, int64_t Pts2) |
void | BlockDump (const char *Name, const u_char *Data, int Length) |
void | TsDump (const char *Name, const u_char *Data, int Length) |
void | PesDump (const char *Name, const u_char *Data, int Length) |
#define CATPID 0x0001 |
Definition at line 53 of file remux.h.
Referenced by cCaPidReceiver::cCaPidReceiver(), and cCaPidReceiver::Receive().
Definition at line 59 of file remux.h.
Referenced by cCuttingThread::FixFrame().
#define MAX33BIT 0x00000001FFFFFFFFLL |
Definition at line 58 of file remux.h.
Referenced by cCuttingThread::FixFrame(), PtsAdd(), and PtsDiff().
#define MAX_PMT_PIDS 32 |
Definition at line 347 of file remux.h.
Referenced by cPatPmtParser::ParsePat().
#define MAX_PMT_TS (MAX_SECTION_SIZE / TS_SIZE + 1) |
#define MAX_SECTION_SIZE 4096 |
Definition at line 290 of file remux.h.
Referenced by cPatPmtGenerator::GeneratePmt().
#define MIN_TS_PACKETS_FOR_FRAME_DETECTOR 100 |
Definition at line 488 of file remux.h.
Referenced by cIndexFileGenerator::Action(), cFrameDetector::Analyze(), and cRecorder::cRecorder().
#define PATPID 0x0000 |
Definition at line 52 of file remux.h.
Referenced by cIndexFileGenerator::Action(), cFrameDetector::Analyze(), cCuttingThread::FixFrame(), cPatPmtGenerator::GeneratePat(), cTsPayload::GetByte(), cFileName::GetLastPatPmtVersions(), cCuttingThread::GetPendingPackets(), cPatPmtParser::ParsePatPmt(), cDevice::PlayTs(), and cDevice::StillPicture().
#define PCRFACTOR 300 |
Definition at line 57 of file remux.h.
Referenced by cCuttingThread::FixFrame(), TsGetPcr(), and TsSetPcr().
#define PTSTICKS 90000 |
Definition at line 56 of file remux.h.
Referenced by cFrameDetector::Analyze(), and cCuttingThread::cCuttingThread().
#define TS_ADAPT_FIELD_EXISTS 0x20 |
Definition at line 40 of file remux.h.
Referenced by TsExtendAdaptionField(), TsHasAdaptationField(), and TsHidePayload().
#define TS_ADAPT_PCR 0x10 |
Definition at line 46 of file remux.h.
Referenced by TsGetPcr(), and TsSetPcr().
#define TS_CONT_CNT_MASK 0x0F |
Definition at line 42 of file remux.h.
Referenced by cCuttingThread::FixFrame(), cNaluDumper::ProcessTSPacket(), TsContinuityCounter(), TsGetContinuityCounter(), and TsSetContinuityCounter().
#define TS_PAYLOAD_EXISTS 0x10 |
Definition at line 41 of file remux.h.
Referenced by TsExtendAdaptionField(), TsHasPayload(), TsHidePayload(), and TsSetPayload().
#define TS_PAYLOAD_START 0x40 |
Definition at line 36 of file remux.h.
Referenced by cPatPmtGenerator::GeneratePat(), cPatPmtGenerator::GeneratePmt(), TsHidePayload(), and TsPayloadStart().
#define TS_SCRAMBLING_CONTROL 0xC0 |
Definition at line 39 of file remux.h.
Referenced by TsIsScrambled().
#define TS_SIZE 188 |
Definition at line 34 of file remux.h.
Referenced by cRecorder::Action(), cDevice::Action(), cIndexFileGenerator::Action(), cTransfer::Activate(), cFrameDetector::Analyze(), cTsPayload::AtTsStart(), cMpeg2Fixer::cMpeg2Fixer(), cRecorder::cRecorder(), cTSBuffer::cTSBuffer(), cCamSlot::Decrypt(), cCuttingThread::FixFrame(), cPatPmtGenerator::GeneratePmt(), cTSBuffer::Get(), cNaluStreamProcessor::GetBuffer(), cTsPayload::GetByte(), cFileName::GetLastPatPmtVersions(), cCuttingThread::GetPendingPackets(), cAudioParser::Parse(), cMpeg2Parser::Parse(), cPatPmtParser::ParsePatPmt(), cDevice::PlayTs(), cNaluDumper::ProcessTSPacket(), cCaPidReceiver::Receive(), cDvbSdFfDevice::StillPicture(), cDvbHdFfDevice::StillPicture(), cDevice::StillPicture(), TsExtendAdaptionField(), TsGetDts(), TsGetPayload(), TsGetPts(), TsHidePayload(), TsPayloadOffset(), TsSetDts(), TsSetPts(), and cTsPayload::Used().
#define TS_SYNC_BYTE 0x47 |
Definition at line 33 of file remux.h.
Referenced by cIndexFileGenerator::Action(), cFrameDetector::Analyze(), cCuttingThread::FixFrame(), cPatPmtGenerator::GeneratePat(), cPatPmtGenerator::GeneratePmt(), cTSBuffer::Get(), cNaluStreamProcessor::GetBuffer(), cTsPayload::GetByte(), cFileName::GetLastPatPmtVersions(), cCuttingThread::GetPendingPackets(), cPatPmtParser::ParsePatPmt(), and cDevice::PlayTs().
enum ePesHeader |
ePesHeader AnalyzePesHeader | ( | const uchar * | Data, |
int | Count, | ||
int & | PesPayloadOffset, | ||
bool * | ContinuationHeader = NULL |
||
) |
Definition at line 32 of file remux.c.
References phInvalid, phMPEG1, phMPEG2, and phNeedMoreData.
Referenced by cRemux::SetBrokenLink().
void BlockDump | ( | const char * | Name, |
const u_char * | Data, | ||
int | Length | ||
) |
void PesDump | ( | const char * | Name, |
const u_char * | Data, | ||
int | Length | ||
) |
|
inline |
Definition at line 197 of file remux.h.
References PesSetDts(), and PesSetPts().
Referenced by TsGetDts().
|
inline |
Definition at line 188 of file remux.h.
Referenced by cDvbPlayer::Action(), cFrameDetector::Analyze(), cDvbSubtitleConverter::Convert(), cDvbSubtitleConverter::ConvertFragments(), cDvbPlayer::Goto(), and TsGetPts().
|
inline |
Definition at line 183 of file remux.h.
Referenced by TsGetDts(), and TsSetDts().
|
inline |
Definition at line 163 of file remux.h.
Referenced by cTsToPes::GetPes().
|
inline |
Definition at line 178 of file remux.h.
Referenced by cFrameDetector::Analyze(), cDvbSubtitleConverter::Convert(), cDvbSubtitleConverter::ConvertFragments(), TsGetPts(), and TsSetPts().
|
inline |
Definition at line 168 of file remux.h.
Referenced by cTsToPes::GetPes(), and cDevice::PlayPes().
|
inline |
Definition at line 158 of file remux.h.
Referenced by cTsToPes::GetPes().
|
inline |
Definition at line 173 of file remux.h.
Referenced by cDvbSubtitleConverter::Convert(), cDvbSubtitleConverter::ConvertFragments(), cRemux::SetBrokenLink(), and cTsPayload::SkipPesHeader().
void PesSetDts | ( | uchar * | p, |
int64_t | Dts | ||
) |
Definition at line 212 of file remux.c.
Referenced by PesGetDts(), and TsSetDts().
void PesSetPts | ( | uchar * | p, |
int64_t | Pts | ||
) |
Definition at line 203 of file remux.c.
Referenced by PesGetDts(), and TsSetPts().
|
inline |
Adds the given PTS values, taking into account the 33bit wrap around.
Definition at line 211 of file remux.h.
References MAX33BIT, and PtsDiff().
Referenced by cCuttingThread::FixFrame().
int64_t PtsDiff | ( | int64_t | Pts1, |
int64_t | Pts2 | ||
) |
Returns the difference between two PTS values.
The result of Pts2 - Pts1 is the actual number of 90kHz time ticks that pass from Pts1 to Pts2, properly taking into account the 33bit wrap around. If Pts2 is "before" Pts1, the result is negative.
Definition at line 221 of file remux.c.
References MAX33BIT.
Referenced by cCuttingThread::FixFrame(), cCuttingThread::GetPendingPackets(), and PtsAdd().
|
inline |
Definition at line 122 of file remux.h.
References TS_CONT_CNT_MASK.
Referenced by cNaluDumper::ProcessTSPacket().
void TsDump | ( | const char * | Name, |
const u_char * | Data, | ||
int | Length | ||
) |
|
inline |
void TsExtendAdaptionField | ( | unsigned char * | Packet, |
int | ToLength | ||
) |
Definition at line 346 of file remux.c.
References TS_ADAPT_FIELD_EXISTS, TS_PAYLOAD_EXISTS, TS_SIZE, and TsPayloadOffset().
Referenced by cNaluDumper::ProcessTSPacket(), and TsGetPcr().
Definition at line 96 of file remux.h.
References TS_CONT_CNT_MASK.
Referenced by cCuttingThread::FixFrame().
int64_t TsGetDts | ( | const uchar * | p, |
int | l | ||
) |
Definition at line 160 of file remux.c.
References PesGetDts(), PesHasDts(), TS_SIZE, TsGetPayload(), and TsPayloadStart().
Referenced by cCuttingThread::FixFrame(), and TsGetPcr().
|
inline |
Definition at line 112 of file remux.h.
References TS_SIZE, TsHasPayload(), and TsPayloadOffset().
Referenced by cTsToPes::PutTs(), TsGetDts(), TsGetPts(), TsSetDts(), and TsSetPts().
|
inline |
Definition at line 127 of file remux.h.
References PCRFACTOR, TS_ADAPT_PCR, TsExtendAdaptionField(), TsGetDts(), TsGetPts(), TsHasAdaptationField(), TsHidePayload(), TsSetDts(), TsSetPcr(), and TsSetPts().
Referenced by cCuttingThread::FixFrame().
int64_t TsGetPts | ( | const uchar * | p, |
int | l | ||
) |
Definition at line 147 of file remux.c.
References PesGetPts(), PesHasPts(), TS_SIZE, TsGetPayload(), and TsPayloadStart().
Referenced by cDvbPlayer::Action(), cCuttingThread::FixFrame(), cCuttingThread::GetPendingPackets(), cDvbPlayer::Goto(), and TsGetPcr().
|
inline |
Definition at line 71 of file remux.h.
References TS_ADAPT_FIELD_EXISTS.
Referenced by cNaluDumper::ProcessTSPacket(), TsGetPcr(), TsPayloadOffset(), and TsSetPcr().
|
inline |
Definition at line 61 of file remux.h.
References TS_PAYLOAD_EXISTS.
Referenced by cFrameDetector::Analyze(), cCuttingThread::FixFrame(), cTsPayload::GetByte(), cDevice::PlayTs(), cNaluDumper::ProcessTSPacket(), and TsGetPayload().
void TsHidePayload | ( | uchar * | p | ) |
Definition at line 121 of file remux.c.
References TS_ADAPT_FIELD_EXISTS, TS_PAYLOAD_EXISTS, TS_PAYLOAD_START, and TS_SIZE.
Referenced by cCuttingThread::FixFrame(), and TsGetPcr().
|
inline |
Definition at line 91 of file remux.h.
References TS_SCRAMBLING_CONTROL.
Referenced by cDevice::Action(), cFrameDetector::Analyze(), and cCaActivationReceiver::Receive().
|
inline |
Definition at line 106 of file remux.h.
References TS_SIZE, and TsHasAdaptationField().
Referenced by cFrameDetector::Analyze(), cTsPayload::GetByte(), cPatPmtParser::ParsePat(), cPatPmtParser::ParsePmt(), cDevice::PlayTs(), cNaluDumper::ProcessTSPacket(), cTsPayload::SkipPesHeader(), TsExtendAdaptionField(), and TsGetPayload().
|
inline |
Definition at line 76 of file remux.h.
References TS_PAYLOAD_START.
Referenced by cFrameDetector::Analyze(), cTsPayload::AtPayloadStart(), cTsPayload::GetByte(), cAudioParser::Parse(), cMpeg2Parser::Parse(), cH264Parser::Parse(), cPatPmtParser::ParsePmt(), cDevice::PlayTsVideo(), cNaluDumper::ProcessTSPacket(), cTsToPes::PutTs(), cCaPidReceiver::Receive(), cDevice::StillPicture(), TsGetDts(), TsGetPts(), TsSetDts(), and TsSetPts().
|
inline |
Definition at line 86 of file remux.h.
References TS_PID_MASK_HI.
Referenced by cDevice::Action(), cIndexFileGenerator::Action(), cFrameDetector::Analyze(), cMpeg2Fixer::cMpeg2Fixer(), cCuttingThread::FixFrame(), cNaluStreamProcessor::GetBuffer(), cTsPayload::GetByte(), cFileName::GetLastPatPmtVersions(), cCuttingThread::GetPendingPackets(), cPatPmtParser::ParsePatPmt(), cDevice::PlayTs(), cDvbHdFfDevice::PlayTsAudio(), cDvbHdFfDevice::PlayTsVideo(), cCaPidReceiver::Receive(), cTsPayload::Setup(), and cDevice::StillPicture().
Definition at line 101 of file remux.h.
References TS_CONT_CNT_MASK.
Referenced by cCuttingThread::FixFrame(), and cNaluDumper::ProcessTSPacket().
void TsSetDts | ( | uchar * | p, |
int | l, | ||
int64_t | Dts | ||
) |
Definition at line 187 of file remux.c.
References PesHasDts(), PesSetDts(), TS_SIZE, TsGetPayload(), and TsPayloadStart().
Referenced by cCuttingThread::FixFrame(), and TsGetPcr().
|
inline |
Definition at line 66 of file remux.h.
References TS_PAYLOAD_EXISTS.
void TsSetPcr | ( | uchar * | p, |
int64_t | Pcr | ||
) |
Definition at line 131 of file remux.c.
References PCRFACTOR, TS_ADAPT_PCR, and TsHasAdaptationField().
Referenced by cCuttingThread::FixFrame(), and TsGetPcr().
void TsSetPts | ( | uchar * | p, |
int | l, | ||
int64_t | Pts | ||
) |
Definition at line 173 of file remux.c.
References PesHasPts(), PesSetPts(), TS_SIZE, TsGetPayload(), and TsPayloadStart().
Referenced by cCuttingThread::FixFrame(), and TsGetPcr().