mirror of
https://github.com/mpv-player/mpv
synced 2025-01-02 21:12:23 +00:00
printf --> mp_msg by the Wanderer <inverseparadox at comcast dot net>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13700 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e8b569487d
commit
3a591997ba
@ -23,6 +23,9 @@
|
||||
|
||||
#include "divx4_vbr.h"
|
||||
|
||||
#include "mp_msg.h"
|
||||
#include "help_mp.h"
|
||||
|
||||
//#include "transcode.h"
|
||||
|
||||
#define FALSE 0
|
||||
@ -201,7 +204,7 @@ int VbrControl_init_2pass_vbr_encoding(const char *filename, int bitrate, double
|
||||
|
||||
m_vFrames = (entry*)malloc(iNumFrames*sizeof(entry));
|
||||
if (!m_vFrames)
|
||||
{ printf("out of memory");
|
||||
{ mp_msg(MSGT_FIXME, MSGL_FIXME,MSGTR_OutOfMemory);
|
||||
return -2; //TC_EXPORT_ERROR;
|
||||
}
|
||||
|
||||
@ -228,9 +231,7 @@ int VbrControl_init_2pass_vbr_encoding(const char *filename, int bitrate, double
|
||||
if(desired_bits<=non_text_bits)
|
||||
{
|
||||
/* char s[200];*/
|
||||
printf("Specified bitrate is too low for this clip.\n"
|
||||
"Minimum possible bitrate for the clip is %.0f kbps. Overriding\n"
|
||||
"user-specified value.\n",
|
||||
mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_OverridingTooLowBitrate,
|
||||
(float)(non_text_bits*framerate/(int64_t)iNumFrames));
|
||||
|
||||
desired_bits=non_text_bits*3/2;
|
||||
|
2
fifo.c
2
fifo.c
@ -7,7 +7,7 @@ static int keyb_fifo_get=-1;
|
||||
|
||||
static void make_pipe(int* pr,int* pw){
|
||||
int temp[2];
|
||||
if(pipe(temp)!=0) printf("Cannot make PIPE!\n");
|
||||
if(pipe(temp)!=0) mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_CannotMakePipe);
|
||||
*pr=temp[0];
|
||||
*pw=temp[1];
|
||||
}
|
||||
|
@ -12,6 +12,9 @@
|
||||
#include "libvo/sub.h"
|
||||
#include "subreader.h"
|
||||
|
||||
#include "mp_msg.h"
|
||||
#include "help_mp.h"
|
||||
|
||||
static int current_sub=0;
|
||||
|
||||
//static subtitle* subtitles=NULL;
|
||||
@ -144,7 +147,7 @@ void find_sub(sub_data* subd,int key){
|
||||
}
|
||||
}
|
||||
|
||||
printf("SUB ERROR: %d ? %d --- %d [%d] \n",key,(int)vo_sub->start,(int)vo_sub->end,current_sub);
|
||||
mp_msg(MSGT_FIXME,MSGL_FIXME,"SUB ERROR: %d ? %d --- %d [%d] \n",key,(int)vo_sub->start,(int)vo_sub->end,current_sub);
|
||||
|
||||
vo_sub=NULL; // no sub here
|
||||
}
|
||||
|
@ -430,6 +430,25 @@ static char help_text[]=
|
||||
#define MSGTR_CodecDefinitionIncorrect "Codec is not defined correctly."
|
||||
#define MSGTR_OutdatedCodecsConf "This codecs.conf is too old and incompatible with this MPlayer release!"
|
||||
|
||||
// divx4_vbr.c:
|
||||
#define MSGTR_OutOfMemory "out of memory"
|
||||
#define MSGTR_OverridingTooLowBitrate "Specified bitrate is too low for this clip.\n"\
|
||||
"Minimum possible bitrate for the clip is %.0f kbps. Overriding\n"\
|
||||
"user-specified value.\n"
|
||||
|
||||
// fifo.c
|
||||
#define MSGTR_CannotMakePipe "Cannot make PIPE!\n"
|
||||
|
||||
// m_config.c
|
||||
#define MSGTR_SaveSlotTooOld "Too old save slot found from lvl %d: %d !!!\n"
|
||||
#define MSGTR_InvalidCfgfileOption "The %s option can't be used in a config file\n"
|
||||
#define MSGTR_InvalidCmdlineOption "The %s option can't be used on the command line\n"
|
||||
#define MSGTR_InvalidSuboption "Error: option '%s' has no suboption '%s'\n"
|
||||
#define MSGTR_MissingSuboptionParameter "Error: suboption '%s' of '%s' must have a parameter!\n"
|
||||
#define MSGTR_MissingOptionParameter "Error: option '%s' must have a parameter!\n"
|
||||
#define MSGTR_OptionListHeader "\n Name Type Min Max Global CL Cfg\n\n"
|
||||
#define MSGTR_TotalOptions "\nTotal: %d options\n"
|
||||
|
||||
// open.c, stream.c:
|
||||
#define MSGTR_CdDevNotfound "CD-ROM Device '%s' not found.\n"
|
||||
#define MSGTR_ErrTrackSelect "Error selecting VCD track."
|
||||
|
19
m_config.c
19
m_config.c
@ -11,6 +11,7 @@
|
||||
#include "m_config.h"
|
||||
#include "m_option.h"
|
||||
#include "mp_msg.h"
|
||||
#include "help_mp.h"
|
||||
|
||||
m_config_t*
|
||||
m_config_new(void) {
|
||||
@ -104,7 +105,7 @@ m_config_pop(m_config_t* config) {
|
||||
if(co->flags & M_CFG_OPT_ALIAS)
|
||||
continue;
|
||||
if(co->slots->lvl > config->lvl)
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_WARN,"Too old save slot found from lvl %d : %d !!!\n",config->lvl,co->slots->lvl);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_WARN,MSGTR_SaveSlotTooOld,config->lvl,co->slots->lvl);
|
||||
|
||||
while(co->slots->lvl >= config->lvl) {
|
||||
m_option_free(co->opt,co->slots->data);
|
||||
@ -239,11 +240,11 @@ m_config_parse_option(m_config_t *config, char* arg, char* param,int set) {
|
||||
|
||||
// Check if this option isn't forbiden in the current mode
|
||||
if((config->mode == M_CONFIG_FILE) && (co->opt->flags & M_OPT_NOCFG)) {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,"The %s option can't be used in a config file\n",arg);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidCfgfileOption,arg);
|
||||
return M_OPT_INVALID;
|
||||
}
|
||||
if((config->mode == M_COMMAND_LINE) && (co->opt->flags & M_OPT_NOCMD)) {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,"The %s option can't be used on the command line\n",arg);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidCmdlineOption,arg);
|
||||
return M_OPT_INVALID;
|
||||
}
|
||||
|
||||
@ -264,11 +265,11 @@ m_config_parse_option(m_config_t *config, char* arg, char* param,int set) {
|
||||
sr = m_config_parse_option(config,n,lst[2*i+1],set);
|
||||
if(sr < 0){
|
||||
if(sr == M_OPT_UNKNOWN){
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Error: option '%s' has no suboption '%s'\n",co->name,lst[2*i]);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_InvalidSuboption,co->name,lst[2*i]);
|
||||
r = M_OPT_INVALID;
|
||||
} else
|
||||
if(sr == M_OPT_MISSING_PARAM){
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Error: suboption '%s' of '%s' must have a parameter!\n",lst[2*i],co->name);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_MissingSuboptionParameter,lst[2*i],co->name);
|
||||
r = M_OPT_INVALID;
|
||||
} else
|
||||
r = sr;
|
||||
@ -305,7 +306,7 @@ m_config_check_option(m_config_t *config, char* arg, char* param) {
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_DBG2,"Checking %s=%s\n",arg,param);
|
||||
r=m_config_parse_option(config,arg,param,0);
|
||||
if(r==M_OPT_MISSING_PARAM){
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,"Error: option '%s' must have a parameter!\n",arg);
|
||||
mp_msg(MSGT_CFGPARSER, MSGL_ERR,MSGTR_MissingOptionParameter,arg);
|
||||
return M_OPT_INVALID;
|
||||
}
|
||||
return r;
|
||||
@ -351,7 +352,7 @@ m_config_print_option_list(m_config_t *config) {
|
||||
|
||||
if(!config->opts) return;
|
||||
|
||||
printf("\n Name Type Min Max Global CL Cfg\n\n");
|
||||
mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_OptionListHeader);
|
||||
for(co = config->opts ; co ; co = co->next) {
|
||||
m_option_t* opt = co->opt;
|
||||
if(opt->type->flags & M_OPT_TYPE_HAS_CHILD) continue;
|
||||
@ -363,7 +364,7 @@ m_config_print_option_list(m_config_t *config) {
|
||||
sprintf(max,"%-8.0f",opt->max);
|
||||
else
|
||||
strcpy(max,"No");
|
||||
printf(" %-20.20s %-15.15s %-10.10s %-10.10s %-3.3s %-3.3s %-3.3s\n",
|
||||
mp_msg(MSGT_FIXME, MSGL_FIXME, " %-20.20s %-15.15s %-10.10s %-10.10s %-3.3s %-3.3s %-3.3s\n",
|
||||
co->name,
|
||||
co->opt->type->name,
|
||||
min,
|
||||
@ -373,5 +374,5 @@ m_config_print_option_list(m_config_t *config) {
|
||||
opt->flags & CONF_NOCFG ? "No" : "Yes");
|
||||
count++;
|
||||
}
|
||||
printf("\nTotal: %d options\n",count);
|
||||
mp_msg(MSGT_FIXME, MSGL_FIXME, MSGTR_TotalOptions,count);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user