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 second304 //--------------------------------------------------------------------------------------------------308 //--------------------------------------------------------------------------------------------------311 //--------------------------------------------------------------------------------------------------314 * Connect the current client thread to the service providing this API. Block until the service is317 * For each thread that wants to use this API, either ConnectService or TryConnectService must be318 * called before any other functions in this API. Normally, ConnectService is automatically called323 //--------------------------------------------------------------------------------------------------329 //--------------------------------------------------------------------------------------------------332 * Try to connect the current client thread to the service providing this API. Return with an error335 * For each thread that wants to use this API, either ConnectService or TryConnectService must be336 * called before any other functions in this API. Normally, ConnectService is automatically called345 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).348 //--------------------------------------------------------------------------------------------------354 //--------------------------------------------------------------------------------------------------358 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants361 //--------------------------------------------------------------------------------------------------368 //--------------------------------------------------------------------------------------------------374 * longer a connection to the service, and the functions in this API can't be used. For details, see379 //--------------------------------------------------------------------------------------------------386 //--------------------------------------------------------------------------------------------------390 //--------------------------------------------------------------------------------------------------393 //--------------------------------------------------------------------------------------------------397 //--------------------------------------------------------------------------------------------------400 //--------------------------------------------------------------------------------------------------404 //--------------------------------------------------------------------------------------------------407 //--------------------------------------------------------------------------------------------------411 //--------------------------------------------------------------------------------------------------414 //--------------------------------------------------------------------------------------------------419 //--------------------------------------------------------------------------------------------------436 //--------------------------------------------------------------------------------------------------440 //--------------------------------------------------------------------------------------------------444 //--------------------------------------------------------------------------------------------------449 //--------------------------------------------------------------------------------------------------451 (460 //--------------------------------------------------------------------------------------------------466 //--------------------------------------------------------------------------------------------------473 //--------------------------------------------------------------------------------------------------479 //--------------------------------------------------------------------------------------------------491 //--------------------------------------------------------------------------------------------------499 //--------------------------------------------------------------------------------------------------506 //--------------------------------------------------------------------------------------------------513 //--------------------------------------------------------------------------------------------------520 //--------------------------------------------------------------------------------------------------529 //--------------------------------------------------------------------------------------------------550 //--------------------------------------------------------------------------------------------------559 //--------------------------------------------------------------------------------------------------568 //--------------------------------------------------------------------------------------------------573 //--------------------------------------------------------------------------------------------------580 //--------------------------------------------------------------------------------------------------587 //--------------------------------------------------------------------------------------------------598 //--------------------------------------------------------------------------------------------------602 //--------------------------------------------------------------------------------------------------le_result_t streamMedia_SendRtcpBye(le_audio_StreamRef_t streamRef, const char *LE_NONNULL reason)void(* streamMedia_DisconnectHandler_t)(void *)Definition: streamMedia_interface.h:309le_audio_StreamRef_t streamMedia_OpenAudioRtpRx(int32_t localPort)struct le_audio_Stream * le_audio_StreamRef_tDefinition: le_audio_interface.h:594struct streamMedia_RtcpHandler * streamMedia_RtcpHandlerRef_tDefinition: streamMedia_interface.h:441streamMedia_RtcpHandlerRef_t streamMedia_AddRtcpHandler(le_audio_StreamRef_t streamRef, streamMedia_RtcpHandlerFunc_t handlerPtr, void *contextPtr)void streamMedia_SetServerDisconnectHandler(streamMedia_DisconnectHandler_t disconnectHandler, void *contextPtr)void(* streamMedia_RtcpHandlerFunc_t)(le_audio_StreamRef_t streamRef, streamMedia_RtcpEvent_t event, void *contextPtr)Definition: streamMedia_interface.h:451le_result_t streamMedia_Stop(le_audio_StreamRef_t streamRef)void streamMedia_DisconnectService(void)RTCP Session Description packet has been received.Definition: streamMedia_interface.h:422RTCP Sender Report packet has been received.Definition: streamMedia_interface.h:426le_result_t streamMedia_Start(le_audio_StreamRef_t streamRef)RTCP Receiver Report packet has been received.Definition: streamMedia_interface.h:428void streamMedia_RemoveRtcpHandler(streamMedia_RtcpHandlerRef_t handlerRef)le_audio_StreamRef_t streamMedia_OpenAudioRtpTx(int32_t localPort, const char *LE_NONNULL remoteIpAddress, int32_t remotePort)le_result_t streamMedia_TryConnectService(void)void streamMedia_ConnectService(void)RTCP Application-specific packet has been received.Definition: streamMedia_interface.h:430void streamMedia_Close(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)