Commit Graph

95 Commits

Author SHA1 Message Date
wm4 53bfaecd40 core: remove duplicated format_time() functions
This was an on-going transition to make mplayer format all times in the
same format.
2012-09-18 21:04:47 +02:00
wm4 5a13f5a5e8 build: move mpcommon.c to version.c
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.
2012-09-18 21:04:47 +02:00
wm4 46b218ca34 Change version string
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.
2012-07-29 00:04:17 +02:00
wm4 0eb21226cb Use "mplayer2" in version string, not "MPlayer2"
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.
2012-03-14 10:29:35 +01:00
Uoti Urpala 43b1de1dd7 core: move most mpcommon.c contents to mplayer.c
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.
2011-01-15 18:45:43 +02:00
Uoti Urpala a1692437d0 core: move global "subdata" and "vo_sub_last" to mpctx 2011-01-11 17:55:05 +02:00
Uoti Urpala f95674fb6c subtitles: remove sub_last_pts hack
This code was probably added because of bad pts handling in old timing
code, and should not be needed any more.
2011-01-11 17:38:15 +02:00
Uoti Urpala b26fbeddd8 options: move -noconfig to option struct, simplify 2011-01-11 17:28:10 +02:00
Uoti Urpala 3c2cfee488 demux: improve -alang / -slang track choosing logic
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.
2010-11-08 18:05:12 +02:00
reimar 14e4bb7d70 command.c: Add windows.h include to fix compilation in some cases
Patch by Gianluigi Tiesi [sherpya netfarm it]

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32500 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:18:37 +02:00
Uoti Urpala c5e462b33d build: enable/disable all FFmpeg libraries together
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
2010-11-02 04:16:55 +02:00
reimar 9e537d1f6e subs: Add support for DVB and XSUB subtitles, not yet working properly
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31694 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
reimar 3b92d75481 mpcommon.c: Remove dvdsub_id checks that should not be necessary
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31692 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
reimar 0eb5662a05 subs: Automatically allocate a vo_spudec if there is none
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
2010-11-02 04:14:43 +02:00
reimar 96c17fe68b subs: Add support for PGS subtitle decoding via libavcodec
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31665 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +02:00
reimar d6322407c5 subs: change subdelay handling and vobsub timing
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
2010-11-02 04:14:43 +02:00
diego a1b8092c87 Factorize MPlayer/MEncoder version string handling.
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
2010-11-02 04:11:43 +02:00
Grigori Goronzy b784346e78 libass: match font attachments based on extension
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.
2010-06-01 23:15:41 +02:00
Uoti Urpala 4785c2617e Merge svn changes up to r30967 2010-04-26 17:42:20 +03:00
Uoti Urpala 95fba94860 Merge svn changes up to r30917 2010-04-26 17:11:04 +03:00
diego 5e480c7b81 Get rid of pointless def_path variable; use codec_path directly instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30949 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-23 18:01:00 +00:00
attila a1f7ee1a4b Make all instances of codec_patch unconditional, otherwise
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
2010-03-21 10:13:00 +00:00
komh 11eeaf5005 Follow a more proper way to support -codecpath.
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
2010-03-17 09:12:51 +00:00
Uoti Urpala 00323c06e2 Delete things related to old translation system
Remove the help/ subdirectory, configure code to create toplevel
help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
2010-03-10 03:47:14 +02:00
Uoti Urpala 12d3caebc7 Merge svn changes up to r30475 2010-03-09 19:18:43 +02:00
diego 99c1bbca2a Add license header to all top-level files missing them.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-30 23:24:23 +00:00
Uoti Urpala 67b40bd219 Merge svn changes up to r30065 2009-12-29 23:57:14 +02:00
reimar 4ab63df7af Never include ass.h and ass_types.h directly, use ass_mp.h instead.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30067 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-12-19 15:32:17 +00:00
reimar 2ed18d7a2a Use on-stack subtitle struct for temporary storage for passing subtitles on
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
2009-12-18 19:29:33 +00:00
Uoti Urpala 8ee23f418f subtitles: Fix double text with libass rendered plaintext subs
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.
2009-12-18 19:53:34 +02:00
Uoti Urpala 55f94a1a91 subtitles: Fix recent filter-rendered libass timing problem
commit 4c552b2e42 ("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).
2009-12-02 17:57:47 +02:00
Uoti Urpala 9afcdab694 options: Move ass_enabled to options struct 2009-12-02 17:37:39 +02:00
Uoti Urpala 287b62163e Merge svn changes up to r29912 2009-11-16 07:01:46 +02:00
reimar 9a8a73e547 Add support for DVB teletext.
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
2009-11-10 11:31:47 +00:00
cehoyos 2a5611473c Remove CONFIG_TV_TELETEXT.
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
2009-11-07 16:40:42 +00:00
cehoyos 423c415534 Separate teletext from tv support.
Path by Francesco Lavra, francescolavra interfree it


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29848 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-07 12:31:05 +00:00
reimar 1280614c9f Unbreak the demuxer-specific code in video.c with e.g.
-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
2009-11-01 09:48:34 +00:00
cehoyos 9df11ee8bf Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some paths
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
2009-10-29 22:39:00 +00:00
cehoyos a9474b0b39 Move teletext specific code from stream into libmpcodecs.
Patch by Francesco Lavra, francescolavra interfree it


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29801 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-10-29 22:13:04 +00:00
Uoti Urpala 7fd3eb0f74 Merge svn changes up to r29752
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.
2009-10-06 04:48:00 +03:00
reimar 4b182ff652 Add support for displaying subtitles on the command-line when playing
audio-only files.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29712 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-23 21:48:48 +00:00
reimar bf16f6f4f3 Make update_subtitles work without sh_video for text subtitles.
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
2009-09-23 21:21:58 +00:00
reimar f9c8809a39 Include mpcommon.h in mpcommon.c, ensures that the declarations in the header
match those in the file.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29708 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-23 19:04:24 +00:00
reimar 8dad891bf9 Factor out sh_video->pts into a refpts variable. This simplifies a future patch
that reduces the dependency on sh_video.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29707 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-23 19:01:33 +00:00
reimar 5c6d055a15 Rename ambiguous "pts" variable to subpts.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29706 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-09-23 18:28:20 +00:00
Uoti Urpala 95da34aa07 Merge svn changes up to r29532 2009-08-18 02:29:37 +03:00
Grigori Goronzy 1e98ef7789 Change type names to match upstream libass 2009-08-07 00:13:33 +03:00
diego 64d5279410 Remove pointless #ifdefs around harmless internal header #includes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29471 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-08-02 16:00:55 +00:00
Uoti Urpala 546c3fb53c Remove internal libass tree
Remove the libass/ directory and use the newest standalone version of
the library instead.
2009-07-26 20:22:43 +03:00
Uoti Urpala d6c410b54c Replace libavutil internal header #includes with MPlayer copies
Change #include lines for libavutil/intreadwrite.h, libavutil/bswap.h
and libavutil/x86_cpu.h to use the MPlayer file under ffmpeg_files/
instead.
2009-07-26 06:16:43 +03:00