mediastreamer2 5.2.0
Data Structures | Macros | Typedefs | Enumerations | Functions
Video streaming API - Create and run video streams.

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

Collaboration diagram for Video streaming API - Create and run video streams.:

Data Structures

struct  _MediastreamVideoStat
 
struct  _VideoStream
 

Macros

#define video_preview_set_event_callback(p, c, u)   video_stream_set_event_callback(p,c,u)
 
#define video_preview_set_size(p, s)   video_stream_set_sent_video_size(p,s)
 
#define video_preview_set_display_filter_name(p, dt)   video_stream_set_display_filter_name(p,dt)
 
#define video_preview_create_native_window_id(p)   video_stream_create_native_preview_window_id(p)
 
#define video_preview_set_native_window_id(p, id)   video_stream_set_native_preview_window_id(p,id)
 
#define video_preview_get_native_window_id(p)   video_stream_get_native_preview_window_id(p)
 
#define video_preview_set_fps(p, fps)   video_stream_set_fps((VideoStream*)p,fps)
 
#define video_preview_set_device_rotation(p, r)   video_stream_set_device_rotation(p, r)
 

Typedefs

typedef void(* VideoStreamRenderCallback) (void *user_pointer, const MSPicture *local_view, const MSPicture *remote_view)
 
typedef void(* VideoStreamEventCallback) (void *user_pointer, const MSFilter *f, const unsigned int event_id, const void *args)
 
typedef void(* VideoStreamCameraNotWorkingCallback) (void *user_pointer, const MSWebCam *old_webcam)
 
typedef void(* VideoStreamEncoderControlCb) (struct _VideoStream *, unsigned int method_id, void *arg, void *user_data)
 
typedef void(* VideoStreamCsrcChangedCb) (void *user_pointer, uint32_t new_csrc)
 
typedef struct _MediastreamVideoStat MediaStreamVideoStat
 
typedef enum _MSVideoContent MSVideoContent
 
typedef struct _VideoStream VideoStream
 
typedef VideoStream VideoPreview
 

Enumerations

enum  _MSVideoContent {
  MSVideoContentDefault ,
  MSVideoContentSpeaker ,
  MSVideoContentThumbnail
}
 

Functions

VideoStreamvideo_stream_new (MSFactory *factory, int loc_rtp_port, int loc_rtcp_port, bool_t use_ipv6)
 
VideoStreamvideo_stream_new2 (MSFactory *factory, const char *ip, int loc_rtp_port, int loc_rtcp_port)
 
VideoStreamvideo_stream_new_with_sessions (MSFactory *factory, const MSMediaStreamSessions *sessions)
 
void video_stream_set_direction (VideoStream *vs, MediaStreamDir dir)
 
void video_stream_set_render_callback (VideoStream *s, VideoStreamRenderCallback cb, void *user_pointer)
 
void video_stream_set_event_callback (VideoStream *s, VideoStreamEventCallback cb, void *user_pointer)
 
void video_stream_set_camera_not_working_callback (VideoStream *s, VideoStreamCameraNotWorkingCallback cb, void *user_pointer)
 
void video_stream_set_display_filter_name (VideoStream *s, const char *fname)
 
void video_stream_set_label (VideoStream *s, const char *label)
 
void video_stream_set_content (VideoStream *s, MSVideoContent content)
 
MSVideoContent video_stream_get_content (const VideoStream *vs)
 
int video_stream_start_with_source (VideoStream *stream, RtpProfile *profile, const char *rem_rtp_ip, int rem_rtp_port, const char *rem_rtcp_ip, int rem_rtcp_port, int payload, int jitt_comp, MSWebCam *cam, MSFilter *source)
 
int video_stream_start (VideoStream *stream, RtpProfile *profile, const char *rem_rtp_ip, int rem_rtp_port, const char *rem_rtcp_ip, int rem_rtcp_port, int payload, int jitt_comp, MSWebCam *device)
 
int video_stream_start_with_files (VideoStream *stream, RtpProfile *profile, const char *rem_rtp_ip, int rem_rtp_port, const char *rem_rtcp_ip, int rem_rtcp_port, int payload_type, const char *play_file, const char *record_file)
 
int video_stream_start_from_io (VideoStream *stream, RtpProfile *profile, const char *rem_rtp_ip, int rem_rtp_port, const char *rem_rtcp_ip, int rem_rtcp_port, int payload_type, const MSMediaStreamIO *io)
 
void link_video_stream_with_itc_sink (VideoStream *stream)
 
void video_stream_prepare_video (VideoStream *stream)
 
void video_stream_unprepare_video (VideoStream *stream)
 
void video_stream_set_relay_session_id (VideoStream *stream, const char *relay_session_id)
 
const MSWebCamvideo_stream_get_camera (const VideoStream *stream)
 
MSFiltervideo_stream_get_source_filter (const VideoStream *stream)
 
void video_preview_stream_change_camera (VideoStream *stream, MSWebCam *cam)
 
void video_stream_change_camera (VideoStream *stream, MSWebCam *cam)
 
void video_stream_change_camera_skip_bitrate (VideoStream *stream, MSWebCam *cam)
 
MSFiltervideo_stream_change_source_filter (VideoStream *stream, MSWebCam *cam, MSFilter *filter, bool_t keep_previous_source)
 This functions changes the source filter for the passed video stream.
 
void video_stream_forward_source_stream (VideoStream *stream, VideoStream *source)
 This function forwards the video from the source stream to the specifed one.
 
MSFiltervideo_stream_change_camera_keep_previous_source (VideoStream *stream, MSWebCam *cam)
 This is the same function as video_stream_change_source_filter() called with keep_source=1, but the new filter will be created from the MSWebcam that is passed as argument.
 
void video_preview_stream_update_video_params (VideoStream *stream)
 
void video_stream_update_video_params (VideoStream *stream)
 
void video_stream_iterate (VideoStream *stream)
 
void video_stream_set_encoder_control_callback (VideoStream *stream, VideoStreamEncoderControlCb cb, void *user_data)
 
void video_stream_send_fir (VideoStream *stream)
 
void video_stream_send_vfu (VideoStream *stream)
 
void video_stream_stop (VideoStream *stream)
 
MSFiltervideo_stream_stop_keep_source (VideoStream *stream)
 
bool_t video_stream_started (VideoStream *stream)
 
void video_stream_set_sent_video_size (VideoStream *stream, MSVideoSize vsize)
 
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)
 
void video_stream_enable_self_view (VideoStream *stream, bool_t val)
 
void * video_stream_create_native_window_id (VideoStream *stream)
 
void * video_stream_get_native_window_id (VideoStream *stream)
 
void video_stream_set_native_window_id (VideoStream *stream, void *id)
 
void * video_stream_create_native_preview_window_id (VideoStream *stream)
 
void video_stream_set_native_preview_window_id (VideoStream *stream, void *id)
 
void * video_stream_get_native_preview_window_id (VideoStream *stream)
 
void video_stream_use_preview_video_window (VideoStream *stream, bool_t yesno)
 
void video_stream_set_device_rotation (VideoStream *stream, int orientation)
 
void video_stream_show_video (VideoStream *stream, bool_t show)
 
void video_stream_set_freeze_on_error (VideoStream *stream, bool_t yesno)
 
void video_stream_set_display_mode (VideoStream *stream, MSVideoDisplayMode mode)
 
int video_stream_get_camera_sensor_rotation (VideoStream *stream)
 Gets the camera sensor rotation.
 
int video_stream_recv_only_start (VideoStream *videostream, RtpProfile *profile, const char *addr, int port, int used_pt, int jitt_comp)
 
int video_stream_send_only_start (VideoStream *videostream, RtpProfile *profile, const char *addr, int port, int rtcp_port, int used_pt, int jitt_comp, MSWebCam *device)
 
void video_stream_recv_only_stop (VideoStream *vs)
 
void video_stream_send_only_stop (VideoStream *vs)
 
void video_stream_enable_zrtp (VideoStream *vstream, AudioStream *astream)
 
void video_stream_start_zrtp (VideoStream *stream)
 
void video_stream_enable_display_filter_auto_rotate (VideoStream *stream, bool_t enable)
 
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)
 
void video_stream_use_video_preset (VideoStream *stream, const char *preset)
 
const char * video_stream_get_video_preset (VideoStream *stream)
 
void video_stream_set_frame_marking_extension_id (VideoStream *stream, int extension_id)
 
MSFiltervideo_stream_open_remote_play (VideoStream *stream, const char *filename)
 
void video_stream_close_remote_play (VideoStream *stream)
 
MSFiltervideo_stream_open_remote_record (VideoStream *stream, const char *filename)
 
void video_stream_close_remote_record (VideoStream *stream)
 
void video_stream_enable_retransmission_on_nack (VideoStream *stream, bool_t enable)
 
void video_stream_set_retransmission_on_nack_max_packet (VideoStream *stream, unsigned int max)
 
void video_stream_enable_fec (VideoStream *stream, char *local_ip, int local_port, int local_rtcp_port, char *remote_ip, int remote_port, int L, int D)
 
void video_stream_set_sent_video_size_max (VideoStream *stream, MSVideoSize max)
 
void video_stream_set_csrc_changed_callback (VideoStream *stream, VideoStreamCsrcChangedCb cb, void *user_pointer)
 
VideoPreviewvideo_preview_new (MSFactory *factory)
 
void video_preview_start (VideoPreview *stream, MSWebCam *device)
 
void video_preview_enable_qrcode (VideoPreview *stream, bool_t enable)
 
void video_preview_set_decode_rect (VideoPreview *stream, MSRect rect)
 
bool_t video_preview_qrcode_enabled (VideoPreview *stream)
 
MSVideoSize video_preview_get_current_size (VideoPreview *stream)
 
void video_preview_stop (VideoPreview *stream)
 
void video_preview_change_camera (VideoPreview *stream, MSWebCam *cam)
 
void video_preview_update_video_params (VideoPreview *stream)
 
MSFiltervideo_preview_stop_reuse_source (VideoPreview *stream)
 
MSWebCamDescms_mire_webcam_desc_get (void)
 
RtpSession * ms_create_duplex_rtp_session (const char *local_ip, int loc_rtp_port, int loc_rtcp_port, int mtu)
 
void audio_stream_set_audio_route (AudioStream *stream, MSAudioRoute route)
 
void audio_stream_set_audio_route_changed_callback (AudioStream *stream, MSAudioRouteChangedCallback callback, void *audio_route_changed_cb_user_data)
 
int audio_stream_set_input_ms_snd_card (AudioStream *stream, MSSndCard *sndcard_capture)
 
int audio_stream_set_output_ms_snd_card (AudioStream *stream, MSSndCard *sndcard_playback)
 
MSSndCardaudio_stream_get_input_ms_snd_card (AudioStream *stream)
 
MSSndCardaudio_stream_get_output_ms_snd_card (AudioStream *stream)
 

Detailed Description

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

Typedef Documentation

◆ VideoPreview

Small API to display a local preview window.

Function Documentation

◆ audio_stream_get_input_ms_snd_card()

MSSndCard * audio_stream_get_input_ms_snd_card ( AudioStream stream)

Retrieve the current sound card from the audio capture filter (currently only used for AAudio and OpenSLES)

Parameters
[in]streamThe AudioStream object

◆ audio_stream_get_output_ms_snd_card()

MSSndCard * audio_stream_get_output_ms_snd_card ( AudioStream stream)

Retrieve the current sound card from the audio playback filter (currently only used for AAudio and OpenSLES)

Parameters
[in]streamThe AudioStream object

◆ audio_stream_link_video()

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.

◆ audio_stream_set_audio_route()

void audio_stream_set_audio_route ( AudioStream stream,
MSAudioRoute  route 
)

Asks the audio playback filter to route to the selected device (currently only used for blackberry)

Parameters
[in]streamThe AudioStream object
[in]routeThe wanted audio output device (earpiece, speaker)

◆ audio_stream_set_audio_route_changed_callback()

void audio_stream_set_audio_route_changed_callback ( AudioStream stream,
MSAudioRouteChangedCallback  callback,
void *  audio_route_changed_cb_user_data 
)

Set a callback to be called when an audio route change is notified (IOS only)

Parameters
[in]streamThe AudioStream object
[in]callbackThe function to call when receiving the route change event
[in]audio_route_changed_cb_user_dataContext for the callback

◆ audio_stream_set_input_ms_snd_card()

int audio_stream_set_input_ms_snd_card ( AudioStream stream,
MSSndCard sndcard_capture 
)

Asks the audio capture filter to route to the selected sound card (currently only used for AAudio and OpenSLES)

Parameters
[in]streamThe AudioStream object
[in]sndcard_captureThe wanted audio input soundcard
Returns
'0' if MS_AUDIO_CAPTURE_SET_INTERNAL_ID has been successfully called, '-1' if not

◆ audio_stream_set_output_ms_snd_card()

int audio_stream_set_output_ms_snd_card ( AudioStream stream,
MSSndCard sndcard_playback 
)

Asks the audio playback filter to route to the selected sound card (currently only used for AAudio and OpenSLES)

Parameters
[in]streamThe AudioStream object
[in]sndcard_playbackThe wanted audio output soundcard
Returns
'0' if MS_AUDIO_PLAYBACK_SET_INTERNAL_ID has been successfully called, '-1' if not

◆ audio_stream_unlink_video()

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.

◆ link_video_stream_with_itc_sink()

void link_video_stream_with_itc_sink ( VideoStream stream)

Link a video stream with ItcSink filter. Used for starting another video stream.

Parameters
[in]streamVideoStream object previously created with video_stream_new().

◆ ms_create_duplex_rtp_session()

RtpSession * ms_create_duplex_rtp_session ( const char *  local_ip,
int  loc_rtp_port,
int  loc_rtcp_port,
int  mtu 
)

Create an RTP session for duplex communication.

Parameters
[in]local_ipThe local IP to bind the RTP and RTCP sockets to.
[in]local_rtp_portThe local port to bind the RTP socket to.
[in]local_rtcp_portThe local port to bind the RTCP socket to.

◆ video_preview_stop_reuse_source()

MSFilter * video_preview_stop_reuse_source ( VideoPreview stream)

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]streamVideoPreview object
Returns
The source filter to be passed to the video_stream_start_with_source function.

◆ video_stream_change_camera_keep_previous_source()

MSFilter * video_stream_change_camera_keep_previous_source ( VideoStream stream,
MSWebCam cam 
)

This is the same function as video_stream_change_source_filter() called with keep_source=1, but the new filter will be created from the MSWebcam that is passed as argument.

Parameters
streamthe video stream
camthe MSWebcam from which the new source filter should be created.
Returns
the previous source filter

◆ video_stream_change_source_filter()

MSFilter * video_stream_change_source_filter ( VideoStream stream,
MSWebCam cam,
MSFilter filter,
bool_t  keep_previous_source 
)

This functions changes the source filter for the passed video stream.

This is quite the same function as video_stream_change_camera, but this one allows you to pass the source filter that is created for the camera and reuse it. This gives you the ability to switch rapidly between two streams, whereas re-creating them each time would be costly (especially with webcams).

Note
Since the video_stream_stop() will automatically destroy the source, it is advised that you use video_stream_stop_keep_source() instead, so that you can manually destroy the source filters after the stream is stopped.

Example usage:

    video_stream_start(stream, profile, [...], noWebcamDevice);
    // We manage the sources for the stream ourselves:
    MSFilter* noWebCamFilter = video_stream_get_source_filter(stream);
    MSFilter* frontCamFilter = ms_web_cam_create_reader(frontCamDevice);

            sleep(1);
            video_stream_change_source_filter(stream, frontCamDevice, frontCamFilter, TRUE); // will keep the previous filter
            sleep(1);
            video_stream_change_source_filter(stream, noWebcamDevice, noWebCamFilter, TRUE); // keep the previous filter

    sleep(1)
    video_stream_stop_keep_source(stream);
    ms_filter_destroy(noWebCamFilter);
    ms_filter_destroy(frontCamFilter);
Parameters
streamthe video stream to modify
camthe camera that you want to set as the new source
cam_filterthe filter for this camera. It can be obtained with ms_web_cam_create_reader(cam)
Returns
the previous source if keep_previous_source is TRUE, otherwise NULL

◆ video_stream_decoding_error_recovered()

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.

◆ video_stream_decoding_error_reported()

void video_stream_decoding_error_reported ( VideoStream stream)

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

Parameters
[in]streamThe VideoStream object.

◆ video_stream_forward_source_stream()

void video_stream_forward_source_stream ( VideoStream stream,
VideoStream source 
)

This function forwards the video from the source stream to the specifed one.

This will connect the received video stream from source and will pass it to current stream to send. Using video_stream_change_camera will stop the forwarding and use the provided camera. If the source stream is stopped before this stream, a call to video_stream_change_camera is also required in order to restart the graph.

Parameters
streamthe video stream to modify
sourcethe video stream that will be used as a source

◆ video_stream_get_camera_sensor_rotation()

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

◆ video_stream_get_received_framerate()

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.

◆ video_stream_get_received_video_size()

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.

◆ video_stream_get_sent_framerate()

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..

◆ video_stream_get_sent_video_size()

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.

◆ video_stream_get_source_filter()

MSFilter * video_stream_get_source_filter ( const VideoStream stream)

Returns the current video stream source filter. Be careful, this source will be destroyed if the stream is stopped.

Returns
current stream source

◆ video_stream_get_video_preset()

const char * video_stream_get_video_preset ( VideoStream stream)

Returns the name of the video preset used for the video stream.

Parameters
[in]streamVideoStream object

◆ video_stream_is_decoding_error_to_be_reported()

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.

◆ video_stream_new2()

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

Creates a 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 VideoStream.

◆ video_stream_open_remote_play()

MSFilter * video_stream_open_remote_play ( VideoStream stream,
const char *  filename 
)

Open a player to play a video file (mkv) to remote end. The player is returned as a MSFilter so that application can make usual player controls on it using the MSPlayerInterface.

◆ video_stream_open_remote_record()

MSFilter * video_stream_open_remote_record ( VideoStream stream,
const char *  filename 
)

Open a recorder to record the video coming from remote end into a mkv file. This must be done before the stream is started.

◆ video_stream_send_fir()

void video_stream_send_fir ( VideoStream stream)

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

Parameters
[in]streamThe videostream object.

◆ video_stream_send_vfu()

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]streamThe videostream object.

◆ video_stream_set_direction()

void video_stream_set_direction ( VideoStream vs,
MediaStreamDir  dir 
)

Use media_stream_set_direction() instead

◆ video_stream_set_fps()

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".

◆ video_stream_set_frame_marking_extension_id()

void video_stream_set_frame_marking_extension_id ( VideoStream stream,
int  extension_id 
)

Sets the header extension id for frame marking. This has to be called before starting the video stream.

Parameters
streamthe video stream
extension_idthe extension id

◆ video_stream_set_preview_size()

void video_stream_set_preview_size ( VideoStream stream,
MSVideoSize  vsize 
)

Force a resolution for the preview.

Parameters
[in]streamThe VideoStream object.
[in]vsizevideo resolution.

◆ video_stream_set_sent_video_size()

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]streamThe videostream for which to get the sent video size.
[in]vsizeThe sent video size wished.

◆ video_stream_set_sent_video_size_max()

void video_stream_set_sent_video_size_max ( VideoStream stream,
MSVideoSize  max 
)

Sets the max size the sent video stream can reach.

Parameters
streamthe video stream
maxthe max size the sent videostream can reach. 0x0 will remove this limitation.

◆ video_stream_start_from_io()

int video_stream_start_from_io ( VideoStream stream,
RtpProfile *  profile,
const char *  rem_rtp_ip,
int  rem_rtp_port,
const char *  rem_rtcp_ip,
int  rem_rtcp_port,
int  payload_type,
const MSMediaStreamIO io 
)

Start a video stream according to the specified VideoStreamIO.

Parameters
[in]streamVideoStream object previously created with video_stream_new().
[in]profileRtpProfile object holding the PayloadType that can be used during the video session.
[in]rem_rtp_ipThe remote IP address where to send the encoded video to.
[in]rem_rtp_portThe remote port where to send the encoded video to.
[in]rem_rtcp_ipThe remote IP address for RTCP.
[in]rem_rtcp_portThe remote port for RTCP.
[in]payload_typeThe payload type number used to send the video stream. A valid PayloadType must be available at this index in the profile.
[in]ioA VideoStreamIO describing the input/output of the video stream.

◆ video_stream_stop_keep_source()

MSFilter * video_stream_stop_keep_source ( VideoStream stream)

Stop the video stream, but does not destroy the source of the video. This function can be use in conjunction with video_stream_change_source_filter() to allow manual management of the source filters for a video stream.

Parameters
streamthe stream to stop
Returns
returns the source of the video stream, which you should manually destroy when appropriate.

◆ video_stream_use_video_preset()

void video_stream_use_video_preset ( VideoStream stream,
const char *  preset 
)

Set a video preset to be used for the video stream.

Parameters
[in]streamVideoStream object
[in]presetThe name of the video preset to be used.