summaryrefslogtreecommitdiffstats
path: root/mp_core.h
Commit message (Collapse)AuthorAgeFilesLines
* 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