DtvKit_ATSC3.0
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
CFeHwCtrl Class Reference

#include <atsc_plf_frontend_hwcontrol.h>

Classes

struct  sFeHw_t
 
struct  sFeHwStatus_t
 

Public Member Functions

 CFeHwCtrl (int iDevId)
 
 ~CFeHwCtrl ()
 Stop the demux and close frontend. And free the allocated memory for ALP,Frontend.
 
int32_t StopInput (void)
 To Stop the demux.
 
int32_t StartInput (void)
 To Start the demux for collecting the data.
 
int32_t SetCallback (void *pParent, DataCallback dataCB)
 
int32_t GetStatus (int32_t *pSnr, int32_t *pRssi, int32_t *pEas, int32_t *pLock)
 
int32_t SetProperties (int32_t iMode, uint32_t iFreq, int32_t iBandwidth, int32_t iPlp)
 
int32_t GetProperty (int32_t *pMode, uint32_t *pFreq, int *pBandwidth, int32_t *pPlp)
 
 CFeHwCtrl (int iDevId)
 
int32_t StopInput (void)
 
int32_t StartInput (void)
 
int32_t SetCallback (void *pParent, DataCallback dataCB)
 
int32_t GetStatus (int32_t *pSnr, int32_t *pRssi, int32_t *pEas, int32_t *pLock)
 
int32_t SetProperties (int32_t iMode, uint32_t iFreq, int32_t iBandwidth, int32_t iPlp)
 
int32_t GetProperty (int32_t *pMode, uint32_t *pFreq, int *pBandwidth, int32_t *pPlp)
 

Protected Member Functions

void DataDeInit (void)
 Set the m_BitCount as 0.
 
void SetByteAlign (void)
 To adjust the m_BitCount member to ensure it is aligned to the nearest byte boundary.
 
uint32_t GetBitCount (void)
 Get the m_BitCount value for process the get/skip data.
 
void SkipData (int iBitCount)
 Skip the data based on m_BitCount which is used in GetData().
 
int32_t SendData (sFeHw_t *pHan)
 Read the data from driver frontend and provide the data for formation of TS,ALP.
 
int32_t StopDemux (sFeHw_t *pHan)
 To stop the PES filter demux.
 
int32_t StartDemux (sFeHw_t *pHan)
 To start the PES filter with immediate start to collect the data after tuner lock.
 
void * CaptureThreadHandler (void)
 To get the data from driver frontend via SendData().
 
uint32_t GetData (int32_t iBitSize)
 Calculated and return the data length represented in bit calc.
 
int32_t InitFrontend (sFeHw_t *pHan)
 To Open the driver API - Frontend.
 
int32_t CloseFrontend (sFeHw_t *pHan)
 To close the frontend and demux handle.
 
void DataInit (unsigned char *pData)
 Assign the INIT ALP data to the param m_pData.
 
int32_t SetFrontendParams (sFeHw_t *pHan)
 To set the properties for frontend to driver.
 
void CancelReaderThread (sFeHw_t *pHan)
 To close the Frontend.
 
void ThreadCleanUp (void *pCleanHandle)
 To close the Frontend.
 
int32_t ProcessInput (unsigned char *pTsData)
 Process the received input data of TS and provide the data for ALP via ProcessALP() by calculating the data size based on 2048 bytes.
 
void ProcessALP (unsigned char *pDataBuf, int32_t iLen)
 Passed the data for ALP via ProcessAlpData() for the received length.
 
int32_t ProcessTS (unsigned char *pDataBuf, int32_t iLen)
 Process the sync byte of TS data and passed the data as remaining data for ALP formation via ProcessInput().
 
int32_t ProcessAlpData (unsigned char *pDataBuf, int32_t iLen)
 Parsed the ALP data based on the header formation and passed the data via callback(pCallbackHandler).
 
int32_t CheckFrontend (sFeHw_t *pHan, sFeHwStatus_t *pTunerProp)
 To check the frontend status such as Signal strength,Frequency, Lock status,SNR,Bitrate.
 

Static Protected Member Functions

static void * DataReadInput (void *a_pParam)
 To get the data from driver frontend via CaptureThreadHandler().
 

Protected Attributes

pthread_t mCaptureThread
 
pthread_mutex_t mCaptureMutex
 
sFeHw_t hDevice
 
void * mpParent
 
DataCallback pCallbackHandler
 
