Commit 9b1820fb authored by smorlat's avatar smorlat
Browse files

check that ffmpeg encoder are present before registering them.



git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@368 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent b62a0c97
......@@ -21,6 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "mediastreamer-config.h"
#endif
extern void __register_ffmpeg_encoders_if_possible(void);
#include "mediastreamer2/mscommon.h"
#include "mediastreamer2/msfilter.h"
......@@ -534,6 +536,7 @@ void ms_init(){
ms_web_cam_manager_register_desc(wm,ms_web_cam_descs[i]);
}
}
__register_ffmpeg_encoders_if_possible();
#endif
ms_message("Loading plugins");
ms_load_plugins(PACKAGE_PLUGINS_DIR);
......
......@@ -699,9 +699,9 @@ MSFilterDesc ms_snow_enc_desc={
.id=MS_SNOW_ENC_ID,
.name="MSSnowEnc",
.text=N_("The snow codec is royalty-free and is open-source. \n"
"It uses innovative techniques that makes it one of the best video "
"It uses innovative techniques that makes it one of most promising video "
"codec. It is implemented within the ffmpeg project.\n"
"However it is under development and compatibility with other versions "
"However it is under development, quite unstable and compatibility with other versions "
"cannot be guaranteed."),
.category=MS_FILTER_ENCODER,
.enc_fmt="x-snow",
......@@ -717,8 +717,21 @@ MSFilterDesc ms_snow_enc_desc={
#endif
void __register_ffmpeg_encoders_if_possible(void){
ms_ffmpeg_check_init();
if (avcodec_find_encoder(CODEC_ID_MPEG4))
ms_filter_register(&ms_mpeg4_enc_desc);
if (avcodec_find_encoder(CODEC_ID_H263)){
ms_filter_register(&ms_h263_enc_desc);
ms_filter_register(&ms_h263_old_enc_desc);
}
if (avcodec_find_encoder(CODEC_ID_SNOW))
ms_filter_register(&ms_snow_enc_desc);
}
/*
MS_FILTER_DESC_EXPORT(ms_mpeg4_enc_desc)
MS_FILTER_DESC_EXPORT(ms_h263_enc_desc)
MS_FILTER_DESC_EXPORT(ms_h263_old_enc_desc)
MS_FILTER_DESC_EXPORT(ms_snow_enc_desc)
*/
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