From 7420952caf36b0d86e850160dd8689158df6de7c Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 10 May 2008 15:03:04 +0000 Subject: Request a timer resolution of 1 ms on Windows, the default of between 10 and 55 ms (depending on OS version) is too inaccurate for our needs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26721 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 3a5cb9238a..7022f1442d 100644 --- a/mplayer.c +++ b/mplayer.c @@ -688,6 +688,9 @@ void exit_player_with_rc(const char* how, int rc){ if (mpctx->user_muted && !mpctx->edl_muted) mixer_mute(&mpctx->mixer); uninit_player(INITIALIZED_ALL); +#ifdef WIN32 + timeEndPeriod(1); +#endif #ifdef HAVE_X11 #ifdef HAVE_NEW_GUI if ( !use_gui ) @@ -2627,6 +2630,8 @@ int gui_no_filename=0; #endif #ifdef WIN32 + // request 1ms timer resolution + timeBeginPeriod(1); if(proc_priority){ int i; for(i=0; priority_presets_defs[i].name; i++){ -- cgit v1.2.3 From 27cdeb019dfe41fd7c349fcec2dc5fb79aa88001 Mon Sep 17 00:00:00 2001 From: eugeni Date: Mon, 12 May 2008 20:40:39 +0000 Subject: Change subtitle selection order by giving "indirect" ways of specifying the desired subtitle track the least priority. Selection of displayed subtitles by language (-slang) and default track attribute is only performed if all other ways have failed. They are not directly controllable by the user (especially default tracks), therefore they should not override -sub, -vobsub and even auto-subs. Based on a patch by Sergey Malkovsky (mplayer.win32_gmail_com). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26752 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 7022f1442d..d0df70e4e7 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3464,10 +3464,7 @@ if(mpctx->sh_video) { if (mpctx->global_sub_size) { // find the best sub to use int vobsub_index_id = vobsub_get_index_by_id(vo_vobsub, vobsub_id); - if (dvdsub_id < 0 && dvdsub_lang) - dvdsub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang); - if (dvdsub_id < 0) - dvdsub_id = demuxer_default_sub_track(mpctx->demuxer); + mpctx->global_sub_pos = -1; // no subs by default if (vobsub_index_id >= 0) { // if user asks for a vobsub id, use that first. mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_VOBSUB] + vobsub_index_id; @@ -3477,14 +3474,19 @@ if (mpctx->global_sub_size) { } else if (mpctx->global_sub_indices[SUB_SOURCE_SUBS] >= 0) { // if there are text subs to use, use those. (autosubs come last here) mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_SUBS]; + } else if (dvdsub_id < 0 && mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) { + // finally select subs by language and container hints + if (dvdsub_id < 0 && dvdsub_lang) + dvdsub_id = demuxer_sub_track_by_lang(mpctx->demuxer, dvdsub_lang); + if (dvdsub_id < 0) + dvdsub_id = demuxer_default_sub_track(mpctx->demuxer); + if (dvdsub_id >= 0) + mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id; /* } else if (mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) { // if nothing else works, get subs from the demuxer. mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX]; */ - } else { - // nothing worth doing automatically. - mpctx->global_sub_pos = -1; } // rather than duplicate code, use the SUB_SELECT handler to init the right one. mpctx->global_sub_pos--; -- cgit v1.2.3 From 9440d4aaed43efe859f2d8ecffa700979251e40a Mon Sep 17 00:00:00 2001 From: eugeni Date: Mon, 12 May 2008 20:40:42 +0000 Subject: Cosmetics: remove some commented code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26753 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index d0df70e4e7..3e0b65e82a 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3482,11 +3482,6 @@ if (mpctx->global_sub_size) { dvdsub_id = demuxer_default_sub_track(mpctx->demuxer); if (dvdsub_id >= 0) mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id; -/* - } else if (mpctx->global_sub_indices[SUB_SOURCE_DEMUX] >= 0) { - // if nothing else works, get subs from the demuxer. - mpctx->global_sub_pos = mpctx->global_sub_indices[SUB_SOURCE_DEMUX]; -*/ } // rather than duplicate code, use the SUB_SELECT handler to init the right one. mpctx->global_sub_pos--; -- cgit v1.2.3 From c289ff3a72b122557f6ae03d20db3e439a03aefa Mon Sep 17 00:00:00 2001 From: ben Date: Tue, 13 May 2008 17:26:41 +0000 Subject: Delcare a dvdnav-specific input section if the currently played stream is from such a type. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26760 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 3e0b65e82a..5a8448f417 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3629,6 +3629,7 @@ if ( use_gui ) { mp_input_set_section(NULL); //TODO: add desired (stream-based) sections here if (mpctx->stream->type==STREAMTYPE_TV) mp_input_set_section("tv"); +if (mpctx->stream->type==STREAMTYPE_DVDNAV) mp_input_set_section("dvdnav"); //==================== START PLAYING ======================= -- cgit v1.2.3