vdr 2.7.5
|
#include <remux.h>
Public Member Functions | |
cFrameDetector (int Pid=0, int Type=0) | |
~cFrameDetector () | |
void | SetPid (int Pid, int Type) |
void | SetMissing (void) |
int | Analyze (const uchar *Data, int Length, bool ErrorCheck=true) |
bool | Synced (void) |
bool | NewFrame (int *PreviousErrors=NULL, int *MissingFrames=NULL) |
bool | IndependentFrame (void) |
double | FramesPerSecond (void) |
uint16_t | FrameWidth (void) |
uint16_t | FrameHeight (void) |
eScanType | ScanType (void) |
eAspectRatio | AspectRatio (void) |
Public Attributes | |
cFrameChecker * | frameChecker |
Private Types | |
enum | { MaxPtsValues = 150 } |
Private Attributes | |
int | pid |
int | type |
bool | synced |
bool | newFrame |
bool | independentFrame |
uint32_t | ptsValues [MaxPtsValues] |
int | numPtsValues |
int | numIFrames |
bool | isVideo |
double | framesPerSecond |
uint16_t | frameWidth |
uint16_t | frameHeight |
eScanType | scanType |
eAspectRatio | aspectRatio |
int | framesInPayloadUnit |
int | framesPerPayloadUnit |
bool | scanning |
bool | firstIframeSeen |
cFrameParser * | parser |
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 2105 of file remux.c.
References arUnknown, aspectRatio, firstIframeSeen, frameChecker, frameHeight, framesInPayloadUnit, framesPerPayloadUnit, framesPerSecond, frameWidth, independentFrame, newFrame, numIFrames, numPtsValues, parser, scanning, scanType, SetPid(), stUnknown, and synced.
cFrameDetector::~cFrameDetector | ( | ) |
Definition at line 2124 of file remux.c.
References frameChecker.
int cFrameDetector::Analyze | ( | const uchar * | Data, |
int | Length, | ||
bool | ErrorCheck = true ) |
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. Error checks can be turned off by setting ErrorCheck to false. This is used when regenerating the index file, where the first chunk of data is scanned for the PAT/PMT and then a rewind is done on the file.
Definition at line 2171 of file remux.c.
References aspectRatio, CmpUint32(), dbgframes, DEFAULTFRAMESPERSECOND, dsyslog, firstIframeSeen, frameChecker, frameHeight, framesInPayloadUnit, framesPerPayloadUnit, framesPerSecond, frameWidth, independentFrame, isVideo, MaxPtsValues, MIN_TS_PACKETS_FOR_FRAME_DETECTOR, newFrame, numIFrames, numPtsValues, parser, PATPID, PesGetPts(), PesHasPts(), pid, PTSTICKS, ptsValues, scanning, scanType, synced, TS_SIZE, TS_SYNC, TsHasPayload(), TsIsScrambled(), TsPayloadOffset(), TsPayloadStart(), and TsPid().
Referenced by cIndexFileGenerator::Action().
|
inline |
Returns the aspect ratio, or arUnknown if this information is not available.
Definition at line 593 of file remux.h.
References aspectRatio.
Referenced by cIndexFileGenerator::Action().
|
inline |
Returns the frame height, or 0 if this information is not available.
Definition at line 589 of file remux.h.
References frameHeight.
Referenced by cIndexFileGenerator::Action().
|
inline |
Returns the number of frames per second, or 0 if this information is not available.
Definition at line 584 of file remux.h.
References framesPerSecond.
Referenced by cIndexFileGenerator::Action().
|
inline |
Returns the frame width, or 0 if this information is not available.
Definition at line 587 of file remux.h.
References frameWidth.
Referenced by cIndexFileGenerator::Action().
|
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 580 of file remux.h.
References independentFrame.
Referenced by cIndexFileGenerator::Action().
bool cFrameDetector::NewFrame | ( | int * | PreviousErrors = NULL, |
int * | MissingFrames = NULL ) |
Returns true if the data given to the last call to Analyze() started a new frame.
If PreviousErrors is given, it will be set to the number of errors in the previous frame. If MissingFrames is given, it will be set to the number of missing frames between the previous frame and this one. The results returned in PreviousErrors and MissingFrames are only valid if the function returns true.
Definition at line 2160 of file remux.c.
References frameChecker, and newFrame.
Referenced by cIndexFileGenerator::Action().
|
inline |
Returns the scan type, or stUnknown if this information is not available.
Definition at line 591 of file remux.h.
References scanType.
Referenced by cIndexFileGenerator::Action().
void cFrameDetector::SetMissing | ( | void | ) |
Call if this is a resumed recording, which has missing frames.
Definition at line 2155 of file remux.c.
References frameChecker.
void cFrameDetector::SetPid | ( | int | Pid, |
int | Type ) |
Sets the Pid and stream Type to detect frames for.
Definition at line 2136 of file remux.c.
References esyslog, isVideo, parser, pid, and type.
Referenced by cIndexFileGenerator::Action(), and cFrameDetector().
|
inline |
Returns true if the frame detector has synced on the data stream.
Definition at line 571 of file remux.h.
References synced.
Referenced by cIndexFileGenerator::Action().
|
private |
Definition at line 544 of file remux.h.
Referenced by Analyze(), AspectRatio(), and cFrameDetector().
|
private |
Definition at line 549 of file remux.h.
Referenced by Analyze(), and cFrameDetector().
cFrameChecker* cFrameDetector::frameChecker |
Definition at line 552 of file remux.h.
Referenced by Analyze(), cFrameDetector(), NewFrame(), SetMissing(), and ~cFrameDetector().
|
private |
Definition at line 542 of file remux.h.
Referenced by Analyze(), cFrameDetector(), and FrameHeight().
|
private |
Definition at line 545 of file remux.h.
Referenced by Analyze(), and cFrameDetector().
|
private |
Definition at line 546 of file remux.h.
Referenced by Analyze(), and cFrameDetector().
|
private |
Definition at line 540 of file remux.h.
Referenced by Analyze(), cFrameDetector(), and FramesPerSecond().
|
private |
Definition at line 541 of file remux.h.
Referenced by Analyze(), cFrameDetector(), and FrameWidth().
|
private |
Definition at line 535 of file remux.h.
Referenced by Analyze(), cFrameDetector(), and IndependentFrame().
|
private |
|
private |
Definition at line 534 of file remux.h.
Referenced by Analyze(), cFrameDetector(), and NewFrame().
|
private |
Definition at line 538 of file remux.h.
Referenced by Analyze(), and cFrameDetector().
|
private |
Definition at line 537 of file remux.h.
Referenced by Analyze(), and cFrameDetector().
|
private |
Definition at line 550 of file remux.h.
Referenced by Analyze(), cFrameDetector(), and SetPid().
|
private |
|
private |
|
private |
Definition at line 548 of file remux.h.
Referenced by Analyze(), and cFrameDetector().
|
private |
Definition at line 543 of file remux.h.
Referenced by Analyze(), cFrameDetector(), and ScanType().
|
private |
Definition at line 533 of file remux.h.
Referenced by Analyze(), cFrameDetector(), and Synced().