summaryrefslogtreecommitdiffstats
path: root/mplayer.c
<
Commit message (Collapse)AuthorAgeFilesLines
* core: Clean up move-to-next-file logicUoti Urpala2008-08-131-42/+44
| | | | | | | | | | | | | | | | | The mpctx->eof field was used to also store other reasons to stop playing the current file besides EOF, and the code didn't properly distinguish those from EOF. Rename the field to "stop_play" and clean up some of the code accessing it. Properly separating EOF from other reasons allows handling file switching better. Before this commit buffered audio was always drained before moving to the next file (the only exception when it was NOT drained when stopping a file was when quitting the player completely). This added an extra delay when manually moving to the next file as you had to wait for the currently buffered audio to finish playing before the next file would start. After this commit audio is only drained if the file reaches EOF normally; otherwise audio is cut and the next file starts immediately.
* Merge svn changes up to r27458Uoti Urpala2008-08-121-1/+1
|\
| * Use translatable string instead of hardcoded message for process priority.diego2008-08-091-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27445 b3059339-0415-0410-9bf9-f77b7e298cf2
* | mplayer.c: #include mplayer.h and access_mpcontext.hUoti Urpala2008-08-121-0/+2
| | | | | | | | | | Both declare symbols defined in mplayer.c, so include them to make the compiler check the declarations match.
* | Move some declarations from mplayer.c to proper headersUoti Urpala2008-08-121-8/+0
| | | | | | | | | | Declare mp_input_register_options in input.h and xscreensaver_heartbeat in x11_common.h.
* | Make various functions staticUoti Urpala2008-08-121-1/+1
| |
* | Merge svn changes up to r27441Uoti Urpala2008-08-081-22/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h command.c configure input/input.c libmpcodecs/dec_video.c libmpcodecs/vd.c libmpdemux/stheader.h libvo/sub.c libvo/video_out.c libvo/vo_xv.c libvo/vosub_vidix.c libvo/x11_common.c libvo/x11_common.h mp_core.h mplayer.c stream/stream.h
| * Give a CONFIG_ prefix to preprocessor directives that lacked one anddiego2008-08-071-6/+6
| | | | | | | | | | | | | | change arbitrary prefixes to CONFIG_. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27429 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename font-related preprocessor directives.diego2008-08-071-6/+6
| | | | | | | | | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27425 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename a bunch of miscellaneous preprocessor directives.diego2008-08-071-1/+1
| | | | | | | | | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27423 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change a bunch of X11-specific preprocessor directives.diego2008-08-041-4/+4
| | | | | | | | | | | | | | Switch from a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27409 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change a bunch of video/audio-output-specific preprocessor directives fromdiego2008-08-031-5/+5
| | | | | | | | | | | | | | a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27399Uoti Urpala2008-08-021-33/+33
|\| | | | | | | | | | | | | | | | | | | Conflicts: libmpcodecs/vd.c libmpcodecs/ve_raw.c libvo/video_out.c libvo/x11_common.c mplayer.c
| * Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;diego2008-08-011-2/+2
| | | | | | | | | | | | | | CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27391 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename preprocessor directive HAVE_MENU --> CONFIG_MENU.diego2008-07-301-6/+6
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27377 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename two GUI-related preprocessor directives:diego2008-07-301-25/+25
| | | | | | | | | | | | | | HAVE_NEW_GUI --> CONFIG_GUI, HAVE_GTK2_GUI --> CONFIG_GTK2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27375 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27374Uoti Urpala2008-07-301-39/+38
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h cfg-mplayer.h command.c configure libmpcodecs/dec_video.c libmpcodecs/vd.c libmpcodecs/vf_vo.c libmpdemux/demuxer.h libmpdemux/stheader.h mp_core.h mplayer.c stream/stream_radio.c
| * Start unifying names of internal preprocessor directives.diego2008-07-301-37/+37
| | | | | | | | | | | | | | | | Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use GetTimerMS() instead of time() with srand.reimar2008-07-261-2/+1
| | | | | | | | | | | | | | | | This is more portable and avoids generating the same random numbers for a whole second (and on MinGW for some unexplainable reason for almost 10 seconds). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27353 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Fix crash during early exitUoti Urpala2008-07-091-3/+3
| | | | | | | | | | | | | | | | | | | | Starting MPlayer with options such as "-demuxer help" that exit before initializing OSD struct would crash at exit because of a reference to mpctx->osd->sub_font in deinitialization code. Fix by checking that mpctx->osd is not NULL. Checking that osd->sub_font is not NULL was unnecessary because free_font_desc(NULL) is safe.
* | Fix compilation with dvdnav enabledUoti Urpala2008-06-261-4/+7
| | | | | | | | | | Some dvdnav-specific code had not been properly updated after moving options to option struct and removing global mpctx.
* | Move global sub_font to OSD structUoti Urpala2008-06-241-6/+6
| |
* | Remove unnecessary casts of sh_video->vfilterUoti Urpala2008-06-241-7/+7
| | | | | | | | | | | | The casts were left from the time when the type of sh_video->vfilter was (unnecessarily) void *. Now that the field has the correct type the casts are pointless.
* | Create a context struct for OSD stateUoti Urpala2008-06-241-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit creates the struct and passes it to some functions that needs to access OSD state but does not yet move much data from globals to it. vf_expand accesses the OSD state for rendering purposes outside of the normal OSD draw time. The way this currently works is suboptimal, but I did not attempt to clean it up now. To keep things working the same way vf_expand needs to know the address of the state object to be able to access the data even in the functions that should normally not need it. For that purpose this commit adds a VFCTRL to tell vf_expand the address of the object.
* | Merge svn changes up to r27092Uoti Urpala2008-06-171-1/+1
|\| | | | | | | | | | | | | | | Conflicts: libmpdemux/demuxer.c libvo/vo_xv.c mencoder.c
| * Try harder to honour CTRL+C etc. during dumpstreamreimar2008-06-161-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27092 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add the ugly HELP_MP_DEFINE_STATIC back, otherwise we produce warnings likediego2008-06-151-0/+2
| | | | | | | | | | | | | | ./help_mp.h:21: warning: 'help_text' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27071 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove pointless HELP_MP_DEFINE_STATIC definition.diego2008-06-151-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27068 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27025Uoti Urpala2008-06-071-3/+7
|\| | | | | | | | | | | | | | | | | Conflicts: command.c libvo/vosub_vidix.c libvo/vosub_vidix.h mplayer.c
| * Rename some functions as they are mplayer related and notben2008-06-071-3/+3
| | | | | | | | | | | | | | | | from libdvdnav public API. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27018 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix the linking of TOOLS/netstream and TOOLS/vivodump.diego2008-06-061-0/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26995 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r26979Uoti Urpala2008-06-041-1/+10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the conflicts are trivial. Conflicts: Makefile cfg-mplayer.h input/input.c libmenu/vf_menu.c libmpcodecs/dec_video.c libmpcodecs/vf_expand.c libmpcodecs/vf_vo.c libmpdemux/demux_mkv.c libmpdemux/demuxer.c libmpdemux/demuxer.h libvo/vo_directfb2.c libvo/vo_gl.c libvo/vo_winvidix.c libvo/vo_xv.c libvo/vo_xvidix.c libvo/vo_xvmc.c libvo/x11_common.c mplayer.c osdep/timer-linux.c stream/cache2.c
| * Add a slave command to stop stream playback.ben2008-05-271-0/+3
| | | | | | | | | | | | | | | | | | Mostly useful when used with -idle mode. Patch by Mathieu Schroeter ( mathieu dot schroeter at gamesover dot ch ) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26909 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Re-add (hackish) support for -chapter (only start chapter, end is not ↵reimar2008-05-241-0/+4
| | | | | | | | | | | | supported) with -dumpstream. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26864 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid crash with video stream switching and -nosoundreimar2008-05-211-1/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26850 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r26783Uoti Urpala2008-05-151-12/+15
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile common.mak configure libmpcodecs/vd_ffmpeg.c libmpdemux/demux_mkv.c libvo/vo_xv.c mplayer.c
| * Delcare a dvdnav-specific input section if the currently playedben2008-05-131-0/+1
| | | | | | | | | | | | | | | | stream is from such a type. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26760 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Cosmetics: remove some commented code.eugeni2008-05-121-5/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26753 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change subtitle selection order by giving "indirect" ways of specifying theeugeni2008-05-121-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Request a timer resolution of 1 ms on Windows, the default ofreimar2008-05-101-0/+5
| | | | | | | | | | | | | | 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
* | Move input options to option structUoti Urpala2008-04-301-1/+1
| |
* | input: Move command filedescriptor list to context structUoti Urpala2008-04-301-1/+1
| |
* | input: Move cmd_queue to context structUoti Urpala2008-04-301-3/+4
| | | | | | | | Menu instances now also need a input context pointer to queue commands.
* | input: Move key filedescriptor list to context structUoti Urpala2008-04-301-3/+3
| | | | | | | | | | The context variable is now passed to VOs too as it's now needed to add a callback on the X filedescriptor.
* | Remove INITIALIZED_INPUT from mpctx->initialized_flagsUoti Urpala2008-04-301-13/+9
| | | | | | | | | | The input functions are never uninited except at exit. Move the uninit to player exit function and remove the flag.
* | input: Move command bind variables to context structUoti Urpala2008-04-301-2/+2
| |
* | Create a context for input.c stateUoti Urpala2008-04-301-10/+10
| | | | | | | | | | | | | | | | | | Start moving static variables to a context struct. Only autorepeat state is moved to the struct in this commit. mp_input_check_interrupt now requires the context variable. Change stream functions to pass it. It's still stored in a static variable in stream/.
* | Move allocation/free of x11 struct to x11_common.cUoti Urpala2008-04-291-2/+1
| | | | | | | | Allocate the struct in the init function and free in uninit.
* | Move key_fifo_size & doubleclick_time to options structUoti Urpala2008-04-291-1/+1
| |
* | Add a context for mp_fifoUoti Urpala2008-04-291-5/+7
| | | | | | | | | | Store data in an allocated context and take it as an argument instead of using static variables.
* | input: Remove separate mp_input_add_event_fdUoti Urpala2008-04-291-3/+4
| | | | | | | | | | | | | | | | Use the same mp_input_add_key_fd for all uses and add a context argument to its callback that was before only in the event fd callbacks. Instead of checking in input.c whether keys were inserted to the keypress FIFO during the callback do the check in the callback before returning and set return value accordingly.
* | timers: Remove GetRelativeTime()Uoti Urpala2008-04-281-7/+17
| | | | | | | | | | | | | | | | | | | | Move the code calculating time delta since last query out of the platform-specific drivers and into mplayer.c. The platform-specific drivers now return absolute values only. The way the code in timer-darwin.c uses doubles in wrapping arithmetic looks questionable and this change might make problems in it more visible.
* | Move initialized_flags to mpctxUoti Urpala