From 835c654bb0089933c5dd85a8ca123581cda1169e Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 14 Feb 2008 14:23:55 +0000 Subject: typo fix: inited --> initialized git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 6 +-- gui/mplayer/widgets.c | 6 +-- help/help_mp-en.h | 2 +- input/ar.c | 12 +++--- input/joystick.c | 6 +-- libaf/af_lavcac3enc.c | 6 +-- libao2/ao_mpegpes.c | 2 +- libmpcodecs/ad_ffmpeg.c | 6 +-- libmpcodecs/ae_lavc.c | 6 +-- libmpcodecs/dec_audio.c | 20 +++++----- libmpcodecs/dec_video.c | 22 +++++------ libmpcodecs/vd.c | 6 +-- libmpcodecs/vd_ffmpeg.c | 14 +++---- libmpcodecs/vd_libmpeg2.c | 2 +- libmpcodecs/vd_qtvideo.c | 8 ++-- libmpcodecs/vd_realvid.c | 10 ++--- libmpcodecs/vd_zrmjpeg.c | 6 +-- libmpcodecs/ve_lavc.c | 6 +-- libmpcodecs/ve_qtvideo.c | 6 +-- libmpcodecs/ve_xvid4.c | 2 +- libmpcodecs/vf_lavc.c | 6 +-- libmpcodecs/vf_lavcdeint.c | 6 +-- libmpcodecs/vf_zrmjpeg.c | 12 +++--- libmpdemux/demux_ogg.c | 8 ++-- libmpdemux/demux_ty_osd.c | 6 +-- libmpdemux/muxer_mpeg.c | 2 +- libmpdemux/stheader.h | 6 +-- libvo/jpeg_enc.c | 6 +-- libvo/mga_common.c | 2 +- libvo/vo_directx.c | 6 +-- libvo/vo_dxr2.c | 2 +- libvo/vo_vesa.c | 2 +- libvo/vo_x11.c | 2 +- libvo/vo_xmga.c | 8 ++-- libvo/vo_xv.c | 2 +- libvo/x11_common.c | 2 +- m_config.c | 6 +-- mencoder.c | 4 +- mp_core.h | 24 ++++++------ mp_msg.c | 2 +- mplayer.c | 98 +++++++++++++++++++++++----------------------- stream/stream_radio.c | 6 +-- stream/tvi_v4l2.c | 18 ++++----- sub_cc.c | 6 +-- 44 files changed, 198 insertions(+), 198 deletions(-) diff --git a/command.c b/command.c index 7267782361..c10ee903ca 100644 --- a/command.c +++ b/command.c @@ -843,7 +843,7 @@ static int mp_property_audio(m_option_t * prop, int action, void *arg, if (audio_id == -2 || (audio_id > -1 && mpctx->demuxer->audio->id != current_id && current_id != -2)) - uninit_player(INITED_AO | INITED_ACODEC); + uninit_player(INITIALIZED_AO | INITIALIZED_ACODEC); if (audio_id > -1 && mpctx->demuxer->audio->id != current_id) { sh_audio_t *sh2; sh2 = mpctx->demuxer->a_streams[mpctx->demuxer->audio->id]; @@ -901,8 +901,8 @@ static int mp_property_video(m_option_t * prop, int action, void *arg, if (video_id == -2 || (video_id > -1 && mpctx->demuxer->video->id != current_id && current_id != -2)) - uninit_player(INITED_VCODEC | - (fixed_vo && video_id != -2 ? 0 : INITED_VO)); + uninit_player(INITIALIZED_VCODEC | + (fixed_vo && video_id != -2 ? 0 : INITIALIZED_VO)); if (video_id > -1 && mpctx->demuxer->video->id != current_id) { sh_video_t *sh2; sh2 = mpctx->demuxer->v_streams[mpctx->demuxer->video->id]; diff --git a/gui/mplayer/widgets.c b/gui/mplayer/widgets.c index 1d4ee6123c..891b44b32f 100644 --- a/gui/mplayer/widgets.c +++ b/gui/mplayer/widgets.c @@ -35,7 +35,7 @@ GtkWidget * ErrorPixmap; int gtkPopupMenu = 0; int gtkPopupMenuParam = 0; -int gtkInited = 0; +int gtkInitialized = 0; #include "gtk/sb.h" #include "gtk/pl.h" @@ -78,7 +78,7 @@ void gtkInit( void ) gtk_widget_destroy( win ); } - gtkInited=1; + gtkInitialized=1; } void gtkAddIcon( GtkWidget * window ) @@ -115,7 +115,7 @@ void gtkEventHandling( void ) void gtkMessageBox( int type,const gchar * str ) { - if ( !gtkInited ) return; + if ( !gtkInitialized ) return; ShowMessageBox( str ); gtk_label_set_text( GTK_LABEL( gtkMessageBoxText ),str ); /* enable linewrapping by alex */ diff --git a/help/help_mp-en.h b/help/help_mp-en.h index fe8b2557e9..af2aae9f63 100644 --- a/help/help_mp-en.h +++ b/help/help_mp-en.h @@ -163,7 +163,7 @@ static char help_text[]= #define MSGTR_LinuxRTCInitErrorPieOn "Linux RTC init error in ioctl (rtc_pie_on): %s\n" #define MSGTR_UsingTimingType "Using %s timing.\n" #define MSGTR_NoIdleAndGui "The -idle option cannot be used with GMPlayer.\n" -#define MSGTR_MenuInitialized "Menu inited: %s\n" +#define MSGTR_MenuInitialized "Menu initialized: %s\n" #define MSGTR_MenuInitFailed "Menu init failed.\n" #define MSGTR_Getch2InitializedTwice "WARNING: getch2_init called twice!\n" #define MSGTR_DumpstreamFdUnavailable "Cannot dump this stream - no file descriptor available.\n" diff --git a/input/ar.c b/input/ar.c index 5b5659157f..7347b4c326 100644 --- a/input/ar.c +++ b/input/ar.c @@ -106,7 +106,7 @@ static const cookie_keycode_map_t *ar_codes; static IOHIDQueueInterface **queue; static IOHIDDeviceInterface **hidDeviceInterface = NULL; -static int inited = 0; +static int initialized = 0; static int hidDeviceIsOpen; /* Maximum number of elements in queue before oldest elements @@ -221,7 +221,7 @@ int mp_input_ar_init(void) IOHIDElementCookie *cookies = NULL; int nr_cookies = 0; - if (inited) + if (initialized) mp_input_ar_close(-1); if (floor(NSAppKitVersionNumber) <= 824 /* NSAppKitVersionNumber10_4 */) { @@ -286,7 +286,7 @@ int mp_input_ar_init(void) // not useful anymore IOObjectRelease(hidObjectIterator); - inited = 1; + initialized = 1; return 0; mp_input_ar_init_error: @@ -335,7 +335,7 @@ int mp_input_ar_read(int fd) char cookie_queue[MAX_QUEUE_SIZE]; int value_queue[MAX_QUEUE_SIZE]; - if (inited == 0) + if (initialized == 0) return MP_INPUT_NOTHING; while ((result = (*queue)->getNextEvent(queue, &event, zeroTime, 0)) == kIOReturnSuccess) { @@ -415,7 +415,7 @@ int mp_input_ar_read(int fd) void mp_input_ar_close(int fd) { - if (inited == 0) + if (initialized == 0) return; // Close the device. @@ -431,7 +431,7 @@ void mp_input_ar_close(int fd) // Release the interface. (*hidDeviceInterface)->Release(hidDeviceInterface); - inited = 0; + initialized = 0; } #ifdef TEST diff --git a/input/joystick.c b/input/joystick.c index 312cd90f4d..0fb2c041ed 100644 --- a/input/joystick.c +++ b/input/joystick.c @@ -33,7 +33,7 @@ int btns = 0; int mp_input_joystick_init(char* dev) { int fd,l=0; - int inited = 0; + int initialized = 0; struct js_event ev; mp_msg(MSGT_INPUT,MSGL_V,MSGTR_INPUT_JOYSTICK_Opening,dev ? dev : JS_DEV); @@ -44,7 +44,7 @@ int mp_input_joystick_init(char* dev) { return -1; } - while(! inited) { + while(! initialized) { l = 0; while((unsigned int)l < sizeof(struct js_event)) { int r = read(fd,((char*)&ev)+l,sizeof(struct js_event)-l); @@ -52,7 +52,7 @@ int mp_input_joystick_init(char* dev) { if(errno == EINTR) continue; else if(errno == EAGAIN) { - inited = 1; + initialized = 1; break; } mp_msg(MSGT_INPUT,MSGL_ERR,MSGTR_INPUT_JOYSTICK_ErrReading,strerror(errno)); diff --git a/libaf/af_lavcac3enc.c b/libaf/af_lavcac3enc.c index 8062c208c4..1208887ac1 100644 --- a/libaf/af_lavcac3enc.c +++ b/libaf/af_lavcac3enc.c @@ -45,7 +45,7 @@ typedef struct af_ac3enc_s { int min_channel_num; } af_ac3enc_t; -extern int avcodec_inited; +extern int avcodec_initialized; // Initialization and runtime control static int control(struct af_instance_s *af, int cmd, void *arg) @@ -287,10 +287,10 @@ static int af_open(af_instance_t* af){ af->data=calloc(1,sizeof(af_data_t)); af->setup=s; - if (!avcodec_inited){ + if (!avcodec_initialized){ avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } s->lavc_acodec = avcodec_find_encoder_by_name("ac3"); diff --git a/libao2/ao_mpegpes.c b/libao2/ao_mpegpes.c index fe3924f4ca..3e9f51725a 100644 --- a/libao2/ao_mpegpes.c +++ b/libao2/ao_mpegpes.c @@ -127,7 +127,7 @@ static int init_device(int card) mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO SET AV SYNC: %s\n", strerror(errno)); return -1; } - //FIXME: in vo_mpegpes audio was inited as MUTEd + //FIXME: in vo_mpegpes audio was initialized as MUTEd if((ioctl(vo_mpegpes_fd2,AUDIO_SET_MUTE, false) < 0)) { mp_msg(MSGT_VO, MSGL_ERR, "DVB AUDIO SET MUTE: %s\n", strerror(errno)); diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index 472323a5de..937f7a44a8 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -30,7 +30,7 @@ LIBAD_EXTERN(ffmpeg) #include "avcodec.h" #endif -extern int avcodec_inited; +extern int avcodec_initialized; static int preinit(sh_audio_t *sh) { @@ -45,10 +45,10 @@ static int init(sh_audio_t *sh_audio) AVCodec *lavc_codec; mp_msg(MSGT_DECAUDIO,MSGL_V,"FFmpeg's libavcodec audio codec\n"); - if(!avcodec_inited){ + if(!avcodec_initialized){ avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } lavc_codec = (AVCodec *)avcodec_find_decoder_by_name(sh_audio->codec->dll); diff --git a/libmpcodecs/ae_lavc.c b/libmpcodecs/ae_lavc.c index f8ba92ac56..a13fb7ec52 100644 --- a/libmpcodecs/ae_lavc.c +++ b/libmpcodecs/ae_lavc.c @@ -27,7 +27,7 @@ extern char *lavc_param_acodec; extern int lavc_param_abitrate; extern int lavc_param_atag; extern int lavc_param_audio_global_header; -extern int avcodec_inited; +extern int avcodec_initialized; static int compressed_frame_size = 0; #ifdef USE_LIBAVFORMAT #ifdef USE_LIBAVFORMAT_SO @@ -178,10 +178,10 @@ int mpae_init_lavc(audio_encoder_t *encoder) return 0; } - if(!avcodec_inited){ + if(!avcodec_initialized){ avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } lavc_acodec = avcodec_find_encoder_by_name(lavc_param_acodec); diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c index b7ce68f0b1..d20071b36f 100644 --- a/libmpcodecs/dec_audio.c +++ b/libmpcodecs/dec_audio.c @@ -98,7 +98,7 @@ static int init_audio_codec(sh_audio_t *sh_audio) return 0; } - sh_audio->inited = 1; + sh_audio->initialized = 1; if (!sh_audio->channels || !sh_audio->samplerate) { mp_msg(MSGT_DECAUDIO, MSGL_WARN, MSGTR_UnknownAudio); @@ -233,9 +233,9 @@ int init_best_audio_codec(sh_audio_t *sh_audio, char **audio_codec_list, if (!audio_codec_list) audio_codec_list = ac_l_default; // Go through the codec.conf and find the best codec... - sh_audio->inited = 0; + sh_audio->initialized = 0; stringset_init(&selected); - while (!sh_audio->inited && *audio_codec_list) { + while (!sh_audio->initialized && *audio_codec_list) { char *audio_codec = *(audio_codec_list++); if (audio_codec[0]) { if (audio_codec[0] == '-') { @@ -254,7 +254,7 @@ int init_best_audio_codec(sh_audio_t *sh_audio, char **audio_codec_list, if (audio_fm_list) { char **fmlist = audio_fm_list; // try first the preferred codec families: - while (!sh_audio->inited && *fmlist) { + while (!sh_audio->initialized && *fmlist) { char *audio_fm = *(fmlist++); mp_msg(MSGT_DECAUDIO, MSGL_INFO, MSGTR_TryForceAudioFmtStr, audio_fm); @@ -264,7 +264,7 @@ int init_best_audio_codec(sh_audio_t *sh_audio, char **audio_codec_list, break; } } - if (!sh_audio->inited) + if (!sh_audio->initialized) for (status = CODECS_STATUS__MAX; status >= CODECS_STATUS__MIN; --status) if (init_audio(sh_audio, NULL, NULL, status, &selected)) @@ -273,7 +273,7 @@ int init_best_audio_codec(sh_audio_t *sh_audio, char **audio_codec_list, } stringset_free(&selected); - if (!sh_audio->inited) { + if (!sh_audio->initialized) { mp_msg(MSGT_DECAUDIO, MSGL_ERR, MSGTR_CantFindAudioCodec, sh_audio->format); mp_msg(MSGT_DECAUDIO, MSGL_HINT, MSGTR_RTFMCodecs); @@ -293,7 +293,7 @@ void uninit_audio(sh_audio_t *sh_audio) free(sh_audio->afilter); sh_audio->afilter = NULL; } - if (sh_audio->inited) { + if (sh_audio->initialized) { mp_msg(MSGT_DECAUDIO, MSGL_V, MSGTR_UninitAudioStr, sh_audio->codec->drv); sh_audio->ad_driver->uninit(sh_audio); @@ -301,7 +301,7 @@ void uninit_audio(sh_audio_t *sh_audio) if (sh_audio->dec_handle) dlclose(sh_audio->dec_handle); #endif - sh_audio->inited = 0; + sh_audio->initialized = 0; } free(sh_audio->a_out_buffer); sh_audio->a_out_buffer = NULL; @@ -467,14 +467,14 @@ int decode_audio(sh_audio_t *sh_audio, int minlen) void resync_audio_stream(sh_audio_t *sh_audio) { sh_audio->a_in_buffer_len = 0; // clear audio input buffer - if (!sh_audio->inited) + if (!sh_audio->initialized) return; sh_audio->ad_driver->control(sh_audio, ADCTRL_RESYNC_STREAM, NULL); } void skip_audio_frame(sh_audio_t *sh_audio) { - if (!sh_audio->inited) + if (!sh_audio->initialized) return; if (sh_audio->ad_driver->control(sh_audio, ADCTRL_SKIP_FRAME, NULL) == CONTROL_TRUE) diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 403f29d4cd..ab63ec4006 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -152,7 +152,7 @@ int get_current_video_decoder_lag(sh_video_t *sh_video) } void uninit_video(sh_video_t *sh_video){ - if(!sh_video->inited) return; + if(!sh_video->initialized) return; mp_msg(MSGT_DECVIDEO,MSGL_V,MSGTR_UninitVideoStr,sh_video->codec->drv); mpvdec->uninit(sh_video); #ifdef DYNAMIC_PLUGINS @@ -160,7 +160,7 @@ void uninit_video(sh_video_t *sh_video){ dlclose(sh_video->dec_handle); #endif vf_uninit_filter_chain(sh_video->vfilter); - sh_video->inited=0; + sh_video->initialized=0; } void vfm_help(void){ @@ -180,7 +180,7 @@ static int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status, int force = 0; unsigned int orig_fourcc=sh_video->bih?sh_video->bih->biCompression:0; sh_video->codec=NULL; - sh_video->vf_inited=0; + sh_video->vf_initialized=0; if (codecname && codecname[0] == '+') { codecname = &codecname[1]; force = 1; @@ -259,8 +259,8 @@ static int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status, // init() mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_OpeningVideoDecoder,mpvdec->info->short_name,mpvdec->info->name); // clear vf init error, it is no longer relevant - if (sh_video->vf_inited < 0) - sh_video->vf_inited = 0; + if (sh_video->vf_initialized < 0) + sh_video->vf_initialized = 0; if(!mpvdec->init(sh_video)){ mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_VDecoderInitFailed); sh_video->disp_w=orig_w; @@ -272,7 +272,7 @@ static int init_video(sh_video_t *sh_video,char* codecname,char* vfm,int status, continue; // try next... } // Yeah! We got it! - sh_video->inited=1; + sh_video->initialized=1; return 1; } return 0; @@ -284,9 +284,9 @@ stringset_t selected; // hack: if(!video_codec_list) video_codec_list=vc_l_default; // Go through the codec.conf and find the best codec... -sh_video->inited=0; +sh_video->initialized=0; stringset_init(&selected); -while(!sh_video->inited && *video_codec_list){ +while(!sh_video->initialized && *video_codec_list){ char* video_codec=*(video_codec_list++); if(video_codec[0]){ if(video_codec[0]=='-'){ @@ -303,21 +303,21 @@ while(!sh_video->inited && *video_codec_list){ if(video_fm_list){ char** fmlist=video_fm_list; // try first the preferred codec families: - while(!sh_video->inited && *fmlist){ + while(!sh_video->initialized && *fmlist){ char* video_fm=*(fmlist++); mp_msg(MSGT_DECVIDEO,MSGL_INFO,MSGTR_TryForceVideoFmtStr,video_fm); for(status=CODECS_STATUS__MAX;status>=CODECS_STATUS__MIN;--status) if(init_video(sh_video,NULL,video_fm,status, &selected)) break; } } - if(!sh_video->inited) + if(!sh_video->initialized) for(status=CODECS_STATUS__MAX;status>=CODECS_STATUS__MIN;--status) if(init_video(sh_video,NULL,NULL,status, &selected)) break; } } stringset_free(&selected); -if(!sh_video->inited){ +if(!sh_video->initialized){ mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_CantFindVideoCodec,sh_video->format); mp_msg(MSGT_DECAUDIO,MSGL_HINT, MSGTR_RTFMCodecs); return 0; // failed diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 6bc8ba38ad..d287241890 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -225,7 +225,7 @@ csp_again: } } mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_VOincompCodec); - sh->vf_inited=-1; + sh->vf_initialized=-1; return 0; // failed } out_fmt=sh->codec->outfmt[j]; @@ -312,11 +312,11 @@ csp_again: out_fmt)==0){ // "MPlayer",out_fmt)){ mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_CannotInitVO); - sh->vf_inited=-1; + sh->vf_initialized=-1; return 0; } - sh->vf_inited=1; + sh->vf_initialized=1; if (vo_gamma_gamma != 1000) set_video_colors(sh, "gamma", vo_gamma_gamma); diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index bdbb322694..60db717f58 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -33,7 +33,7 @@ LIBVD_EXTERN(ffmpeg) #include "xvmc_render.h" #endif -int avcodec_inited=0; +int avcodec_initialized=0; typedef struct { AVCodecContext *avctx; @@ -41,7 +41,7 @@ typedef struct { enum PixelFormat pix_fmt; int do_slices; int do_dr1; - int vo_inited; + int vo_initialized; int best_csp; int b_age; int ip_age[2]; @@ -227,10 +227,10 @@ static int init(sh_video_t *sh){ int lowres_w=0; int do_vis_debug= lavc_param_vismv || (lavc_param_debug&(FF_DEBUG_VIS_MB_TYPE|FF_DEBUG_VIS_QP)); - if(!avcodec_inited){ + if(!avcodec_initialized){ avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; av_log_set_callback(mp_msp_av_log_callback); } @@ -501,7 +501,7 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ width != sh->disp_w || height != sh->disp_h || pix_fmt != ctx->pix_fmt || - !ctx->vo_inited) + !ctx->vo_initialized) { mp_msg(MSGT_DECVIDEO, MSGL_V, "[ffmpeg] aspect_ratio: %f\n", aspect); if (sh->aspect == 0 || @@ -541,7 +541,7 @@ static int init_vo(sh_video_t *sh, enum PixelFormat pix_fmt){ } if (!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h, ctx->best_csp)) return -1; - ctx->vo_inited = 1; + ctx->vo_initialized = 1; } return 0; } @@ -742,7 +742,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ if (!dr1) avctx->draw_horiz_band=NULL; avctx->opaque=sh; - if(ctx->vo_inited && !(flags&3) && !dr1){ + if(ctx->vo_initialized && !(flags&3) && !dr1){ mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE | (ctx->do_slices?MP_IMGFLAG_DRAW_CALLBACK:0), sh->disp_w, sh->disp_h); diff --git a/libmpcodecs/vd_libmpeg2.c b/libmpcodecs/vd_libmpeg2.c index d28574fb18..81c1a1d8a3 100644 --- a/libmpcodecs/vd_libmpeg2.c +++ b/libmpcodecs/vd_libmpeg2.c @@ -173,7 +173,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ pw = info->sequence->display_width * info->sequence->pixel_width; ph = info->sequence->display_height * info->sequence->pixel_height; if(ph) sh->aspect = (float) pw / (float) ph; - // video parameters inited/changed, (re)init libvo: + // video parameters initialized/changed, (re)init libvo: if (info->sequence->width >> 1 == info->sequence->chroma_width && info->sequence->height >> 1 == info->sequence->chroma_height) { if(!mpcodecs_config_vo(sh, diff --git a/libmpcodecs/vd_qtvideo.c b/libmpcodecs/vd_qtvideo.c index 1d8f405b12..b23a8f2ee1 100644 --- a/libmpcodecs/vd_qtvideo.c +++ b/libmpcodecs/vd_qtvideo.c @@ -95,7 +95,7 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){ return CONTROL_UNKNOWN; } -static int codec_inited=0; +static int codec_initialized=0; // init driver static int init(sh_video_t *sh){ @@ -106,7 +106,7 @@ static int init(sh_video_t *sh){ CodecInfo cinfo; // for ImageCodecGetCodecInfo() ImageSubCodecDecompressCapabilities icap; // for ImageCodecInitialize() - codec_inited = 0; + codec_initialized = 0; #ifdef MACOSX EnterMovies(); #else @@ -315,7 +315,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ decpar.bufferSize = len; (**framedescHandle).dataSize=len; -if(!codec_inited){ +if(!codec_initialized){ result = QTNewGWorldFromPtr( &OutBufferGWorld, // kYUVSPixelFormat, //pixel format of new GWorld == YUY2 @@ -382,7 +382,7 @@ if(!codec_inited){ // printf("ImageCodecPreDecompress cres=0x%X\n",cres); - codec_inited=1; + codec_initialized=1; } #if 0 diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c index bb28e15b06..dee690a895 100644 --- a/libmpcodecs/vd_realvid.c +++ b/libmpcodecs/vd_realvid.c @@ -58,7 +58,7 @@ static unsigned long WINAPI (*wrvyuv_transform)(char*, char*,transform_in_t*,uns #endif static void *rv_handle=NULL; -static int inited=0; +static int initialized=0; static uint8_t *buffer = NULL; static int bufsz = 0; #ifdef USE_WIN32DLL @@ -341,7 +341,7 @@ static void uninit(sh_video_t *sh){ if(rv_handle) dlclose(rv_handle); #endif rv_handle=NULL; - inited = 0; + initialized = 0; if (buffer) free(buffer); buffer = NULL; @@ -392,12 +392,12 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ result=(*rvyuv_transform)(dp_data, buffer, &transform_in, transform_out, sh->context); - if(!inited){ // rv30 width/height now known + if(!initialized){ // rv30 width/height now known sh->aspect=(float)sh->disp_w/(float)sh->disp_h; sh->disp_w=transform_out[3]; sh->disp_h=transform_out[4]; if (!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_I420)) return 0; - inited=1; + initialized=1; } mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0 /*MP_IMGFLAG_ACCEPT_STRIDE*/, sh->disp_w, sh->disp_h); @@ -411,7 +411,7 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ if(transform_out[0] && (sh->disp_w != transform_out[3] || sh->disp_h != transform_out[4])) - inited = 0; + initialized = 0; return (result?NULL:mpi); } diff --git a/libmpcodecs/vd_zrmjpeg.c b/libmpcodecs/vd_zrmjpeg.c index e4f51d9096..c33c71778a 100644 --- a/libmpcodecs/vd_zrmjpeg.c +++ b/libmpcodecs/vd_zrmjpeg.c @@ -33,7 +33,7 @@ LIBVD_EXTERN(zrmjpeg) #include "libvo/video_out.h" typedef struct { - int vo_inited; + int vo_initialized; unsigned int preferred_csp; } vd_zrmjpeg_ctx_t; @@ -215,12 +215,12 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags) { mp_image_t* mpi; vd_zrmjpeg_ctx_t *ctx = sh->context; - if (!ctx->vo_inited) { + if (!ctx->vo_initialized) { ctx->preferred_csp = guess_mjpeg_type(data, len, sh->disp_h); if (ctx->preferred_csp == 0) return NULL; mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, ctx->preferred_csp); - ctx->vo_inited = 1; + ctx->vo_initialized = 1; } mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index 07541c3c99..552779d7e9 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -36,7 +36,7 @@ extern char* passtmpfile; #include "libavcodec/avcodec.h" #endif -extern int avcodec_inited; +extern int avcodec_initialized; /* video options */ static char *lavc_param_vcodec = "mpeg4"; @@ -1019,10 +1019,10 @@ static int vf_open(vf_instance_t *vf, char* args){ mux_v->bih->biCompression = mmioFOURCC(lavc_param_vcodec[0], lavc_param_vcodec[1], lavc_param_vcodec[2], lavc_param_vcodec[3]); /* FIXME!!! */ - if (!avcodec_inited){ + if (!avcodec_initialized){ avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } vf->priv->codec = (AVCodec *)avcodec_find_encoder_by_name(lavc_param_vcodec); diff --git a/libmpcodecs/ve_qtvideo.c b/libmpcodecs/ve_qtvideo.c index fee22005dd..23c63bc655 100644 --- a/libmpcodecs/ve_qtvideo.c +++ b/libmpcodecs/ve_qtvideo.c @@ -170,7 +170,7 @@ static int query_format(struct vf_instance_s* vf, unsigned int fmt){ return 0; } -static int codec_inited = 0; +static int codec_initialized = 0; static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ @@ -182,7 +182,7 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ int width = mpi->width; int height = mpi->height; int stride = width*2; -if(!codec_inited){ +if(!codec_initialized){ FrameRect.top=0; FrameRect.left=0; FrameRect.right=width; @@ -243,7 +243,7 @@ if(!codec_inited){ mp_msg(MSGT_MENCODER,MSGL_DBG2,"Sequence ID:%i\n",seq); dump_ImageDescription(*desc); - codec_inited++; + codec_initialized++; } cres = CompressSequenceFrame ( seq, diff --git a/libmpcodecs/ve_xvid4.c b/libmpcodecs/ve_xvid4.c index 09958ad0e4..c1759061e6 100644 --- a/libmpcodecs/ve_xvid4.c +++ b/libmpcodecs/ve_xvid4.c @@ -1283,7 +1283,7 @@ flush_internal_buffers(xvid_mplayer_module_t *mod) xvid_enc_frame_t *frame = &mod->frame; if (mod->instance == NULL) - return;/*encoder not inited*/ + return; /* encoder not initialized */ /* Init a fake frame to force flushing */ frame->version = XVID_VERSION; diff --git a/libmpcodecs/vf_lavc.c b/libmpcodecs/vf_lavc.c index db4fbc727d..ca8656441c 100644 --- a/libmpcodecs/vf_lavc.c +++ b/libmpcodecs/vf_lavc.c @@ -17,7 +17,7 @@ #include "libavcodec/avcodec.h" #endif -extern int avcodec_inited; +extern int avcodec_initialized; struct vf_priv_s { unsigned char* outbuf; @@ -127,10 +127,10 @@ static int open(vf_instance_t *vf, char* args){ vf->priv=malloc(sizeof(struct vf_priv_s)); memset(vf->priv,0,sizeof(struct vf_priv_s)); - if (!avcodec_inited){ + if (!avcodec_initialized){ avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } vf->priv->codec = (AVCodec *)avcodec_find_encoder_by_name("mpeg1video"); diff --git a/libmpcodecs/vf_lavcdeint.c b/libmpcodecs/vf_lavcdeint.c index 173c17612b..271855694b 100644 --- a/libmpcodecs/vf_lavcdeint.c +++ b/libmpcodecs/vf_lavcdeint.c @@ -17,7 +17,7 @@ #include "libavcodec/avcodec.h" #endif -extern int avcodec_inited; +extern int avcodec_initialized; struct vf_priv_s { @@ -162,11 +162,11 @@ open (vf_instance_t *vf, char* args) /* This may not technically be necessary just for a deinterlace, * but it seems like a good idea. */ - if(!avcodec_inited) + if(!avcodec_initialized) { avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } return 1; diff --git a/libmpcodecs/vf_zrmjpeg.c b/libmpcodecs/vf_zrmjpeg.c index 91a88eb9b1..d74a4db9f5 100644 --- a/libmpcodecs/vf_zrmjpeg.c +++ b/libmpcodecs/vf_zrmjpeg.c @@ -39,7 +39,7 @@ #undef free #undef realloc -extern int avcodec_inited; +extern int avcodec_initialized; /* some convenient #define's, is this portable enough? */ /// Printout with vf_zrmjpeg: prefix at VERBOSE level @@ -52,7 +52,7 @@ extern int avcodec_inited; // "local" flag in vd_ffmpeg.c. If not set, avcodec_init() et. al. need to be called // set when init is done, so that initialization is not done twice. -extern int avcodec_inited; +extern int avcodec_initialized; /// structure copied from mjpeg.c /* zrmjpeg_encode_mb needs access to these tables for the black & white @@ -479,10 +479,10 @@ static jpeg_enc_t *jpeg_enc_init(int w, int h, int y_rsize, /* if libavcodec is used by the decoder then we must not * initialize again, but if it is not initialized then we must * initialize it here. */ - if (!avcodec_inited) { + if (!avcodec_initialized) { avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } // Build mjpeg huffman code tables, setting up j->s->mjpeg_ctx @@ -921,11 +921,11 @@ static int open(vf_instance_t *vf, char* args){ /* if libavcodec is already initialized, we must not initialize it * again, but if it is not initialized then we mustinitialize it now. */ - if (!avcodec_inited) { + if (!avcodec_initialized) { /* we need to initialize libavcodec */ avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } if (args) { diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c index 717f3ccd8d..44816cf3bc 100644 --- a/libmpdemux/demux_ogg.c +++ b/libmpdemux/demux_ogg.c @@ -111,7 +111,7 @@ typedef struct ogg_stream { int id; vorbis_info vi; - int vi_inited; + int vi_initialized; void *ogg_d; } ogg_stream_t; @@ -245,7 +245,7 @@ static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,vo if(os->vorbis) { if(*pack->packet & PACKET_TYPE_HEADER) os->hdr_packets++; - else if (os->vi_inited) + else if (os->vi_initialized) { vorbis_info *vi; int32_t blocksize; @@ -690,7 +690,7 @@ static void fixup_vorbis_wf(sh_audio_t *sh, ogg_demuxer_t *od) } vorbis_comment_clear(&vc); if(!init_error) - os->vi_inited = 1; + os->vi_initialized = 1; len = op[0].bytes + op[1].bytes + op[2].bytes; sh->wf = calloc(1, sizeof(WAVEFORMATEX) + len + len/255 + 64); @@ -1519,7 +1519,7 @@ static void demux_close_ogg(demuxer_t* demuxer) { { os = &ogg_d->subs[i]; ogg_stream_clear(&os->stream); - if(os->vi_inited) + if(os->vi_initialized) vorbis_info_clear(&os->vi); } free(ogg_d->subs); diff --git a/libmpdemux/demux_ty_osd.c b/libmpdemux/demux_ty_osd.c index 03fb45f9d3..5b484999d6 100644 --- a/libmpdemux/demux_ty_osd.c +++ b/libmpdemux/demux_ty_osd.c @@ -61,7 +61,7 @@ static subtitle ty_OSD1; static subtitle ty_OSD2; static subtitle *ty_pOSD1; static subtitle *ty_pOSD2; -static int tyOSDInited = 0; +static int tyOSDInitialized = 0; static int tyOSDUpdate = 0; static void ty_DrawOSD(void) @@ -870,7 +870,7 @@ void ty_processuserdata( unsigned char* buf, int len ) if ( subcc_enabled ) { - if ( tyOSDInited == 0 ) + if ( tyOSDInitialized == 0 ) { for ( index = 0; index < SUB_MAX_TEXT ; index++ ) { @@ -883,7 +883,7 @@ void ty_processuserdata( unsigned char* buf, int len ) ty_pOSD1 = &ty_OSD1; ty_pOSD2 = &ty_OSD2; tyOSDUpdate = 0; - tyOSDInited = 1; + tyOSDInitialized = 1; } if ( buf[ 0 ] == 0x01 ) diff --git a/libmpdemux/muxer_mpeg.c b/libmpdemux/muxer_mpeg.c index 68f2d8f01f..c32262359c 100644 --- a/libmpdemux/muxer_mpeg.c +++ b/libmpdemux/muxer_mpeg.c @@ -1111,7 +1111,7 @@ static int get_packet_stats(muxer_priv_t *priv, muxer_stream_t *s, pack_stats_t static int fill_packet(muxer_t *muxer, muxer_stream_t *s, int finalize) { //try to fill a packet as much as possible - //spriv->pack_offset is the start position inited to 0 + //spriv->pack_offset is the start position initialized to 0 //data is taken from spriv->framebuf //if audio and a52 insert the headers muxer_priv_t *priv = (muxer_priv_t *) muxer->priv; diff --git a/libmpdemux/stheader.h b/libmpdemux/stheader.h index 7fb897cdd7..1c727f07c8 100644 --- a/libmpdemux/stheader.h +++ b/libmpdemux/stheader.h @@ -11,7 +11,7 @@ typedef struct { demux_stream_t *ds; struct codecs_st *codec; unsigned int format; - int inited; + int initialized; float stream_delay; // number of seconds stream should be delayed (according to dwStart or similar) // output format: int sample_format; @@ -56,7 +56,7 @@ typedef struct { demux_stream_t *ds; struct codecs_st *codec; unsigned int format; - int inited; + int initialized; float timer; // absolute time in video stream, since last start/seek float stream_delay; // number of seconds stream should be delayed (according to dwStart or similar) // frame counters: @@ -79,7 +79,7 @@ typedef struct { // output driver/filters: (set by libmpcodecs core) unsigned int outfmtidx; struct vf_instance_s *vfilter; // the video filter chain, used for this video stream - int vf_inited; + int vf_initialized; #ifdef DYNAMIC_PLUGINS void *dec_handle; #endif diff --git a/libvo/jpeg_enc.c b/libvo/jpeg_enc.c index a97acb8f6c..6e7fa2dacd 100644 --- a/libvo/jpeg_enc.c +++ b/libvo/jpeg_enc.c @@ -39,7 +39,7 @@ #include "jpeg_enc.h" -extern int avcodec_inited; +extern int avcodec_initialized; /* Begin excessive code duplication ************************************/ @@ -319,11 +319,11 @@ jpeg_enc_t *jpeg_enc_init(int w, int h, int y_psize, int y_rsize, /* if libavcodec is used by the decoder then we must not * initialize again, but if it is not initialized then we must * initialize it here. */ - if (!avcodec_inited) { + if (!avcodec_initialized) { /* we need to initialize libavcodec */ avcodec_init(); avcodec_register_all(); - avcodec_inited=1; + avcodec_initialized=1; } if (ff_mjpeg_encode_init(j->s) < 0) { diff --git a/libvo/mga_common.c b/libvo/mga_common.c index dce62abeac..b150b18012 100644 --- a/libvo/mga_common.c +++ b/libvo/mga_common.c @@ -327,7 +327,7 @@ static int control(uint32_t request, void *data, ...) vo_x11_ontop(); return VO_TRUE; case VOCTRL_GET_PANSCAN: - if ( !inited || !vo_fs ) return VO_FALSE; + if ( !initialized || !vo_fs ) return VO_FALSE; return VO_TRUE; case VOCTRL_FULLSCREEN: vo_x11_fullscreen(); diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index fd2693460d..356304ce6e 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -375,7 +375,7 @@ static void uninit(void) FreeLibrary( hddraw_dll); hddraw_dll= NULL; mp_msg(MSGT_VO, MSGL_DBG3,"ddraw.dll freed\n"); - mp_msg(MSGT_VO, MSGL_DBG3,"uninited\n"); + mp_msg(MSGT_VO, MSGL_DBG3,"uninitialized\n"); } static BOOL WINAPI EnumCallbackEx(GUID FAR *lpGUID, LPSTR lpDriverDescription, LPSTR lpDriverName, LPVOID lpContext, HMONITOR hm) @@ -509,7 +509,7 @@ static uint32_t Directx_InitDirectDraw() mp_msg(MSGT_VO, MSGL_FATAL,"can't set displaymode\n"); return 1; } - mp_msg(MSGT_VO, MSGL_V,"Inited adapter %i for %i x %i @ %i \n",vo_adapter_num,vm_width,vm_height,vm_bpp); + mp_msg(MSGT_VO, MSGL_V,"Initialized adapter %i for %i x %i @ %i \n",vo_adapter_num,vm_width,vm_height,vm_bpp); return 0; } if (g_lpdd->lpVtbl->SetCooperativeLevel(g_lpdd, hWnd, DDSCL_NORMAL) != DD_OK) // or DDSCL_SETFOCUSWINDOW @@ -517,7 +517,7 @@ static uint32_t Directx_InitDirectDraw() mp_msg(MSGT_VO, MSGL_FATAL,"could not set cooperativelevel for hardwarecheck\n"); return 1; } - mp_msg(MSGT_VO, MSGL_DBG3,"DirectDraw Inited\n"); + mp_msg(MSGT_VO, MSGL_DBG3,"DirectDraw Initialized\n"); return 0; } diff --git a/libvo/vo_dxr2.c b/libvo/vo_dxr2.c index 37f093ec98..93ad86f610 100644 --- a/libvo/vo_dxr2.c +++ b/libvo/vo_dxr2.c @@ -841,7 +841,7 @@ static int preinit(const char *arg) { use_ol = 0; } else { uint32_t fmt = IMGFMT_BGR24; - mp_msg(MSGT_VO,MSGL_V,"VO: [dxr2] Sub vo %s inited\n",arg); + mp_msg(MSGT_VO,MSGL_V,"VO: [dxr2] Sub vo %s initialized\n",arg); if(sub_vo->control(VOCTRL_QUERY_FORMAT,&fmt) <= 0) { mp_msg(MSGT_VO,MSGL_WARN,"VO: [dxr2] Sub vo %s doesn't support BGR24 => no overlay\n",arg); sub_vo->uninit(); diff --git a/libvo/vo_vesa.c b/libvo/vo_vesa.c index 0e64c6621f..0eaa47b07b 100644 --- a/libvo/vo_vesa.c +++ b/libvo/vo_vesa.c @@ -1046,7 +1046,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin static void uninit(void) { - // not inited + // not initialized vesa_term(); if( mp_msg_test(MSGT_VO,MSGL_DBG3) ) mp_msg(MSGT_VO,MSGL_DBG3, "vo_vesa: uninit was called\n"); diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index c5e5a2a069..ca79dab24f 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -25,7 +25,7 @@ static int Shmem_Flag; -//static int Quiet_Flag; Here also what is this for. It's used but isn't inited ? +//static int Quiet_Flag; Here also what is this for. It's used but isn't initialized? static XShmSegmentInfo Shminfo[1]; static int gXErrorFlag; static int CompletionType = -1; diff --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index 1ca7acd9c6..175bda9533 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -68,7 +68,7 @@ static Window mRoot; static XSetWindowAttributes xWAttribs; -static int inited = 0; +static int initialized = 0; #define VO_XMGA #include "mga_common.c" @@ -169,7 +169,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey); - inited = 1; + initialized = 1; #ifdef HAVE_NEW_GUI if (use_gui) @@ -262,8 +262,8 @@ static void uninit(void) { mp_msg(MSGT_VO, MSGL_V, "vo: uninit!\n"); mga_uninit(); - if (!inited) + if (!initialized) return; // no window? - inited = 0; + initialized = 0; vo_x11_uninit(); // destroy the window } diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c index 2a3898889c..7584a74c43 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -45,7 +45,7 @@ Buffer allocation: #include "gui/interface.h" #endif -#include "libavutil/common.h" +#include "ffmpeg/libavutil/common.h" static const vo_info_t info = { "X11/Xv", diff --git a/libvo/x11_common.c b/libvo/x11_common.c index bf92a37032..2ed8ff31c6 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -546,7 +546,7 @@ void vo_uninit(void) if (!mDisplay) { mp_msg(MSGT_VO, MSGL_V, - "vo: x11 uninit called but X11 not inited..\n"); + "vo: x11 uninit called but X11 not initialized..\n"); return; } // if( !vo_depthonscreen ) return; diff --git a/m_config.c b/m_config.c index c6cbbc89ad..080bbe4e36 100644 --- a/m_config.c +++ b/m_config.c @@ -37,7 +37,7 @@ list_options(m_option_t *opt, char* name, char *param); m_config_t* m_config_new(void) { m_config_t* config; - static int inited = 0; + static int initialized = 0; static m_option_type_t profile_opt_type; static m_option_t ref_opts[] = { { "profile", NULL, &profile_opt_type, CONF_NOSAVE, 0, 0, NULL }, @@ -49,8 +49,8 @@ m_config_new(void) { config = calloc(1,sizeof(m_config_t)); config->lvl = 1; // 0 Is the defaults - if(!inited) { - inited = 1; + if(!initialized) { + initialized = 1; profile_opt_type = m_option_type_string_list; profile_opt_type.parse = parse_profile; profile_opt_type.set = set_profile; diff --git a/mencoder.c b/mencoder.c index f6a0783605..8f9937dc28 100644 --- a/mencoder.c +++ b/mencoder.c @@ -876,7 +876,7 @@ default: { mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); init_best_video_codec(sh_video,video_codec_list,video_fm_list); mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); - if(!sh_video->inited) mencoder_exit(1,NULL); + if(!sh_video->initialized) mencoder_exit(1,NULL); } } @@ -1330,7 +1330,7 @@ default: skip_flag>0 && (!sh_video->vfilter || ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_SKIP_NEXT_FRAME, 0) != CONTROL_TRUE), MP_NOPTS_VALUE); blit_frame = decoded_frame && filter_video(sh_video, decoded_frame, MP_NOPTS_VALUE);} - if (sh_video->vf_inited < 0) mencoder_exit(1, NULL); + if (sh_video->vf_initialized < 0) mencoder_exit(1, NULL); if(!blit_frame){ if (play_n_frames >= 0) diff --git a/mp_core.h b/mp_core.h index 01373f7abf..4bf612db64 100644 --- a/mp_core.h +++ b/mp_core.h @@ -5,18 +5,18 @@ // definitions used internally by the core player code -#define INITED_VO 1 -#define INITED_AO 2 -#define INITED_GUI 4 -#define INITED_GETCH2 8 -#define INITED_SPUDEC 32 -#define INITED_STREAM 64 -#define INITED_INPUT 128 -#define INITED_VOBSUB 256 -#define INITED_DEMUXER 512 -#define INITED_ACODEC 1024 -#define INITED_VCODEC 2048 -#define INITED_ALL 0xFFFF +#define INITIALIZED_VO 1 +#define INITIALIZED_AO 2 +#define INITIALIZED_GUI 4 +#define INITIALIZED_GETCH2 8 +#define INITIALIZED_SPUDEC 32 +#define INITIALIZED_STREAM 64 +#define INITIALIZED_INPUT 128 +#define INITIALIZED_VOBSUB 256 +#define INITIALIZED_DEMUXER 512 +#define INITIALIZED_ACODEC 1024 +#define INITIALIZED_VCODEC 2048 +#define INITIALIZED_ALL 0xFFFF #define SUB_SOURCE_SUBS 0 diff --git a/mp_msg.c b/mp_msg.c index 70c2ef1394..30ae209d29 100644 --- a/mp_msg.c +++ b/mp_msg.c @@ -27,7 +27,7 @@ int use_gui; /* maximum message length of mp_msg */ #define MSGSIZE_MAX 3072 -int mp_msg_levels[MSGT_MAX]; // verbose level of this module. inited to -2 +int mp_msg_levels[MSGT_MAX]; // verbose level of this module. initialized to -2 int mp_msg_level_all = MSGL_STATUS; int verbose = 0; #ifdef USE_ICONV diff --git a/mplayer.c b/mplayer.c index 50ea3109d7..cd0a903a25 100644 --- a/mplayer.c +++ b/mplayer.c @@ -369,7 +369,7 @@ short edl_decision = 0; ///< 1 when an EDL operation has been made. FILE* edl_fd = NULL; ///< fd to write to when in -edlout mode. int use_filedir_conf; -static unsigned int inited_flags=0; +static unsigned int initialized_flags=0; #include "mpcommon.h" #include "command.h" @@ -587,12 +587,12 @@ static void mp_dvdnav_context_free(MPContext *ctx){ #endif void uninit_player(unsigned int mask){ - mask=inited_flags&mask; + mask=initialized_flags&mask; mp_msg(MSGT_CPLAYER,MSGL_DBG2,"\n*** uninit(0x%X)\n",mask); - if(mask&INITED_ACODEC){ - inited_flags&=~INITED_ACODEC; + if(mask&INITIALIZED_ACODEC){ + initialized_flags&=~INITIALIZED_ACODEC; current_module="uninit_acodec"; if(mpctx->sh_audio) uninit_audio(mpctx->sh_audio); #ifdef HAVE_NEW_GUI @@ -602,8 +602,8 @@ void uninit_player(unsigned int mask){ mpctx->mixer.afilter = NULL; } - if(mask&INITED_VCODEC){ - inited_flags&=~INITED_VCODEC; + if(mask&INITIALIZED_VCODEC){ + initialized_flags&=~INITIALIZED_VCODEC; current_module="uninit_vcodec"; if(mpctx->sh_video) uninit_video(mpctx->sh_video); mpctx->sh_video=NULL; @@ -612,8 +612,8 @@ void uninit_player(unsigned int mask){ #endif } - if(mask&INITED_DEMUXER){ - inited_flags&=~INITED_DEMUXER; + if(mask&INITIALIZED_DEMUXER){ + initialized_flags&=~INITIALIZED_DEMUXER; current_module="free_demuxer"; if(mpctx->demuxer){ mpctx->stream=mpctx->demuxer->stream; @@ -623,15 +623,15 @@ void uninit_player(unsigned int mask){ } // kill the cache process: - if(mask&INITED_STREAM){ - inited_flags&=~INITED_STREAM; + if(mask&INITIALIZED_STREAM){ + initialized_flags&=~INITIALIZED_STREAM; current_module="uninit_stream"; if(mpctx->stream) free_stream(mpctx->stream); mpctx->stream=NULL; } - if(mask&INITED_VO){ - inited_flags&=~INITED_VO; + if(mask&INITIALIZED_VO){ + initialized_flags&=~INITIALIZED_VO; current_module="uninit_vo"; mpctx->video_out->uninit(); mpctx->video_out=NULL; @@ -641,45 +641,45 @@ void uninit_player(unsigned int mask){ } // Must be after libvo uninit, as few vo drivers (svgalib) have tty code. - if(mask&INITED_GETCH2){ - inited_flags&=~INITED_GETCH2; + if(mask&INITIALIZED_GETCH2){ + initialized_flags&=~INITIALIZED_GETCH2; current_module="uninit_getch2"; mp_msg(MSGT_CPLAYER,MSGL_DBG2,"\n[[[uninit getch2]]]\n"); // restore terminal: getch2_disable(); } - if(mask&INITED_VOBSUB){ - inited_flags&=~INITED_VOBSUB; + if(mask&INITIALIZED_VOBSUB){ + initialized_flags&=~INITIALIZED_VOBSUB; current_module="uninit_vobsub"; if(vo_vobsub) vobsub_close(vo_vobsub); vo_vobsub=NULL; } - if (mask&INITED_SPUDEC){ - inited_flags&=~INITED_SPUDEC; + if (mask&INITIALIZED_SPUDEC){ + initialized_flags&=~INITIALIZED_SPUDEC; current_module="uninit_spudec"; spudec_free(vo_spudec); vo_spudec=NULL; } - if(mask&INITED_AO){ - inited_flags&=~INITED_AO; + if(mask&INITIALIZED_AO){ + initialized_flags&=~INITIALIZED_AO; current_module="uninit_ao"; if (mpctx->edl_muted) mixer_mute(&mpctx->mixer); mpctx->audio_out->uninit(mpctx->eof?0:1); mpctx->audio_out=NULL; } #ifdef HAVE_NEW_GUI - if(mask&INITED_GUI){ - inited_flags&=~INITED_GUI; + if(mask&INITIALIZED_GUI){ + initialized_flags&=~INITIALIZED_GUI; current_module="uninit_gui"; guiDone(); } #endif - if(mask&INITED_INPUT){ - inited_flags&=~INITED_INPUT; + if(mask&INITIALIZED_INPUT){ + initialized_flags&=~INITIALIZED_INPUT; current_module="uninit_input"; mp_input_uninit(); #ifdef HAVE_MENU @@ -694,7 +694,7 @@ void uninit_player(unsigned int mask){ void exit_player_with_rc(const char* how, int rc){ if (mpctx->user_muted && !mpctx->edl_muted) mixer_mute(&mpctx->mixer); - uninit_player(INITED_ALL); + uninit_player(INITIALIZED_ALL); #ifdef HAVE_X11 #ifdef HAVE_NEW_GUI if ( !use_gui ) @@ -755,7 +755,7 @@ static void exit_sighandler(int x){ if (!crash_debug || x != SIGTRAP) #endif ++sig_count; - if(inited_flags==0 && sig_count>1) exit(1); + if(initialized_flags==0 && sig_count>1) exit(1); if(sig_count==5) { /* We're crashing bad and can't uninit cleanly :( @@ -1084,7 +1084,7 @@ void update_set_of_subtitles(void) void init_vo_spudec(void) { if (vo_spudec) spudec_free(vo_spudec); - inited_flags &= ~INITED_SPUDEC; + initialized_flags &= ~INITIALIZED_SPUDEC; vo_spudec = NULL; if (spudec_ifo) { unsigned int palette[16], width, height; @@ -1137,7 +1137,7 @@ void init_vo_spudec(void) { } if (vo_spudec!=NULL) - inited_flags|=INITED_SPUDEC; + initialized_flags|=INITIALIZED_SPUDEC; } /* @@ -1589,7 +1589,7 @@ if(mpctx->sh_audio){ mpctx->d_audio->id = -2; return; } else - inited_flags|=INITED_ACODEC; + initialized_flags|=INITIALIZED_ACODEC; mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); @@ -1617,13 +1617,13 @@ if(mpctx->sh_audio){ ao_data.format,0))){ // FAILED: mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_CannotInitAO); - uninit_player(INITED_ACODEC); // close codec + uninit_player(INITIALIZED_ACODEC); // close codec mpctx->sh_audio=mpctx->d_audio->sh=NULL; // -> nosound mpctx->d_audio->id = -2; return; } else { // SUCCESS: - inited_flags|=INITED_AO; + initialized_flags|=INITIALIZED_AO; mp_msg(MSGT_CPLAYER,MSGL_INFO,"AO: [%s] %dHz %dch %s (%d bytes per sample)\n", mpctx->audio_out->info->short_name, ao_data.samplerate, ao_data.channels, @@ -1639,7 +1639,7 @@ if(mpctx->sh_audio){ if(!build_afilter_chain(mpctx->sh_audio, &ao_data)) { mp_msg(MSGT_CPLAYER,MSGL_ERR,MSGTR_NoMatchingFilter); // mp_msg(MSGT_CPLAYER,MSGL_ERR,"Couldn't find matching filter / ao format! -> NOSOUND\n"); -// uninit_player(INITED_ACODEC|INITED_AO); // close codec & ao +// uninit_player(INITIALIZED_ACODEC|INITIALIZED_AO); // close codec & ao // sh_audio=mpctx->d_audio->sh=NULL; // -> nosound } #endif @@ -2121,7 +2121,7 @@ int reinit_video_chain(void) { sh_video_t * const sh_video = mpctx->sh_video; double ar=-1.0; //================== Init VIDEO (codec & libvo) ========================== - if(!fixed_vo || !(inited_flags&INITED_VO)){ + if(!fixed_vo || !(initialized_flags&INITIALIZED_VO)){ current_module="preinit_libvo"; //shouldn't we set dvideo->id=-2 when we fail? @@ -2131,7 +2131,7 @@ int reinit_video_chain(void) { mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_ErrorInitializingVODevice); goto err_out; } - inited_flags|=INITED_VO; + initialized_flags|=INITIALIZED_VO; } if(stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_ASPECT_RATIO, &ar) != STREAM_UNSUPPORTED) @@ -2190,12 +2190,12 @@ int reinit_video_chain(void) { init_best_video_codec(sh_video,video_codec_list,video_fm_list); mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n"); - if(!sh_video->inited){ - if(!fixed_vo) uninit_player(INITED_VO); + if(!sh_video->initialized){ + if(!fixed_vo) uninit_player(INITIALIZED_VO); goto err_out; } - inited_flags|=INITED_VCODEC; + initialized_flags|=INITIALIZED_VCODEC; if (sh_video->codec) mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_CODEC=%s\n", sh_video->codec->name); @@ -2879,7 +2879,7 @@ else if(!noconsolecontrols) } #endif -inited_flags|=INITED_INPUT; +initialized_flags|=INITIALIZED_INPUT; current_module = NULL; /// Catch signals @@ -2916,7 +2916,7 @@ current_module = NULL; if(use_gui){ guiInit(); guiGetEvent(guiSetContext, mpctx); - inited_flags|=INITED_GUI; + initialized_flags|=INITIALIZED_GUI; guiGetEvent( guiCEvent,(char *)((gui_no_filename) ? 0 : 1) ); } #endif @@ -2943,11 +2943,11 @@ play_next_file: // We must enable getch2 here to be able to interrupt network connection // or cache filling if(!noconsolecontrols && !slave_mode){ - if(inited_flags&INITED_GETCH2) + if(initialized_flags&INITIALIZED_GETCH2) mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_Getch2InitializedTwice); else getch2_enable(); // prepare stdin for hotkeys... - inited_flags|=INITED_GETCH2; + initialized_flags|=INITIALIZED_GETCH2; mp_msg(MSGT_CPLAYER,MSGL_DBG2,"\n[[[init getch2]]]\n"); } @@ -3096,7 +3096,7 @@ if (edl_output_filename) { free(buf); } if(vo_vobsub){ - inited_flags|=INITED_VOBSUB; + initialized_flags|=INITIALIZED_VOBSUB; vobsub_set_from_lang(vo_vobsub, dvdsub_lang); // check if vobsub requested only to display forced subtitles forced_subs_only=vobsub_get_forced_subs_flag(vo_vobsub); @@ -3127,7 +3127,7 @@ if (edl_output_filename) { mpctx->eof = libmpdemux_was_interrupted(PT_NEXT_ENTRY); goto goto_next_file; } - inited_flags|=INITED_STREAM; + initialized_flags|=INITIALIZED_STREAM; #ifdef HAVE_NEW_GUI if ( use_gui ) guiGetEvent( guiSetStream,(char *)mpctx->stream ); @@ -3283,7 +3283,7 @@ if(dvd_chapter>1) { demuxer_seek_chapter(mpctx->demuxer, dvd_chapter-1, 1, &pts, NULL, NULL); } -inited_flags|=INITED_DEMUXER; +initialized_flags|=INITIALIZED_DEMUXER; if (mpctx->stream->type != STREAMTYPE_DVD && mpctx->stream->type != STREAMTYPE_DVDNAV) { int i; @@ -3579,14 +3579,14 @@ if(!mpctx->sh_audio){ mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused audio chunks.\n",mpctx->d_audio->packs); ds_free_packs(mpctx->d_audio); // free buffered chunks //mpctx->d_audio->id=-2; // do not read audio chunks - //uninit_player(INITED_AO); // close device + //uninit_player(INITIALIZED_AO); // close device } if(!mpctx->sh_video){ mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Video_NoVideo); mp_msg(MSGT_CPLAYER,MSGL_V,"Freeing %d unused video chunks.\n",mpctx->d_video->packs); ds_free_packs(mpctx->d_video); mpctx->d_video->id=-2; - //if(!fixed_vo) uninit_player(INITED_VO); + //if(!fixed_vo) uninit_player(INITIALIZED_VO); } if (!mpctx->sh_video && !mpctx->sh_audio) @@ -3694,7 +3694,7 @@ if(!mpctx->sh_video) { if (!mpctx->num_buffered_frames) { double frame_time = update_video(&blit_frame); mp_dbg(MSGT_AVSYNC,MSGL_DBG2,"*** ftime=%5.3f ***\n",frame_time); - if (mpctx->sh_video->vf_inited < 0) { + if (mpctx->sh_video->vf_initialized < 0) { mp_msg(MSGT_CPLAYER,MSGL_FATAL, MSGTR_NotInitializeVOPorVO); mpctx->eof = 1; goto goto_next_file; } @@ -3896,7 +3896,7 @@ mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d \n",mpctx->eof); if(mpctx->dvbin_reopen) { mpctx->eof = 0; - uninit_player(INITED_ALL-(INITED_GUI|INITED_STREAM|INITED_INPUT|INITED_GETCH2|(fixed_vo?INITED_VO:0))); + uninit_player(INITIALIZED_ALL-(INITIALIZED_GUI|INITIALIZED_STREAM|INITIALIZED_INPUT|INITIALIZED_GETCH2|(fixed_vo?INITIALIZED_VO:0))); cache_uninit(mpctx->stream); mpctx->dvbin_reopen = 0; goto goto_enable_cache; @@ -3935,7 +3935,7 @@ if(benchmark){ } // time to uninit all, except global stuff: -uninit_player(INITED_ALL-(INITED_GUI+INITED_INPUT+(fixed_vo?INITED_VO:0))); +uninit_player(INITIALIZED_ALL-(INITIALIZED_GUI+INITIALIZED_INPUT+(fixed_vo?INITIALIZED_VO:0))); if ( mpctx->set_of_sub_size > 0 ) { diff --git a/stream/stream_radio.c b/stream/stream_radio.c index 85607f6fa9..d5a91aa471 100644 --- a/stream/stream_radio.c +++ b/stream/stream_radio.c @@ -125,7 +125,7 @@ typedef struct radio_priv_s { int audio_buffer_size; ///< size of ringbuffer int audio_cnt; ///< size of meanfull data inringbuffer int audio_drop; ///< number of dropped bytes - int audio_inited; + int audio_initialized; #endif radio_param_t *radio_param; } radio_priv_t; @@ -822,7 +822,7 @@ static int init_audio(radio_priv_t *priv) int is_oss=1; int seconds=2; char* tmp; - if (priv->audio_inited) return 1; + if (priv->audio_initialized) return 1; /* do_capture==0 mplayer was not started with capture keyword, so disabling capture*/ if(!priv->do_capture) @@ -885,7 +885,7 @@ static int init_audio(radio_priv_t *priv) audio_in_start_capture(&priv->audio_in); - priv->audio_inited = 1; + priv->audio_initialized = 1; return STREAM_OK; } diff --git a/stream/tvi_v4l2.c b/stream/tvi_v4l2.c index c9fae4b8a1..638787f416 100644 --- a/stream/tvi_v4l2.c +++ b/stream/tvi_v4l2.c @@ -133,7 +133,7 @@ typedef struct { volatile int audio_drop; volatile int shutdown; - int audio_inited; + int audio_initialized; double audio_secs_per_block; long long audio_usecs_per_block; long long audio_skew_total; @@ -365,7 +365,7 @@ static void setup_audio_buffer_sizes(priv_t *priv) static void init_audio(priv_t *priv) { - if (priv->audio_inited) return; + if (priv->audio_initialized) return; if (!priv->tv_param->noaudio) { #if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) @@ -398,7 +398,7 @@ static void init_audio(priv_t *priv) if (audio_in_setup(&priv->audio_in) < 0) return; - priv->audio_inited = 1; + priv->audio_initialized = 1; } } @@ -960,28 +960,28 @@ static int control(priv_t *priv, int cmd, void *arg) return TVI_CONTROL_TRUE; case TVI_CONTROL_AUD_GET_FORMAT: init_audio(priv); - if (!priv->audio_inited) return TVI_CONTROL_FALSE; + if (!priv->audio_initialized) return TVI_CONTROL_FALSE; *(int *)arg = AF_FORMAT_S16_LE; mp_msg(MSGT_TV, MSGL_V, "%s: get audio format: %d\n", info.short_name, *(int *)arg); return TVI_CONTROL_TRUE; case TVI_CONTROL_AUD_GET_SAMPLERATE: init_audio(priv); - if (!priv->audio_inited) return TVI_CONTROL_FALSE; + if (!priv->audio_initialized) return TVI_CONTROL_FALSE; *(int *)arg = priv->audio_in.samplerate; mp_msg(MSGT_TV, MSGL_V, "%s: get audio samplerate: %d\n", info.short_name, *(int *)arg); return TVI_CONTROL_TRUE; case TVI_CONTROL_AUD_GET_SAMPLESIZE: init_audio(priv); - if (!priv->audio_inited) return TVI_CONTROL_FALSE; + if (!priv->audio_initialized) return TVI_CONTROL_FALSE; *(int *)arg = priv->audio_in.bytes_per_sample; mp_msg(MSGT_TV, MSGL_V, "%s: get audio samplesize: %d\n", info.short_name, *(int *)arg); return TVI_CONTROL_TRUE; case TVI_CONTROL_AUD_GET_CHANNELS: init_audio(priv); - if (!priv->audio_inited) return TVI_CONTROL_FALSE; + if (!priv->audio_initialized) return TVI_CONTROL_FALSE; *(int *)arg = priv->audio_in.channels; mp_msg(MSGT_TV, MSGL_V, "%s: get audio channels: %d\n", info.short_name, *(int *)arg); @@ -1170,7 +1170,7 @@ static int init(priv_t *priv) priv->audio_skew_buffer = NULL; priv->audio_skew_delta_buffer = NULL; - priv->audio_inited = 0; + priv->audio_initialized = 0; /* Open the video device. */ priv->video_fd = open(priv->video_dev, O_RDWR); @@ -1383,7 +1383,7 @@ static int start(priv_t *priv) /* setup audio parameters */ init_audio(priv); - if (!priv->tv_param->noaudio && !priv->audio_inited) return 0; + if (!priv->tv_param->noaudio && !priv->audio_initialized) return 0; /* we need this to size the audio buffer properly */ if (priv->immediate_mode) { diff --git a/sub_cc.c b/sub_cc.c index aa7800b865..2acebf01bc 100644 --- a/sub_cc.c +++ b/sub_cc.c @@ -35,7 +35,7 @@ static subtitle *fb,*bb; static unsigned int cursor_pos=0; -static int inited=0; +static int initialized=0; #define CC_ROLLON 1 #define CC_ROLLUP 2 @@ -102,7 +102,7 @@ void subcc_init(void) fb=&buf1; bb=&buf2; - inited=1; + initialized=1; } static void append_char(char c) @@ -326,7 +326,7 @@ static void subcc_decode(unsigned char *inputbuffer, unsigned int inputlength) void subcc_process_data(unsigned char *inputdata,unsigned int len) { if(!subcc_enabled) return; - if(!inited) subcc_init(); + if(!initialized) subcc_init(); subcc_decode(inputdata, len); } -- cgit v1.2.3