Video streaming API - Easily run video streams from camera capture or static picture files to RTP.
More...
Video streaming API - Easily run video streams from camera capture or static picture files to RTP.
Small API to display a local preview window.
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_ip | the local ip to listen for RTP packets. Can be ::, O.O.O.O or any ip4/6 addresses |
[in] | loc_rtp_port | the local UDP port to listen for RTP packets. |
[in] | loc_rtcp_port | the local UDP port to listen for RTCP packets |
- Returns
- a new AudioStream.
void video_stream_send_fir |
( |
VideoStream * |
stream | ) |
|
Asks the video stream to send a Full-Intra Request.
- Parameters
-
[in] | stream | The videostream object. |
void video_stream_send_vfu |
( |
VideoStream * |
stream | ) |
|
Asks the video stream to generate a Video Fast Update (generally after receiving a Full-Intra Request.
- Parameters
-
[in] | stream | The videostream object. |
void video_stream_set_sent_video_size |
( |
VideoStream * |
stream, |
|
|
MSVideoSize |
vsize |
|
) |
| |
Try to set the size of the video that is sent. Since this relies also on the bitrate specified, make sure to set the payload bitrate accordingly with rtp_profile_get_payload and normal_bitrate value otherwise the best possible resolution will be taken instead of the requested one.
- Parameters
-
[in] | stream | The videostream for which to get the sent video size. |
[in] | vsize | The sent video size wished. |
MSVideoSize video_stream_get_sent_video_size |
( |
const VideoStream * |
stream | ) |
|
Gets the size of the video that is sent.
- Parameters
-
[in] | stream | The 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] | stream | The 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] | stream | The 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] | stream | The videostream. |
- Returns
- The received framerate or 0 if not available.
const char* video_stream_get_default_video_renderer |
( |
void |
| ) |
|
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
-
stream | The 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] | stream | The VideoStream object. |
[in] | ms | The 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] | stream | The 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] | stream | The VideoStream object. |
void video_stream_set_preview_size |
( |
VideoStream * |
stream, |
|
|
MSVideoSize |
vsize |
|
) |
| |
Force a resolution for the preview.
- Parameters
-
[in] | stream | The VideoStream object. |
[in] | vsize | video resolution. |
void video_stream_set_fps |
( |
VideoStream * |
stream, |
|
|
float |
fps |
|
) |
| |
Force a resolution for the preview.
- Parameters
-
[in] | stream | The VideoStream object. |
[in] | fps | the 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 destroy it.
- Parameters
-
[in] | stream | VideoPreview object |
- Returns
- The source filter to be passed to the #video_stream_start_with_source function.