Tizen Native API  6.5
Media Streamer

The Media Streamer APIs provides functions for building custom player.

Required Header

#include <media_streamer.h>

Overview

The Media Streamer API allows application developers to construct the custom player. It includes providing a way to handle media content by user specific player.

MEDIASTREAMER allows :

  • Application can decide the input type of the media source.
  • Application can decide the output type of the media content.
  • Application can create filter nodes considering requirements.
  • Application can set/get properties of each node.

The Media Streamer API also notifies you by callback mechanism when the state is changed.

Related Features

This API is related with the following features:

It is recommended to design feature related codes in your application for reliability.
You can check if a device supports the related features for this API by using System Information, thereby controlling the procedure of your application.
To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
More details on featuring your application can be found from Feature Element.

Functions

int media_streamer_set_error_cb (media_streamer_h streamer, media_streamer_error_cb callback, void *user_data)
 Sets a error callback function to be invoked when an error occurs.
int media_streamer_unset_error_cb (media_streamer_h streamer)
 Unsets the error callback function.
int media_streamer_set_state_change_cb (media_streamer_h streamer, media_streamer_state_changed_cb callback, void *user_data)
 Sets a callback that will be triggered after media streamer state is changed.
int media_streamer_unset_state_change_cb (media_streamer_h streamer)
 Unsets the state changed callback function.
int media_streamer_set_interrupted_cb (media_streamer_h streamer, media_streamer_interrupted_cb callback, void *user_data)
 Sets a callback function to be invoked when the media streamer is interrupted.
int media_streamer_unset_interrupted_cb (media_streamer_h streamer)
 Unsets the callback function.
int media_streamer_src_set_buffer_status_cb (media_streamer_node_h src, media_streamer_custom_buffer_status_cb callback, void *user_data)
 Sets a callback function to be invoked when buffer underrun or overflow is occurred.
int media_streamer_src_unset_buffer_status_cb (media_streamer_node_h src)
 Unsets the source buffer status callback function.
int media_streamer_sink_set_data_ready_cb (media_streamer_node_h sink, media_streamer_sink_data_ready_cb callback, void *user_data)
 Sets a callback function to be called when the custom sink is ready for data processing.
int media_streamer_sink_unset_data_ready_cb (media_streamer_node_h sink)
 Unsets the sink data ready callback function.
int media_streamer_sink_set_eos_cb (media_streamer_node_h sink, media_streamer_sink_eos_cb callback, void *user_data)
 Sets a callback function to be called when custom sink detect the end-of-stream.
int media_streamer_sink_unset_eos_cb (media_streamer_node_h sink)
 Unsets the sink end-of-stream callback function.
int media_streamer_create (media_streamer_h *streamer)
 Creates an instance of media streamer and passes the handle to the caller.
int media_streamer_prepare (media_streamer_h streamer)
 Sets media streamer state to MEDIA_STREAMER_STATE_READY.
int media_streamer_unprepare (media_streamer_h streamer)
 Sets media streamer state to MEDIA_STREAMER_STATE_IDLE.
int media_streamer_play (media_streamer_h streamer)
 Sets media streamer state to MEDIA_STREAMER_STATE_PLAYING.
int media_streamer_pause (media_streamer_h streamer)
 Pauses the media streamer.
int media_streamer_stop (media_streamer_h streamer)
 Stops the media streamer.
int media_streamer_destroy (media_streamer_h streamer)
 Destroys media streamer.
int media_streamer_set_play_position (media_streamer_h streamer, int time, bool accurate, media_streamer_position_changed_cb callback, void *user_data)
 Changes playback position to the defined time value, asynchronously.
int media_streamer_get_play_position (media_streamer_h streamer, int *time)
 Gets the current position in milliseconds.
int media_streamer_get_duration (media_streamer_h streamer, int *duration)
 Gets the total running time of the associated media.
int media_streamer_get_state (media_streamer_h streamer, media_streamer_state_e *state)
 Gets media streamer state.
int media_streamer_node_create_src (media_streamer_node_src_type_e type, media_streamer_node_h *src)
 Creates media streamer source node.
int media_streamer_node_push_packet (media_streamer_node_h src, media_packet_h packet)
 Pushes packet into custom source node.
int media_streamer_node_create_sink (media_streamer_node_sink_type_e type, media_streamer_node_h *sink)
 Creates media streamer sink node.
int media_streamer_node_pull_packet (media_streamer_node_h sink, media_packet_h *packet)
 Pulls packet from custom sink node.
int media_streamer_node_create (media_streamer_node_type_e type, media_format_h in_fmt, media_format_h out_fmt, media_streamer_node_h *node)
 Creates media streamer node except MEDIA_STREAMER_NODE_TYPE_SRC and MEDIA_STREAMER_NODE_TYPE_SINK.
int media_streamer_node_add (media_streamer_h streamer, media_streamer_node_h node)
 Adds node to media streamer.
int media_streamer_node_destroy (media_streamer_node_h node)
 Destroys media streamer node.
int media_streamer_node_remove (media_streamer_h streamer, media_streamer_node_h node)
 Removes media streamer node from streamer.
int media_streamer_node_link (media_streamer_node_h node1, const char *src_pad_name, media_streamer_node_h node2, const char *sink_pad_name)
 Links two media streamer nodes.
int media_streamer_node_set_pad_format (media_streamer_node_h node, const char *pad_name, media_format_h fmt)
 Sets media format for pad of media streamer node.
int media_streamer_node_get_pad_format (media_streamer_node_h node, const char *pad_name, media_format_h *fmt)
 Gets media format for pad of media streamer node.
int media_streamer_node_get_pad_name (media_streamer_node_h node, char ***src_pad_name, int *src_pad_num, char ***sink_pad_name, int *sink_pad_num)
 Gets name of node pads.
int media_streamer_node_set_params (media_streamer_node_h node, bundle *param_list)
 Sets parameters of node.
int media_streamer_node_get_params (media_streamer_node_h node, bundle **param_list)
 Gets node parameter list.
int media_streamer_node_set_param (media_streamer_node_h node, const char *param_name, const char *param_value)
 Sets single parameter of node.
int media_streamer_node_get_param (media_streamer_node_h node, const char *param_name, char **param_value)
 Gets value of parameter.
int media_streamer_node_set_decoded_ready_cb (media_streamer_node_h node, media_streamer_node_decoded_ready_cb callback, void *user_data)
 Sets a callback function to be invoked when a source pad of node is ready to give decoded data.
int media_streamer_node_unset_decoded_ready_cb (media_streamer_node_h node)
 Unsets the decoded ready callback function.
int media_streamer_webrtc_node_set_message_cb (media_streamer_node_h webrtc, media_streamer_webrtc_message_cb callback, void *user_data)
 Sets a callback function to be invoked when WebRTC node needs to send a message to the remote peer of WebRTC connection.
int media_streamer_webrtc_node_unset_message_cb (media_streamer_node_h webrtc)
 Unsets the WebRTC message callback function.

Typedefs

typedef void * media_streamer_h
 Media Streamer handle type.
typedef void * media_streamer_node_h
 Media Streamer node handle type.
typedef void(* media_streamer_error_cb )(media_streamer_h streamer, media_streamer_error_e error, void *user_data)
 Called when error occurs in media streamer.
