From af0c41e162725b0edcd6c3d066a2dbef05a3b896 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 7 Jul 2013 23:54:11 +0200 Subject: Remove old demuxers Delete demux_avi, demux_asf, demux_mpg, demux_ts. libavformat does better than them (except in rare corner cases), and the demuxers have a bad influence on the rest of the code. Often they don't output proper packets, and require additional audio and video parsing. Most work only in --no-correct-pts mode. Remove them to facilitate further cleanups. --- DOCS/man/en/changes.rst | 1 - DOCS/man/en/options.rst | 10 ---------- 2 files changed, 11 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/changes.rst b/DOCS/man/en/changes.rst index e6a20b6ddf..494c46e186 100644 --- a/DOCS/man/en/changes.rst +++ b/DOCS/man/en/changes.rst @@ -106,7 +106,6 @@ Command Line Switches -subdelay --sub-delay -subpos --sub-pos -forcedsubsonly --sub-forced-only - -ni --avi-ni -benchmark --untimed (no stats) -xineramascreen --screen (different values) -ss --start diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 938e5d54ed..9c7aac61ce 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1198,20 +1198,10 @@ depends on the VO backend and how it handles keyboard input. Does not apply to terminal input.) ---avi-ni - (Internal AVI demuxer which is not used by default only) - Force usage of non-interleaved AVI parser (fixes playback of some bad AVI - files). - --no-aspect Ignore aspect ratio information from video file and assume the video has square pixels. See also ``--aspect``. ---no-bps - (Internal AVI demuxer which is not used by default only) - Do not use average byte/second value for A-V sync. Helps with some AVI - files with broken header. - --no-cache Turn off input stream caching. See ``--cache``. -- cgit v1.2.3 From 9bb7935ce186d55aaaafd708e7559345082ecabc Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 8 Jul 2013 21:59:44 +0200 Subject: options: remove --ignore-start This was used only with demux_avi. --- DOCS/man/en/options.rst | 5 ----- 1 file changed, 5 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 915602aaca..d891766f6b 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -1044,11 +1044,6 @@ This option only works if the underlying media supports seeking (i.e. not with stdin, pipe, etc). -``--ignore-start`` - Matters with the builtin AVI demuxer only, which is not enabled by default. - Ignore the specified starting time for streams in AVI files. This - nullifies stream delays. - ``--include=`` Specify configuration file to be parsed after the default ones. -- cgit v1.2.3 From 3269bd178020c5d821e8b2d1fd807a38d63e93ce Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 12 Jul 2013 21:58:11 +0200 Subject: demux: rewrite probing and demuxer initialization Get rid of the strange and messy reliance on DEMUXER_TYPE_ constants. Instead of having two open functions for the demuxer callbacks (which somehow are both optional, but you can also decide to implement both...), just have one function. This function takes a parameter that tells the demuxer how strictly it should check for the file headers. This is a nice simplification and allows more flexibility. Remove the file extension code. This literally did nothing (anymore). Change demux_lavf so that we check our other builtin demuxers first before libavformat tries to guess by file extension. --- DOCS/man/en/options.rst | 6 ------ 1 file changed, 6 deletions(-) (limited to 'DOCS') diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index d891766f6b..a6e5fee7ed 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -690,12 +690,6 @@ Stop at given absolute time. Use ``--length`` if the time should be relative to ``--start``. See ``--start`` for valid option values and examples. -``--no-extbased``, ``--extbased`` - ``--no-extbased`` disables extension-based demuxer selection. By default, - when the file type (demuxer) cannot be detected reliably (the file has no - header or it is not reliable enough), the filename extension is used to - select the demuxer. Always falls back on content-based demuxer selection. - ``--field-dominance=`` Set first field for interlaced content. Useful for deinterlacers that double the framerate: ``--vf=yadif=1`` and ``--vo=vdpau:deint``. -- cgit v1.2.3 From 5ad42d0caf040bc8bff2a9bed39a6f2624728821 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 13 Jul 2013 01:15:36 +0200 Subject: tech-overview.txt: minor changes and additions --- DOCS/tech-overview.txt | 65 +++++++++++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 27 deletions(-) (limited to 'DOCS') diff --git a/DOCS/tech-overview.txt b/DOCS/tech-overview.txt index e242df1325..d4dbd95938 100644 --- a/DOCS/tech-overview.txt +++ b/DOCS/tech-overview.txt @@ -1,9 +1,9 @@ NOTE: DOCS/OUTDATED-tech/* may contain more detailed information, but most of it is possibly or definitely outdated. This file intends to give a big - picture of how mplayer/mpv is structured. + picture of how mpv is structured. core/mplayer.c: - This contains the main play loop, anything related to mplayer and playback + This contains the main play loop, anything related to mpv and playback related initializations. It also contains the main function. Generally, it accesses all other subsystems, initializes them, and pushes data between them during playback. @@ -59,7 +59,7 @@ talloc.h & talloc.c: allocation. (Needless to say, talloc_free() and free() are completely different things.) - The copy in mplayer has been modified to abort on OOM conditions. An + The copy in mpv has been modified to abort on OOM conditions. An allocation call will never return NULL. One very useful feature of talloc is fast tracking of memory leaks. ("Fast" @@ -72,9 +72,13 @@ talloc.h & talloc.c: Documentation can be found here: http://git.samba.org/?p=samba.git;a=blob;f=lib/talloc/talloc.h;hb=HEAD + Note: unlike tcmalloc, jemalloc, etc., talloc() is not actually a malloc + replacement. It works on top of system malloc and provides additional + features that are supposed to make memory management easier. + core/mp_core.h: Data structures for mplayer.c and command.c. They are usually not accessed - by other parts of mplayer for the sake of modularization. + by other parts of mpv for the sake of modularization. Note that there are lots of global variables floating around everywhere else. This is an ongoing transition, and eventually there should be no @@ -92,7 +96,7 @@ core/input/input.c: Note that keyboard input and slave mode input are essentially the same things. Just looking at input.conf should make this clear. (The other - direction of slave mode communication, mplayer to application, consists of + direction of slave mode communication, mpv to application, consists of random mp_msg() calls all over the code in all parts of the player.) core/command.c: @@ -100,18 +104,18 @@ core/command.c: Properties are essentially dynamic variables changed by certain commands. This is basically responsible for all user commands, like initiating seeking, switching tracks, etc. It calls into mplayer.c, where most of the - work is done, but also into other parts of mplayer. + work is done, but also into other parts of mpv. core/mp_msg.h: - All terminal output should go though mp_msg(). + All terminal output should go through mp_msg(). stream/*: File input is implemented here. stream.h/.c provides a simple stream based - interface (like reading a number of bytes at a given offset). mplayer can + interface (like reading a number of bytes at a given offset). mpv can also play from http streams and such, which is implemented here. - E.g. if mplayer sees "http://something" on the command line, it will pick - stream_http.c based on the prefix, and pass the rest of the filename to it. + E.g. if mpv sees "http://something" on the command line, it will pick + stream_lavf.c based on the prefix, and pass the rest of the filename to it. Some stream inputs are quite special: stream_dvd.c turns DVDs into mpeg streams (DVDs are actually a bunch of vob files etc. on a filesystem), @@ -120,39 +124,40 @@ stream/*: Some stream inputs are just there to invoke special demuxers, like stream_mf.c. (Basically to make the prefix "mf://" do something special.) - cache2.c is a horrible little thing which provides a caching wrapper around - stream implementations, needed for smooth network playback. + cache.c is a caching wrapper around streams implementations, needed for + smooth network playback. demux/: Demuxers split data streams into audio/video/sub streams, which in turn - yield packets. Packets (see demux_packet.h) are mostly byte chunks tagged - with a playback time (PTS). These packets are passed to the decoders. + are split in packets. Packets (see demux_packet.h) are mostly byte chunks + tagged with a playback time (PTS). These packets are passed to the decoders. Most demuxers have been removed from this fork, and the only important and "actual" demuxers left are demux_mkv.c and demux_lavf.c (uses libavformat). There are some pseudo demuxers like demux_cue.c, which exist only to invoke other frontend code (tl_cue.c in this case). - The main interface is in demux.h. A demuxer provides a list of available - streams. Also, for each type of stream (video/audio/sub) there is a - demux_stream. This contains the current packet stream coming from the - demuxer as a linked list of demux_packets. + The main interface is in demux.h. The stream headers are in stheader.h. + There is a stream header for each audio/video/sub stream, and each of them + holds codec information about the stream and other information. video/: - This contains several things related to audio/video encoding, as well as + This contains several things related to audio/video decoding, as well as video filters. - mp_image.h and img_format.h define how mplayer stores video frames + mp_image.h and img_format.h define how mpv stores decoded video frames internally. video/decode/: - vd_*.c are video decoders. (There's only vd_ffmpeg.c left.) dec_video.c/vd.c + vd_*.c are video decoders. (There's only vd_lavc.c left.) dec_video.c/vd.c handle most of connecting the frontend with the actual decoder. video/filter/: vf_*.c and vf.c form the video filter chain. They are fed by the video decoder, and output the filtered images to the VOs though vf_vo.c. By - default, no video filters (except vf_vo) are used. + default, no video filters (except vf_vo) are used. vf_scale is automatically + inserted if the video output can't handle the video format used by the + decoder. video/out/: Video output. They also create GUI windows and handle user input. In most @@ -167,13 +172,18 @@ video/out/: vo_vdpau and vo_opengl should be taken as reference. audio/: - format.h/format.c define the audio formats. + format.h/format.c define the uncompressed audio formats. (As well as some + compressed formats used for spdif.) audio/decode/: - ad_*.c and dec_audio.c/ad.c handle audio decoding. + ad_*.c and dec_audio.c/ad.c handle audio decoding. ad_lavc.c is the + decoder using ffmpeg. ad_spdif.c is not really a decoder, but is used for + compressed audio passthrough. audio/filter/: - Audio filter chain. + Audio filter chain. af_lavrresample is inserted if any form of conversion + between audio formats is needed. (af_format.c is also used for some corner + cases.) audio/out/: Audio outputs. @@ -182,7 +192,7 @@ audio/out/: --gapless-audio, even playing a new file will close and re-open the audio device. - Note that mplayer synchronizes the video to the audio. That's the reason + Note that mpv synchronizes the video to the audio. That's the reason why buggy audio drivers can have a bad influence on playback quality. sub/: @@ -210,7 +220,8 @@ sub/: Text subtitles can be preloaded, in which case they are read fully as soon as the subtitle is selected, and then effectively stored in an ASS_Track. It's used for external text subtitles, and required to make codepage - detection as well as timing postprocessing work. + detection as well as timing postprocessing work. (Timing postprocessing + removes tiny gaps or overlaps between subtitle events.) core/timeline/: A timeline is the abstraction used by mplayer.c to combine several files -- cgit v1.2.3