streamMedia_interface.h
Go to the documentation of this file.
25 * The RTP protocol is augmented by a control protocol called Real-Time Transport Control Protocol34 * @note The RTP interface does not provide the full Audio/Video Profile (AVP) profile : it can only37 * Typically, the RTP interface can be used to redirect an audio call coming from an audio interface40 * sends the data through an IP network. The data would be received by an IP client (PC, smartphone,45 * In order to start a RTP session, information on the local and remote IP address are required to47 * sent and received, and the remote address and port correspond to the IP address and port on which87 * several optional text fields that can provide information about the user's name, email address,90 * The RTCP BYE packet can be used to mark the end of the RTP session. It is possible to specify the100 * @note The RTP interface requires one more UDP socket in order to send and receive RTCP packets.109 * @warning The following codes show a basic example of how to transmit audio through RTP between270 * - When disconnecting it, start by the transmission stream, and then disconnect the reception one.274 * A delay of 500 ms has been measured on a one-sided RTP session (RTP transmission only) on a WP85276 * second due to the two-sided RTP session (transmission on one module and reception on the other).277 * However, the streamMedia API can be used for any streaming purposes where a delay of one second309 //--------------------------------------------------------------------------------------------------313 //--------------------------------------------------------------------------------------------------316 //--------------------------------------------------------------------------------------------------319 * Connect the current client thread to the service providing this API. Block until the service is322 * For each thread that wants to use this API, either ConnectService or TryConnectService must be323 * called before any other functions in this API. Normally, ConnectService is automatically called328 //--------------------------------------------------------------------------------------------------334 //--------------------------------------------------------------------------------------------------337 * Try to connect the current client thread to the service providing this API. Return with an error340 * For each thread that wants to use this API, either ConnectService or TryConnectService must be341 * called before any other functions in this API. Normally, ConnectService is automatically called350 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).353 //--------------------------------------------------------------------------------------------------359 //--------------------------------------------------------------------------------------------------363 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants366 //--------------------------------------------------------------------------------------------------373 //--------------------------------------------------------------------------------------------------379 * longer a connection to the service, and the functions in this API can't be used. For details, see384 //--------------------------------------------------------------------------------------------------391 //--------------------------------------------------------------------------------------------------396 //--------------------------------------------------------------------------------------------------399 //--------------------------------------------------------------------------------------------------404 //--------------------------------------------------------------------------------------------------407 //--------------------------------------------------------------------------------------------------411 //--------------------------------------------------------------------------------------------------414 //--------------------------------------------------------------------------------------------------420 //--------------------------------------------------------------------------------------------------427 //--------------------------------------------------------------------------------------------------433 //--------------------------------------------------------------------------------------------------445 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------460 //--------------------------------------------------------------------------------------------------467 //--------------------------------------------------------------------------------------------------474 //--------------------------------------------------------------------------------------------------483 //--------------------------------------------------------------------------------------------------504 //--------------------------------------------------------------------------------------------------513 //--------------------------------------------------------------------------------------------------522 //--------------------------------------------------------------------------------------------------527 //--------------------------------------------------------------------------------------------------534 //--------------------------------------------------------------------------------------------------541 //--------------------------------------------------------------------------------------------------552 //--------------------------------------------------------------------------------------------------556 //--------------------------------------------------------------------------------------------------LE_FULL_API void streamMedia_SetServerDisconnectHandler(streamMedia_DisconnectHandler_t disconnectHandler, void *contextPtr)void streamMedia_RemoveRtcpHandler(streamMedia_RtcpHandlerRef_t handlerRef)void streamMedia_ConnectService(void)le_audio_StreamRef_t streamMedia_OpenAudioRtpRx(int32_t localPort)void streamMedia_DisconnectService(void)void(* streamMedia_RtcpHandlerFunc_t)(le_audio_StreamRef_t streamRef, streamMedia_RtcpEvent_t event, void *contextPtr)Definition: streamMedia_common.h:96le_result_t streamMedia_TryConnectService(void)le_result_t streamMedia_Stop(le_audio_StreamRef_t streamRef)void(* streamMedia_DisconnectHandler_t)(void *)Definition: streamMedia_interface.h:314le_result_t streamMedia_SendRtcpBye(le_audio_StreamRef_t streamRef, const char *LE_NONNULL reason)le_result_t streamMedia_Start(le_audio_StreamRef_t streamRef)le_audio_StreamRef_t streamMedia_OpenAudioRtpTx(int32_t localPort, const char *LE_NONNULL remoteIpAddress, int32_t remotePort)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)void streamMedia_Close(le_audio_StreamRef_t streamRef)streamMedia_RtcpHandlerRef_t streamMedia_AddRtcpHandler(le_audio_StreamRef_t streamRef, streamMedia_RtcpHandlerFunc_t handlerPtr, void *contextPtr)struct streamMedia_RtcpHandler * streamMedia_RtcpHandlerRef_tDefinition: streamMedia_common.h:86