RDK Documentation (Open Sourced RDK Components)
Stream In Interface

Description

This file defines bluetooth manager's data streaming interfaces to external bluetooth devices.

Typedefs

typedef eBTRMgrRet(* fPtr_BTRMgr_SI_StatusCb) (stBTRMgrMediaStatus *apstBtrMgrSiStatus, void *apvUserData)
 
typedef enum _eBTRMgrSIGstRet eBTRMgrSIGstRet
 
typedef enum _eBTRMgrSIGstStatus eBTRMgrSIGstStatus
 
typedef eBTRMgrSIGstRet(* fPtr_BTRMgr_SI_GstStatusCb) (eBTRMgrSIGstStatus aeBtrMgrSiGstStatus, void *apvUserData)
 

Enumerations

enum  _eBTRMgrSIGstRet
 
enum  _eBTRMgrSIGstStatus
 

Functions

eBTRMgrRet BTRMgr_SI_Init (tBTRMgrSiHdl *phBTRMgrSiHdl, fPtr_BTRMgr_SI_StatusCb afpcBSiStatus, void *apvUserData)
 This API invokes BTRMgr_SI_GstInit() for the stream in initializations. More...
 
eBTRMgrRet BTRMgr_SI_DeInit (tBTRMgrSiHdl hBTRMgrSiHdl)
 This API invokes BTRMgr_SI_GstDeInit() for the deinitializations. More...
 
eBTRMgrRet BTRMgr_SI_GetDefaultSettings (tBTRMgrSiHdl hBTRMgrSiHdl)
 This API is used to load the default settings used by this interface. More...
 
eBTRMgrRet BTRMgr_SI_GetCurrentSettings (tBTRMgrSiHdl hBTRMgrSiHdl)
 This API will fetch the current settings used by this interface. More...
 
eBTRMgrRet BTRMgr_SI_GetStatus (tBTRMgrSiHdl hBTRMgrSiHdl, stBTRMgrMediaStatus *apstBtrMgrSiStatus)
 This API will fetch the current settings used by this interface. More...
 
eBTRMgrRet BTRMgr_SI_SetStatus (tBTRMgrSiHdl hBTRMgrSiHdl, stBTRMgrMediaStatus *apstBtrMgrSiStatus)
 This API will set the current settings used by this interface. More...
 
eBTRMgrRet BTRMgr_SI_Start (tBTRMgrSiHdl hBTRMgrSiHdl, int aiInBufMaxSize, stBTRMgrInASettings *apstBtrMgrSiInASettings)
 This API uses BTRMgr_SI_GstStart(), starts the pipeline. More...
 
eBTRMgrRet BTRMgr_SI_Stop (tBTRMgrSiHdl hBTRMgrSiHdl)
 This API uses BTRMgr_SI_GstStop() for closing the pipeline. More...
 
eBTRMgrRet BTRMgr_SI_Pause (tBTRMgrSiHdl hBTRMgrSiHdl)
 This API uses BTRMgr_SI_GstPause() for pausing the current operation. More...
 
eBTRMgrRet BTRMgr_SI_Resume (tBTRMgrSiHdl hBTRMgrSiHdl)
 This API uses BTRMgr_SI_GstResume() to resume the status. More...
 
eBTRMgrRet BTRMgr_SI_SendBuffer (tBTRMgrSiHdl hBTRMgrSiHdl, char *pcInBuf, int aiInBufSize)
 Invokes BTRMgr_SI_GstSendBuffer() to add the buffer to the queue. More...
 
eBTRMgrRet BTRMgr_SI_SendEOS (tBTRMgrSiHdl hBTRMgrSiHdl)
 This API is used to indicate the End of stream. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstInit (tBTRMgrSiGstHdl *phBTRMgrSiGstHdl, fPtr_BTRMgr_SI_GstStatusCb afpcBSiGstStatus, void *apvUserData)
 This API initializes the streaming interface. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstDeInit (tBTRMgrSiGstHdl hBTRMgrSiGstHdl)
 This API performs the cleanup operations. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstStart (tBTRMgrSiGstHdl hBTRMgrSiGstHdl, int aiInBufMaxSize, int aiBTDevFd, int aiBTDevMTU, unsigned int aiBTDevSFreq, const char *apcAudioInType)
 This API starts the playback and listens to the events associated with it. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstStop (tBTRMgrSiGstHdl hBTRMgrSiGstHdl)
 This API stops the current playback and sets the state as NULL. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstPause (tBTRMgrSiGstHdl hBTRMgrSiGstHdl)
 This API pauses the current playback and listens to the events. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstResume (tBTRMgrSiGstHdl hBTRMgrSiGstHdl)
 This API resumes the current operation and listens to the events. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstSetVolume (tBTRMgrSiGstHdl hBTRMgrSiGstHdl, unsigned char ui8Volume)
 This API resumes the current operation and listens to the events. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstSendBuffer (tBTRMgrSiGstHdl hBTRMgrSiGstHdl, char *pcInBuf, int aiInBufSize)
 This API pushes the buffer to the queue. More...
 
eBTRMgrSIGstRet BTRMgr_SI_GstSendEOS (tBTRMgrSiGstHdl hBTRMgrSiGstHdl)
 This API is used to push EOS(End of Stream) to the queue. More...
 

Function Documentation

◆ BTRMgr_SI_Init()

eBTRMgrRet BTRMgr_SI_Init ( tBTRMgrSiHdl *  phBTRMgrSiHdl,
fPtr_BTRMgr_SI_StatusCb  afpcBSiStatus,
void *  apvUserData 
)

This API invokes BTRMgr_SI_GstInit() for the stream in initializations.

Parameters
[in]phBTRMgrSiHdlHandle to the stream in interface.
[in]afpcBSiStatusStream In callback function.
[in]apvUserDataData for the callback function.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 75 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_DeInit()

eBTRMgrRet BTRMgr_SI_DeInit ( tBTRMgrSiHdl  hBTRMgrSiHdl)

This API invokes BTRMgr_SI_GstDeInit() for the deinitializations.

Parameters
[in]hBTRMgrSiHdlHandle to the stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 121 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_GetDefaultSettings()

eBTRMgrRet BTRMgr_SI_GetDefaultSettings ( tBTRMgrSiHdl  hBTRMgrSiHdl)

This API is used to load the default settings used by this interface.

Parameters
[in]hBTRMgrSiHdlHandle to the stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 155 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_GetCurrentSettings()

eBTRMgrRet BTRMgr_SI_GetCurrentSettings ( tBTRMgrSiHdl  hBTRMgrSiHdl)

This API will fetch the current settings used by this interface.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 175 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_GetStatus()

eBTRMgrRet BTRMgr_SI_GetStatus ( tBTRMgrSiHdl  hBTRMgrSiHdl,
stBTRMgrMediaStatus apstBtrMgrSiStatus 
)

This API will fetch the current settings used by this interface.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager stream in interface.
[in]pstBtrMgrSiStatusStatus of media device that has to be fetched.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 195 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_SetStatus()

eBTRMgrRet BTRMgr_SI_SetStatus ( tBTRMgrSiHdl  hBTRMgrSiHdl,
stBTRMgrMediaStatus apstBtrMgrSiStatus 
)

This API will set the current settings used by this interface.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager stream in interface.
[in]pstBtrMgrSiStatusStatus of media device that has to be fetched.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 216 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_Start()

eBTRMgrRet BTRMgr_SI_Start ( tBTRMgrSiHdl  hBTRMgrSiHdl,
int  aiInBufMaxSize,
stBTRMgrInASettings apstBtrMgrSiInASettings 
)

This API uses BTRMgr_SI_GstStart(), starts the pipeline.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager stream in interface.
[in]aiInBufMaxSizeMaximum buffer size.
[in]aiBTDevFdInput file descriptor.
[in]aiBTDevMTUBlock size to read.
[in]aiBTDevSFreqThe Clock rate.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 272 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_Stop()

eBTRMgrRet BTRMgr_SI_Stop ( tBTRMgrSiHdl  hBTRMgrSiHdl)

This API uses BTRMgr_SI_GstStop() for closing the pipeline.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 434 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_Pause()

eBTRMgrRet BTRMgr_SI_Pause ( tBTRMgrSiHdl  hBTRMgrSiHdl)

This API uses BTRMgr_SI_GstPause() for pausing the current operation.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager audio capture interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 466 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_Resume()

eBTRMgrRet BTRMgr_SI_Resume ( tBTRMgrSiHdl  hBTRMgrSiHdl)

This API uses BTRMgr_SI_GstResume() to resume the status.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager audio capture interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 496 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_SendBuffer()

eBTRMgrRet BTRMgr_SI_SendBuffer ( tBTRMgrSiHdl  hBTRMgrSiHdl,
char *  pcInBuf,
int  aiInBufSize 
)

Invokes BTRMgr_SI_GstSendBuffer() to add the buffer to the queue.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager audio capture interface.
[in]pcInBufThe buffer to be added to the queue.
[in]aiInBufSizeBuffer size.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 526 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_SendEOS()

eBTRMgrRet BTRMgr_SI_SendEOS ( tBTRMgrSiHdl  hBTRMgrSiHdl)

This API is used to indicate the End of stream.

Invokes the BTRMgr_SI_GstSendEOS() to push the end of stream. Also sets the bluetooth manager status as completed.

