mediastreamer2  2.11.0
Typedefs | Functions
Video streaming API - Create and run video streams.
Mediastreamer2's high level APIs

Video streaming API - Easily run video streams from camera capture or static picture files to RTP. More...

Typedefs

typedef VideoStream VideoPreview

Functions

VideoStream * video_stream_new2 (const char *ip, int loc_rtp_port, int loc_rtcp_port)
void video_stream_send_fir (VideoStream *stream)
void video_stream_send_vfu (VideoStream *stream)
MSVideoSize video_stream_get_sent_video_size (const VideoStream *stream)
MSVideoSize video_stream_get_received_video_size (const VideoStream *stream)
float video_stream_get_sent_framerate (const VideoStream *stream)
float video_stream_get_received_framerate (const VideoStream *stream)
const char * video_stream_get_default_video_renderer (void)
int video_stream_get_camera_sensor_rotation (VideoStream *stream)
 Gets the camera sensor rotation.
bool_t video_stream_is_decoding_error_to_be_reported (VideoStream *stream, uint32_t ms)
void video_stream_decoding_error_reported (VideoStream *stream)
void video_stream_decoding_error_recovered (VideoStream *stream)
void video_stream_set_preview_size (VideoStream *stream, MSVideoSize vsize)
void video_stream_set_fps (VideoStream *stream, float fps)
void audio_stream_link_video (AudioStream *stream, VideoStream *video)
void audio_stream_unlink_video (AudioStream *stream, VideoStream *video)
MSFiltervideo_preview_stop_reuse_source (VideoPreview *stream)

Detailed Description

Video streaming API - Easily run video streams from camera capture or static picture files to RTP.


Typedef Documentation

typedef VideoStream VideoPreview

Small API to display a local preview window.


Function Documentation

VideoStream* video_stream_new2 ( const char *  ip,
int  loc_rtp_port,
int  loc_rtcp_port 
)

Creates an VideoStream object listening on a RTP port for a dedicated address.

Parameters:
loc_ipthe local ip to listen for RTP packets. Can be ::, O.O.O.O or any ip4/6 addresses
[in]loc_rtp_portthe local UDP port to listen for RTP packets.
[in]loc_rtcp_portthe local UDP port to listen for RTCP packets
Returns:
a new AudioStream.
void video_stream_send_fir ( VideoStream *  stream)

Ask the video stream to send a Full-Intra Request.

Parameters:
[in]streamThe videostream object.
void video_stream_send_vfu ( VideoStream *  stream)

Ask the video stream to generate a Video Fast Update (generally after receiving a Full-Intra Request.

Parameters:
[in]streamThe videostream object.
MSVideoSize video_stream_get_sent_video_size ( const VideoStream *  stream)

Gets the size of the video that is sent.

Parameters:
[in]streamThe videostream for which to get the sent video size.
Returns:
The sent video size or MS_VIDEO_SIZE_UNKNOWN if not available.
MSVideoSize video_stream_get_received_video_size ( const VideoStream *  stream)

Gets the size of the video that is received.

Parameters:
[in]streamThe videostream for which to get the received video size.
Returns:
The received video size or MS_VIDEO_SIZE_UNKNOWN if not available.
float video_stream_get_sent_framerate ( const VideoStream *  stream)

Gets the framerate of the video that is sent.

Parameters:
[in]streamThe videostream.
Returns:
The actual framerate, 0 if not available..
float video_stream_get_received_framerate ( const VideoStream *  stream)

Gets the framerate of the video that is received.

Parameters:
[in]streamThe videostream.
Returns:
The received framerate or 0 if not available.

Returns the name of the video display filter on the current platform.

int video_stream_get_camera_sensor_rotation ( VideoStream *  stream)

Gets the camera sensor rotation.

This is needed on some mobile platforms to get the number of degrees the camera sensor is rotated relative to the screen.

Parameters:
streamThe video stream related to the operation
Returns:
The camera sensor rotation in degrees (0 to 360) or -1 if it could not be retrieved
bool_t video_stream_is_decoding_error_to_be_reported ( VideoStream *  stream,
uint32_t  ms 
)

Ask the video stream whether a decoding error should be reported (eg. to send a VFU request).

Parameters:
[in]streamThe VideoStream object.
[in]msThe minimum interval in milliseconds between to decoding error report.
Returns:
TRUE if the decoding error should be reported, FALSE otherwise.
void video_stream_decoding_error_reported ( VideoStream *  stream)

Tell the video stream that a decoding error has been reported.

Parameters:
[in]streamThe VideoStream object.
void video_stream_decoding_error_recovered ( VideoStream *  stream)

Tell the video stream that a decoding error has been recovered so that new decoding can be reported sooner.

Parameters:
[in]streamThe VideoStream object.
void video_stream_set_preview_size ( VideoStream *  stream,
MSVideoSize  vsize 
)

Force a resolution for the preview.

Parameters:
[in]streamThe VideoStream object.
[in]vsizevideo resolution.
void video_stream_set_fps ( VideoStream *  stream,
float  fps 
)

Force a resolution for the preview.

Parameters:
[in]streamThe VideoStream object.
[in]fpsthe frame rate in frame/seconds. A value of zero means "use encoder default value".
void audio_stream_link_video ( AudioStream stream,
VideoStream *  video 
)

Link the audio stream with an existing video stream. This is necessary to enable recording of audio & video into a multimedia file.

void audio_stream_unlink_video ( AudioStream stream,
VideoStream *  video 
)

Unlink the audio stream from the video stream. This must be done if the video stream is about to be stopped.

Stops the video preview graph but keep the source filter for reuse. This is useful when transitioning from a preview-only to a duplex video. The filter needs to be passed to the #video_stream_start_with_source function, otherwise you should detroy it.