Commit 572e7222 authored by Ghislain MARY's avatar Ghislain MARY

Add more sections to the high-level API documentation.

parent 7aed9d2c
/**
* @mainpage
*
* Project Website: http://www.mediastreamer2.com
*
*
* Project Website: http://www.mediastreamer2.com
*/
/**
/**
* @defgroup mediastreamer2_intro Introduction to mediastreamer2 concepts.
* @brief Introduction
* @brief Introduction
*
* @section what_is_it What is mediastreamer2
*
* mediastreamer2 is a powerful engine to make audio and video streams.
* mediastreamer2 is GPL (COPYING). Please understand the licencing details
* before using it!
*
*
* Commercial support and licensing is provided by Belledonne Communications
* http://www.belledonne-communications.com
*
*
* @see http://www.linphone.org/eng/documentation/dev/mediastreamer2.html
*
* @section definitions Some definitions.
*
* @section definitions Some definitions.
*
* Filter:
* A filter is a mediastreamer2 component that process data. A filter
......@@ -32,7 +30,7 @@
* play audio or display video data.
* send or receive RTP data.
* encode or decode audio or video data.
* transform (resize video, resample audio...) data.
* transform (resize video, resample audio...) data.
* duplicate any kind of data.
* mix audio/video data.
* </PRE>
......@@ -41,13 +39,13 @@
* data from OUTPUT pins to INPUT pins and will be responsible for
* running filters.
*
* @section how_do_i_use_mediastreamer2 How do I use mediastremer2?
*
* @section how_do_i_use_mediastreamer2 How do I use mediastreamer2?
*
* Mediastreamer2 can be used for a lot of different purpose. The primary
* use is to manage RTP audio and video session. You will need to use
* the API to build filters, link them together in a graph. Then the
* ticker API will help you to start and stop the graph.
*
*
* Basic graph sample:
*
* <PRE>
......@@ -106,7 +104,7 @@
* video4linux API (linux)
* Quicktime API (MACOSX)
* AV Foundation API (IOS)
* android.hardware.Camera API (Android)
* android.hardware.Camera API (Android)
* video display
* v4w API (windows)
* SDL API (linux, macosx...)
......@@ -187,29 +185,38 @@
* @defgroup mediastreamer2_audio_conference Audio conferencing API - easily create conferences.
* @ingroup mediastreamer2_high_api
* @brief Audio conferencing API - easily create conferences.
*
*
*/
/**
* @defgroup video_stream_api Creating typical VoIP video streams.
* @ingroup mediastreamer2_high_api
* @brief Video streaming API - easily run video streams from camera capture or static picture files to RTP.
**/
/**
* @defgroup ring_api Creating ring graphs.
* @ingroup mediastreamer2_high_api
* @brief Ring playing API - easily play a local ring from a wav file.
**/
/**
* @page mediastreamer2_readme README
/**
* @page mediastreamer2_readme README
* @verbinclude README
*/
/**
* @page mediastreamer2_install INSTALL
/**
* @page mediastreamer2_install INSTALL
* @verbinclude INSTALL
*/
/**
* @page mediastreamer2_license COPYING
* @page mediastreamer2_license COPYING
* @verbinclude COPYING
*/
/**
* @page mediastreamer2_changelog ChangeLog
/**
* @page mediastreamer2_changelog ChangeLog
* @verbinclude ChangeLog
*/
......@@ -45,6 +45,31 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern "C" {
#endif
/**
* @addtogroup ring_api
* @{
**/
struct _RingStream
{
MSTicker *ticker;
MSFilter *source;
MSFilter *gendtmf;
MSFilter *write_resampler;
MSFilter *sndwrite;
};
typedef struct _RingStream RingStream;
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);
/**
* @}
**/
typedef enum StreamType {
AudioStreamType,
VideoStreamType
......@@ -69,6 +94,24 @@ struct _MediaStream {
typedef struct _MediaStream MediaStream;
MS2_PUBLIC void media_stream_set_rtcp_information(MediaStream *stream, const char *cname, const char *tool);
MS2_PUBLIC void media_stream_get_local_rtp_stats(MediaStream *stream, rtp_stats_t *stats);
MS2_PUBLIC int media_stream_set_dscp(MediaStream *stream, int dscp);
MS2_PUBLIC void media_stream_enable_adaptive_bitrate_control(MediaStream *stream, bool_t enabled);
MS2_PUBLIC void media_stream_enable_adaptive_jittcomp(MediaStream *stream, bool_t enabled);
MS2_PUBLIC bool_t media_stream_enable_srtp(MediaStream* stream, enum ortp_srtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key);
/**
* @addtogroup audio_stream_api
* @{
**/
typedef enum EchoLimiterType{
ELInactive,
ELControlMic,
......@@ -103,42 +146,11 @@ struct _AudioStream
bool_t is_beginning;
};
MS2_PUBLIC void media_stream_set_rtcp_information(MediaStream *stream, const char *cname, const char *tool);
MS2_PUBLIC void media_stream_get_local_rtp_stats(MediaStream *stream, rtp_stats_t *stats);
MS2_PUBLIC int media_stream_set_dscp(MediaStream *stream, int dscp);
MS2_PUBLIC void media_stream_enable_adaptive_bitrate_control(MediaStream *stream, bool_t enabled);
MS2_PUBLIC void media_stream_enable_adaptive_jittcomp(MediaStream *stream, bool_t enabled);
MS2_PUBLIC bool_t media_stream_enable_srtp(MediaStream* stream, enum ortp_srtp_crypto_suite_t suite, const char* snd_key, const char* rcv_key);
/**
* @addtogroup audio_stream_api
* @{
**/
/**
* The AudioStream holds all resources to create and run typical VoIP audiostream.
**/
typedef struct _AudioStream AudioStream;
struct _RingStream
{
MSTicker *ticker;
MSFilter *source;
MSFilter *gendtmf;
MSFilter *write_resampler;
MSFilter *sndwrite;
};
typedef struct _RingStream RingStream;
/* start a thread that does sampling->encoding->rtp_sending|rtp_receiving->decoding->playing */
MS2_PUBLIC AudioStream *audio_stream_start (RtpProfile * prof, int locport, const char *remip,
......@@ -286,11 +298,6 @@ MS2_PUBLIC void audio_stream_equalizer_set_gain(AudioStream *stream, int frequen
/* stop the audio streaming thread and free everything*/
MS2_PUBLIC void audio_stream_stop (AudioStream * stream);
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);
/* send a dtmf */
MS2_PUBLIC int audio_stream_send_dtmf (AudioStream * stream, char dtmf);
......@@ -319,15 +326,20 @@ MS2_PUBLIC static inline int audio_stream_set_dscp(AudioStream *stream, int dscp
return media_stream_set_dscp(&stream->ms, dscp);
}
/*****************
Video Support
*****************/
/**
* @}
**/
/**
* @addtogroup video_stream_api
* @{
**/
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 enum _VideoStreamDir{
VideoStreamSendRecv,
VideoStreamSendOnly,
......@@ -365,7 +377,6 @@ struct _VideoStream
typedef struct _VideoStream VideoStream;
MS2_PUBLIC VideoStream *video_stream_new(int loc_rtp_port, int loc_rtcp_port, bool_t use_ipv6);
MS2_PUBLIC void video_stream_set_direction(VideoStream *vs, VideoStreamDir dir);
MS2_PUBLIC static inline void video_stream_enable_adaptive_bitrate_control(VideoStream *stream, bool_t enabled) {
......@@ -447,6 +458,10 @@ MS2_PUBLIC VideoPreview * video_preview_new();
MS2_PUBLIC void video_preview_start(VideoPreview *stream, MSWebCam *device);
MS2_PUBLIC void video_preview_stop(VideoPreview *stream);
/**
* @}
**/
MS2_PUBLIC bool_t ms_is_ipv6(const char *address);
......@@ -454,8 +469,4 @@ MS2_PUBLIC bool_t ms_is_ipv6(const char *address);
}
#endif
/**
* @}
**/
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment