summaryrefslogtreecommitdiffstats
path: root/mp_core.h
Commit message (Collapse)AuthorAgeFilesLines
* subs: Change global subtitle numbering schemereimar2010-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change numbering so that demuxers can "asynchronously" add subtitles during playback. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31678 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix calculation of global_sub_size. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31711 b3059339-0415-0410-9bf9-f77b7e298cf2 Update global_sub_pos if we auto-selected a subtitle. This avoid strange behaviour with subtitle selection in that case, because the subtitle selection code thinks no subtitle was displayed while we actually did display one. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31863 b3059339-0415-0410-9bf9-f77b7e298cf2 Move function to avoid a forward declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31864 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix subtitle selection: make selecting -sid 0 work again by replacing the M_PROPERTY_STEP_UP hack by M_PROPERTY_SET and set the global sub pos also when we do not yet have a subtitle stream but do know the number of subs from out-of-band as e.g. for DVD. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31882 b3059339-0415-0410-9bf9-f77b7e298cf2 100l, re-add vobsub_get_id_by_index call accidentally removed in r31678. Patch by ubitux [ubitux gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31985 b3059339-0415-0410-9bf9-f77b7e298cf2
* core: track current chapter for relative chapter seeksUoti Urpala2010-04-251-0/+6
| | | | | | | | | | Due to inexact seeks, chapter seek commands may result in a playback position that's inside the previous chapter. This causes problems when the user does repeated next-chapter/previous-chapter seeks, because the code will use the wrong base for calculating 'next' or 'previous'. Improve the behavior by adding a heuristic that keeps track of what chapter the user last wanted to seek to and adjusts the "current chapter" value based on that.
* Merge svn change r30560Uoti Urpala2010-03-091-3/+3
|\
| * Rename exit_reason_t enum to exit_reason and do not typedef it.diego2010-02-141-4/+4
| | | | | | | | | | | | | | The _t namespace is reserved for POSIX; the typedef is pointless obfuscation. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30560 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix exit_player() usage throughout the codebase.diego2010-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | exit_player() was declared with differing parameter types in mplayer.c and mplayer.h. Make the declaration in the .h file match the one in the .c file and adjust all usages of exit_player() throughout the codebase. Also move the exit_player() declaration into mp_core.h next to exit_player_with_rc(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30558 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30475Uoti Urpala2010-03-091-0/+18
|\|
| * Add license header to all top-level files missing them.diego2010-01-301-0/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
| * At startup and while seeking avoid to introduce pointless sleeps and possiblyreimar2010-01-041-0/+2
| | | | | | | | | | | | | | desync due to codec delay. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30218 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Also reset time_frame and next_frame_time on reset, it makes no sense toreimar2010-01-041-0/+3
| | | | | | | | | | | | | | | | process the sleep before playing the frame seeked to and can be annoying when the user tries to escape a series of "stuck" frames with a huge duration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30217 b3059339-0415-0410-9bf9-f77b7e298cf2
* | core/VO: Allow VO drivers to add/modify framesUoti Urpala2009-09-181-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add interfaces to allow VO drivers to add or remove frames from the video stream and to alter timestamps. Currently this functionality only works with in correct-pts mode. Use the new functionality in vo_vdpau to properly support frame-adding deinterlace modes. Frames added by the VDPAU deinterlacing code are now properly timed. Before every second frame was always shown immediately (probably next monitor refresh) after the previous one, even if you were watching things in slow motion, and framestepping didn't stop at them at all. When seeking the deinterlace algorithm is no longer fed a mix of frames from old and new positions. As a side effect of the changes a problem with resize events was also fixed. Resizing calls video_to_output_surface() to render the frame at the new resolution, but before this function also changed the list of history frames, so resizing could give an image different from the original one, and also corrupt next frames due to them seeing the wrong history. Now the function has no such side effects. There are more resize-related problems though that will be fixed in a later commit. The deint_mpi[] list of reserved frames is increased from 2 to 3 entries for reasons related to the above. Having 2 entries is enough when you initially get a new frame in draw_image() because then you'll have those two entries plus the new one for a total of 3 (the code relied on the oldest mpi implicitly staying reserved for the duration of the call even after usage count was decreased). However if you want to be able to reproduce the rendering outside draw_image(), relying on the explicitly reserved list only, then it needs to store 3 entries.
* | Change libass type names to match upstream renamesUoti Urpala2009-07-291-1/+1
| |
* | Remove the internal GUIAnton Khirnov2009-07-071-1/+1
| | | | | | | | | | | | | | | | | | The GUI is badly designed and too closely coupled to the internal details of other code. The GUI code is in bad shape and unmaintained for years. There is no indication that anyone would maintain it in the future either. Even if someone did volunteer to implement a better integrated GUI having the current code in the tree probably wouldn't help much. So get rid of it.
* | 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
| | | | | | | | | | | | | |