typedef void(* media_streamer_state_changed_cb )(media_streamer_h streamer, media_streamer_state_e previous_state, media_streamer_state_e current_state, void *user_data)
 Called when media streamer state is changed.
typedef void(* media_streamer_custom_buffer_status_cb )(media_streamer_node_h src, media_streamer_custom_buffer_status_e status, void *user_data)
 Called when the custom source needs more data or has enough data.
typedef void(* media_streamer_sink_data_ready_cb )(media_streamer_node_h sink, void *user_data)
 Called when new data is available from custom sink.
typedef void(* media_streamer_sink_eos_cb )(media_streamer_node_h sink, void *user_data)
 Called when the end-of-stream has been reached.
typedef void(* media_streamer_position_changed_cb )(void *user_data)
 Called when the seek operation is completed.
typedef void(* media_streamer_interrupted_cb )(media_streamer_interrupted_code_e code, void *user_data)
 Called when the media streamer is interrupted.
typedef void(* media_streamer_node_decoded_ready_cb )(media_streamer_node_h node, const char *src_pad_name, const char *media_type, void *user_data)
 Called when a source pad of a media streamer node is ready to provide decoded data.
typedef void(* media_streamer_webrtc_message_cb )(media_streamer_node_h webrtc, const char *message, void *user_data)
 Called when the media streamer WebRTC node needs to send the message to the remote peer of the WebRTC connection.

Defines

#define MEDIA_STREAMER_PARAM_CAMERA_ID   "camera-id"
 Definition for camera-id parameter of source node.
#define MEDIA_STREAMER_PARAM_CAPTURE_WIDTH   "capture-width"
 Definition for capture-width parameter of source node.
#define MEDIA_STREAMER_PARAM_CAPTURE_HEIGHT   "capture-height"
 Definition for capture-height parameter of source node.
#define MEDIA_STREAMER_PARAM_IS_LIVE_STREAM   "is-live"
 Definition for is-live parameter of source node.
#define MEDIA_STREAMER_PARAM_URI   "uri"
 Definition for URI parameter of source node.
#define MEDIA_STREAMER_PARAM_USER_AGENT   "user-agent"
 Definition for user-agent parameter of source node.
#define MEDIA_STREAMER_PARAM_STREAM_TYPE   "stream-type"
 Definition for stream type parameter of source node.
#define MEDIA_STREAMER_PARAM_PORT   "port"
 Definition for port parameter of source or sink node.
#define MEDIA_STREAMER_PARAM_RTP_LATENCY   "rtp-latency"
 Definition for RTP packet latency of jitterbuffers of rtpbin or WebRTC node.
#define MEDIA_STREAMER_PARAM_VIDEO_IN_PORT   "video_in_port"
 Definition for video port parameter of source node.
#define MEDIA_STREAMER_PARAM_AUDIO_IN_PORT   "audio_in_port"
 Definition for audio port parameter of source node.
#define MEDIA_STREAMER_PARAM_VIDEO_OUT_PORT   "video_out_port"
 Definition for video port parameter of sink node.
#define MEDIA_STREAMER_PARAM_AUDIO_OUT_PORT   "audio_out_port"
 Definition for audio port parameter of sink node.
#define MEDIA_STREAMER_PARAM_IP_ADDRESS   "address"
 Definition for IP address parameter of source node.
#define MEDIA_STREAMER_PARAM_WEBRTC_PEER_TYPE   "webrtc-peer-type"
 Definition for the peer type of WebRTC node.
#define MEDIA_STREAMER_PARAM_WEBRTC_STUN_SERVER   "webrtc-stun-server"
 Definition for the STUN server URL for WebRTC node.
#define MEDIA_STREAMER_PARAM_WEBRTC_REMOTE_SESSION_DESCRIPTION   "webrtc-remote-session-description"
 Definition for remote session description.
#define MEDIA_STREAMER_PARAM_WEBRTC_ADD_ICE_CANDIDATE   "webrtc-add-ice-candidate"
 Definition for ICE candidate of WebRTC node.
#define MEDIA_STREAMER_PARAM_WEBRTC_RTP_TRANSCEIVER_DIRECTION_FOR_AUDIO   "webrtc-rtp-transceiver-direction-for-audio"
 Definition for WebRTC RTP transceiver direction for audio.
#define MEDIA_STREAMER_PARAM_WEBRTC_RTP_TRANSCEIVER_DIRECTION_FOR_VIDEO   "webrtc-rtp-transceiver-direction-for-video"
 Definition for WebRTC RTP transceiver direction for video.
#define MEDIA_STREAMER_PARAM_AUDIO_DEVICE   "audio_device"
 Definition for audio device name parameter of source or sink node.
#define MEDIA_STREAMER_PARAM_CLOCK_SYNCHRONIZED   "sync"
 Definition for sync parameter of sink node.
#define MEDIA_STREAMER_PARAM_ROTATE   "rotate"
 Definition for rotate parameter of sink node.
#define MEDIA_STREAMER_PARAM_FLIP   "flip"
 Definition for flip parameter of sink node.
#define MEDIA_STREAMER_PARAM_DISPLAY_GEOMETRY_METHOD   "display-geometry-method"
 Definition for display geometry method parameter of sink node.
#define MEDIA_STREAMER_PARAM_DISPLAY   "display"
 Definition for display parameter of sink node.
#define MEDIA_STREAMER_PARAM_VISIBLE   "visible"
 Definition for visible parameter of sink node.
#define MEDIA_STREAMER_PARAM_USE_TBM   "use-tbm"
 Definition for use-tbm parameter of sink node.
#define MEDIA_STREAMER_PARAM_HOST   "host"
 Definition for host parameter of sink node.
#define MEDIA_STREAMER_PARAM_SEGMENT_LOCATION   "location"
 Definition for segment location parameter of adaptive sink node.
#define MEDIA_STREAMER_PARAM_PLAYLIST_LOCATION   "playlist-location"
 Definition for playlist location parameter of adaptive sink node.
#define MEDIA_STREAMER_PARAM_SINK_MAX_LATENESS   "max-lateness"
 Definition for maximum lateness of sink node.
#define MEDIA_STREAMER_NODE_PAD_VIDEO_SINK   "video-in"
 Definition for the name of the sink pad that receives video data.
#define MEDIA_STREAMER_NODE_PAD_AUDIO_SINK   "audio-in"
 Definition for the name of the sink pad that receives audio data.

Define Documentation

#define MEDIA_STREAMER_NODE_PAD_AUDIO_SINK   "audio-in"

Definition for the name of the sink pad that receives audio data.

Since :
6.0
Remarks:
A node of MEDIA_STREAMER_NODE_TYPE_RTP or MEDIA_STREAMER_NODE_TYPE_WEBRTC type has this pad.
See also:
media_streamer_node_set_pad_format()
media_streamer_node_get_pad_format()
media_streamer_node_link()
#define MEDIA_STREAMER_NODE_PAD_VIDEO_SINK   "video-in"

Definition for the name of the sink pad that receives video data.

Since :
6.0
Remarks:
A node of MEDIA_STREAMER_NODE_TYPE_RTP or MEDIA_STREAMER_NODE_TYPE_WEBRTC type has this pad.
See also:
media_streamer_node_set_pad_format()
media_streamer_node_get_pad_format()
media_streamer_node_link()
#define MEDIA_STREAMER_PARAM_AUDIO_DEVICE   "audio_device"