int32_t m_Mode
 
int32_t m_State
 
int32_t m_CurPlp
 
int32_t m_BitCount
 
int32_t m_CurIndex
 
int32_t m_TSRemain
 
int32_t m_RecvState
 
int32_t m_SyncPoint
 
int32_t m_AlpRemain
 
uint8_t * m_pData
 
uint8_t * m_pAlpData
 
uint8_t * m_pResData
 
uint8_t * m_pInputBuf
 
uint8_t * m_pRemainData
 
int32_t mBitrate
 
int32_t mAvgBitrate
 

Detailed Description

CFeHwCtrl

Constructor & Destructor Documentation

◆ ~CFeHwCtrl()

CFeHwCtrl::~CFeHwCtrl ( )

Stop the demux and close frontend. And free the allocated memory for ALP,Frontend.

Parameters
NA
Return values
NA

Member Function Documentation

◆ CancelReaderThread()

CFeHwCtrl::CancelReaderThread ( sFeHw_t * pHan)
protected

To close the Frontend.

Parameters
sFeHw_t* pHan
Return values
void

◆ CaptureThreadHandler()

CFeHwCtrl::CaptureThreadHandler ( void )
protected

To get the data from driver frontend via SendData().

Parameters
None
Return values
void*

◆ CheckFrontend()

CFeHwCtrl::CheckFrontend ( sFeHw_t * pHan,
sFeHwStatus_t * pTunerProp )
protected

To check the frontend status such as Signal strength,Frequency, Lock status,SNR,Bitrate.

Parameters
sFeHw_t* pHan, sFeHwStatus_t *pFeStatus
Return values
int32_t(eATSCResult_t)

◆ CloseFrontend()

CFeHwCtrl::CloseFrontend ( sFeHw_t * pHan)
protected

To close the frontend and demux handle.

Parameters
sFeHw_t* pHan
Return values
int32_t(eATSCResult_t)

◆ DataDeInit()

CFeHwCtrl::DataDeInit ( void )
protected

Set the m_BitCount as 0.

Parameters
None
Return values
void

◆ DataInit()

CFeHwCtrl::DataInit ( unsigned char * pData)
protected

Assign the INIT ALP data to the param m_pData.

Parameters
uint8_t*pData
Return values
void

◆ DataReadInput()

CFeHwCtrl::DataReadInput ( void * a_pParam)
staticprotected

To get the data from driver frontend via CaptureThreadHandler().

Parameters
void*a_pParam
Return values
void*

◆ GetBitCount()

CFeHwCtrl::GetBitCount ( void )
protected

Get the m_BitCount value for process the get/skip data.

Parameters
None
Return values
uint32_t(m_BitCount)

◆ GetData()

CFeHwCtrl::GetData ( int32_t iBitSize)
protected

Calculated and return the data length represented in bit calc.

Parameters
int32_tiBitSize
Return values
uint32_t(Length of data value as bit).

◆ InitFrontend()

CFeHwCtrl::InitFrontend ( sFeHw_t * pHan)
protected

To Open the driver API - Frontend.

Parameters
sFeHw_t* pHan
Return values
int32_t(eATSCResult_t)

◆ ProcessALP()

CFeHwCtrl::ProcessALP ( unsigned char * pDataBuf,
int32_t iLen )
protected

Passed the data for ALP via ProcessAlpData() for the received length.

Parameters
uint8_t*pDataBuf,int32_t iLen
Return values
void

◆ ProcessAlpData()

CFeHwCtrl::ProcessAlpData ( unsigned char * pDataBuf,
int32_t iLen )
protected

Parsed the ALP data based on the header formation and passed the data via callback(pCallbackHandler).

Parameters
uint8_t* pDataBuf ,int32_t iLen
Return values
int32_t(eATSCResult_t) , Position of Data

◆ ProcessInput()

CFeHwCtrl::ProcessInput ( unsigned char * pTsData)
protected

Process the received input data of TS and provide the data for ALP via ProcessALP() by calculating the data size based on 2048 bytes.

Parameters
uint8_t* pDataBuf
Return values
int32_t(eATSCResult_t)

◆ ProcessTS()

CFeHwCtrl::ProcessTS ( unsigned char * pDataBuf,
int32_t iLen )
protected

Process the sync byte of TS data and passed the data as remaining data for ALP formation via ProcessInput().

Parameters
uint8_t* pDataBuf, int32_t iLen
Return values
int32_t(eATSCResult_t)

