summaryrefslogtreecommitdiffstats
path: root/mp_core.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove trailing whitespace from most filesUoti Urpala2009-07-071-1/+1
|
* Support chapter seeking with ordered chaptersUoti Urpala2009-04-021-1/+12
|
* Initial ordered chapters supportUoti Urpala2009-04-021-0/+18
| | | | | | | | | | | Add basic support for Matroska ordered chapters. The switching between segments is implemented as a general edit timeline that could also be used for other purposes. Some things still need improvement. In particular the current code does not try to do any proper mapping between audio/video/subtitle streams of different files and there should be options for better control of how MPlayer searches other files for the required content.
* core: Clean up OSD seek info logicUoti Urpala2009-03-311-1/+6
| | | | | | | | | | Clean up the code and make the behavior more consistent. Before bits of the OSD information were triggered in different places, and various property commands that affect playback position only showed the seek bar while the main seek command also triggered showing the percentage in OSD text. Now only the seek and chapter commands trigger all information and others nothing (which is consistent with most property behavior).
* core: Rewrite some of the A/V sync related codeUoti Urpala2009-01-141-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Notable functionality changes: * Timing change between any two frames is now accurately limited to 1/10 of their nominal distance. Previous code did not always use the correct duration. * The status line now keeps showing the same A-V sync value from one video frame change to the next. Previously it kept recalculating the value using a new audio position but the same video position when the status line was updated between video frames. This incorrectly showed the video losing sync with audio. * The status line now displays actual measured A-V difference in autosync mode too. The previous code displayed values that completely ignored real timing in autosync mode, showing 0 A-V difference even when video was significantly behind audio due to inadequate decoding speed. The new behavior can make the shown A-V values appear more unstable if the audio out has unreliable delay measurements (the most likely reason to use autosync), but this is a display change rather than a timing quality change. * Autosync mode now tries to adjust timing by the amount of time vo_flip() calls take, so the calls start earlier and finish at the time the frame should be shown. Previously non-autosync mode adjusted for this but autosync did not. * The warning about the system being too slow to decode the video in realtime is now displayed in autosync mode too.
* Update OSD while pausedUoti Urpala2008-12-091-0/+1
| | | | | | | | | | | | When OSD contents change while paused, try to change the OSD drawn in the currently visible frame. If such OSD updates are not supported then advance by one frame and draw the OSD normally. Add some support for OSD redrawing to vo xv. The new xv code makes a copy of the original frame contents before drawing the OSD if MPlayer is already paused when the frame is drawn. If such a copy of the current frame exists then the frame contents can be restored and a different OSD drawn on top of the same frame.
* Start pause handling changesUoti Urpala2008-12-091-1/+7
| | | | | | | Add separate pause_player() / unpause_player functions(), move some pausing-related state into explicit variables and make commands while paused not unpause. Not everything works properly while paused yet (no screen updates etc).
* Merge svn changes up to r28087Uoti Urpala2008-12-041-1/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_ivtv.c libao2/ao_v4l2.c libmpcodecs/dec_video.h libvo/aspect.h libvo/sub.c libvo/sub.h libvo/vo_directx.c libvo/vo_macosx.m libvo/vo_quartz.c mp_core.h mplayer.c mplayer.h osdep/getch2.h osdep/timer.h
| * Print ID_EXIT and exit reason message in identify mode when exiting.reimar2008-12-021-1/+7
| | | | | | | | | | | | | | Patch by rvm [rvm3000 ya com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28066 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change a bunch of video/audio-output-specific preprocessor directives fromdiego2008-08-031-1/+1
| | | | | | | | | | | | | | a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
* | core: Clean up move-to-next-file logicUoti Urpala2008-08-131-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 r27374Uoti Urpala2008-07-301-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | | 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
* | Create a context struct for OSD stateUoti Urpala2008-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 r26979Uoti Urpala2008-06-041-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | | | | 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
* | Remove INITIALIZED_INPUT from mpctx->initialized_flagsUoti Urpala2008-04-301-1/+0
| | | | | | | | | | The input functions are never uninited except at exit. Move the uninit to player exit function and remove the flag.
* | Create a context for input.c stateUoti Urpala2008-04-301-0/+1
| | | | | | | | | | | | | | | | | | 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/.
* | Add a context for mp_fifoUoti Urpala2008-04-291-0/+1
| | | | | | | | | | Store data in an allocated context and take it as an argument instead of using static variables.
* | timers: Remove GetRelativeTime()Uoti Urpala2008-04-281-0/+5
| | | | | | | | | | | | | | | | | | | | 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 Urpala2008-04-261-0/+1
| | | | | | | | | | | | | | | | The function exit_sighandler had a line if(initialized_flags==0 && sig_count>1) exit(1); rather than try to make this work without the variable I just removed the line as it looks unlikely this condition would occur except very rarely.
* | Move global filename to mpctxUoti Urpala2008-04-261-0/+1
| |
* | Move global mconfig to mpctxUoti Urpala2008-04-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | The global was used in the function cfg_include which handles the -include option. Make the address available in that function by creating a new dynamically allocated option in m_config_new that has the address in the option's private data. asxparser.c also used the global. Making it available through all ways the code could get called required a number of relatively straightforward changes to playtree and menu code.
* | Remove _s/_st suffix from some struct namesUoti Urpala2008-04-251-5/+5
| | | | | | | | | | Since the names are always used after the keyword "struct" having a suffix as in "struct demuxer_st" is almost completely pointless.
* | Remove some unnecessary recursive includesUoti Urpala2008-04-231-20/+11
| | | | | | | | | | | | | | | | Remove some #include lines from headers, some of those removals made possible by using incomplete struct types instead of typedefs. Include mp_osd.h in mplayer.c and command.c after removing it from mp_core.h. Remove "#ifdef USE_ASS" around some "struct ass_track_s *" fields which will now compile even without ASS support.
* | Move playback_speed to options structUoti Urpala2008-04-231-3/+1
| |
* | Move global rel_seek_secs and abs_seek_pos to mpctxUoti Urpala2008-04-231-2/+4
| |
* | Remove static mpctx from mplayer.cUoti Urpala2008-04-231-7/+7
| | | | | | | | | | | | | | | | Pass it in function calls instead. There's no reasonable way to pass it to exit_player() when used outside mplayer.c. However most of those uses seem to be wrong (the code should not make the program exit) and should be removed. For now just make exit_player() uses outside mplayer.c simply call exit() without any shutdown code.
* | Move loop_times to option structUoti Urpala2008-04-231-1/+0
| |
* | Remove pointless #ifdefsUoti Urpala2008-04-231-2/+0
| | | | | | | | | | These #ifdefs only made MPContext 2 variables smaller when dvbin support was disabled.
* | Create a struct for X11 stateUoti Urpala2008-04-231-0/+1
| | | | | | | | | | | | | | | | Will be used for common data between X11 VOs. The main reasons for making it a separate struct rather than extra fields in the main VO struct are that some field definitions need X headers and that the code keeps basic X state such as the display connection over opening and closing of individual VOs.
* | Start of new option systemUoti Urpala2008-04-231-1/+2
| | | | | | | | | | | | | | | | First part of option restructuring. The aim is to move option values from a huge number of separate globals to a single non-global struct. This part adds some support for parsing option values into such struct instances, and moves one example option (fixed-vo) to the struct.
* | Add new video driver APIUoti Urpala2008-04-231-1/+1
|/ | | | | | | | | | | | | Create new video driver API that has a per-instance context structure and does not rely on keeping status in global or static variables. Existing drivers are not yet converted to this API; instead there is a wrapper which translates calls to them. In the new API, an old API call vo_functions->xyz(args) is generally replaced by vo_xyz(vo_instance, args). The changes to keep the vesa, dxr2 and xover drivers compiling have not been tested.
* mp_core.h: Fix use of 'mp_image_t' without definitionuau2008-03-311-1/+1
| | | | | | | | | | | | | A field under #ifdef USE_DVDNAV had type "mp_image_t *', but a definition of the type was not included. Fix by changing the type to "struct mp_image_s *". This probably started causing visible compilation failures after '#include "command.h"' was added to command.c, as that led to mp_core.h being included earlier. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26304 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add necessary #includes to pass 'make checkheaders'.diego2008-03-041-0/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26163 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add MPLAYER_ prefix to multiple inclusion guards.diego2008-02-221-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
* typo fix: inited --> initializeddiego2008-02-141-12/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
* ao_functions_t should be const, part 1reimar2008-02-011-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25945 b3059339-0415-0410-9bf9-f77b7e298cf2
* Split osd related stuff from mp_core.h into new header file mp_osd.h.ulion2008-01-301-20/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25931 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for dvdnav still frames playback.ben2008-01-261-0/+7
| | | | | | | | | | | Based on various patches from Otvos Attila and MPlayer'ized by me. N.B. Always use -vc ffmpeg12 with dvdnav:// git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25852 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add multiple inclusion guards to all header files that lack them.diego2008-01-011-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25581 b3059339-0415-0410-9bf9-f77b7e298cf2
* When auto loading subs, log warning instead of error for load failure.ulion2007-12-041-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25292 b3059339-0415-0410-9bf9-f77b7e298cf2
* Mark several uses of vo_functions_t as const to stop some of the currentreimar2007-12-021-1/+1
| | | | | | | hacks e.g. in vidix code from spreading. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25247 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clean up the way get_path is handled: Compile get_path.c to an object to linkdiego2007-08-281-1/+0
| | | | | | | | against instead of directly #including the C file and replace the many extern declarations by a proper header file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix warnings:diego2007-08-251-1/+0
| | | | | | | | | | | | In file included from mplayer.c:191: mp_fifo.h:5: warning: redundant redeclaration of 'mplayer_put_key' mp_core.h:129: warning: previous declaration of 'mplayer_put_key' was here In file included from command.c:59: mp_fifo.h:5: warning: redundant redeclaration of 'mplayer_put_key' mp_core.h:129: warning: previous declaration of 'mplayer_put_key' was here git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24182 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix warnings:diego2007-08-251-1/+0
| | | | | | | | | | | | In file included from mplayer.c:341: libass/ass_mp.h:27: warning: redundant redeclaration of 'ass_enabled' mp_core.h:115: warning: previous declaration of 'ass_enabled' was here In file included from command.c:58: mp_core.h:115: warning: redundant redeclaration of 'ass_enabled' libass/ass_mp.h:27: warning: previous declaration of 'ass_enabled' was here git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24178 b3059339-0415-0410-9bf9-f77b7e298cf2
* Declare all vo_gamma variables in libvo/video_out.h and remove them fromdiego2007-08-121-8/+0
| | | | | | | | mp_core.h to avoid some redundant redeclaration warnings. patch by Gábor Mizda, gabrov freemail hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24047 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix redundant redeclaration warningGabrov2007-07-181-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23817 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move loop_times into mpctx.albeu2007-07-091-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23746 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move the sh_audio->delay field to mpctx->delay.uau2007-03-111-0/+7
| | | | | | | | The value is related to overall a/v sync and is not used by audio demuxers or decoders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22506 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move some related variables together & add a commentuau2007-02-221-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22315 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cleanup, move "global" state from the frame_time_remaining mainloopuau2007-02-211-0/+4
| | | | | | | variable to mpctx. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22306 b3059339-0415-0410-9bf9-f77b7e298cf2
* Split command/property handling from mplayer.c to a new file command.c.uau2007-02-211-0/+128
Move some global and static variables under a struct that can be given as a parameter. Add a context argument to the property functions so that they do not have to depend on global/static variables. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22298 b3059339-0415-0410-9bf9-f77b7e298cf2