Definition for audio device name parameter of source or sink node.

ALSA device, as defined in an asound configuration file.
ex) "hw:0,0", "hw:0,1"
Data type is string and default value is "default".

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_AUDIO_IN_PORT   "audio_in_port"

Definition for audio port parameter of source node.

The port to receive the audio packets from.
Data type is integer.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_AUDIO_OUT_PORT   "audio_out_port"

Definition for audio port parameter of sink node.

The port to send the audio packets to.
Data type is integer.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_CAMERA_ID   "camera-id"

Definition for camera-id parameter of source node.

Index number of camera to activate.
Data type is integer and default value is 0.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_CAPTURE_HEIGHT   "capture-height"

Definition for capture-height parameter of source node.

Height for camera size to capture.
Data type is integer and default value is 1200.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_CAPTURE_WIDTH   "capture-width"

Definition for capture-width parameter of source node.

Width for camera size to capture.
Data type is integer and default value is 1600.

Since :
3.0
See also:
media_streamer_node_get_params()

Definition for sync parameter of sink node.

Synchronize on the clock.
Data type is boolean and default value is true.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_DISPLAY   "display"

Definition for display parameter of sink node.

It is a object to draw video frame on.
Data type is pointer.

Since :
3.0
Remarks:
This parameter must be set in main thread of application.
Otherwise, media_streamer_node_set_param() will return MEDIA_STREAMER_ERROR_INVALID_OPERATION by internal restriction.
To avoid MEDIA_STREAMER_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and ecore_thread_main_loop_end() can be used, but deadlock can be also occurred if main thread is busy.
See also:
media_streamer_node_get_params()
ecore_thread_main_loop_begin()
ecore_thread_main_loop_end()
#define MEDIA_STREAMER_PARAM_DISPLAY_GEOMETRY_METHOD   "display-geometry-method"

Definition for display geometry method parameter of sink node.

Geometrical method for display.
0:Letter box
1:Original size
2:Full-screen
3:Cropped full screen
4:Original size if surface size is larger than video size(width/height), or Letter box if video size(width/height) is larger than surface size. 5:Custom ROI
Default value is 0(Letter box).

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_FLIP   "flip"

Definition for flip parameter of sink node.

Flip for display.
0:none, 1:horizontal, 2:vertical, 3:both
Default value is 0.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_HOST   "host"

Definition for host parameter of sink node.

The host/IP/Multicast group to send the packets to.
Data type is string and default value is "localhost".

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_IP_ADDRESS   "address"

Definition for IP address parameter of source node.

IP address to send/receive packets for.
Data type is string and default value is "0.0.0.0".

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_IS_LIVE_STREAM   "is-live"

Definition for is-live parameter of source node.

Whether to act as a live source.
Data type is boolean and default value is false.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_PLAYLIST_LOCATION   "playlist-location"

Definition for playlist location parameter of adaptive sink node.

Path for writing playlist from.
Data type is string.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_PORT   "port"

Definition for port parameter of source or sink node.

The port to receive the packets from.
Data type is integer and default value is 5004.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_ROTATE   "rotate"

Definition for rotate parameter of sink node.

Rotate angle of display output.
0:none/1:rotate 90 degree/2:rotate 180 degree/3:rotate 270 degree
Default value is 3(rotate 270 degree).

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_RTP_LATENCY   "rtp-latency"

Definition for RTP packet latency of jitterbuffers of rtpbin or WebRTC node.

Default amount of ms to buffer in the jitterbuffers.
Data type is string and default value is "200".

Since :
6.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_SEGMENT_LOCATION   "location"

Definition for segment location parameter of adaptive sink node.

Path for writing playlist from.
Data type is string.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_SINK_MAX_LATENESS   "max-lateness"

Definition for maximum lateness of sink node.

The maximum number of nanoseconds that a buffer can be late before it is dropped (-1 unlimited).
The range is from "-1" to "9223372036854775807".
Data type is string and default value is "5000000".

Since :
6.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_STREAM_TYPE   "stream-type"

Definition for stream type parameter of source node.

The type of the push data stream.
0:stream, 1:seekable, 2:random-access (default:0)

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_URI   "uri"

Definition for URI parameter of source node.

URI to read from.
Data type is string.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_USE_TBM   "use-tbm"

Definition for use-tbm parameter of sink node.

Use Tizen Buffer Memory instead of Shared Memory.
The sink node must receive the tbm-buffer created by the previous node.
The value is changeable only in the MEDIA_STREAMER_STATE_IDLE state.
Data type is boolean and default value is false.

Since :
5.5
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_USER_AGENT   "user-agent"

Definition for user-agent parameter of source node.

Value of the User-Agent HTTP request header field.
Data type is string.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_VIDEO_IN_PORT   "video_in_port"

Definition for video port parameter of source node.

The port to receive the video packets from.
Data type is integer.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_VIDEO_OUT_PORT   "video_out_port"

Definition for video port parameter of sink node.

The port to send the video packets to.
Data type is integer.

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_VISIBLE   "visible"

Definition for visible parameter of sink node.

Draws screen or blacks out.
Data type is boolean and default value is true(visible).

Since :
3.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_WEBRTC_ADD_ICE_CANDIDATE   "webrtc-add-ice-candidate"

Definition for ICE candidate of WebRTC node.

Value of ICE candidate of the remote peer over its signaling channel.
Data type is string.

Since :
6.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_WEBRTC_PEER_TYPE   "webrtc-peer-type"

Definition for the peer type of WebRTC node.

The type of WebRTC peer, it can be "answer" or "offer".
Data type is string and default value is "answer".

Since :
6.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_WEBRTC_REMOTE_SESSION_DESCRIPTION   "webrtc-remote-session-description"

Definition for remote session description.

Value of the session description of the remote peer over its signaling channel.
Data type is string.

Since :
6.0
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_WEBRTC_RTP_TRANSCEIVER_DIRECTION_FOR_AUDIO   "webrtc-rtp-transceiver-direction-for-audio"

Definition for WebRTC RTP transceiver direction for audio.

WebRTC Transceiver direction to send audio RTP.
It can be "sendrecv" or "sendonly" or "recvonly" or "inactive".

Since :
6.0
Remarks:
"sendrecv": local peer will offer to send RTP, and send RTP if remote peer accepts, and will offer receive RTP, and will receive RTP if remote peer accepts.
"sendonly": local peer will offer to send RTP and will not suggest to receive RTP, and will not offer to send RTP and will not receive RTP if remote peer accepts.
"recvonly": local peer will not offer to send RTP, and will not send RTP, and will offer to receive RTP, and will receive RTP if remote peer accepts.
"inactive": local peer will not offer to send RTP, and will not send RTP, and will not offer to receive RTP, and will not receive RTP.
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_WEBRTC_RTP_TRANSCEIVER_DIRECTION_FOR_VIDEO   "webrtc-rtp-transceiver-direction-for-video"

Definition for WebRTC RTP transceiver direction for video.

WebRTC Transceiver direction to send video RTP.
It can be "sendrecv" or "sendonly" or "recvonly" or "inactive".

