vdr
1.7.27
|
#include <remux.h>
Public Member Functions | |
cFrameDetector (int Pid=0, int Type=0) | |
void | SetPid (int Pid, int Type) |
void | Reset (void) |
int | Analyze (const uchar *Data, int Length) |
bool | Synced (void) |
bool | NewFrame (void) |
bool | IndependentFrame (void) |
double | FramesPerSecond (void) |
cFrameDetector (int Pid=0, int Type=0) | |
void | SetPid (int Pid, int Type) |
void | Reset (void) |
int | Analyze (const uchar *Data, int Length) |
bool | Synced (void) |
bool | NewFrame (void) |
bool | IndependentFrame (void) |
double | FramesPerSecond (void) |
Private Types | |
enum | { MaxPtsValues = 150 } |
enum | { MaxPtsValues = 150 } |
Private Member Functions | |
int | SkipPackets (const uchar *&Data, int &Length, int &Processed, int &FrameTypeOffset) |
int | SkipPackets (const uchar *&Data, int &Length, int &Processed, int &FrameTypeOffset) |
Private Attributes | |
int | pid |
int | type |
bool | synced |
bool | newFrame |
bool | independentFrame |
uint32_t | ptsValues [MaxPtsValues] |
int | numPtsValues |
int | numFrames |
int | numIFrames |
bool | isVideo |
double | framesPerSecond |
int | framesInPayloadUnit |
int | framesPerPayloadUnit |
int | payloadUnitOfFrame |
bool | scanning |
uint32_t | scanner |
Definition at line 350 of file include/vdr/remux.h.
anonymous enum [private] |
Definition at line 352 of file include/vdr/remux.h.
cFrameDetector::cFrameDetector | ( | int | Pid = 0 , |
int | Type = 0 |
||
) |
Sets up a frame detector for the given Pid and stream Type.
If no Pid and Type is given, they need to be set by a separate call to SetPid().
Definition at line 841 of file remux.c.
References EMPTY_SCANNER, framesInPayloadUnit, framesPerPayloadUnit, framesPerSecond, independentFrame, newFrame, numFrames, numIFrames, numPtsValues, payloadUnitOfFrame, scanner, scanning, SetPid(), and synced.
cFrameDetector::cFrameDetector | ( | int | Pid = 0 , |
int | Type = 0 |
||
) |
Sets up a frame detector for the given Pid and stream Type.
If no Pid and Type is given, they need to be set by a separate call to SetPid().
int cFrameDetector::Analyze | ( | const uchar * | Data, |
int | Length | ||
) |
Analyzes the TS packets pointed to by Data.
Length is the number of bytes Data points to, and must be a multiple of TS_SIZE. Returns the number of bytes that have been analyzed. If the return value is 0, the data was not sufficient for analyzing and Analyze() needs to be called again with more actual data.
Definition at line 897 of file remux.c.
References CmpUint32(), dbgframes, DebugFrames, DEFAULTFRAMESPERSECOND, dsyslog, EMPTY_SCANNER, esyslog, framesInPayloadUnit, framesPerPayloadUnit, framesPerSecond, independentFrame, isVideo, MaxPtsValues, MIN_TS_PACKETS_FOR_FRAME_DETECTOR, newFrame, numFrames, numIFrames, numPtsValues, PATPID, payloadUnitOfFrame, PesGetPts(), PesHasPts(), PesPayloadOffset(), pid, ptsValues, Reset(), scanner, scanning, SkipPackets(), synced, TS_SIZE, TS_SYNC_BYTE, TsHasPayload(), TsIsScrambled(), TsPayloadOffset(), TsPayloadStart(), TsPid(), and type.
Referenced by cRecorder::Action(), and cIndexFileGenerator::Action().
int cFrameDetector::Analyze | ( | const uchar * | Data, |
int | Length | ||
) |
Analyzes the TS packets pointed to by Data.
Length is the number of bytes Data points to, and must be a multiple of TS_SIZE. Returns the number of bytes that have been analyzed. If the return value is 0, the data was not sufficient for analyzing and Analyze() needs to be called again with more actual data.
double cFrameDetector::FramesPerSecond | ( | void | ) | [inline] |
Returns the number of frames per second, or 0 if this information is not available.
Definition at line 397 of file include/vdr/remux.h.
References framesPerSecond.
Referenced by cRecorder::Action().
double cFrameDetector::FramesPerSecond | ( | void | ) | [inline] |
Returns the number of frames per second, or 0 if this information is not available.
Definition at line 397 of file remux.h.
References framesPerSecond.
bool cFrameDetector::IndependentFrame | ( | void | ) | [inline] |
Returns true if a new frame was detected and this is an independent frame (i.e.
one that can be displayed by itself, without using data from any other frames).
Definition at line 393 of file include/vdr/remux.h.
References independentFrame.
Referenced by cRecorder::Action(), cIndexFileGenerator::Action(), and cRecorder::NextFile().
bool cFrameDetector::IndependentFrame | ( | void | ) | [inline] |
Returns true if a new frame was detected and this is an independent frame (i.e.
one that can be displayed by itself, without using data from any other frames).
Definition at line 393 of file remux.h.
References independentFrame.
bool cFrameDetector::NewFrame | ( | void | ) | [inline] |
bool cFrameDetector::NewFrame | ( | void | ) | [inline] |
Returns true if the data given to the last call to Analyze() started a new frame.
Definition at line 390 of file include/vdr/remux.h.
References newFrame.
Referenced by cRecorder::Action(), and cIndexFileGenerator::Action().
void cFrameDetector::Reset | ( | void | ) |
Resets any counters and flags used while syncing and prepares the frame detector for actual work.
Definition at line 870 of file remux.c.
References EMPTY_SCANNER, independentFrame, newFrame, payloadUnitOfFrame, scanner, and scanning.
Referenced by cIndexFileGenerator::Action(), and Analyze().
void cFrameDetector::Reset | ( | void | ) |
Resets any counters and flags used while syncing and prepares the frame detector for actual work.
void cFrameDetector::SetPid | ( | int | Pid, |
int | Type | ||
) |
Sets the Pid and stream Type to detect frames for.
void cFrameDetector::SetPid | ( | int | Pid, |
int | Type | ||
) |
Sets the Pid and stream Type to detect frames for.
Definition at line 863 of file remux.c.
References isVideo, pid, and type.
Referenced by cIndexFileGenerator::Action(), and cFrameDetector().
int cFrameDetector::SkipPackets | ( | const uchar *& | Data, |
int & | Length, | ||
int & | Processed, | ||
int & | FrameTypeOffset | ||
) | [private] |
int cFrameDetector::SkipPackets | ( | const uchar *& | Data, |
int & | Length, | ||
int & | Processed, | ||
int & | FrameTypeOffset | ||
) | [private] |
bool cFrameDetector::Synced | ( | void | ) | [inline] |
Returns true if the frame detector has synced on the data stream.
Definition at line 388 of file include/vdr/remux.h.
References synced.
Referenced by cRecorder::Action(), and cIndexFileGenerator::Action().
bool cFrameDetector::Synced | ( | void | ) | [inline] |
int cFrameDetector::framesInPayloadUnit [private] |
Definition at line 364 of file include/vdr/remux.h.
Referenced by Analyze(), and cFrameDetector().
int cFrameDetector::framesPerPayloadUnit [private] |
Definition at line 365 of file include/vdr/remux.h.
Referenced by Analyze(), and cFrameDetector().
double cFrameDetector::framesPerSecond [private] |
Definition at line 363 of file include/vdr/remux.h.
Referenced by Analyze(), cFrameDetector(), and FramesPerSecond().
bool cFrameDetector::independentFrame [private] |
Definition at line 357 of file include/vdr/remux.h.
Referenced by Analyze(), cFrameDetector(), IndependentFrame(), and Reset().
bool cFrameDetector::isVideo [private] |
Definition at line 362 of file include/vdr/remux.h.
bool cFrameDetector::newFrame [private] |
Definition at line 356 of file include/vdr/remux.h.
Referenced by Analyze(), cFrameDetector(), NewFrame(), and Reset().
int cFrameDetector::numFrames [private] |
Definition at line 360 of file include/vdr/remux.h.
Referenced by Analyze(), and cFrameDetector().
int cFrameDetector::numIFrames [private] |
Definition at line 361 of file include/vdr/remux.h.
Referenced by Analyze(), and cFrameDetector().
int cFrameDetector::numPtsValues [private] |
Definition at line 359 of file include/vdr/remux.h.
Referenced by Analyze(), and cFrameDetector().
int cFrameDetector::payloadUnitOfFrame [private] |
Definition at line 368 of file include/vdr/remux.h.
Referenced by Analyze(), cFrameDetector(), and Reset().
int cFrameDetector::pid [private] |
Definition at line 353 of file include/vdr/remux.h.
Referenced by Analyze(), SetPid(), and SkipPackets().
uint32_t cFrameDetector::ptsValues [private] |
Definition at line 358 of file include/vdr/remux.h.
Referenced by Analyze().
uint32_t cFrameDetector::scanner [private] |
Definition at line 370 of file include/vdr/remux.h.
Referenced by Analyze(), cFrameDetector(), and Reset().
bool cFrameDetector::scanning [private] |
Definition at line 369 of file include/vdr/remux.h.
Referenced by Analyze(), cFrameDetector(), and Reset().
bool cFrameDetector::synced [private] |
Definition at line 355 of file include/vdr/remux.h.
Referenced by Analyze(), cFrameDetector(), SkipPackets(), and Synced().
int cFrameDetector::type [private] |
Definition at line 354 of file include/vdr/remux.h.