◆ SendData()

CFeHwCtrl::SendData ( sFeHw_t * pHan)
protected

Read the data from driver frontend and provide the data for formation of TS,ALP.

Parameters
sFeHw_t* pHan
Return values
int32_t(eATSCResult_t)

◆ SetByteAlign()

CFeHwCtrl::SetByteAlign ( void )
protected

To adjust the m_BitCount member to ensure it is aligned to the nearest byte boundary.

Parameters
None
Return values
void

◆ SetFrontendParams()

CFeHwCtrl::SetFrontendParams ( sFeHw_t * pHan)
protected

To set the properties for frontend to driver.

Parameters
sFeHw_t* pHan
Return values
int32_t(eATSCResult_t)

◆ SkipData()

CFeHwCtrl::SkipData ( int iBitCount)
protected

Skip the data based on m_BitCount which is used in GetData().

Parameters
int32_tbitCount
Return values
void

◆ StartDemux()

CFeHwCtrl::StartDemux ( sFeHw_t * pHan)
protected

To start the PES filter with immediate start to collect the data after tuner lock.

Parameters
sFeHw_t* pHan
Return values
int32_t(eATSCResult_t)

◆ StartInput()

CFeHwCtrl::StartInput ( void )

To Start the demux for collecting the data.

Parameters
void
Return values
int32_t(eATSCResult_t)

◆ StopDemux()

CFeHwCtrl::StopDemux ( sFeHw_t * pHan)
protected

To stop the PES filter demux.

Parameters
sFeHw_t* pHan
Return values
int32_t(eATSCResult_t)

◆ StopInput()

CFeHwCtrl::StopInput ( void )

To Stop the demux.

Parameters
void
Return values
int32_t(eATSCResult_t)

◆ ThreadCleanUp()

CFeHwCtrl::ThreadCleanUp ( void * pCleanHandle)
protected

To close the Frontend.

Parameters
void* pCleanHandle
Return values
void

Member Data Documentation

◆ hDevice

sFeHw_t CFeHwCtrl::hDevice
protected

Tuner Device

◆ m_AlpRemain

int32_t CFeHwCtrl::m_AlpRemain
protected

ALP Data remaining count for processing

◆ m_BitCount

int32_t CFeHwCtrl::m_BitCount
protected

Total Bit count

◆ m_CurIndex

int32_t CFeHwCtrl::m_CurIndex
protected

Current Index

◆ m_CurPlp

int32_t CFeHwCtrl::m_CurPlp
protected

Current PLP ID

◆ m_Mode

int32_t CFeHwCtrl::m_Mode
protected

Current Mode

◆ m_pAlpData

uint8_t* CFeHwCtrl::m_pAlpData
protected

Pointer to ALP Data to be processed

◆ m_pData

uint8_t* CFeHwCtrl::m_pData
protected

Pointer to Raw data to process

◆ m_pInputBuf

uint8_t* CFeHwCtrl::m_pInputBuf
protected

Pointer to Input buffer with data to process

◆ m_pRemainData

uint8_t* CFeHwCtrl::m_pRemainData
protected

Pointer to remaining data

◆ m_pResData

uint8_t* CFeHwCtrl::m_pResData
protected

Pointer to Residual data

◆ m_RecvState

int32_t CFeHwCtrl::m_RecvState
protected

Receiving State flag

◆ m_State

int32_t CFeHwCtrl::m_State
protected

Current State

◆ m_SyncPoint

int32_t CFeHwCtrl::m_SyncPoint
protected

Synchronization Point

◆ m_TSRemain

int32_t CFeHwCtrl::m_TSRemain
protected

Remaining TS processing data left

◆ mAvgBitrate

int32_t CFeHwCtrl::mAvgBitrate
protected

To store Calculated Average Bitrate

◆ mBitrate

int32_t CFeHwCtrl::mBitrate
protected

To store Bitrate

◆ mCaptureMutex

pthread_mutex_t CFeHwCtrl::mCaptureMutex
protected

mCaptureMutex

◆ mCaptureThread

pthread_t CFeHwCtrl::mCaptureThread
protected

mCaptureThread

◆ mpParent

void* CFeHwCtrl::mpParent
protected

Parent - calling pointer

◆ pCallbackHandler

DataCallback CFeHwCtrl::pCallbackHandler
protected

Data call back handler execution unit


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