Since :
6.0
Remarks:
"sendrecv": local peer will offer to send RTP, and send RTP if remote peer accepts, and will offer receive RTP, and will receive RTP if remote peer accepts.
"sendonly": local peer will offer to send RTP and will not suggest to receive RTP, and will not offer to send RTP and will not receive RTP if remote peer accepts.
"recvonly": local peer will not offer to send RTP, and will not send RTP, and will offer to receive RTP, and will receive RTP if remote peer accepts.
"inactive": local peer will not offer to send RTP, and will not send RTP, and will not offer to receive RTP, and will not receive RTP.
See also:
media_streamer_node_get_params()
#define MEDIA_STREAMER_PARAM_WEBRTC_STUN_SERVER   "webrtc-stun-server"

Definition for the STUN server URL for WebRTC node.

Data type is string and default value is "stun://stun.l.google.com:19302".

Since :
6.0
See also:
media_streamer_node_get_params()

Typedef Documentation

Called when the custom source needs more data or has enough data.

This callback will be invoked when the buffer level drops below the threshold of max size or no free space in custom source buffer.

Since :
3.0
Remarks:
This callback can be applied only to MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM source type node.
The src is the same object for which the callback was set.
Parameters:
[in]srcMedia streamer source node handle
[in]statusMedia streamer custom buffer status
[in]user_dataThe user data passed from the callback registration function
See also:
media_streamer_src_set_buffer_status_cb()
media_streamer_node_get_param()
media_streamer_node_set_param()
typedef void(* media_streamer_error_cb)(media_streamer_h streamer, media_streamer_error_e error, void *user_data)

Called when error occurs in media streamer.

Since :
3.0
Remarks:
Following error codes can be delivered.
MEDIA_STREAMER_ERROR_INVALID_OPERATION,
MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE,
MEDIA_STREAMER_ERROR_NOT_SUPPORTED,
MEDIA_STREAMER_ERROR_CONNECTION_FAILED,
MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT.
The streamer is the same object for which the callback was set.
Parameters:
[in]streamerMedia streamer handle
[in]errorThe error that occurred in media steamer
[in]user_dataThe user data passed from the code where media_streamer_set_error_cb() was invoked This data will be accessible from media_streamer_error_cb()
Precondition:
Create media streamer handle by calling media_streamer_create().
See also:
media_streamer_set_error_cb()
media_streamer_unset_error_cb()
typedef void* media_streamer_h

Media Streamer handle type.

Since :
3.0
typedef void(* media_streamer_interrupted_cb)(media_streamer_interrupted_code_e code, void *user_data)

Called when the media streamer is interrupted.

Since :
3.0
Parameters:
[in]codeThe interrupted error code
[in]user_dataThe user data passed from the callback registration function
See also:
media_streamer_set_interrupted_cb()
media_streamer_unset_interrupted_cb()
typedef void(* media_streamer_node_decoded_ready_cb)(media_streamer_node_h node, const char *src_pad_name, const char *media_type, void *user_data)

Called when a source pad of a media streamer node is ready to provide decoded data.

Since :
6.0
Remarks:
The node is the same object for which the callback was set.
The src_pad_name and the media_type can be used only in the callback. To use outside, make a copy.
Parameters:
[in]nodeMedia streamer node handle
[in]src_pad_nameThe source pad name that can give decoded data to another one
[in]media_typeThe media type of the data from the given source pad such as 'video/x-raw', 'audio/x-raw', and so on
[in]user_dataThe user data passed from the callback registration function
See also:
media_streamer_node_set_decoded_ready_cb()
media_streamer_node_link()
media_streamer_node_unset_decoded_ready_cb()
typedef void* media_streamer_node_h

Media Streamer node handle type.

Since :
3.0
typedef void(* media_streamer_position_changed_cb)(void *user_data)

Called when the seek operation is completed.

Since :
3.0
Parameters:
[in]user_dataThe user data passed from the callback registration function
See also:
media_streamer_set_play_position()
typedef void(* media_streamer_sink_data_ready_cb)(media_streamer_node_h sink, void *user_data)

Called when new data is available from custom sink.

This callback can be applied only to MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type node.

Since :
3.0
Remarks:
The sink is the same object for which the callback was set.
Parameters:
[in]sinkMedia streamer sink node handle
[in]user_dataThe user data passed from the code where media_streamer_sink_set_data_ready_cb() was invoked This data will be accessible from media_streamer_sink_data_ready_cb()
Precondition:
media_streamer_sink_set_data_ready_cb()
See also:
MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM
media_streamer_sink_set_data_ready_cb()
media_streamer_sink_unset_data_ready_cb()
typedef void(* media_streamer_sink_eos_cb)(media_streamer_node_h sink, void *user_data)

Called when the end-of-stream has been reached.

This callback can be applied only to MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type node.

Since :
3.0
Remarks:
The sink is the same object for which the callback was set.
Parameters:
[in]sinkMedia streamer sink node handle
[in]user_dataThe user data passed from the code where media_streamer_sink_set_eos_cb() was invoked This data will be accessible from media_streamer_sink_eos_cb()
Precondition:
media_streamer_sink_set_eos_cb()
See also:
MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM
media_streamer_sink_set_eos_cb()
media_streamer_sink_unset_eos_cb()
typedef void(* media_streamer_state_changed_cb)(media_streamer_h streamer, media_streamer_state_e previous_state, media_streamer_state_e current_state, void *user_data)

Called when media streamer state is changed.

Since :
3.0
Remarks:
The streamer is the same object for which the callback was set.
Parameters:
[in]streamerMedia streamer handle
[in]previous_stateThe previous state of the media streamer
[in]current_stateThe current state of media streamer
[in]user_dataThe user data passed from the code where media_streamer_set_state_changed_cb() was invoked This data will be accessible from media_streamer_state_changed_cb()
Precondition:
Create media streamer handle by calling media_streamer_create().
See also:
media_streamer_set_state_change_cb()
media_streamer_unset_state_change_cb()
typedef void(* media_streamer_webrtc_message_cb)(media_streamer_node_h webrtc, const char *message, void *user_data)

Called when the media streamer WebRTC node needs to send the message to the remote peer of the WebRTC connection.

Since :
6.0
Remarks:
Two types will be delivered with message which is a JSON string.
One is for the remote session description and the other is for a new ICE candidate.
For the remote session description, message will be {"sdp":{"type":"offer or answer","sdp":"..."}}.
For the new ICE candidate, message will be {"ice":{"candidate":"..."}}.
The webrtc is the same object for which the callback was set.
The message can be used only in the callback. To use outside, make a copy.
Parameters:
[in]webrtcMedia streamer WebRTC node handle
[in]messageThe message to be passed to the remote peer over the signaling channel
[in]user_dataThe user data passed from the callback registration function
See also:
media_streamer_webrtc_node_set_message_cb()
media_streamer_webrtc_node_unset_message_cb()

Enumeration Type Documentation

Enumeration for media streamer buffer status of custom source.

Since :
3.0
Enumerator:
MEDIA_STREAMER_CUSTOM_BUFFER_UNDERRUN 

Buffer underrun of custom source

MEDIA_STREAMER_CUSTOM_BUFFER_OVERFLOW 

Buffer overflow of custom source

Enumeration for media streamer error.

Since :
3.0
Enumerator:
MEDIA_STREAMER_ERROR_NONE 

Successful

MEDIA_STREAMER_ERROR_INVALID_PARAMETER 

Invalid parameter

MEDIA_STREAMER_ERROR_INVALID_OPERATION 

