mirror of https://github.com/mpv-player/mpv
mp_msg: Remove uses of MSGT_MENCODER
Some of the code that could run outside MEcoder used MSGT_MENCODER. Replace those with appropriate MSGT_ types.
This commit is contained in:
parent
83f37b54de
commit
69fdb30400
|
@ -285,7 +285,6 @@ const m_option_t msgl_config[]={
|
|||
{ "lirc", &mp_msg_levels[MSGT_LIRC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
|
||||
{ "stream", &mp_msg_levels[MSGT_STREAM], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
|
||||
{ "cache", &mp_msg_levels[MSGT_CACHE], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
|
||||
{ "mencoder", &mp_msg_levels[MSGT_MENCODER], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
|
||||
{ "xacodec", &mp_msg_levels[MSGT_XACODEC], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
|
||||
{ "tv", &mp_msg_levels[MSGT_TV], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
|
||||
{ "radio", &mp_msg_levels[MSGT_RADIO], CONF_TYPE_INT, CONF_RANGE, -1, 9, NULL },
|
||||
|
@ -331,7 +330,6 @@ const m_option_t msgl_config[]={
|
|||
" lirc - lirc_mp.c and input lirc driver\n"
|
||||
" stream - stream.c\n"
|
||||
" cache - cache2.c\n"
|
||||
" mencoder\n"
|
||||
" xacodec - XAnim codecs\n"
|
||||
" tv - TV input subsystem\n"
|
||||
" osdep - OS-dependent parts\n"
|
||||
|
|
|
@ -149,9 +149,9 @@ static int init(sh_video_t *sh)
|
|||
|
||||
/* Gather some information about the host library */
|
||||
if(xvid_global(NULL, XVID_GBL_INFO, &xvid_gbl_info, NULL) < 0) {
|
||||
mp_msg(MSGT_MENCODER,MSGL_INFO, "xvid: could not get information about the library\n");
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_INFO, "xvid: could not get information about the library\n");
|
||||
} else {
|
||||
mp_msg(MSGT_MENCODER,MSGL_INFO, "xvid: using library version %d.%d.%d (build %s)\n",
|
||||
mp_msg(MSGT_DECVIDEO,MSGL_INFO, "xvid: using library version %d.%d.%d (build %s)\n",
|
||||
XVID_VERSION_MAJOR(xvid_gbl_info.actual_version),
|
||||
XVID_VERSION_MINOR(xvid_gbl_info.actual_version),
|
||||
XVID_VERSION_PATCH(xvid_gbl_info.actual_version),
|
||||
|
|
|
@ -74,12 +74,12 @@ static int config(struct vf_instance *vf,
|
|||
vf->priv->outbuf = malloc(vf->priv->outbuf_size);
|
||||
|
||||
if (avcodec_open(&lavc_venc_context, vf->priv->codec) != 0) {
|
||||
mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Could not open codec.\n");
|
||||
mp_tmsg(MSGT_VFILTER,MSGL_ERR,"Could not open codec.\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lavc_venc_context.codec->encode == NULL) {
|
||||
mp_msg(MSGT_MENCODER,MSGL_ERR,"avcodec init failed (ctx->codec->encode == NULL)!\n");
|
||||
mp_msg(MSGT_VFILTER,MSGL_ERR,"avcodec init failed (ctx->codec->encode == NULL)!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ static int vf_open(vf_instance_t *vf, char *args){
|
|||
|
||||
vf->priv->codec = (AVCodec *)avcodec_find_encoder_by_name("mpeg1video");
|
||||
if (!vf->priv->codec) {
|
||||
mp_tmsg(MSGT_MENCODER,MSGL_ERR,"Cannot find codec '%s' in libavcodec...\n", "mpeg1video");
|
||||
mp_tmsg(MSGT_VFILTER,MSGL_ERR,"Cannot find codec '%s' in libavcodec...\n", "mpeg1video");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
2
mp_msg.h
2
mp_msg.h
|
@ -79,8 +79,6 @@ extern int verbose;
|
|||
#define MSGT_STREAM 20 // stream.c
|
||||
#define MSGT_CACHE 21 // cache2.c
|
||||
|
||||
#define MSGT_MENCODER 22
|
||||
|
||||
#define MSGT_XACODEC 23 // XAnim codecs
|
||||
|
||||
#define MSGT_TV 24 // TV input subsystem
|
||||
|
|
|
@ -4114,7 +4114,7 @@ if(stream_dump_type==5){
|
|||
len=stream_read(mpctx->stream,buf,4096);
|
||||
if(len>0) {
|
||||
if(fwrite(buf,len,1,f) != 1) {
|
||||
mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n",opts->stream_dump_name);
|
||||
mp_tmsg(MSGT_GLOBAL,MSGL_FATAL,"%s: Error writing file.\n",opts->stream_dump_name);
|
||||
exit_player(mpctx, EXIT_ERROR);
|
||||
}
|
||||
}
|
||||
|
@ -4127,7 +4127,7 @@ if(stream_dump_type==5){
|
|||
}
|
||||
}
|
||||
if(fclose(f)) {
|
||||
mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n",opts->stream_dump_name);
|
||||
mp_tmsg(MSGT_GLOBAL,MSGL_FATAL,"%s: Error writing file.\n",opts->stream_dump_name);
|
||||
exit_player(mpctx, EXIT_ERROR);
|
||||
}
|
||||
mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Core dumped ;)\n");
|
||||
|
|
Loading…
Reference in New Issue