| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Commit 59fff90d94 ("options: change -alang and -slang to use string
list type") failed to change demux_ogg accordingly. Add the missing
change.
|
|
|
|
|
|
|
|
|
|
|
| |
Update various code to use newer alternatives instead of deprecated
functions/fields that are being dropped at libav API bump. An
exception is avcodec_thread_init() which is being dropped even though
it's still _necessary_ with fairly recent libav versions, so there's
no good alternative which would work with both those recent versions
and latest libavcodec. I think there are grounds to consider the drop
premature and revert it for now; if that doesn't happen I'll add a
version-test #if check around it later.
|
| |
|
|
|
|
|
|
|
|
|
| |
There is no reason to use manual language list splitting when an
automatic split function is already available.
Some types change from "unsigned char" to "char", but this shouldn't
cause issues since [as]lang settings are unlikely to have characters
above 127.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* edl:
core: support timeline with audio-only files
core: wake up a bit less often for audio-only files
core: audio: cut audio writes at end of timeline part
EDL: add support for new EDL file format
stream.[ch], ass_mp: new stream function for whole-file reads
tl_matroska.c: move the find_files() function here
bstr.[ch], path.[ch]: add string and path handling functions
core: ordered chapters: move timeline creation to timeline/
options: drop support for numeric -demuxer values
cleanup: demuxer.[ch]: remove unused code, make functions static
cleanup: reindent demuxer.h, use struct names for types
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The timeline code previously added to support Matroska ordered
chapters allows constructing a playback timeline from segments picked
from multiple source files. Add support for a new EDL format to make
this machinery available for use with file formats other than Matroska
and in a manner easier to use than creating files with ordered
chapters.
Unlike the old -edl option which specifies an additional file with
edits to apply to the video file given as the main argument, the new
EDL format is used by giving only the EDL file as the file to play;
that file then contains the filename(s) to use as source files where
actual video segments come from. Filename paths in the EDL file are
ignored. Currently the source files are only searched for in the
directory of the EDL file; support for a search path option will
likely be added in the future.
Format of the EDL files
The first line in the file must be "mplayer EDL file, version 2".
The rest of the lines belong to one of these classes:
1) lines specifying source files
2) empty lines
3) lines specifying timeline segments.
Lines beginning with '<' specify source files. These lines first
contain an identifier used to refer to the source file later, then the
filename separated by whitespace. The identifier must start with a
letter. Filenames that start or end with whitespace or contain
newlines are not supported.
On other lines '#' characters delimit comments. Lines that contain
only whitespace after comments have been removed are ignored.
Timeline segments must appear in the file in chronological order. Each
segment has the following information associated with it:
- duration
- output start time
- output end time (= output start time + duration)
- source id (specifies the file the content of the segment comes from)
- source start time (timestamp in the source file)
- source end time (= source start time + duration)
The output timestamps must form a continuous timeline from 0 to the
end of the last segment, such that each new segment starts from the
time the previous one ends at. Source files and times may change
arbitrarily between segments.
The general format for lines specifying timeline segments is
[output time info] source_id [source time info]
source_id must be an identifier defined on a '<' line. Both the time
info parts consists of zero or more of the following elements:
1) timestamp
2) -timestamp
3) +duration
4) *
5) -*
, where "timestamp" and "duration" are decimal numbers (computations
are done with nanosecond precision). Whitespace around "+" and "-" is
optional. 1) and 2) specify start and end time of the segment on
output or source side. 3) specifies duration; the semantics are the
same whether this appears on output or source side. 4) and 5) are
ignored on the output side (they're always implicitly assumed). On the
source side 4) specifies that the segment starts where the previous
segment _using this source_ ended; if there was no previous segment
time 0 is used. 5) specifies that the segment ends where the next
segment using this source starts.
Redundant information may be omitted. It will be filled in using the
following rules:
- output start for first segment is 0
- two of [output start, output end, duration] imply third
- two of [source start, source end, duration] imply third
- output start = output end of previous segment
- output end = output start of next segment
- if "*", source start = source end of earlier segment
- if "-*", source end = source start of a later segment
As a special rule, a last zero-duration segment without a source
specification may appear. This will produce no corresponding segment
in the resulting timeline, but can be used as syntax to specify the
end time of the timeline (with effect equal to adding -time on the
previous line).
Examples:
----- begin -----
mplayer EDL file, version 2
< id1 filename
0 id1 123
100 id1 456
200 id1 789
300
----- end -----
All segments come from the source file "filename". First segment
(output time 0-100) comes from time 123-223, second 456-556, third
789-889.
----- begin -----
mplayer EDL file, version 2
< f filename
f 60-120
f 600-660
f 30- 90
----- end -----
Play first seconds 60-120 from the file, then 600-660, then 30-90.
----- begin -----
mplayer EDL file, version 2
< id1 filename1
< id2 filename2
+10 id1 *
+10 id2 *
+10 id1 *
+10 id2 *
+10 id1 *
+10 id2 *
----- end -----
This plays time 0-10 from filename1, then 0-10 from filename1, then
10-20 from filename1, then 10-20 from filename2, then 20-30 from
filename1, then 20-30 from filename2.
----- begin -----
mplayer EDL file, version 2
< t1 filename1
< t2 filename2
t1 * +2 # segment 1
+2 t2 100 # segment 2
t1 * # segment 3
t2 *-* # segment 4
t1 3 -* # segment 5
+0.111111 t2 102.5 # segment 6
7.37 t1 5 +1 # segment 7
----- end -----
This rather pathological example illustrates the rules for filling in
implied data. All the values can be determined by recursively applying
the rules given above, and the full end result is this:
+2 0-2 t1 0-2 # segment 1
+2 2-4 t2 100-102 # segment 2
+0.758889 4-4.758889 t1 2-2.758889 # segment 3
+0.5 4.4758889-5.258889 t2 102-102.5 # segment 4
+2 5.258889-7.258889 t1 3-5 # segment 5
+0.111111 7.258889-7.37 t2 102.5-102.611111 # segment 6
+1 7.37-8.37 t1 5-6 # segment 7
|
| |
| |
| |
| |
| |
| |
| | |
Drop support for specifying demuxer types by numeric ID (options
-demuxer, -audio-demuxer and -sub-demuxer). Stop printing the numeric
values in "-demuxer help" output. Convert the list of DEMUXER_TYPE_XXX
defines to "enum demuxer_type".
|
| |
| |
| |
| |
| |
| |
| | |
Remove some unused lines from demuxer.h. Make some demuxer.c functions
static. Move new_ds_stream() declaration from demuxer.h to stream.h
(the function is defined in stream.c). Clean up some code in mplayer.c
that had commented-out free_demuxer_stream() calls.
|
| |
| |
| |
| |
| | |
Reindent demuxer.h and also change some comments. Change some types
from 'foo_t' to 'struct foo'.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
libavformat returns nonsense per-stream bitrate values for some MPEG
files (0 or many times higher than the overall bitrate of the file),
which triggered the heuristic to enable byte-based seeking in
demux_lavf and then made the byte-based seeks wildly inaccurate.
Disable the support for byte-based seeks. This will avoid problems
with files that have consistent timestamps, but on the other hand will
completely break seeking in MPEG files that have timestamp resets.
I'll probably add at least an option to manually enable byte-based
seeking later.
|
| |
| |
| |
| |
| |
| |
| | |
Add code identical to the audio case to also support switching video
tracks at runtime.
Patch by "Hermi".
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove code that tries to select audio track during demuxer
initialization from demux_mkv and demux_lavf. Just leave audio
disabled at that point; the higher-level select_audio() function will
call the demuxer to switch track later anyway.
Removing this unneeded code also fixes use of these demuxers as the
main demuxer with -audiofile. Before the automatic track selection
would have enabled an audio track (if the file had any); as the main
demuxer was not used for audio the unused packets from this enabled
track would accumulate until they reached queue size limits.
|
| |
| |
| |
| |
| |
| | |
Commit de42015a97cf296aad6307 ("demux_mkv: read tags") added code that
failed to initialize a loop variable. Fix. No visible problems caused
by the bug have been reported.
|
| |
| |
| |
| | |
Recognize "S_HDMV/PGS" CodecID.
|
| |
| |
| |
| |
| | |
Remove indirection through MATROSKA_SUBTYPE_* and instead set the
per-track type field to the letter identifier used in public sh_sub.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Duration may now be set for packet types other than subtitles; as far
as I can tell nothing should care. A check requiring valid duration
values for subtitles is removed, because duration may not be properly
set for all bitmap subtitle types; hopefully this doesn't make the
behavior with (already broken) subtitles without duration worse.
|
| |
| |
| |
| | |
Recognize "A_EAC3" CodecID.
|
| |
| |
| |
| |
| |
| | |
In 59058b54a73809866476b243d8bee82174fb4de8 (from svn r31129) Aurelien
changed demux_lavf -vid indexing, but failed to change the initial
video stream selection based on -vid to match. Fix.
|
| |
| |
| |
| |
| |
| |
| |
| | |
If the argument given to demux_lavf audio/video switch code is not one
of -2, -1, or valid audio/video ID the code will treat it the same as
-2 (switch to no sound / no video). However the returned index was not
set to -2 in this case. Fix. Also change the returned index from -1 to
-2 when staying at no sound / video.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Fix bugs in the handling of stream index values in video stream
switching. This is similar to what commit 90bedd0b872b6eea02351aafb62e
did for audio.
Also clean up the corresponding audio code a little bit.
|
|/
|
|
|
|
|
|
| |
Disable compilation of demux_ty_osd.c because of its GPL v2-only
license. This only affects TiVo files with -subcc. After this no
v2-only code should get compiled (yuv4mpeg_intern.h has a v2-only
license, but the contents of the header look like they're not
copyrightable).
|
|
|
|
|
|
|
|
| |
Change DVB SPU stream format in TS demuxer so it can be decoded by
libavcodec (as soon as lavc is fixed not to fail just because of an
extra padding byte).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32866 b3059339-0415-0410-9bf9-f77b7e298cf2
|
|
|
|
|
|
|
|
| |
Fix r32587: the previous approach to return subtitles in time broke
DVB subtitles due to returning incomplete packets and even for
PGS subtitles resulted in incorrect pts values for the sub packets.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32864 b3059339-0415-0410-9bf9-f77b7e298cf2
|
|
|
|
| |
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32862 b3059339-0415-0410-9bf9-f77b7e298cf2
|
|
|
|
|
|
|
| |
Do not pointlessly cast the return value of memalign().
memalign() returns void*, which is compatible with any pointer in C.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32850 b3059339-0415-0410-9bf9-f77b7e298cf2
|
|
|
|
|
|
| |
Check that rlen is valid before using it to increment a pointer.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32832 b3059339-0415-0410-9bf9-f77b7e298cf2
|
|
|
|
|
|
|
|
|
|
|
|
| |
af_lavcac3enc: use old SampleFormat names without AV_ prefix, the
latter were only added in 2010-11
vd_ffmpeg: add ifdef around CODEC_ID_LAGARITH use
demux_real: use ffmpeg_files/intreadwrite.h
stream/http.c, stream/realrtsp/real.c: define AV_BASE64_SIZE macro for
old libavutil versions lacking it
|
|
|
|
|
|
|
|
|
| |
Use limits.h to get the maximum length instead of hardcoding it.
Original patch by Sang-Uok Kum.
Signed-off-by: Tobias Diedrich <ranma@google.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32766 b3059339-0415-0410-9bf9-f77b7e298cf2
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* sub:
sub/OSD: move some related files to sub/
subtitles: options: enable -ass by default
subtitles: change default libass rendering style
demux_mkv, chapters: change millisecond arithmetic to ns
cleanup: rename ass_* functions to mp_ass_*
subs: use correct font aspect ratio for libass + converted subs
cleanup: some random minor code simplification and cleanup
vf_vo: fix EOSD change detection bug
sd_ass: remove subreader use, support plaintext markup
subtitles: style support for common SubRip tags and MicroDVD
core: ordered chapters: fix bad subtitle parameter
subs/demux: don't try to enable sub track when creating it
subtitles/demux: store duration instead of endpts in demux packets
subtitles: add framework for subtitle decoders
options: add special -leak-report option
subtitles: remove code trying to handle text subs with libavcodec
cleanup: move MP_NOPTS_VALUE definition to mpcommon.h
subtitles: move global ass_track to struct osd_state
core: move most mpcommon.c contents to mplayer.c
core: move global "subdata" and "vo_sub_last" to mpctx
subtitles: remove sub_last_pts hack
options: move -noconfig to option struct, simplify
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
demux_mkv kept various integer timestamps in millisecond units.
Matroska timestamp arithmetic is however specified in nanoseconds
(even though files typically use 1 ms precision), and using ms units
instead of that only made things more complex. Based on the demux_mkv
example the general demuxer-level chapter structure also used ms
units. Change the demux_mkv arithmetic and demuxer chapter structures
to use nanoseconds instead. This also fixes a seeking problem in
demux_mkv with files using a TimecodeScale other than the usual
1000000 (confusion between ms and TimecodeScale*ns units).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
demuxer.c new_sh_sub_sid() tried to immediately select the created sub
track for playback if its id matched the "-sid" option value. This was
buggy, as more initialization is needed to properly enable subtitles.
Normally the correct track to play is selected after the demuxer has
been created. It's possible that some DVD use case or such depended on
the removed code to make -sid work with a subtitle track that's not
found at start and only added later (vobsubs probably would start
playing without separate initialization); if so then that needs to be
fixed later in a different way.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a framework for subtitle decoder modules that work more like
audio/video decoders do, and change libass rendering of demuxed
subtitles to use the new framework.
The old subtitle code is messy, with details specific to handling
particular subtitle types spread over high-level code. This should
make it easier to clean things up and fix some bugs/limitations.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
demux_ty relied on demuxer->filepos being initially set to 0, but
demuxer.c has been changed to initialize it to -1. This caused a
"Invalid seek to negative position!" error message when running the
demux_ty file format check (so it occurred for any file which had not
been recognized as another type before that). Fix by making demux_ty
initialize filepos to 0.
|
| |
| |
| |
| |
| |
| |
| |
| | |
When trying to determine the format of an input stream, demux_lavf
retries the probe with a larger buffer size up to some limit if the
match score is low, but when reaching the size limit it accepted the
best match (if any) regardless of its score. Change it to require a
score of at least AVPROBE_SCORE_MAX/4 to accept a match at all.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Change new_demux_packet() and resize_demux_packet() length parameter
type from int to size_t and add a check to abort() if the size is over
1 GB. This should make integer overflow problems leading to memory
corruption in demuxers less likely; and aborting should be no worse
than insane memory consumption. Also make the functions abort() if the
actual allocation fails instead of trying |