Invalid operation

MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE 

No space left on the device

MEDIA_STREAMER_ERROR_NOT_SUPPORTED 

The feature is not supported

MEDIA_STREAMER_ERROR_PERMISSION_DENIED 

Permission denied

MEDIA_STREAMER_ERROR_INVALID_STATE 

Invalid state

MEDIA_STREAMER_ERROR_CONNECTION_FAILED 

Connection failed

MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT 

Resource conflict

MEDIA_STREAMER_ERROR_SEEK_FAILED 

Seek operation failure

Enumeration for media streamer's interruption type.

Since :
3.0
Enumerator:
MEDIA_STREAMER_INTERRUPTED_BY_RESOURCE_CONFLICT 

Interrupted by a resource conflict

MEDIA_STREAMER_INTERRUPTED_BY_SECURITY 

Interrupted by a security policy

Enumeration for media streamer sink node type.

Since :
3.0
Enumerator:
MEDIA_STREAMER_NODE_SINK_TYPE_NONE 

Not defined sink type

MEDIA_STREAMER_NODE_SINK_TYPE_FILE 

Local file sink type

MEDIA_STREAMER_NODE_SINK_TYPE_RTSP 

RTSP sink type, Network internet feature is required

MEDIA_STREAMER_NODE_SINK_TYPE_HTTP 

HTTP sink type, Network internet feature is required

MEDIA_STREAMER_NODE_SINK_TYPE_AUDIO 

Audio sink type

MEDIA_STREAMER_NODE_SINK_TYPE_OVERLAY 

Overlay sink type

MEDIA_STREAMER_NODE_SINK_TYPE_FAKE 

Fake sink type

MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM 

Custom sink type

MEDIA_STREAMER_NODE_SINK_TYPE_ADAPTIVE 

Adaptive sink type to generate fragmented files

Enumeration for media streamer source node type.

Since :
3.0
Enumerator:
MEDIA_STREAMER_NODE_SRC_TYPE_NONE 

Not defined source type

MEDIA_STREAMER_NODE_SRC_TYPE_FILE 

Local file source type

MEDIA_STREAMER_NODE_SRC_TYPE_HTTP 

HTTP source type, Network internet feature is required

MEDIA_STREAMER_NODE_SRC_TYPE_RTSP 

RTSP source type, Network internet feature is required

MEDIA_STREAMER_NODE_SRC_TYPE_CAMERA 

Camera source type, Camera feature is required

MEDIA_STREAMER_NODE_SRC_TYPE_AUDIO_CAPTURE 

Audio capture source type, Microphone feature is required

MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_CAPTURE 

Video capture source type, Camera feature is required

MEDIA_STREAMER_NODE_SRC_TYPE_AUDIO_TEST 

Audio test source type

MEDIA_STREAMER_NODE_SRC_TYPE_VIDEO_TEST 

Video test source type

MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM 

Custom source type

MEDIA_STREAMER_NODE_SRC_TYPE_ADAPTIVE 

Adaptive source type, Network internet feature is required

Enumeration for media streamer node type.

Since :
3.0
Enumerator:
MEDIA_STREAMER_NODE_TYPE_NONE 

Not defined type

MEDIA_STREAMER_NODE_TYPE_SRC 

Source node type. Not available for media_streamer_node_create(). Use media_streamer_node_create_src()

MEDIA_STREAMER_NODE_TYPE_SINK 

Sink node type. Not available for media_streamer_node_create(). Use media_streamer_node_create_sink()

MEDIA_STREAMER_NODE_TYPE_VIDEO_ENCODER 

Video encoder node type

MEDIA_STREAMER_NODE_TYPE_VIDEO_DECODER 

Video decoder node type

MEDIA_STREAMER_NODE_TYPE_AUDIO_ENCODER 

Audio encoder node type

MEDIA_STREAMER_NODE_TYPE_AUDIO_DECODER 

Audio decoder node type

MEDIA_STREAMER_NODE_TYPE_VIDEO_CONVERTER 

Video converter node type

MEDIA_STREAMER_NODE_TYPE_AUDIO_CONVERTER 

Audio converter node type

MEDIA_STREAMER_NODE_TYPE_AUDIO_RESAMPLE 

Audio resample node type

MEDIA_STREAMER_NODE_TYPE_VIDEO_PAY 

RTP video payloader

MEDIA_STREAMER_NODE_TYPE_AUDIO_PAY 

RTP audio payloader

MEDIA_STREAMER_NODE_TYPE_VIDEO_DEPAY 

RTP video depayloader

MEDIA_STREAMER_NODE_TYPE_AUDIO_DEPAY 

RTP audio depayloader

MEDIA_STREAMER_NODE_TYPE_VIDEO_RATE 

Rate node type

MEDIA_STREAMER_NODE_TYPE_VIDEO_SCALE 

Scale node type

MEDIA_STREAMER_NODE_TYPE_TEXT_OVERLAY 

Overlay node type

MEDIA_STREAMER_NODE_TYPE_PARSER 

Parser node type

MEDIA_STREAMER_NODE_TYPE_FILTER 

Filter node type, to limit formats of data

MEDIA_STREAMER_NODE_TYPE_TEE 

Tee node type, splits data to multiple path

MEDIA_STREAMER_NODE_TYPE_QUEUE 

Queue node type

MEDIA_STREAMER_NODE_TYPE_MQUEUE 

Multiple data queue node type

MEDIA_STREAMER_NODE_TYPE_MUXER 

Muxer node type

MEDIA_STREAMER_NODE_TYPE_DEMUXER 

Demuxer node type

MEDIA_STREAMER_NODE_TYPE_RTP 

RTP component to send and receive data

MEDIA_STREAMER_NODE_TYPE_INPUT_SELECTOR 

N-to-1 input stream selector

MEDIA_STREAMER_NODE_TYPE_OUTPUT_SELECTOR 

1-to-N output stream selector

MEDIA_STREAMER_NODE_TYPE_INTERLEAVE 

Folds many mono channel into one interleaved audio stream

MEDIA_STREAMER_NODE_TYPE_DEINTERLEAVE 

Splits multi channel audio into many mono audio

MEDIA_STREAMER_NODE_TYPE_WEBRTC 

WebRTC component to send and receive data (Since 6.0)

Enumeration for media streamer state.

Since :
3.0
Enumerator:
MEDIA_STREAMER_STATE_NONE 

Streamer is not created

MEDIA_STREAMER_STATE_IDLE 

Streamer is created but not prepared

MEDIA_STREAMER_STATE_READY 

Streamer is ready to play

MEDIA_STREAMER_STATE_PLAYING 

Streamer is playing

MEDIA_STREAMER_STATE_PAUSED 

Streamer is paused

MEDIA_STREAMER_STATE_SEEKING 

Seek is under operation


Function Documentation

Creates an instance of media streamer and passes the handle to the caller.

Since :
3.0
Remarks:
The streamer should be released using media_streamer_destroy().
Parameters:
[out]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Postcondition:
The media streamer state will be MEDIA_STREAMER_STATE_IDLE.
See also:
media_streamer_destroy()

Destroys media streamer.

Since :
3.0
Remarks:
Nodes in streamer will be removed automatically. Don't need to remove nodes by calling media_streamer_node_remove(). If you want to change the node without destroying streamer handle, you can call the media_streamer_node_remove(). after setting the streamer state to MEDIA_STREAMER_STATE_IDLE state.
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create a media streamer handle by calling media_streamer_create().
Postcondition:
The media streamer state will be MEDIA_STREAMER_STATE_NONE.
See also:
media_streamer_create()
int media_streamer_get_duration ( media_streamer_h  streamer,
int *  duration 
)

Gets the total running time of the associated media.

Since :
3.0
Remarks:
The streamer's source node type should be MEDIA_STREAMER_NODE_SRC_TYPE_FILE or MEDIA_STREAMER_NODE_SRC_TYPE_HTTP.
If not, return value will be MEDIA_STREAMER_ERROR_NONE and duration will be -1.
Parameters:
[in]streamerMedia streamer handle
[out]durationThe duration in milliseconds
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
The media streamer state must be one of these: MEDIA_STREAMER_STATE_PAUSED, or MEDIA_STREAMER_STATE_PLAYING.
int media_streamer_get_play_position ( media_streamer_h  streamer,
int *  time 
)

Gets the current position in milliseconds.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
[out]timeThe current position in milliseconds
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
The media streamer state must be one of these: MEDIA_STREAMER_STATE_PAUSED, or MEDIA_STREAMER_STATE_PLAYING.
See also:
media_streamer_set_play_position()

Gets media streamer state.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
[out]stateMedia streamer state
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media streamer handle by calling media_streamer_create().
See also:
media_streamer_state_e

Adds node to media streamer.

Since :
3.0
Remarks:
Before 6.0, this function returns MEDIA_STREAMER_ERROR_INVALID_STATE if streamer is not in the MEDIA_STREAMER_STATE_IDLE state.
Since 6.0, this function can be called in any state of streamer.
Parameters:
[in]streamerMedia streamer handle
[in]nodeMedia streamer node handle to be added
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create media streamer handle by calling media_streamer_create().
Create node handle by calling media_streamer_node_create().
See also:
media_streamer_create()
media_streamer_node_create()
media_streamer_node_create_src()
media_streamer_node_create_sink()

Creates media streamer node except MEDIA_STREAMER_NODE_TYPE_SRC and MEDIA_STREAMER_NODE_TYPE_SINK.

Creates node specific type with specific format of input and output data.

