summaryrefslogtreecommitdiffstats
path: root/mpcommon.c
Commit message (Collapse)AuthorAgeFilesLines
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* core: remove duplicated format_time() functionswm42012-09-181-0/+19
| | | | | This was an on-going transition to make mplayer format all times in the same format.
* build: move mpcommon.c to version.cwm42012-09-181-4/+0
| | | | | | | | | | | | | mpcommon.c used to be the only file to include version.h. version.h is generated by the build system, and contains the git revision. Any time a commit is made (or the tree is rebased etc.), the file is rewritten, and mpcommon.c rebuilt. To make rebuilding less annoying, the definition of the version string is the only thing in mpcommon.c. Since I want to add other things to mpcommon.c, add a new file named version.c, that takes over mpcommon.c's role as described above. mpcommon.c doesn't include version.h anymore, and will be used to park code that doesn't really belong anywhere else.
* Change version stringwm42012-07-291-1/+1
| | | | | | | | | | | | | | Change the "main" name from "mplayer2" to "mplayer". Note that upstream mplayer2 uses "MPlayer2", and mplayer uses "MPlayer", so it's unambiguous. The version.sh script used to put the latest tag into the version script. The intention was to add a new tag on each release, but this hasn't been done in over a year, making the tag absolutely pointless. Remove it. Now "git-SHORTHASH" is used. Remove the string "MPlayer & mplayer2 teams" after the copyright date, because that sounded silly.
* Use "mplayer2" in version string, not "MPlayer2"wm42012-03-141-1/+1
| | | | | | | | The name "MPlayer2" isn't used anywhere. It's either "MPlayer" or "mplayer2". Make it more consistent by using "mplayer2" instead. Note that the version string passed as network user-agent changes from "MPlayer" to "mplayer2" as well.
* core: move most mpcommon.c contents to mplayer.cUoti Urpala2011-01-151-320/+0
| | | | | | | | | | | | | | | | The contents of mpcommon.c were quite arbitrary; the most common reason to place some functions in this file had been "MEncoder happens to need similar code as MPlayer and we want to share some parts, but we have no clue whatsoever how to organize things in a sensible way, so we'll just dump those parts we want to share in mpcommon.c". As a result of containing an essentially random subset of top-level player functionality the mpcommon.h header required access to central structs and was unsuitable for inclusion in lower-level code, but was nonetheless included there for the mplayer_version symbol. Move almost all contents from mpcommon.c to mplayer.c. mplayer.c is already big and should perhaps be split further, but keeping a few random functions in mpcommon.c would not be an improvement.
* core: move global "subdata" and "vo_sub_last" to mpctxUoti Urpala2011-01-111-7/+6
|
* subtitles: remove sub_last_pts hackUoti Urpala2011-01-111-9/+3
| | | | | This code was probably added because of bad pts handling in old timing code, and should not be needed any more.
* options: move -noconfig to option struct, simplifyUoti Urpala2011-01-111-19/+0
|
* demux: improve -alang / -slang track choosing logicUoti Urpala2010-11-081-3/+1
| | | | | | | | | | | | When -alang / -slang was specified the numerically first matching track (if any) was always chosen. This meant that specifying "-alang eng" could change the track choice even if all tracks were in English, because now the default flag of tracks was ignored. Change the logic to take the default flag into account as a secondary sorting key. The code also accepted prefix matches, so that "-slang g" would match track language "ger". I think that was not intentional. Change it to require exact matches.
* command.c: Add windows.h include to fix compilation in some casesreimar2010-11-021-0/+3
| | | | | | Patch by Gianluigi Tiesi [sherpya netfarm it] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32500 b3059339-0415-0410-9bf9-f77b7e298cf2
* build: enable/disable all FFmpeg libraries togetherUoti Urpala2010-11-021-2/+2
| | | | | | | | | Enable all of libavcodec, libavformat, libswscale, and libpostproc together (libavutil is always required). based on svn commit by diego: git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32226 b3059339-0415-0410-9bf9-f77b7e298cf2
* subs: Add support for DVB and XSUB subtitles, not yet working properlyreimar2010-11-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31694 b3059339-0415-0410-9bf9-f77b7e298cf2
* mpcommon.c: Remove dvdsub_id checks that should not be necessaryreimar2010-11-021-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31692 b3059339-0415-0410-9bf9-f77b7e298cf2
* subs: Automatically allocate a vo_spudec if there is nonereimar2010-11-021-1/+7
| | | | | | | | | | | Allows playback of DVD subtitles from "raw" MPEG-PS. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31674 b3059339-0415-0410-9bf9-f77b7e298cf2 Move initialization of vo_spudec further behind to avoid issues with PGS subtitles being scaled incorrectly. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31917 b3059339-0415-0410-9bf9-f77b7e298cf2
* subs: Add support for PGS subtitle decoding via libavcodecreimar2010-11-021-10/+36
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31665 b3059339-0415-0410-9bf9-f77b7e298cf2
* subs: change subdelay handling and vobsub timingreimar2010-11-021-11/+8
| | | | | | | | | | | Make subdelay handling work the same way for all subtitle types and also allow changing subtitle delay to work better with vobsubs. This probably breaks vobsub behaviour with timestamp wrapping though. Positive values for sub delay now delay subtitles compared to video, where before the effect was in the opposite direction. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31663 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factorize MPlayer/MEncoder version string handling.diego2010-11-021-0/+2
| | | | | | | The string now resides in a central object file instead of being duplicated in every file that requires a version string. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31577 b3059339-0415-0410-9bf9-f77b7e298cf2
* libass: match font attachments based on extensionGrigori Goronzy2010-06-011-0/+18
| | | | | | | Instead of only relying on the MIME type, use the file extension as a fallback for deciding which attachments are fonts and should be fed to libass. This also refactors the check into a separate function in mpcommon.
* Merge svn changes up to r30967Uoti Urpala2010-04-261-4/+0
|\
| * Get rid of pointless def_path variable; use codec_path directly instead.diego2010-03-231-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30949 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make all instances of codec_patch unconditional, otherwiseattila2010-03-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | compilation will break on systems that do not have win32 dlls enabled. Fixes compilation bug introduced by r30942 10l to the anonymous guy who explains the importance of commit messages and would like to have romance novels in these very messages. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30945 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30917Uoti Urpala2010-04-261-0/+5
|\|
| * Follow a more proper way to support -codecpath.komh2010-03-171-0/+5
| | | | | | | | | | | | | | | | | | | | 1. Include loader/drv.h for SetCodecPath() instead of a declaration of it. 2. Move codec_path from get_path.h to mpcommon.h and mpcommon.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30914 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | | | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* | 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
| * Never include ass.h and ass_types.h directly, use ass_mp.h instead.reimar2009-12-191-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30067 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30065Uoti Urpala2009-12-291-5/+6
|\|
| * Use on-stack subtitle struct for temporary storage for passing subtitles onreimar2009-12-181-5/+6
| | | | | | | | | | | | | | | | | | | | for rendering by libass. This avoids mangling the static subtitle struct that is supposed to contain the subtitles that will actually be displayed and it also minimally reduces memory usage by freeing the subtitle lines again as early as possible. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30059 b3059339-0415-0410-9bf9-f77b7e298cf2
* | subtitles: Fix double text with libass rendered plaintext subsUoti Urpala2009-12-181-2/+3
| | | | | | | | | | | | | | | | | | | | When using libass to render plaintext (non-SSA/ASS) subtitles the code in update_subtitles() still called set_osd_subtitle() in one case, causing the global vo_sub variable containing non-libass subtitles to be set. Under some circumstances this resulted in both a libass-rendered and non-libass-rendered version of the same subtitle appearing on screen. Fix by running the subtitle clearing code (which called set_osd_subtitle) only when libass is not used.
* | subtitles: Fix recent filter-rendered libass timing problemUoti Urpala2009-12-021-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 4c552b2e420ba4cb6d888b12360c7bf63e7cd03a ("core: Do OSD/subtitle updates at a more accurate point") made filter-rendered libass subtitles appear one frame too late the first time they became visible (VO rendering was not affected, and filter rendering was accurate if seeking back later). The reason was that the subtitle code did not feed the subtitle events to libass before their starting time, and this now happened after the filtering phase. Fix this by skipping the time check in the libass case and feeding demuxed subtitles to it unconditionally (as timing is done separately anyway with libass). There are still at least theoretically possible new problems in the filter-rendered case because the filter now relies on packets demuxed before the _previous_ frame. There's a bigger chance of getting the subtitle packet too late, and the filter can't see packets for the first frame after a seek. However the former is not an issue for the samples I tested even with -nosound, and subtitles are not in general guaranteed to be shown when seeking to a new position (though it could be worth a later improvement).
* | options: Move ass_enabled to options structUoti Urpala2009-12-021-1/+1
| |
* | Merge svn changes up to r29912Uoti Urpala2009-11-161-12/+36
|\|
| * Add support for DVB teletext.reimar2009-11-101-1/+23
| | | | | | | | | | | | | | Patch by Francesco Lavra [francescolavra interfree it] with modifications by me. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29875 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove CONFIG_TV_TELETEXT.cehoyos2009-11-071-2/+0
| | | | | | | | | | | | | | | | DVB teletext support is nearly finished, it will be possible to read teletext from file, it will not be depending on reception any more. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29851 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Separate teletext from tv support.cehoyos2009-11-071-9/+8
| | | | | | | | | | | | | | Path by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29848 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Unbreak the demuxer-specific code in video.c with e.g.reimar2009-11-011-0/+4
| | | | | | | | | | | | | | | | | | | | -audiofile by moving the code to manually interleave subtitles to mp_common.c. video.c should still be changed to not be demuxer-specific anymore, it is bad practice but fully fixing it is non-trivial. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29810 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some pathscehoyos2009-10-291-5/+5
| | | | | | | | | | | | | | | | | | in comments. Based on a patch by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29802 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move teletext specific code from stream into libmpcodecs.cehoyos2009-10-291-0/+1
| | | | | | | | | | | | | | Patch by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29801 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29752Uoti Urpala2009-10-061-31/+28
|\| | | | | | | | | | | | | | | | | As part of merging subtitle-in-terminal changes make update_subtitles() only clear existing subtitles if called with the reset argument, and not try to set new ones. Later calls should set the needed new subtitles, and this change avoids some problems with trying to set subtitles when mp_property_sub() in command.c gets called from initialization code before full initialization.
| * Add support for displaying subtitles on the command-line when playingreimar2009-09-231-6/+3
| | | | | | | | | | | | | | audio-only files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29712 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make update_subtitles work without sh_video for text subtitles.reimar2009-09-231-3/+2
| | | | | | | | | | | | | | | | | | This fixes a crash with e.g. auto-enabled subtitles and -novideo due to command.c calling update_subtitles even without video and is a step toward subtitle support for audio-only files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29710 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Include mpcommon.h in mpcommon.c, ensures that the declarations in the headerreimar2009-09-231-0/+1
| | | | | | | | | | | | | | match those in the file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29708 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Factor out sh_video->pts into a refpts variable. This simplifies a future patchreimar2009-09-231-12/+12
| | | | | | | | | | | | | | that reduces the dependency on sh_video. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29707 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename ambiguous "pts" variable to subpts.reimar2009-09-231-8/+8
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29706 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29532Uoti Urpala2009-08-181-2/+0
|\|
| * Remove pointless #ifdefs around harmless internal header #includes.diego2009-08-021-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29471 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Change type names to match upstream libassGrigori Goronzy2009-08-071-1/+1
| |
* | Remove internal libass treeUoti Urpala2009-07-261-2/+1
| | | | | | | | | | Remove the libass/ directory and use the newest standalone version of the library instead.
* | Replace libavutil internal header #includes with MPlayer copiesUoti Urpala2009-07-261-1/+1
| | | | | | | | | | | | Change #include lines for libavutil/intreadwrite.h, libavutil/bswap.h and libavutil/x86_cpu.h to use the MPlayer file under ffmpeg_files/ instead.
* | Remove the internal GUIAnton Khirnov2009-07-071-9/+0
| | | | | | | | | | | | | | | | | | 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
| |
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-2/+2
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-2/+2
| | | | | | | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* | Merge svn changes up to r29154Uoti Urpala2009-04-091-2/+2
|\| | | | | | | | | Synchronizes runtime CPU detection handling in the build system with latest FFmpeg.
|<