int tdav_deinit() { int ret = 0; if(!__b_initialized) { TSK_DEBUG_INFO("TINYDAV not initialized"); return 0; } /* === OS specific === */ #if TDAV_UNDER_WINDOWS if ((ret = tdav_win32_deinit())) { return ret; } #elif TDAV_UNDER_APPLE if ((ret = tdav_apple_deinit())) { return ret; } #endif /* === UnRegister media contents === */ tmedia_content_plugin_unregister_all(); /* === UnRegister sessions === */ tmedia_session_plugin_unregister(tmedia_session_ghost_plugin_def_t); tmedia_session_plugin_unregister(tdav_session_audio_plugin_def_t); tmedia_session_plugin_unregister(tdav_session_video_plugin_def_t); #if !defined(HAVE_TINYMSRP) || HAVE_TINYMSRP tmedia_session_plugin_unregister(tdav_session_msrp_plugin_def_t); #endif tmedia_session_plugin_unregister(tdav_session_t140_plugin_def_t); #if !defined(HAVE_TINYBFCP) || HAVE_TINYBFCP tmedia_session_plugin_unregister(tdav_session_bfcp_plugin_def_t); #endif tmedia_session_plugin_unregister(tdav_session_bfcpaudio_plugin_def_t); tmedia_session_plugin_unregister(tdav_session_bfcpvideo_plugin_def_t); /* === UnRegister codecs === */ tmedia_codec_plugin_unregister_all(); /* === unRegister converters === */ #if HAVE_LIBYUV tmedia_converter_video_plugin_unregister(tdav_converter_video_libyuv_plugin_def_t); #endif #if HAVE_FFMPEG || HAVE_SWSSCALE tmedia_converter_video_plugin_unregister(tdav_converter_video_ffmpeg_plugin_def_t); #endif /* === unRegister consumers === */ tmedia_consumer_plugin_unregister(tdav_consumer_t140_plugin_def_t); /* T140 */ #if HAVE_DSOUND_H tmedia_consumer_plugin_unregister(tdav_consumer_dsound_plugin_def_t); #endif #if HAVE_WAVE_API tmedia_consumer_plugin_unregister(tdav_consumer_waveapi_plugin_def_t); #endif #if HAVE_WASAPI tmedia_consumer_plugin_unregister(tdav_consumer_wasapi_plugin_def_t); #endif #if TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT // Windows GDI tmedia_consumer_plugin_unregister(tdav_consumer_video_gdi_plugin_def_t); #endif #if HAVE_WINM // Windows Media (WP8) tmedia_consumer_plugin_unregister(tdav_consumer_winm_plugin_def_t); #endif #if HAVE_COREAUDIO_AUDIO_UNIT // CoreAudio based on AudioUnit tmedia_consumer_plugin_unregister(tdav_consumer_audiounit_plugin_def_t); #endif #if HAVE_COREAUDIO_AUDIO_QUEUE // CoreAudio based on AudioQueue tmedia_consumer_plugin_unregister(tdav_consumer_audioqueue_plugin_def_t); #endif #if HAVE_ALSA_ASOUNDLIB_H // Linux tmedia_consumer_plugin_unregister(tdav_consumer_alsa_plugin_def_t); #endif #if HAVE_LINUX_SOUNDCARD_H // Linux tmedia_consumer_plugin_unregister(tdav_consumer_oss_plugin_def_t); #endif /* === UnRegister producers === */ tmedia_producer_plugin_unregister(tdav_producer_t140_plugin_def_t); /* T140 */ #if HAVE_DSOUND_H // DirectSound tmedia_producer_plugin_unregister(tdav_producer_dsound_plugin_def_t); #endif #if HAVE_WAVE_API // WaveAPI tmedia_producer_plugin_unregister(tdav_producer_waveapi_plugin_def_t); #endif #if HAVE_WASAPI // WASAPI tmedia_producer_plugin_unregister(tdav_producer_wasapi_plugin_def_t); #endif #if TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT // Windows DirectDraw (DirectX) tmedia_producer_plugin_unregister(tdav_producer_screencast_ddraw_plugin_def_t); #endif #if TDAV_UNDER_WINDOWS && !TDAV_UNDER_WINDOWS_RT // Windows GDI tmedia_producer_plugin_unregister(tdav_producer_screencast_gdi_plugin_def_t); #endif #if HAVE_WINM // Windows Media (WP8) tmedia_producer_plugin_unregister(tdav_producer_winm_plugin_def_t); #endif #if HAVE_ALSA_ASOUNDLIB_H // Linux tmedia_producer_plugin_unregister(tdav_producer_alsa_plugin_def_t); #endif #if HAVE_LINUX_SOUNDCARD_H // Linux tmedia_producer_plugin_unregister(tdav_producer_oss_plugin_def_t); #endif #if HAVE_LINUX_VIDEODEV2_H // V4L2 (Linux) tmedia_producer_plugin_unregister(tdav_producer_video_v4l2_plugin_def_t); tmedia_producer_plugin_unregister(tdav_producer_screencast_v4l2_plugin_def_t); #endif #if HAVE_COREAUDIO_AUDIO_UNIT // CoreAudio based on AudioUnit tmedia_producer_plugin_unregister(tdav_producer_audiounit_plugin_def_t); #elif HAVE_COREAUDIO_AUDIO_QUEUE // CoreAudio based on AudioQueue tmedia_producer_plugin_unregister(tdav_producer_audioqueue_plugin_def_t); #endif #if HAVE_OSS_H tmedia_consumer_plugin_unregister(tmedia_consumer_oss_plugin_def_t); #endif /* === UnRegister Audio Denoise (AGC, VAD, Noise Suppression and AEC) === */ #if HAVE_SPEEX_DSP && (!defined(HAVE_SPEEX_DENOISE) || HAVE_SPEEX_DENOISE) tmedia_denoise_plugin_unregister(tdav_speex_denoise_plugin_def_t); #endif #if HAVE_WEBRTC && (!defined(HAVE_WEBRTC_DENOISE) || HAVE_WEBRTC_DENOISE) tmedia_denoise_plugin_unregister(tdav_webrtc_denoise_plugin_def_t); #endif /* === UnRegister Audio Resampler === */ #if HAVE_SPEEX_DSP && (!defined(HAVE_SPEEX_RESAMPLER) || HAVE_SPEEX_RESAMPLER) tmedia_resampler_plugin_unregister(tdav_speex_resampler_plugin_def_t); #endif /* === UnRegister Audio/video JitterBuffer === */ #if HAVE_SPEEX_DSP && HAVE_SPEEX_JB tmedia_jitterbuffer_plugin_unregister(tdav_speex_jitterbuffer_plugin_def_t); #else tmedia_jitterbuffer_plugin_unregister(tdav_speakup_jitterbuffer_plugin_def_t); #endif /* === stand-alone plugins === */ #if TDAV_HAVE_PLUGIN_EXT_WIN32 { TSK_OBJECT_SAFE_FREE(__dll_plugin_cuda); TSK_OBJECT_SAFE_FREE(__dll_plugin_wasapi); TSK_OBJECT_SAFE_FREE(__dll_plugin_mf); TSK_OBJECT_SAFE_FREE(__dll_plugin_dd); TSK_OBJECT_SAFE_FREE(__dll_plugin_dshow); TSK_OBJECT_SAFE_FREE(__dll_plugin_audio_dsp); TSK_OBJECT_SAFE_FREE(__dll_plugin_ipsec_wfp); } #endif // disperse all collected codecs _tdav_codec_plugins_disperse(); __b_initialized = tsk_false; return ret; }
int tdav_deinit() { int ret = 0; /* === OS specific === */ #if TDAV_UNDER_WINDOWS if ((ret = tdav_win32_deinit())) { return ret; } #elif TDAV_UNDER_APPLE if ((ret = tdav_apple_deinit())) { return ret; } #endif /* === UnRegister media contents === */ tmedia_content_plugin_unregister_all(); /* === UnRegister sessions === */ tmedia_session_plugin_unregister(tmedia_session_ghost_plugin_def_t); tmedia_session_plugin_unregister(tdav_session_audio_plugin_def_t); tmedia_session_plugin_unregister(tdav_session_video_plugin_def_t); tmedia_session_plugin_unregister(tdav_session_msrp_plugin_def_t); tmedia_session_plugin_unregister(tdav_session_t140_plugin_def_t); /* === UnRegister codecs === */ tmedia_codec_plugin_unregister(tdav_codec_dtmf_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_ulpfec_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_red_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_t140_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_msrp_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_g711a_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_g711u_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_g722_plugin_def_t); #if HAVE_OPENCORE_AMR tmedia_codec_plugin_unregister(tdav_codec_amrnb_oa_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_amrnb_be_plugin_def_t); #endif #if HAVE_BV16 tmedia_codec_plugin_unregister(tdav_codec_bv16_plugin_def_t); #endif #if HAVE_LIBGSM tmedia_codec_plugin_unregister(tdav_codec_gsm_plugin_def_t); #endif #if HAVE_ILBC tmedia_codec_plugin_unregister(tdav_codec_ilbc_plugin_def_t); #endif #if HAVE_LIB_SPEEX tmedia_codec_plugin_unregister(tdav_codec_speex_nb_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_speex_wb_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_speex_uwb_plugin_def_t); #endif #if HAVE_LIBOPUS tmedia_codec_plugin_unregister(tdav_codec_opus_plugin_def_t); #endif #if HAVE_G729 tmedia_codec_plugin_unregister(tdav_codec_g729ab_plugin_def_t); #endif #if HAVE_LIBVPX tmedia_codec_plugin_unregister(tdav_codec_vp8_plugin_def_t); #endif #if HAVE_CUDA if(tdav_codec_h264_cuda_is_supported()){ tmedia_codec_plugin_unregister(tdav_codec_h264_cuda_bp10_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h264_cuda_bp20_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h264_cuda_bp30_plugin_def_t); } #endif #if HAVE_FFMPEG tmedia_codec_plugin_unregister(tdav_codec_mp4ves_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h261_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h263_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h263p_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h263pp_plugin_def_t); # if !defined(HAVE_H264) || HAVE_H264 tmedia_codec_plugin_unregister(tdav_codec_h264_base_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h264_main_plugin_def_t); # endif # if !defined(HAVE_THEORA) || HAVE_THEORA tmedia_codec_plugin_unregister(tdav_codec_theora_plugin_def_t); # endif #elif HAVE_H264_PASSTHROUGH tmedia_codec_plugin_unregister(tdav_codec_h264_base_plugin_def_t); tmedia_codec_plugin_unregister(tdav_codec_h264_main_plugin_def_t); #endif /* === unRegister converters === */ #if HAVE_LIBYUV tmedia_converter_video_plugin_unregister(tdav_converter_video_libyuv_plugin_def_t); #elif HAVE_FFMPEG || HAVE_SWSSCALE tmedia_converter_video_plugin_unregister(tdav_converter_video_ffmpeg_plugin_def_t); #endif /* === unRegister consumers === */ tmedia_consumer_plugin_unregister(tdav_consumer_t140_plugin_def_t); /* T140 */ #if HAVE_DSOUND_H tmedia_consumer_plugin_unregister(tdav_consumer_dsound_plugin_def_t); #endif #if HAVE_WAVE_API tmedia_consumer_plugin_unregister(tdav_consumer_waveapi_plugin_def_t); #endif #if HAVE_WASAPI tmedia_consumer_plugin_unregister(tdav_consumer_wasapi_plugin_def_t); #endif #if HAVE_TINYDSHOW // DirectShow (Windows XP and later) tmedia_consumer_plugin_unregister(tdshow_consumer_plugin_def_t); #elif HAVE_WINM // Windows Media (WP8) tmedia_consumer_plugin_unregister(tdav_consumer_winm_plugin_def_t); #elif HAVE_MF // Media Foundation (Windows 7 or later) tmedia_consumer_plugin_unregister(tdav_consumer_video_mf_plugin_def_t); #endif #if HAVE_COREAUDIO_AUDIO_UNIT // CoreAudio based on AudioUnit tmedia_consumer_plugin_unregister(tdav_consumer_audiounit_plugin_def_t); #endif #if HAVE_COREAUDIO_AUDIO_QUEUE // CoreAudio based on AudioQueue tmedia_consumer_plugin_unregister(tdav_consumer_audioqueue_plugin_def_t); #endif /* === UnRegister producers === */ tmedia_producer_plugin_unregister(tdav_producer_t140_plugin_def_t); /* T140 */ #if HAVE_DSOUND_H // DirectSound tmedia_producer_plugin_unregister(tdav_producer_dsound_plugin_def_t); #endif #if HAVE_WAVE_API // WaveAPI tmedia_producer_plugin_unregister(tdav_producer_waveapi_plugin_def_t); #endif #if HAVE_WASAPI // WASAPI tmedia_producer_plugin_unregister(tdav_producer_wasapi_plugin_def_t); #endif #if HAVE_TINYDSHOW // DirectShow (Windows XP or later) tmedia_producer_plugin_unregister(tdshow_producer_plugin_def_t); #elif HAVE_WINM // Windows Media (WP8) tmedia_producer_plugin_unregister(tdav_producer_winm_plugin_def_t); #elif HAVE_MF // Media Foundation (Windows 7 or later) tmedia_producer_plugin_unregister(tdav_producer_video_mf_plugin_def_t); #endif #if HAVE_COREAUDIO_AUDIO_UNIT // CoreAudio based on AudioUnit tmedia_producer_plugin_unregister(tdav_producer_audiounit_plugin_def_t); #elif HAVE_COREAUDIO_AUDIO_QUEUE // CoreAudio based on AudioQueue tmedia_producer_plugin_unregister(tdav_producer_audioqueue_plugin_def_t); #endif #if HAVE_OSS_H tmedia_consumer_plugin_unregister(tmedia_consumer_oss_plugin_def_t); #endif /* === UnRegister Audio Denoise (AGC, VAD, Noise Suppression and AEC) === */ #if HAVE_SPEEX_DSP && (!defined(HAVE_SPEEX_DENOISE) || HAVE_SPEEX_DENOISE) tmedia_denoise_plugin_unregister(tdav_speex_denoise_plugin_def_t); #endif #if HAVE_WEBRTC && (!defined(HAVE_WEBRTC_DENOISE) || HAVE_WEBRTC_DENOISE) tmedia_denoise_plugin_unregister(tdav_webrtc_denoise_plugin_def_t); #endif /* === UnRegister Audio Resampler === */ #if HAVE_SPEEX_DSP && (!defined(HAVE_SPEEX_RESAMPLER) || HAVE_SPEEX_RESAMPLER) tmedia_resampler_plugin_unregister(tdav_speex_resampler_plugin_def_t); #endif /* === UnRegister Audio/video JitterBuffer === */ #if HAVE_SPEEX_DSP && HAVE_SPEEX_JB tmedia_jitterbuffer_plugin_unregister(tdav_speex_jitterbuffer_plugin_def_t); #else tmedia_jitterbuffer_plugin_unregister(tdav_speakup_jitterbuffer_plugin_def_t); #endif return ret; }