vdr  2.2.0
Public Member Functions | Private Types | Private Attributes | List of all members
cFrameDetector Class Reference

#include <remux.h>

Public Member Functions

 cFrameDetector (int Pid=0, int Type=0)
 
void SetPid (int Pid, int Type)
 
int Analyze (const uchar *Data, int Length)
 
bool Synced (void)
 
bool NewFrame (void)
 
bool IndependentFrame (void)
 
double FramesPerSecond (void)
 

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
 
int framesInPayloadUnit
 
int framesPerPayloadUnit
 
bool scanning
 
cFrameParserparser
 

Detailed Description

Definition at line 492 of file remux.h.

Member Enumeration Documentation

anonymous enum
private
Enumerator
MaxPtsValues 

Definition at line 494 of file remux.h.

Constructor & Destructor Documentation

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 1524 of file remux.c.

Member Function Documentation

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 1561 of file remux.c.

References CmpUint32(), dbgframes, DEFAULTFRAMESPERSECOND, dsyslog, esyslog, MIN_TS_PACKETS_FOR_FRAME_DETECTOR, PATPID, PesGetPts(), PesHasPts(), PTSTICKS, TS_SIZE, TS_SYNC_BYTE, TsHasPayload(), TsIsScrambled(), TsPayloadOffset(), TsPayloadStart(), and TsPid().

Referenced by cRecorder::Action(), and cIndexFileGenerator::Action().

double cFrameDetector::FramesPerSecond ( void  )
inline

Returns the number of frames per second, or 0 if this information is not available.

Definition at line 532 of file remux.h.

Referenced by cRecorder::Action(), and cIndexFileGenerator::Action().

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 528 of file remux.h.

Referenced by cRecorder::Action(), cIndexFileGenerator::Action(), and cRecorder::NextFile().

bool cFrameDetector::NewFrame ( void  )
inline

Returns true if the data given to the last call to Analyze() started a new frame.

Definition at line 525 of file remux.h.

Referenced by cRecorder::Action(), and cIndexFileGenerator::Action().

void cFrameDetector::SetPid ( int  Pid,
int  Type 
)

Sets the Pid and stream Type to detect frames for.

Definition at line 1544 of file remux.c.

References esyslog.

Referenced by cIndexFileGenerator::Action().

bool cFrameDetector::Synced ( void  )
inline

Returns true if the frame detector has synced on the data stream.

Definition at line 523 of file remux.h.

Referenced by cRecorder::Action(), and cIndexFileGenerator::Action().

Member Data Documentation

int cFrameDetector::framesInPayloadUnit
private

Definition at line 505 of file remux.h.

int cFrameDetector::framesPerPayloadUnit
private

Definition at line 506 of file remux.h.

double cFrameDetector::framesPerSecond
private

Definition at line 504 of file remux.h.

bool cFrameDetector::independentFrame
private

Definition at line 499 of file remux.h.

bool cFrameDetector::isVideo
private

Definition at line 503 of file remux.h.

bool cFrameDetector::newFrame
private

Definition at line 498 of file remux.h.

int cFrameDetector::numIFrames
private

Definition at line 502 of file remux.h.

int cFrameDetector::numPtsValues
private

Definition at line 501 of file remux.h.

cFrameParser* cFrameDetector::parser
private

Definition at line 509 of file remux.h.

int cFrameDetector::pid
private

Definition at line 495 of file remux.h.

uint32_t cFrameDetector::ptsValues[MaxPtsValues]
private

Definition at line 500 of file remux.h.

bool cFrameDetector::scanning
private

Definition at line 508 of file remux.h.

bool cFrameDetector::synced
private

Definition at line 497 of file remux.h.

int cFrameDetector::type
private

Definition at line 496 of file remux.h.


The documentation for this class was generated from the following files: