| | |
| | | MS2_PUBLIC void ring_stop (RingStream * stream); |
| | | |
| | | /** |
| | | * Asks the ring filter to route to the selected sound card (currently only used for AAudio and OpenSLES) |
| | | * @param[in] stream The RingStream object |
| | | * @param[in] sndcard_playback The wanted audio output soundcard |
| | | */ |
| | | MS2_PUBLIC void ring_stream_set_output_ms_snd_card(RingStream *stream, MSSndCard * sndcard_playback); |
| | | |
| | | /** |
| | | * Retrieve the current sound card from the audio playback filter (currently only used for AAudio and OpenSLES) |
| | | * @param[in] stream The AudioStream object |
| | | */ |
| | | MS2_PUBLIC MSSndCard * ring_stream_get_output_ms_snd_card(RingStream *stream); |
| | | |
| | | /** |
| | | * @} |
| | | **/ |
| | | /** |
| | |
| | | MSFactory *factory; |
| | | MSBandwidthController *bandwidth_controller; |
| | | MSVideoQualityController *video_quality_controller; |
| | | MediaStreamDir direction; |
| | | }; |
| | | |
| | | MS2_PUBLIC void media_stream_init(MediaStream *stream, MSFactory *factory, const MSMediaStreamSessions *sessions); |
| | |
| | | |
| | | MS2_PUBLIC void media_stream_iterate(MediaStream * stream); |
| | | |
| | | MS2_PUBLIC void media_stream_set_direction(MediaStream *stream, MediaStreamDir dir); |
| | | |
| | | MS2_PUBLIC MediaStreamDir media_stream_get_direction(const MediaStream *stream); |
| | | |
| | | /** |
| | | * Returns TRUE if stream was still actively receiving packets (RTP or RTCP) in the last period specified in timeout_seconds. |
| | | **/ |
| | |
| | | MSResourceFile, |
| | | MSResourceRtp, |
| | | MSResourceCamera, |
| | | MSResourceSoundcard |
| | | MSResourceSoundcard, |
| | | MSResourceVoid |
| | | }MSResourceType; |
| | | |
| | | MS2_PUBLIC const char *ms_resource_type_to_string(MSResourceType type); |
| | |
| | | struct _AudioStream |
| | | { |
| | | MediaStream ms; |
| | | MSSndCard *playcard; |
| | | MSSndCard *captcard; |
| | | MSFilter *soundread; |
| | | MSFilter *soundwrite; |
| | | MSFilter *dtmfgen; |
| | |
| | | bool_t spk_eq_active; |
| | | bool_t use_ng;/*noise gate*/ |
| | | bool_t is_ec_delay_set; |
| | | bool_t disable_record_on_mute; |
| | | float last_mic_gain_level_db; |
| | | }; |
| | | |
| | | /** |
| | |
| | | static MS2_INLINE void audio_stream_enable_adaptive_jittcomp(AudioStream *stream, bool_t enabled) { |
| | | media_stream_enable_adaptive_jittcomp(&stream->ms, enabled); |
| | | } |
| | | /** |
| | | * Calling this method with disable=true will cause the microhone to be completely deactivated when muted |
| | | * Currently only implemented for IOS, this will cause the playback sound to be interrupted for a short moment while the audio is reconfigured. |
| | | * On IOS 14, it will also disable Apple's microphone recording indicator when microphone is muted. |
| | | * |
| | | * @param stream The stream. |
| | | * @param disable True if you wish to entirely stop the audio recording when muting the microphone. |
| | | */ |
| | | MS2_PUBLIC void audio_stream_disable_record_on_mute(AudioStream *stream, bool_t disable); |
| | | |
| | | /** |
| | | * Mute or unmute the microphone |
| | | * For IOS, if "audio_stream_disable_record_on_mute" was enabled, this will completely stop the microphone recording. |
| | | * Else, sound recording remains active but silence is sent instead of recorded audiow@ |
| | | * |
| | | * @param stream The stream. |
| | | * @param enable Wether the microphone must be enabled. |
| | | */ |
| | | MS2_PUBLIC void audio_stream_enable_mic(AudioStream *stream, bool_t enable); |
| | | |
| | | /** |
| | | * Apply a software gain on the microphone. |
| | |
| | | |
| | | |
| | | /** |
| | | * @deprecated |
| | | * Like audio_stream_set_mic_gain_db() excepted that the gain is specified |
| | | * in percentage. |
| | | * |
| | |
| | | |
| | | 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); |
| | | |
| | | struct _MediastreamVideoStat |
| | | { |
| | |
| | | char *display_name; |
| | | void *window_id; |
| | | void *preview_window_id; |
| | | MediaStreamDir dir; |
| | | MediaStreamDir dir; /* Not used anymore, see direction in MediaStream */ |
| | | MSRect decode_rect; //Used for the qrcode decoder |
| | | MSWebCam *cam; |
| | | RtpSession *rtp_io_session; /**< The RTP session used for RTP input/output. */ |
| | |
| | | int device_orientation; /* warning: meaning of this variable depends on the platform (Android, iOS, ...) */ |
| | | uint64_t last_reported_decoding_error_time; |
| | | uint64_t last_fps_check; |
| | | uint64_t last_camera_check; |
| | | int dead_camera_check_count; |
| | | VideoStreamCameraNotWorkingCallback cameracb; |
| | | void *camera_pointer; |
| | | MediaStreamVideoStat ms_video_stat; |
| | | VideoStreamEncoderControlCb encoder_control_cb; |
| | | void *encoder_control_cb_user_data; |
| | | bool_t use_preview_window; |
| | | bool_t enable_qrcode_decoder; |
| | | bool_t freeze_on_error; |
| | | bool_t display_filter_auto_rotate_enabled; |
| | | |
| | | bool_t source_performs_encoding; |
| | | |
| | | bool_t output_performs_decoding; |
| | | bool_t player_active; |
| | | bool_t staticimage_webcam_fps_optimization; /* if TRUE, the StaticImage webcam will ignore the fps target in order to save CPU time. Default is TRUE */ |
| | |
| | | MS2_PUBLIC VideoStream *video_stream_new2(MSFactory* factory, const char* ip, int loc_rtp_port, int loc_rtcp_port); |
| | | |
| | | MS2_PUBLIC VideoStream *video_stream_new_with_sessions(MSFactory* factory, const MSMediaStreamSessions *sessions); |
| | | MS2_PUBLIC void video_stream_set_direction(VideoStream *vs, MediaStreamDir dir); |
| | | |
| | | /** |
| | | * Use media_stream_set_direction() instead |
| | | **/ |
| | | MS2_DEPRECATED MS2_PUBLIC void video_stream_set_direction(VideoStream *vs, MediaStreamDir dir); |
| | | static MS2_INLINE void video_stream_enable_adaptive_bitrate_control(VideoStream *stream, bool_t enabled) { |
| | | media_stream_enable_adaptive_bitrate_control(&stream->ms, enabled); |
| | | } |
| | |
| | | } |
| | | 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_camera_not_working_callback(VideoStream *s, VideoStreamCameraNotWorkingCallback cb, void *user_pointer); |
| | | MS2_PUBLIC void video_stream_set_display_filter_name(VideoStream *s, const char *fname); |
| | | MS2_PUBLIC 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); |
| | |
| | | /*function to call periodically to handle various events */ |
| | | MS2_PUBLIC void video_stream_iterate(VideoStream *stream); |
| | | |
| | | /* |
| | | * Assign a specific callback to process PLI, SLI, FIR received by RTCP. |
| | | * When set to NULL, or not assigned, the default behavior is to target these commands to the video encoder. |
| | | */ |
| | | MS2_PUBLIC void video_stream_set_encoder_control_callback(VideoStream *stream, VideoStreamEncoderControlCb cb, void *user_data); |
| | | |
| | | /** |
| | | * Asks the video stream to send a Full-Intra Request. |
| | | * @param[in] stream The videostream object. |
| | |
| | | */ |
| | | MS2_PUBLIC int video_stream_get_camera_sensor_rotation(VideoStream *stream); |
| | | |
| | | /*provided for compatibility, use video_stream_set_direction() instead */ |
| | | /*provided for compatibility, use media_stream_set_direction() instead */ |
| | | 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, |
| | | RtpProfile *profile, const char *addr, int port, int rtcp_port, |
| | |
| | | MS2_PUBLIC void audio_stream_set_audio_route(AudioStream *stream, MSAudioRoute route); |
| | | |
| | | /** |
| | | * Asks the audio capture filter to route to the selected sound card (currently only used for AAudio and OpenSLES) |
| | | * @param[in] stream The AudioStream object |
| | | * @param[in] sndcard_capture The wanted audio input soundcard |
| | | */ |
| | | MS2_PUBLIC void audio_stream_set_input_ms_snd_card(AudioStream *stream, MSSndCard * sndcard_capture); |
| | | |
| | | /** |
| | | * Asks the audio playback filter to route to the selected sound card (currently only used for AAudio and OpenSLES) |
| | | * @param[in] stream The AudioStream object |
| | | * @param[in] sndcard_playback The wanted audio output soundcard |
| | | */ |
| | | MS2_PUBLIC void audio_stream_set_output_ms_snd_card(AudioStream *stream, MSSndCard * sndcard_playback); |
| | | |
| | | /** |
| | | * Retrieve the current sound card from the audio capture filter (currently only used for AAudio and OpenSLES) |
| | | * @param[in] stream The AudioStream object |
| | | */ |
| | | MS2_PUBLIC MSSndCard * audio_stream_get_input_ms_snd_card(AudioStream *stream); |
| | | |
| | | /** |
| | | * Retrieve the current sound card from the audio playback filter (currently only used for AAudio and OpenSLES) |
| | | * @param[in] stream The AudioStream object |
| | | */ |
| | | MS2_PUBLIC MSSndCard * audio_stream_get_output_ms_snd_card(AudioStream *stream); |
| | | |
| | | /** |
| | | * @} |
| | | **/ |
| | | |
| | |
| | | * @} |
| | | **/ |
| | | |
| | | MS2_PUBLIC void update_bitrate_limit_from_tmmbr(MediaStream *obj, int br_limit); |
| | | |
| | | #ifdef __cplusplus |
| | | } |