Go to the source code of this file.
Typedefs | |
typedef void(* | streamMedia_DisconnectHandler_t) (void *) |
Functions | |
void | streamMedia_ConnectService (void) |
le_result_t | streamMedia_TryConnectService (void) |
LE_FULL_API void | streamMedia_SetServerDisconnectHandler (streamMedia_DisconnectHandler_t disconnectHandler, void *contextPtr) |
void | streamMedia_DisconnectService (void) |
le_audio_StreamRef_t | streamMedia_OpenAudioRtpRx (int32_t localPort) |
le_audio_StreamRef_t | streamMedia_OpenAudioRtpTx (int32_t localPort, const char *LE_NONNULL remoteIpAddress, int32_t remotePort) |
le_result_t | streamMedia_Start (le_audio_StreamRef_t streamRef) |
le_result_t | streamMedia_Stop (le_audio_StreamRef_t streamRef) |
le_result_t | streamMedia_SendRtcpSdes (le_audio_StreamRef_t streamRef, const char *LE_NONNULL cname, const char *LE_NONNULL name, const char *LE_NONNULL email, const char *LE_NONNULL phone, const char *LE_NONNULL loc, const char *LE_NONNULL tool, const char *LE_NONNULL note) |
le_result_t | streamMedia_SendRtcpBye (le_audio_StreamRef_t streamRef, const char *LE_NONNULL reason) |
void | streamMedia_Close (le_audio_StreamRef_t streamRef) |
streamMedia_RtcpHandlerRef_t | streamMedia_AddRtcpHandler (le_audio_StreamRef_t streamRef, streamMedia_RtcpHandlerFunc_t handlerPtr, void *contextPtr) |
void | streamMedia_RemoveRtcpHandler (streamMedia_RtcpHandlerRef_t handlerRef) |
Detailed Description
Legato Stream Media include file.
Copyright (C) Sierra Wireless Inc.
Typedef Documentation
◆ streamMedia_DisconnectHandler_t
typedef void(* streamMedia_DisconnectHandler_t) (void *) |
Type for handler called when a server disconnects.
Function Documentation
◆ streamMedia_AddRtcpHandler()
streamMedia_RtcpHandlerRef_t streamMedia_AddRtcpHandler | ( | le_audio_StreamRef_t | streamRef, |
streamMedia_RtcpHandlerFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Add handler function for EVENT 'streamMedia_Rtcp'
This event provides information on RTCP packet type.
- Parameters
-
[in] streamRef Audio stream reference. [in] handlerPtr [in] contextPtr
◆ streamMedia_Close()
void streamMedia_Close | ( | le_audio_StreamRef_t | streamRef | ) |
Close an RTP stream.
- Parameters
-
[in] streamRef Audio stream reference.
◆ streamMedia_ConnectService()
void streamMedia_ConnectService | ( | void | ) |
Connect the current client thread to the service providing this API. Block until the service is available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.
This function is created automatically.
◆ streamMedia_DisconnectService()
void streamMedia_DisconnectService | ( | void | ) |
Disconnect the current client thread from the service providing this API.
Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.
This function is created automatically.
◆ streamMedia_OpenAudioRtpRx()
le_audio_StreamRef_t streamMedia_OpenAudioRtpRx | ( | int32_t | localPort | ) |
RTCP packet reception events, related to the RTCP packet type. See RFC-3550 for more details. Handler for RTCP packet reception. Reference type used by Add/Remove functions for EVENT 'streamMedia_Rtcp' Open the received audio stream of the RTP interface.
- Returns
- Reference to the input audio stream, NULL if the function fails.
- Parameters
-
[in] localPort The local UDP socket port for the RTP session.
◆ streamMedia_OpenAudioRtpTx()
le_audio_StreamRef_t streamMedia_OpenAudioRtpTx | ( | int32_t | localPort, |
const char *LE_NONNULL | remoteIpAddress, | ||
int32_t | remotePort | ||
) |
Open the transmitted audio stream of the RTP interface.
- Returns
- Reference to the output audio stream, NULL if the function fails.
- Parameters
-
[in] localPort The local UDP socket port for the RTP session. [in] remoteIpAddress The IP address of the remote peer. [in] remotePort The port of the remote peer.
◆ streamMedia_RemoveRtcpHandler()
void streamMedia_RemoveRtcpHandler | ( | streamMedia_RtcpHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'streamMedia_Rtcp'
- Parameters
-
[in] handlerRef
◆ streamMedia_SendRtcpBye()
le_result_t streamMedia_SendRtcpBye | ( | le_audio_StreamRef_t | streamRef, |
const char *LE_NONNULL | reason | ||
) |
Send a RTCP BYE packet using pjmedia_rtcp_build_rtcp_bye().
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
- Parameters
-
[in] streamRef Audio stream reference. [in] reason The optional BYE reason.
◆ streamMedia_SendRtcpSdes()
le_result_t streamMedia_SendRtcpSdes | ( | le_audio_StreamRef_t | streamRef, |
const char *LE_NONNULL | cname, | ||
const char *LE_NONNULL | name, | ||
const char *LE_NONNULL | email, | ||
const char *LE_NONNULL | phone, | ||
const char *LE_NONNULL | loc, | ||
const char *LE_NONNULL | tool, | ||
const char *LE_NONNULL | note | ||
) |
Send a RTCP Session Description packet (SDES) using pjmedia_rtcp_build_rtcp_sdes().
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
- Parameters
-
[in] streamRef Audio stream reference. [in] cname The optional source canonical name. [in] name The optional source name. [in] email The optional source email. [in] phone The optional source phone. [in] loc The optional source location. [in] tool The optional source tool. [in] note The optional source note.
◆ streamMedia_SetServerDisconnectHandler()
LE_FULL_API void streamMedia_SetServerDisconnectHandler | ( | streamMedia_DisconnectHandler_t | disconnectHandler, |
void * | contextPtr | ||
) |
Set handler called when server disconnection is detected.
When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.
◆ streamMedia_Start()
le_result_t streamMedia_Start | ( | le_audio_StreamRef_t | streamRef | ) |
Start the RTP stream. This must be called after connecting the RTP interface to start RTP reception or transmission.
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
- Parameters
-
[in] streamRef Audio stream reference.
◆ streamMedia_Stop()
le_result_t streamMedia_Stop | ( | le_audio_StreamRef_t | streamRef | ) |
Stop the RTP stream.
- Returns
- LE_FAULT Function failed.
- LE_OK Function succeeded.
- Parameters
-
[in] streamRef Audio stream reference.
◆ streamMedia_TryConnectService()
le_result_t streamMedia_TryConnectService | ( | void | ) |
Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.
This function is created automatically.
- Returns
- LE_OK if the client connected successfully to the service.
- LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
- LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
- LE_COMM_ERROR if the Service Directory cannot be reached.