Since :
3.0
Remarks:
The node type should not be MEDIA_STREAMER_NODE_TYPE_SRC and MEDIA_STREAMER_NODE_TYPE_SINK.
To create source / sink type node, media_streamer_node_create_src() / media_streamer_node_create_sink() should be called.
The internet privilege (http://tizen.org/privilege/internet) should be added if MEDIA_STREAMER_NODE_TYPE_WEBRTC is set.
You can release the node using media_streamer_node_destroy().
Parameters:
[in]typeCreated node type
[in]in_fmtMedia format handle for input data
[in]out_fmtMedia format handle for output data
[out]nodeMedia streamer node handle to be created
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_NOT_SUPPORTEDNot supported
MEDIA_STREAMER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_node_type_e
media_format_h
media_streamer_node_destroy()

Creates media streamer sink node.

Since :
3.0
Remarks:
The internet privilege(http://tizen.org/privilege/internet) should be added if any URIs are used to transmit the output data.
You can release the sink using media_streamer_node_destroy().
If type is MEDIA_STREAMER_NODE_SINK_TYPE_ADAPTIVE, the HTTP server will be started and the server will be able to transmit the output data to the other device. The application must have an authentication responsibility between a server and client because the data transmission is not secure.
Parameters:
[in]typeType of sink node to be created
[out]sinkMedia streamer sink node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_NOT_SUPPORTEDNot supported
MEDIA_STREAMER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_node_sink_type_e
media_streamer_node_destroy()

Creates media streamer source node.

Since :
3.0
Remarks:
The internet privilege(http://tizen.org/privilege/internet) should be added if any URIs are used to play from network.
The camera privilege(http://tizen.org/privilege/camera) should be added if the source node handles the camera device.
The recorder privilege(http://tizen.org/privilege/recorder) should be added if the source node handles the recorder device.
You can release the src using media_streamer_node_destroy().
Parameters:
[in]typeMedia streamer source node type
[out]srcMedia streamer source node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_NOT_SUPPORTEDNot supported
MEDIA_STREAMER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_node_src_type_e
media_streamer_node_destroy()

Destroys media streamer node.

Since :
3.0
Parameters:
[in]nodeMedia streamer node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create node handle by calling media_streamer_node_create().
If the node was added to media streamer, it has to be removed by calling media_streamer_node_remove().
See also:
media_streamer_node_create()
media_streamer_node_create_src()
media_streamer_node_create_sink()
media_streamer_node_remove()
int media_streamer_node_get_pad_format ( media_streamer_node_h  node,
const char *  pad_name,
media_format_h fmt 
)

Gets media format for pad of media streamer node.

Since :
3.0
Remarks:
The fmt should be released using media_format_unref().
Parameters:
[in]nodeMedia streamer node handle
[in]pad_namePad name
[out]fmtMedia format handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create a node handle by calling media_streamer_node_create(), media_streamer_node_create_src(), or media_streamer_node_create_sink().
Get pad name by calling media_streamer_node_get_pad_name().
See also:
media_format_h
int media_streamer_node_get_pad_name ( media_streamer_node_h  node,
char ***  src_pad_name,
int *  src_pad_num,
char ***  sink_pad_name,
int *  sink_pad_num 
)

Gets name of node pads.

Since :
3.0
Remarks:
The src_pad_name and the sink_pad_name should be released using free().
src_pad_name or sink_pad_name can be null according to the node type.
In case of source type node, sink_pad_name will be null.
In case of sink type node, src_pad_name will be null.
Parameters:
[in]nodeMedia streamer node handle
[out]src_pad_nameArray of source pad name
[out]src_pad_numThe number of source pads
[out]sink_pad_nameArray of sink pad name
[out]sink_pad_numThe number of sink pads
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a node handle by calling media_streamer_node_create(), media_streamer_node_create_src(), or media_streamer_node_create_sink().
See also:
media_streamer_node_create()
media_streamer_node_create_src()
media_streamer_node_create_sink()
int media_streamer_node_get_param ( media_streamer_node_h  node,
const char *  param_name,
char **  param_value 
)

Gets value of parameter.

Gets parameter one by one without creating param bundle.

Since :
3.0
Remarks:
The param_value should be released using free().
Parameters:
[in]nodeMedia streamer node handle
[in]param_nameParam name of node
[out]param_valueParam value of node
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create a node handle by calling media_streamer_node_create(), media_streamer_node_create_src(), or media_streamer_node_create_sink().
Get param list to know the param name by calling media_streamer_node_get_params().
See also:
media_streamer_node_create()
media_streamer_node_create_src()
media_streamer_node_create_sink()
media_streamer_node_get_params()
media_streamer_node_set_param()
int media_streamer_node_get_params ( media_streamer_node_h  node,
bundle **  param_list 
)

Gets node parameter list.

Since :
3.0
Remarks:
The param_list should be released using bundle_free().
Refer to the "Parameter information of node" in this file to get info.
Parameters:
[in]nodeMedia streamer node handle
[out]param_listKey value array of media streamer node parameters
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create a node handle by calling media_streamer_node_create(), media_streamer_node_create_src(), or media_streamer_node_create_sink().
Postcondition:
Set params which are needed to set by calling media_streamer_node_set_params() or media_streamer_node_set_param().
See also:
media_streamer_node_create()
media_streamer_node_create_src()
media_streamer_node_create_sink()
media_streamer_node_set_params()
media_streamer_node_set_param()
bundle
int media_streamer_node_link ( media_streamer_node_h  node1,
const char *  src_pad_name,
media_streamer_node_h  node2,
const char *  sink_pad_name 
)

Links two media streamer nodes.

Since :
3.0
Remarks:
Pads are node's input and output, where you can connect other nodes.
(node1) - (node2)
node1 and node2 are determined relatively.
In case of (A)-(B)-(C),
(B) can be node2 with (A) or (B) can be node1 with (C).
However, source type node is always node1 and sink type node is always node2.
(A) is source type node and it should be node1.
(C) is sink type node and it should be node2.
Parameters:
[in]node1Media streamer node handle which has the src_pad_name pad
[in]src_pad_nameThe name of the source pad of the node1
[in]node2Media streamer node handle which has the sink_pad_name pad
[in]sink_pad_nameThe name of the sink pad of the node2
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create node handles by calling media_streamer_node_create(), media_streamer_node_create_src(), or media_streamer_node_create_sink(). And add the nodes into streamer by calling media_streamer_node_add().
See also:
media_streamer_node_create()
media_streamer_node_create_src()
media_streamer_node_create_sink()
media_streamer_node_add()

Pulls packet from custom sink node.

This function can be called only for MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM type node.

Since :
3.0
Remarks:
The packet should be released using media_packet_destroy().
Parameters:
[in]sinkMedia streamer sink node handle
[out]packetMedia packet handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create a sink node handle by calling media_streamer_node_create_sink().
Set media_streamer_sink_data_ready_cb() by calling media_streamer_sink_set_data_ready_cb().
See also:
media_packet_h
media_streamer_node_create_sink()

Pushes packet into custom source node.

This function can be called only for MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM type node.

Since :
3.0
Parameters:
[in]srcMedia streamer source node handle
[in]packetMedia packet handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a source node handle by calling media_streamer_node_create_src().
The media streamer state must be set to MEDIA_STREAMER_STATE_IDLE at least.
See also:
media_packet_h

Removes media streamer node from streamer.

Since :
3.0
Remarks:
To remove node without error posting, the state of streamer should be MEDIA_STREAMER_STATE_IDLE.
If the node is linked, it will be unlinked before removing.
Parameters:
[in]streamerMedia streamer handle
[in]nodeMedia streamer node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Add node to streamer by calling media_streamer_node_add().
See also:
media_streamer_node_add()

Sets a callback function to be invoked when a source pad of node is ready to give decoded data.

Since :
6.0
Remarks:
The available type of node for this function is MEDIA_STREAMER_NODE_TYPE_WEBRTC.
Parameters:
[in]nodeMedia streamer node handle
[in]callbackThe decoded ready callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media streamer node handle by calling media_streamer_node_create().
Postcondition:
media_streamer_node_decoded_ready_cb() will be invoked.
See also:
media_streamer_node_unset_decoded_ready_cb()
media_streamer_node_decoded_ready_cb()
int media_streamer_node_set_pad_format ( media_streamer_node_h  node,
const char *  pad_name,
media_format_h  fmt 
)

Sets media format for pad of media streamer node.

Since :
3.0
Parameters:
[in]nodeMedia streamer node handle
[in]pad_namePad name
[in]fmtMedia format handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create a node handle by calling media_streamer_node_create(), media_streamer_node_create_src(), or media_streamer_node_create_sink().
Get pad name by calling media_streamer_node_get_pad_name().
See also:
media_format_h
int media_streamer_node_set_param ( media_streamer_node_h  node,
const char *  param_name,
const char *  param_value 
)

Sets single parameter of node.

Sets parameter one by one without creating param bundle.

Since :
3.0
Remarks:
The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are written in the internal storage devices.
The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are written in the external storage devices.
Parameters:
[in]nodeMedia streamer node handle
[in]param_nameParam name of node
[in]param_valueParam value of node
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create a node handle by calling media_streamer_node_create(), media_streamer_node_create_src(), or media_streamer_node_create_sink().
Get param list to set by calling media_streamer_node_get_params().
See also:
media_streamer_node_create()
media_streamer_node_create_src()
media_streamer_node_create_sink()
media_streamer_node_get_params()
media_streamer_node_get_param()

Sets parameters of node.

Many parameters can be set at one time all together by using bundle.

Since :
3.0
Remarks:
The mediastorage privilege(http://tizen.org/privilege/mediastorage) should be added if any video/audio files are written in the internal storage devices.
The externalstorage privilege(http://tizen.org/privilege/externalstorage) should be added if any video/audio files are written in the external storage devices.
Parameters:
[in]nodeMedia streamer node handle
[in]param_listKey value array of media streamer node parameters
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_PERMISSION_DENIEDPermission denied
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
Create a node handle by calling media_streamer_node_create(), media_streamer_node_create_src(), or media_streamer_node_create_sink().
Get param list to set by calling media_streamer_node_get_params().
See also:
media_streamer_node_create()
media_streamer_node_create_src()
media_streamer_node_create_sink()
media_streamer_node_get_params()
bundle

Unsets the decoded ready callback function.

Since :
6.0
Parameters:
[in]nodeMedia streamer node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
See also:
media_streamer_node_set_decoded_ready_cb()

Pauses the media streamer.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
The media streamer state must be set to MEDIA_STREAMER_STATE_PLAYING.
Postcondition:
The media streamer state will be MEDIA_STREAMER_STATE_PAUSED.
See also:
media_streamer_create()
media_streamer_play()

Sets media streamer state to MEDIA_STREAMER_STATE_PLAYING.

Start running the current streamer, or resumes it if paused.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
The media streamer state must be set to MEDIA_STREAMER_STATE_READY by calling media_streamer_prepare() or set to MEDIA_STREAMER_STATE_PAUSED by calling media_streamer_pause().
Postcondition:
The media streamer state will be MEDIA_STREAMER_STATE_PLAYING.
See also:
media_streamer_create()
media_streamer_pause()
media_streamer_stop()

Sets media streamer state to MEDIA_STREAMER_STATE_READY.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
The media streamer state must be set to MEDIA_STREAMER_STATE_IDLE by calling media_streamer_create() or media_streamer_unprepare().
At least one source and one sink should be added and linked in the streamer by calling media_streamer_node_create_src(), media_streamer_node_create_sink() and media_streamer_node_link().
Postcondition:
The media streamer state will be MEDIA_STREAMER_STATE_READY.
See also:
media_streamer_unprepare()
media_streamer_create()
int media_streamer_set_error_cb ( media_streamer_h  streamer,
media_streamer_error_cb  callback,
void *  user_data 
)

Sets a error callback function to be invoked when an error occurs.

Since :
3.0
Remarks:
Following error codes can be delivered by error callback.
MEDIA_STREAMER_ERROR_INVALID_OPERATION,
MEDIA_STREAMER_ERROR_FILE_NO_SPACE_ON_DEVICE,
MEDIA_STREAMER_ERROR_NOT_SUPPORTED,
MEDIA_STREAMER_ERROR_CONNECTION_FAILED,
MEDIA_STREAMER_ERROR_RESOURCE_CONFLICT
Parameters:
[in]streamerMedia streamer handle
[in]callbackCallback function pointer
[in]user_dataThe user data passed from the code where media_streamer_set_error_cb() was invoked This data will be accessible from media_streamer_error_cb()
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media streamer handle by calling media_streamer_create().
Postcondition:
media_streamer_error_cb() will be invoked.
See also:
media_streamer_unset_error_cb()
media_streamer_error_cb()
int media_streamer_set_interrupted_cb ( media_streamer_h  streamer,
media_streamer_interrupted_cb  callback,
void *  user_data 
)

Sets a callback function to be invoked when the media streamer is interrupted.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Postcondition:
media_streamer_interrupted_cb() will be invoked.
See also:
media_streamer_unset_interrupted_cb()
media_streamer_interrupted_code_e
int media_streamer_set_play_position ( media_streamer_h  streamer,
int  time,
bool  accurate,
media_streamer_position_changed_cb  callback,
void *  user_data 
)

Changes playback position to the defined time value, asynchronously.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
[in]timeTime in millisecond
[in]accurateIf true, it will seek to the accurate position, but this might be considerably slower for some formats, otherwise false, it will seek to the nearest keyframe
[in]callbackThe callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
MEDIA_STREAMER_ERROR_SEEK_FAILEDSeek operation failure
Precondition:
The media streamer state must be one of these: MEDIA_STREAMER_STATE_PAUSED, or MEDIA_STREAMER_STATE_PLAYING.
Postcondition:
It invokes media_streamer_set_play_position() when seek operation completes, if you set a callback.
See also:
media_streamer_get_play_position()
int media_streamer_set_state_change_cb ( media_streamer_h  streamer,
media_streamer_state_changed_cb  callback,
void *  user_data 
)

Sets a callback that will be triggered after media streamer state is changed.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
[in]callbackCallback function pointer
[in]user_dataThe user data passed from the code where media_streamer_set_state_change_cb() was invoked This data will be accessible from media_streamer_state_changed_cb()
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media streamer handle by calling media_streamer_create().
Postcondition:
media_streamer_state_changed_cb() will be invoked.
See also:
media_streamer_unset_state_change_cb()
media_streamer_state_changed_cb()

Sets a callback function to be called when the custom sink is ready for data processing.

This function can be called only for MEDIA_STREAMER_NODE_SINK_TYPE_CUSTOM sink type node.

Since :
3.0
Parameters:
[in]sinkMedia streamer sink node handle
[in]callbackCallback function pointer
[in]user_dataThe user data passed from the code where media_streamer_sink_set_data_ready_cb() was invoked This data will be accessible from media_streamer_sink_data_ready_cb()
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media streamer sink handle by calling media_streamer_node_create_sink().
Add created media streamer sink node to media streamer by calling media_streamer_node_add().
Postcondition:
media_streamer_sink_data_ready_cb() will be invoked.
See also:
media_streamer_sink_unset_data_ready_cb()
media_streamer_sink_data_ready_cb()
int media_streamer_sink_set_eos_cb ( media_streamer_node_h  sink,
media_streamer_sink_eos_cb  callback,
void *  user_data 
)

Sets a callback function to be called when custom sink detect the end-of-stream.

Since :
3.0
Parameters:
[in]sinkMedia streamer sink node handle
[in]callbackCallback function pointer
[in]user_dataThe user data passed from the code where media_streamer_sink_set_eos_cb() was invoked. This data will be accessible from media_streamer_sink_eos_cb()
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media streamer sink handle by calling media_streamer_node_create_sink().
Add created media streamer sink node to media streamer by calling media_streamer_node_add().
Postcondition:
media_streamer_sink_eos_cb() will be invoked.
See also:
media_streamer_sink_unset_eos_cb()
media_streamer_sink_eos_cb()

Unsets the sink data ready callback function.

Since :
3.0
Parameters:
[in]sinkMedia streamer sink node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_sink_set_data_ready_cb()

Unsets the sink end-of-stream callback function.

Since :
3.0
Parameters:
[in]sinkMedia streamer sink node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_sink_set_eos_cb()

Sets a callback function to be invoked when buffer underrun or overflow is occurred.

This function can be called only for MEDIA_STREAMER_NODE_SRC_TYPE_CUSTOM source type node.

Since :
3.0
Remarks:
This function is used for media stream playback only.
Parameters:
[in]srcMedia streamer source node handle
[in]callbackThe buffer status callback function to register
[in]user_dataThe user data passed from the code where media_streamer_src_set_buffer_status_cb() was invoked This data will be accessible from media_streamer_custom_buffer_status_cb()
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
Precondition:
Create a media streamer source node handle by calling media_streamer_node_create_src().
Add created media streamer source node to media streamer by calling media_streamer_node_add().
Postcondition:
media_streamer_custom_buffer_status_cb() will be invoked.
See also:
media_streamer_src_unset_buffer_status_cb()
media_streamer_custom_buffer_status_cb()

Unsets the source buffer status callback function.

Since :
3.0
Parameters:
[in]srcMedia streamer source node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_src_set_buffer_status_cb()

Stops the media streamer.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
The media streamer state must be set to MEDIA_STREAMER_STATE_PLAYING by calling media_streamer_play() or set to MEDIA_STREAMER_STATE_PAUSED by calling media_streamer_pause().
Postcondition:
The media streamer state will be MEDIA_STREAMER_STATE_READY.
See also:
media_streamer_create()
media_streamer_play()
media_streamer_pause()

Sets media streamer state to MEDIA_STREAMER_STATE_IDLE.

The most recently used media is reset and no longer associated with the media streamer.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
MEDIA_STREAMER_ERROR_INVALID_STATEInvalid state
Precondition:
The media streamer state should be higher than MEDIA_STREAMER_STATE_IDLE.
Postcondition:
The media streamer state will be MEDIA_STREAMER_STATE_IDLE.
See also:
media_streamer_prepare()

Unsets the error callback function.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_error_cb()

Unsets the callback function.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_set_interrupted_cb()

Unsets the state changed callback function.

Since :
3.0
Parameters:
[in]streamerMedia streamer handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
MEDIA_STREAMER_ERROR_INVALID_OPERATIONInvalid operation
See also:
media_streamer_set_state_change_cb()

Sets a callback function to be invoked when WebRTC node needs to send a message to the remote peer of WebRTC connection.

This function can be called only for MEDIA_STREAMER_NODE_TYPE_WEBRTC type node.

Since :
6.0
Parameters:
[in]webrtcMedia streamer WebRTC node handle
[in]callbackThe WebRTC message callback function to register
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
Create a media streamer WebRTC node handle by calling media_streamer_node_create().
Postcondition:
media_streamer_webrtc_message_cb() will be invoked.
See also:
media_streamer_webrtc_node_unset_message_cb()
media_streamer_webrtc_message_cb()

Unsets the WebRTC message callback function.

Since :
6.0
Parameters:
[in]webrtcMedia streamer WebRTC node handle
Returns:
0 on success, otherwise a negative error value
Return values:
MEDIA_STREAMER_ERROR_NONESuccessful
MEDIA_STREAMER_ERROR_INVALID_PARAMETERInvalid parameter
See also:
media_streamer_webrtc_node_set_message_cb()