OSDN Git Service

removed some messages, modified ao parameter donut-x86
authorOwen Kwon <pinebud77@hotmail.com>
Wed, 11 Aug 2010 05:19:07 +0000 (14:19 +0900)
committerOwen Kwon <pinebud77@hotmail.com>
Wed, 11 Aug 2010 05:19:07 +0000 (14:19 +0900)
MPlayer.cpp
libao2/ao_pcm_mem.c
libmpcodecs/vd_ffmpeg.c
mplayer_lib.c

index fd26691..a1a7957 100644 (file)
@@ -390,7 +390,7 @@ namespace android {
                return ((MPlayer*)p)->render();
        }
 
-#define AUDIOBUFFER_SIZE (4096*2)
+#define AUDIOBUFFER_SIZE (1024*32)
 
        int MPlayer::render() {
                int result = -1;
index ff4396b..c9da9d7 100644 (file)
@@ -39,7 +39,7 @@
 #include <windows.h>
 #endif
 
-#define BUFFER_ROUND_SIZE 128  /* -_-? */
+#define BUFFER_ROUND_SIZE 1  /* -_-? */
 
 static const ao_info_t info =
 {
@@ -142,6 +142,7 @@ static int init(int rate,int channels,int format,int flags){
        ao_data.outburst = 512 * channels * samplesize;
        // A "buffer" for about 0.2 seconds of audio
        ao_data.buffersize = (int)(rate * 0.1 / 256 + 1) * ao_data.outburst;
+       ao_data.buffersize = 1024 * 12; /* -_-? */
        ao_data.channels=channels;
        ao_data.samplerate=rate;
        ao_data.format=format;
@@ -186,12 +187,14 @@ static int get_space(void){
        int real_space;
        int rounded_buffer;
        drain();
-       rounded_buffer = (buffer - BUFFER_ROUND_SIZE/2) / BUFFER_ROUND_SIZE
+       rounded_buffer = (buffer + BUFFER_ROUND_SIZE/2) / BUFFER_ROUND_SIZE
                * BUFFER_ROUND_SIZE;
        virt_space = ao_data.buffersize - rounded_buffer;
        real_space = ao_pcm_buffersize - ao_outputpos;
+       /*
        mp_msg (MSGT_AO, MSGL_INFO, "vir space %d, real space %d",
                        virt_space, real_space);
+                       */
        if (virt_space > real_space) return real_space;
        else return virt_space;
 }
index 38f1fbd..be3da62 100644 (file)
@@ -628,7 +628,7 @@ static int get_buffer(AVCodecContext *avctx, AVFrame *pic){
         }else{
             type= MP_IMGTYPE_IP;
         }
-        mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type== MP_IMGTYPE_IPB ? "using IPB\n" : "using IP\n");
+/*        mp_msg(MSGT_DECVIDEO, MSGL_DBG2, type== MP_IMGTYPE_IPB ? "using IPB\n" : "using IP\n"); */
     }
 
     if (ctx->best_csp == IMGFMT_RGB8 || ctx->best_csp == IMGFMT_BGR8)
@@ -816,8 +816,9 @@ static mp_image_t *decode(sh_video_t *sh, void *data, int len, int flags){
 
     avctx->hurry_up=(flags&3)?((flags&2)?2:1):0;
 
-    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "vd_ffmpeg data: %04x, %04x, %04x, %04x\n",
+/*    mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "vd_ffmpeg data: %04x, %04x, %04x, %04x\n",
            ((int *)data)[0], ((int *)data)[1], ((int *)data)[2], ((int *)data)[3]);
+                  */
     av_init_packet(&pkt);
     pkt.data = data;
     pkt.size = len;
index 8529c64..3ca1361 100644 (file)
@@ -2191,7 +2191,9 @@ static int sleep_until_update(float *time_frame, float *aq_sleep_time)
 
        // flag 256 means: libvo driver does its timing (dvb card)
        if (*time_frame > 0.001 && !(vo_flags&256)) {
+               /*
                mp_msg(MSGT_CPLAYER,MSGL_INFO,"timing_sleep %f", *time_frame);
+               */
                *time_frame = timing_sleep(*time_frame);
        }
        return frame_time_remaining;
@@ -3719,7 +3721,7 @@ int mplayer_after_decode (struct mplayer_context * con)
        int frame_time_remaining = con->frame_time_remaining;
 
        vout_time_usage += (GetTimer() - con->t2) * 0.000001;
-       mp_msg(MSGT_CPLAYER,MSGL_INFO,"vout time %u\n", vout_time_usage);
+/*     mp_msg(MSGT_CPLAYER,MSGL_INFO,"vout time %u\n", vout_time_usage); */
 
 
        if (mpctx->sh_video) {
@@ -3842,7 +3844,7 @@ int mplayer_after_decode (struct mplayer_context * con)
                edl_decision = 0;
        }
 
-       mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d  \n",mpctx->eof);
+/*     mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d  \n",mpctx->eof); */
 
 goto_next_file:  // don't jump here after ao/vo/getch initialization!
        return 0;