Parameters
[in]hBTRMgrSiHdlHandle to the bluetooth manager audio capture interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSuccesson success, appropriate error code otherwise.

Definition at line 557 of file btrMgr_streamIn.c.

◆ BTRMgr_SI_GstInit()

eBTRMgrSIGstRet BTRMgr_SI_GstInit ( tBTRMgrSiGstHdl *  phBTRMgrSiGstHdl,
fPtr_BTRMgr_SI_GstStatusCb  afpcBSiGstStatus,
void *  apvUserData 
)

This API initializes the streaming interface.

Uses gstreamer element "fdsrc" for initialization.

Parameters
[in]phBTRMgrSiGstHdlHandle to the stream in interface.
[in]afpcBSiGstStatusStream In callback function.
[in]apvUserDataData for the callback function.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 257 of file btrMgr_streamInGst.c.

◆ BTRMgr_SI_GstDeInit()

eBTRMgrSIGstRet BTRMgr_SI_GstDeInit ( tBTRMgrSiGstHdl  hBTRMgrSiGstHdl)

This API performs the cleanup operations.

Cancels the threads that are running within and frees all associated memory.

Parameters
[in]hBTRMgrSiGstHdlHandle to the stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 410 of file btrMgr_streamInGst.c.

◆ BTRMgr_SI_GstStart()

eBTRMgrSIGstRet BTRMgr_SI_GstStart ( tBTRMgrSiGstHdl  hBTRMgrSiGstHdl,
int  aiInBufMaxSize,
int  aiBTDevFd,
int  aiBTDevMTU,
unsigned int  aiBTDevSFreq,
const char *  apcAudioInType 
)

This API starts the playback and listens to the events associated with it.

Parameters
[in]hBTRMgrSiGstHdlHandle to the stream in interface.
[in]aiInBufMaxSizeMaximum buffer size.
[in]aiBTDevFdInput file descriptor.
[in]aiBTDevMTUBlock size to read.
[in]aiBTDevSFreqThe Clock rate.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 485 of file btrMgr_streamInGst.c.

◆ BTRMgr_SI_GstStop()

eBTRMgrSIGstRet BTRMgr_SI_GstStop ( tBTRMgrSiGstHdl  hBTRMgrSiGstHdl)

This API stops the current playback and sets the state as NULL.

Parameters
[in]hBTRMgrSiGstHdlHandle to the stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 562 of file btrMgr_streamInGst.c.

◆ BTRMgr_SI_GstPause()

eBTRMgrSIGstRet BTRMgr_SI_GstPause ( tBTRMgrSiGstHdl  hBTRMgrSiGstHdl)

This API pauses the current playback and listens to the events.

Checks for the current state, if it is in playing state pause state is set.

Parameters
[in]hBTRMgrSiGstHdlHandle to the stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 597 of file btrMgr_streamInGst.c.

◆ BTRMgr_SI_GstResume()

eBTRMgrSIGstRet BTRMgr_SI_GstResume ( tBTRMgrSiGstHdl  hBTRMgrSiGstHdl)

This API resumes the current operation and listens to the events.

Checks for the current state, if it is in paused state, playing state is set.

Parameters
[in]hBTRMgrSiGstHdlHandle to the stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 635 of file btrMgr_streamInGst.c.

◆ BTRMgr_SI_GstSetVolume()

eBTRMgrSIGstRet BTRMgr_SI_GstSetVolume ( tBTRMgrSiGstHdl  hBTRMgrSiGstHdl,
unsigned char  ui8Volume 
)

This API resumes the current operation and listens to the events.

Checks for the current state, if it is in paused state, playing state is set.

Parameters
[in]hBTRMgrSiGstHdlHandle to the stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 673 of file btrMgr_streamInGst.c.

◆ BTRMgr_SI_GstSendBuffer()

eBTRMgrSIGstRet BTRMgr_SI_GstSendBuffer ( tBTRMgrSiGstHdl  hBTRMgrSiGstHdl,
char *  pcInBuf,
int  aiInBufSize 
)

This API pushes the buffer to the queue.

Parameters
[in]hBTRMgrSiGstHdlHandle to the stream in interface.
[in]pcInBufThe buffer to be added to the queue.
[in]aiInBufSizeBuffer size.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 698 of file btrMgr_streamInGst.c.

◆ BTRMgr_SI_GstSendEOS()

eBTRMgrSIGstRet BTRMgr_SI_GstSendEOS ( tBTRMgrSiGstHdl  hBTRMgrSiGstHdl)

This API is used to push EOS(End of Stream) to the queue.

Parameters
[in]hBTRMgrSiGstHdlHandle to the stream in interface.
Returns
Returns the status of the operation.
Return values
eBTRMgrSIGstSuccesson success, appropriate error code otherwise.

Definition at line 751 of file btrMgr_streamInGst.c.