summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-05 02:53:53 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-05 02:53:53 +0000
commita01a5a007389e184c3357dfd9f6996e2d25326fe (patch)
treeabd66669b579bf31c7a89e76b024f4e142e658b0 /mplayer.c
parentd8efd32d3f8efaac16da9a92ef5e22bbe9e513d1 (diff)
downloadmpv-a01a5a007389e184c3357dfd9f6996e2d25326fe.tar.bz2
mpv-a01a5a007389e184c3357dfd9f6996e2d25326fe.tar.xz
libvo driver may have its own timing
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2706 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/mplayer.c b/mplayer.c
index 586708a29d..02034ee3ea 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -398,6 +398,8 @@ int v_cont=50;
int v_hue=50;
int v_saturation=50;
+int vo_flags=0;
+
//float a_frame=0; // Audio
int i;
@@ -899,16 +901,16 @@ while(1){
mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s video codec: [%s] drv:%d (%s)\n",video_codec?"Forcing":"Detected",sh_video->codec->name,sh_video->codec->driver,sh_video->codec->info);
for(i=0;i<CODECS_MAX_OUTFMT;i++){
- int ret;
+// int ret;
out_fmt=sh_video->codec->outfmt[i];
if(out_fmt==0xFFFFFFFF) continue;
#ifdef USE_LIBVO2
- ret=vo2_query_format(video_out);
+ vo_flags=vo2_query_format(video_out);
#else
- ret=video_out->query_format(out_fmt);
+ vo_flags=video_out->query_format(out_fmt);
#endif
- mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X\n",vo_format_name(out_fmt),ret);
- if(ret) break;
+ mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X\n",vo_format_name(out_fmt),vo_flags);
+ if(vo_flags) break;
}
if(i>=CODECS_MAX_OUTFMT){
mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_VOincompCodec);
@@ -1142,10 +1144,15 @@ while(!eof){
if(play_n_frames<0) exit_player(MSGTR_Exit_frames);
}
+ vo_pts=sh_video->timer*90000.0;
+
/*========================== PLAY AUDIO ============================*/
while(sh_audio){
unsigned int t;
- int playsize=audio_out->get_space();
+ int playsize;
+
+ ao_pts=sh_audio->timer*90000.0;
+ playsize=audio_out->get_space();
if(!playsize) break; // buffer is full, do not block here!!!
@@ -1294,7 +1301,8 @@ if(1)
EventHandling();
}
#endif
-
+
+if(!(vo_flags&256)){ // flag 256 means: libvo driver does its timing (dvb card)
while(time_frame>0.005){
if(time_frame<=0.020)
// usec_sleep(10000); // sleeps 1 clock tick (10ms)!
@@ -1308,6 +1316,7 @@ if(1)
#endif
time_frame-=GetRelativeTime();
}
+}
current_module="flip_page";
#ifdef USE_LIBVO2