mediastream.h 16.3 KB
Newer Older
aymeric's avatar
aymeric committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2006  Simon MORLAT (simon.morlat@linphone.org)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*/


#ifndef MEDIASTREAM_H
#define MEDIASTREAM_H

Simon Morlat's avatar
Simon Morlat committed
24 25 26 27 28
#include <mediastreamer2/msfilter.h>
#include <mediastreamer2/msticker.h>
#include <mediastreamer2/mssndcard.h>
#include <mediastreamer2/mswebcam.h>
#include <mediastreamer2/msvideo.h>
29 30
#include <mediastreamer2/bitratecontrol.h>
#include <mediastreamer2/qualityindicator.h>
31
#include <mediastreamer2/ice.h>
Simon Morlat's avatar
Simon Morlat committed
32 33
#include <ortp/ortp.h>
#include <ortp/event.h>
Guillaume Beraudo's avatar
Guillaume Beraudo committed
34
#include <ortp/zrtp.h>
35
#include <ortp/ortp_srtp.h>
36

37
#include <ortp/zrtp.h>
aymeric's avatar
aymeric committed
38

Simon Morlat's avatar
Simon Morlat committed
39 40 41
#define PAYLOAD_TYPE_FLAG_CAN_RECV	PAYLOAD_TYPE_USER_FLAG_1
#define PAYLOAD_TYPE_FLAG_CAN_SEND	PAYLOAD_TYPE_USER_FLAG_2

42 43 44
typedef enum EchoLimiterType{
	ELInactive,
	ELControlMic,
45
	ELControlFull
46 47
} EchoLimiterType;

aymeric's avatar
aymeric committed
48 49 50 51
struct _AudioStream
{
	MSTicker *ticker;
	RtpSession *session;
52
	IceCheckList *ice_check_list;
aymeric's avatar
aymeric committed
53 54 55 56 57 58 59
	MSFilter *soundread;
	MSFilter *soundwrite;
	MSFilter *encoder;
	MSFilter *decoder;
	MSFilter *rtprecv;
	MSFilter *rtpsend;
	MSFilter *dtmfgen;
60
	MSFilter *dtmfgen_rtp;
Yann Diorcet's avatar
Yann Diorcet committed
61
	MSFilter *plc;
aymeric's avatar
aymeric committed
62
	MSFilter *ec;/*echo canceler*/
63
	MSFilter *volsend,*volrecv; /*MSVolumes*/
64 65
	MSFilter *read_resampler;
	MSFilter *write_resampler;
smorlat's avatar
smorlat committed
66
	MSFilter *equalizer;
Simon Morlat's avatar
Simon Morlat committed
67
	MSFilter *dummy;
aymeric's avatar
aymeric committed
68
	uint64_t last_packet_count;
aymeric's avatar
aymeric committed
69
	time_t last_packet_time;
70
	EchoLimiterType el_type; /*use echo limiter: two MSVolume, measured input level controlling local output level*/
71
	OrtpEvQueue *evq;
72
	MSBitrateController *rc;
73
	MSQualityIndicator *qi;
74
	time_t start_time;
smorlat's avatar
smorlat committed
75
	bool_t play_dtmfs;
smorlat's avatar
smorlat committed
76
	bool_t use_gc;
77
	bool_t use_agc;
smorlat's avatar
smorlat committed
78
	bool_t eq_active;
79
	bool_t use_ng;/*noise gate*/
80
	bool_t use_rc;
81
	bool_t is_beginning;
Guillaume Beraudo's avatar
Guillaume Beraudo committed
82
	OrtpZrtpContext *ortpZrtpContext;
83
	srtp_t srtp_session;
Yann Diorcet's avatar
Yann Diorcet committed
84
	uint32_t features;
aymeric's avatar
aymeric committed
85 86 87 88 89 90
};

#ifdef __cplusplus
extern "C" {
#endif

91 92 93 94 95 96 97 98
/**
 * @addtogroup audio_stream_api
 * @{
**/

/**
 * The AudioStream holds all resources to create and run typical VoIP audiostream.
**/
aymeric's avatar
aymeric committed
99 100 101 102 103 104
typedef struct _AudioStream AudioStream;

struct _RingStream
{
	MSTicker *ticker;
	MSFilter *source;
105
	MSFilter *gendtmf;
Simon Morlat's avatar
Simon Morlat committed
106
	MSFilter *write_resampler;
aymeric's avatar
aymeric committed
107 108 109 110 111 112 113 114
	MSFilter *sndwrite;
};

typedef struct _RingStream RingStream;



/* start a thread that does sampling->encoding->rtp_sending|rtp_receiving->decoding->playing */
Simon Morlat's avatar
Simon Morlat committed
115
MS2_PUBLIC AudioStream *audio_stream_start (RtpProfile * prof, int locport, const char *remip,
aymeric's avatar
aymeric committed
116 117
				 int remport, int payload_type, int jitt_comp, bool_t echo_cancel);

Simon Morlat's avatar
Simon Morlat committed
118
MS2_PUBLIC AudioStream *audio_stream_start_with_sndcards(RtpProfile * prof, int locport, const char *remip4, int remport, int payload_type, int jitt_comp, MSSndCard *playcard, MSSndCard *captcard, bool_t echocancel);
aymeric's avatar
aymeric committed
119

120

Simon Morlat's avatar
Simon Morlat committed
121
MS2_PUBLIC int audio_stream_start_with_files (AudioStream * stream, RtpProfile * prof,
aymeric's avatar
aymeric committed
122 123 124 125
					    const char *remip, int remport, int rem_rtcp_port,
					    int pt, int jitt_comp,
					    const char * infile,  const char * outfile);

126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
/**
 * Starts an audio stream from/to local wav files or soundcards.
 * 
 * This method starts the processing of the audio stream, that is playing from wav file or soundcard, voice processing, encoding,
 * sending through RTP, receiving from RTP, decoding, voice processing and wav file recording or soundcard playback.
 * 
 * 
 * @param stream an AudioStream previously created with audio_stream_new().
 * @param prof a RtpProfile containing all PayloadType possible during the audio session.
 * @param remip remote IP address where to send the encoded audio.
 * @param remport remote IP port where to send the encoded audio
 * @param rem_rtcp_port remote port for RTCP.
 * @param payload_type payload type index to use for the sending stream. This index must point to a valid PayloadType in the RtpProfile.
 * @param jitt_comp Nominal jitter buffer size in milliseconds.
 * @param infile path to wav file to play out (can be NULL)
 * @param outfile path to wav file to record into (can be NULL)
 * @param playcard The soundcard to be used for playback (can be NULL)
 * @param captcard The soundcard to be used for catpure. (can be NULL)
 * @param echo_cancel whether echo cancellation is to be performed.
 * @returns 0 if sucessful, -1 otherwise.
**/
Simon Morlat's avatar
Simon Morlat committed
147
MS2_PUBLIC int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char *remip,int remport,
148 149 150
	int rem_rtcp_port, int payload,int jitt_comp, const char *infile, const char *outfile,
	MSSndCard *playcard, MSSndCard *captcard, bool_t use_ec);

Simon Morlat's avatar
Simon Morlat committed
151 152
MS2_PUBLIC void audio_stream_play(AudioStream *st, const char *name);
MS2_PUBLIC void audio_stream_record(AudioStream *st, const char *name);
aymeric's avatar
aymeric committed
153

Simon Morlat's avatar
Simon Morlat committed
154
MS2_PUBLIC void audio_stream_set_rtcp_information(AudioStream *st, const char *cname, const char *tool);
aymeric's avatar
aymeric committed
155

Simon Morlat's avatar
Simon Morlat committed
156
MS2_PUBLIC void audio_stream_play_received_dtmfs(AudioStream *st, bool_t yesno);
smorlat's avatar
smorlat committed
157

158 159 160 161 162 163
/**
 * Creates an AudioStream object listening on a RTP port.
 * @param locport the local UDP port to listen for RTP packets.
 * @param ipv6 TRUE if ipv6 must be used.
 * @returns a new AudioStream.
**/
Simon Morlat's avatar
Simon Morlat committed
164
MS2_PUBLIC AudioStream *audio_stream_new(int locport, bool_t ipv6);
Simon Morlat's avatar
Simon Morlat committed
165

166 167 168 169 170 171 172
#define AUDIO_STREAM_FEATURE_PLC 	(1 << 0)
#define AUDIO_STREAM_FEATURE_EC 	(1 << 1)
#define AUDIO_STREAM_FEATURE_EQUALIZER	(1 << 2)
#define AUDIO_STREAM_FEATURE_VOL_SND 	(1 << 3)
#define AUDIO_STREAM_FEATURE_VOL_RCV 	(1 << 4)
#define AUDIO_STREAM_FEATURE_DTMF	(1 << 5)
#define AUDIO_STREAM_FEATURE_DTMF_ECHO (1 << 6)
Yann Diorcet's avatar
Yann Diorcet committed
173 174 175 176 177 178 179 180 181 182 183 184
#define AUDIO_STREAM_FEATURE_ALL	(\
					AUDIO_STREAM_FEATURE_PLC | \
					AUDIO_STREAM_FEATURE_EC | \
					AUDIO_STREAM_FEATURE_EQUALIZER | \
					AUDIO_STREAM_FEATURE_VOL_SND | \
					AUDIO_STREAM_FEATURE_VOL_RCV | \
					AUDIO_STREAM_FEATURE_DTMF | \
					AUDIO_STREAM_FEATURE_DTMF_ECHO \
					)

MS2_PUBLIC uint32_t audio_stream_get_features(AudioStream *st);
MS2_PUBLIC void audio_stream_set_features(AudioStream *st, uint32_t features);
Simon Morlat's avatar
Simon Morlat committed
185 186 187 188
	
MS2_PUBLIC void audio_stream_prepare_sound(AudioStream *st, MSSndCard *playcard, MSSndCard *captcard);
MS2_PUBLIC void audio_stream_unprepare_sound(AudioStream *st);
MS2_PUBLIC bool_t audio_stream_started(AudioStream *stream);
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
/**
 * Starts an audio stream from local soundcards.
 * 
 * This method starts the processing of the audio stream, that is capture from soundcard, voice processing, encoding,
 * sending through RTP, receiving from RTP, decoding, voice processing and soundcard playback.
 * 
 * @param stream an AudioStream previously created with audio_stream_new().
 * @param prof a RtpProfile containing all PayloadType possible during the audio session.
 * @param remip remote IP address where to send the encoded audio.
 * @param remport remote IP port where to send the encoded audio
 * @param rem_rtcp_port remote port for RTCP.
 * @param payload_type payload type index to use for the sending stream. This index must point to a valid PayloadType in the RtpProfile.
 * @param jitt_comp Nominal jitter buffer size in milliseconds.
 * @param playcard The soundcard to be used for playback
 * @param captcard The soundcard to be used for catpure.
 * @param echo_cancel whether echo cancellation is to be performed.
**/
Simon Morlat's avatar
Simon Morlat committed
206 207
MS2_PUBLIC int audio_stream_start_now(AudioStream * stream, RtpProfile * prof,  const char *remip, int remport, int rem_rtcp_port, int payload_type, int jitt_comp,MSSndCard *playcard, MSSndCard *captcard, bool_t echo_cancel);
MS2_PUBLIC void audio_stream_set_relay_session_id(AudioStream *stream, const char *relay_session_id);
aymeric's avatar
aymeric committed
208
/*returns true if we are still receiving some data from remote end in the last timeout seconds*/
Simon Morlat's avatar
Simon Morlat committed
209
MS2_PUBLIC bool_t audio_stream_alive(AudioStream * stream, int timeout);
aymeric's avatar
aymeric committed
210

211 212 213 214
/**
 * Executes background low priority tasks related to audio processing (RTP statistics analysis).
 * It should be called periodically, for example with an interval of 100 ms or so.
 */
215 216
MS2_PUBLIC void audio_stream_iterate(AudioStream *stream);

smorlat's avatar
smorlat committed
217
/*enable echo-limiter dispositve: one MSVolume in input branch controls a MSVolume in the output branch*/
Simon Morlat's avatar
Simon Morlat committed
218
MS2_PUBLIC void audio_stream_enable_echo_limiter(AudioStream *stream, EchoLimiterType type);
219

smorlat's avatar
smorlat committed
220
/*enable gain control, to be done before start() */
Simon Morlat's avatar
Simon Morlat committed
221
MS2_PUBLIC void audio_stream_enable_gain_control(AudioStream *stream, bool_t val);
smorlat's avatar
smorlat committed
222

223
/*enable automatic gain control, to be done before start() */
Simon Morlat's avatar
Simon Morlat committed
224
MS2_PUBLIC void audio_stream_enable_automatic_gain_control(AudioStream *stream, bool_t val);
225

226
/*to be done before start */
Simon Morlat's avatar
Simon Morlat committed
227
MS2_PUBLIC void audio_stream_set_echo_canceller_params(AudioStream *st, int tail_len_ms, int delay_ms, int framesize);
228

229 230
/*enable adaptive rate control */
MS2_PUBLIC void audio_stream_enable_adaptive_bitrate_control(AudioStream *st, bool_t enabled);
231 232


Simon Morlat's avatar
Simon Morlat committed
233
MS2_PUBLIC void audio_stream_set_mic_gain(AudioStream *stream, float gain);
smorlat's avatar
smorlat committed
234

235
/* enable/disable rtp stream */
Simon Morlat's avatar
Simon Morlat committed
236
MS2_PUBLIC void audio_stream_mute_rtp(AudioStream *stream, bool_t val);
Simon Morlat's avatar
Simon Morlat committed
237

238
/*enable noise gate, must be done before start()*/
Simon Morlat's avatar
Simon Morlat committed
239
MS2_PUBLIC void audio_stream_enable_noise_gate(AudioStream *stream, bool_t val);
240

smorlat's avatar
smorlat committed
241
/*enable parametric equalizer in the stream that goes to the speaker*/
Simon Morlat's avatar
Simon Morlat committed
242
MS2_PUBLIC void audio_stream_enable_equalizer(AudioStream *stream, bool_t enabled);
smorlat's avatar
smorlat committed
243

Simon Morlat's avatar
Simon Morlat committed
244
MS2_PUBLIC void audio_stream_equalizer_set_gain(AudioStream *stream, int frequency, float gain, int freq_width);
smorlat's avatar
smorlat committed
245

smorlat's avatar
smorlat committed
246
/* stop the audio streaming thread and free everything*/
Simon Morlat's avatar
Simon Morlat committed
247
MS2_PUBLIC void audio_stream_stop (AudioStream * stream);
aymeric's avatar
aymeric committed
248

Simon Morlat's avatar
Simon Morlat committed
249 250 251
MS2_PUBLIC RingStream *ring_start (const char * file, int interval, MSSndCard *sndcard);
MS2_PUBLIC RingStream *ring_start_with_cb(const char * file, int interval, MSSndCard *sndcard, MSFilterNotifyFunc func, void * user_data);
MS2_PUBLIC void ring_stop (RingStream * stream);
aymeric's avatar
aymeric committed
252 253 254


/* send a dtmf */
Simon Morlat's avatar
Simon Morlat committed
255
MS2_PUBLIC int audio_stream_send_dtmf (AudioStream * stream, char dtmf);
aymeric's avatar
aymeric committed
256

Simon Morlat's avatar
Simon Morlat committed
257
MS2_PUBLIC void audio_stream_set_default_card(int cardindex);
aymeric's avatar
aymeric committed
258

Simon Morlat's avatar
Simon Morlat committed
259
/* retrieve RTP statistics*/
Simon Morlat's avatar
Simon Morlat committed
260
MS2_PUBLIC void audio_stream_get_local_rtp_stats(AudioStream *stream, rtp_stats_t *stats);
Simon Morlat's avatar
Simon Morlat committed
261

262
/* returns a realtime indicator of the stream quality between 0 and 5 */
263 264
MS2_PUBLIC float audio_stream_get_quality_rating(AudioStream *stream);

265 266
/* returns the quality rating as an average since the start of the streaming session.*/
MS2_PUBLIC float audio_stream_get_average_quality_rating(AudioStream *stream);
aymeric's avatar
aymeric committed
267

Guillaume Beraudo's avatar
Guillaume Beraudo committed
268 269 270
/* enable ZRTP on the audio stream */
MS2_PUBLIC void audio_stream_enable_zrtp(AudioStream *stream, OrtpZrtpParams *params);

271 272
/* enable SRTP on the audio stream */
MS2_PUBLIC bool_t audio_stream_enable_strp(AudioStream* stream, enum ortp_srtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key);
Guillaume Beraudo's avatar
Guillaume Beraudo committed
273

aymeric's avatar
aymeric committed
274 275 276 277
/*****************
  Video Support
 *****************/

278
typedef void (*VideoStreamRenderCallback)(void *user_pointer, const MSPicture *local_view, const MSPicture *remote_view);
279 280 281
typedef void (*VideoStreamEventCallback)(void *user_pointer, const MSFilter *f, const unsigned int event_id, const void *args);


aymeric's avatar
aymeric committed
282

283 284 285 286 287 288
typedef enum _VideoStreamDir{
	VideoStreamSendRecv,
	VideoStreamSendOnly,
	VideoStreamRecvOnly
}VideoStreamDir;

aymeric's avatar
aymeric committed
289 290 291 292
struct _VideoStream
{
	MSTicker *ticker;
	RtpSession *session;
293
	IceCheckList *ice_check_list;
aymeric's avatar
aymeric committed
294 295
	MSFilter *source;
	MSFilter *pixconv;
296
	MSFilter *sizeconv;
aymeric's avatar
aymeric committed
297 298 299 300 301 302
	MSFilter *tee;
	MSFilter *output;
	MSFilter *encoder;
	MSFilter *decoder;
	MSFilter *rtprecv;
	MSFilter *rtpsend;
303 304
	MSFilter *tee2;
	MSFilter *jpegwriter;
305
	MSFilter *output2;
aymeric's avatar
aymeric committed
306
	OrtpEvQueue *evq;
smorlat's avatar
smorlat committed
307
	MSVideoSize sent_vsize;
smorlat's avatar
smorlat committed
308
	int corner; /*for selfview*/
309 310
	VideoStreamRenderCallback rendercb;
	void *render_pointer;
311 312
	VideoStreamEventCallback eventcb;
	void *event_pointer;
313
	char *display_name;
314 315
	unsigned long window_id;
	unsigned long preview_window_id;
316
	VideoStreamDir dir;
317
	MSWebCam *cam;
318
	bool_t use_preview_window;
319 320
	bool_t use_rc;
	bool_t pad[2];
321
    bool_t display_filter_auto_rotate_enabled;
322
	int device_orientation; /* warning: meaning of this variable depends on the platform (Android, iOS, ...) */
Guillaume Beraudo's avatar
Guillaume Beraudo committed
323
	OrtpZrtpContext *ortpZrtpContext;
324
	srtp_t srtp_session;
325
	MSBitrateController *rc;
aymeric's avatar
aymeric committed
326 327 328
};

typedef struct _VideoStream VideoStream;
smorlat's avatar
smorlat committed
329

330 331


Simon Morlat's avatar
Simon Morlat committed
332 333 334 335 336 337 338
MS2_PUBLIC VideoStream *video_stream_new(int locport, bool_t use_ipv6);
MS2_PUBLIC void video_stream_set_direction(VideoStream *vs, VideoStreamDir dir);
MS2_PUBLIC void video_stream_enable_adaptive_bitrate_control(VideoStream *s, bool_t yesno);
MS2_PUBLIC void video_stream_set_render_callback(VideoStream *s, VideoStreamRenderCallback cb, void *user_pointer);
MS2_PUBLIC void video_stream_set_event_callback(VideoStream *s, VideoStreamEventCallback cb, void *user_pointer);
MS2_PUBLIC void video_stream_set_display_filter_name(VideoStream *s, const char *fname);
MS2_PUBLIC int video_stream_start(VideoStream * stream, RtpProfile *profile, const char *remip, int remport, int rem_rtcp_port,
aymeric's avatar
aymeric committed
339
		int payload, int jitt_comp, MSWebCam *device);
340 341


Simon Morlat's avatar
Simon Morlat committed
342 343 344
MS2_PUBLIC void video_stream_set_relay_session_id(VideoStream *stream, const char *relay_session_id);
MS2_PUBLIC void video_stream_set_rtcp_information(VideoStream *st, const char *cname, const char *tool);
MS2_PUBLIC void video_stream_change_camera(VideoStream *stream, MSWebCam *cam);
345 346
/* Calling video_stream_set_sent_video_size() or changing the bitrate value in the used PayloadType during a stream is running does nothing.
The following function allows to take into account new parameters by redrawing the sending graph*/
Simon Morlat's avatar
Simon Morlat committed
347
MS2_PUBLIC void video_stream_update_video_params(VideoStream *stream);
aymeric's avatar
aymeric committed
348
/*function to call periodically to handle various events */
Simon Morlat's avatar
Simon Morlat committed
349 350 351 352 353 354 355 356 357 358
MS2_PUBLIC void video_stream_iterate(VideoStream *stream);
MS2_PUBLIC void video_stream_send_vfu(VideoStream *stream);
MS2_PUBLIC void video_stream_stop(VideoStream * stream);
MS2_PUBLIC void video_stream_set_sent_video_size(VideoStream *stream, MSVideoSize vsize);
MS2_PUBLIC void video_stream_enable_self_view(VideoStream *stream, bool_t val);
MS2_PUBLIC unsigned long video_stream_get_native_window_id(VideoStream *stream);
MS2_PUBLIC void video_stream_set_native_window_id(VideoStream *stream, unsigned long id);
MS2_PUBLIC void video_stream_set_native_preview_window_id(VideoStream *stream, unsigned long id);
MS2_PUBLIC unsigned long video_stream_get_native_preview_window_id(VideoStream *stream);
MS2_PUBLIC void video_stream_use_preview_video_window(VideoStream *stream, bool_t yesno);
359
MS2_PUBLIC void video_stream_set_device_rotation(VideoStream *stream, int orientation);
360
MS2_PUBLIC void video_stream_show_video(VideoStream *stream, bool_t show);
361

362
/*provided for compatibility, use video_stream_set_direction() instead */
Simon Morlat's avatar
Simon Morlat committed
363 364
MS2_PUBLIC int video_stream_recv_only_start(VideoStream *videostream, RtpProfile *profile, const char *addr, int port, int used_pt, int jitt_comp);
MS2_PUBLIC int video_stream_send_only_start(VideoStream *videostream,
365
				RtpProfile *profile, const char *addr, int port, int rtcp_port,
366
				int used_pt, int  jitt_comp, MSWebCam *device);
Simon Morlat's avatar
Simon Morlat committed
367 368
MS2_PUBLIC void video_stream_recv_only_stop(VideoStream *vs);
MS2_PUBLIC void video_stream_send_only_stop(VideoStream *vs);
aymeric's avatar
aymeric committed
369

Guillaume Beraudo's avatar
Guillaume Beraudo committed
370 371
/* enable ZRTP on the video stream using information from the audio stream */
MS2_PUBLIC void video_stream_enable_zrtp(VideoStream *vstream, AudioStream *astream, OrtpZrtpParams *param);
372

373 374
/* enable SRTP on the video stream */
MS2_PUBLIC bool_t video_stream_enable_strp(VideoStream* stream, enum ortp_srtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key);
375 376
/* if enabled, the display filter will internaly rotate the video, according to the device orientation */
MS2_PUBLIC void video_stream_enable_display_filter_auto_rotate(VideoStream* stream, bool_t enable);
377

378 379 380 381
/**
 * Small API to display a local preview window.
**/

Simon Morlat's avatar
Simon Morlat committed
382 383
typedef VideoStream VideoPreview;

Simon Morlat's avatar
Simon Morlat committed
384
MS2_PUBLIC VideoPreview * video_preview_new();
Simon Morlat's avatar
Simon Morlat committed
385 386 387 388
#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_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)
Simon Morlat's avatar
Simon Morlat committed
389 390
MS2_PUBLIC void video_preview_start(VideoPreview *stream, MSWebCam *device);
MS2_PUBLIC void video_preview_stop(VideoPreview *stream);
aymeric's avatar
aymeric committed
391

Simon Morlat's avatar
Simon Morlat committed
392
MS2_PUBLIC bool_t ms_is_ipv6(const char *address);
aymeric's avatar
aymeric committed
393

Guillaume Beraudo's avatar
Guillaume Beraudo committed
394

aymeric's avatar
aymeric committed
395 396 397 398
#ifdef __cplusplus
}
#endif

399 400 401
/**
 * @}
**/
aymeric's avatar
aymeric committed
402 403

#endif