summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: fix DVD subtitle selectionwm42012-09-187-31/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add all subtitle tracks as reported by libdvdread at playback start. Display language for subtitle and audio tracks. This commit restores these features to the state when demux_mpg was default for DVD playback, and makes them work with demux_lavf and the recent changes to subtitle selection in the frontend. demux_mpg, which was the default demuxer for DVD playback, reordered the subtitle streams according to the "logical" subtitle track number, which conforms to the track layout reported by libdvdread, and is what stream_dvd expects for the STREAM_CTRL_GET_LANG call. demux_lavf, on the other hand, adds the streams in the order it encounters them in the MPEG stream. It seems this order is essentially random, and can't be mapped easily to what stream_dvd expects. Solve this by making demux_lavf hand out the MPEG stream IDs (using the demuxer_id field). The MPEG IDs are mapped by mplayer.c by special casing DVD playback (map_id_from/to_demuxer() functions). This mapping is essentially the same what demux_mpg did. Making demux_lavf reorder the streams is out of the question, because its stream handling is already messy enough. (Note that demux_lavf doesn't export stream IDs for other formats, because most time libavformat demuxers do not set AVStream.id, and we don't know which demuxers do. But we know that MPEG is safe.) Another major complication is that subtitle tracks are added lazily, as soon as the demuxer encounters the first subtitle packet for a given subtitle stream. Add the streams in advance. If a yet non-existent stream is selected, demux_lavf must be made to auto-select that subtitle stream as soon as it is added. Otherwise, the first subtitle packet would be lost. This is done by DEMUXER_CTRL_PRESELECT_SUBTITLE. demux_mpg didn't need this: the frontend code could just set ds->id to the desired stream number. But demux_lavf's stream IDs don't map directly to the stream number as used by libdvdread, which is why this hack is needed.
* demux_mkv: fix minor memory leakwm42012-09-181-0/+1
|
* mplayer: don't clear OSD when new file is playedwm42012-09-181-19/+0
| | | | | | | | | | | | | | When switching editions, it would be nice to display an OSD message to notify the user which edition is being played. This would be consistent with visual feedback like on tracking switching, seeking, and so on. Rather than introducing awkward hacks and special cases to determine whether a file is being "restarted" (as it happens on edition switching) to avoid clearing the OSD messages, simply never clear the OSD stack. This is more consistent with handling of OSD bars too: they didn't disappear when going to a new file (especially noticable when seeking past the end of the file).
* core: runtime Matroska edition switchingwm42012-09-186-5/+84
| | | | | | | | | | | | | | | | | | | | | | | Add a new slave property which switches the current Matroska edition. Since each edition can define an entirely new timeline, switching the edition will simply restart playback at the beginning of the file with the new edition selected. Add 'E' as new keybinding to step the edition property. DVD titles are still separate. Apparently they work similarly, but I don't have any multi-title DVDs for testing. Also, cdda (for audio CDs) uses the same mechanism as DVDs to report a number of titles, so there seems to be confusion what exactly this mechanism is supposed to do. That's why the edition code is completely separate for now. Remove demuxer.num_titles. It was just a rather useless cache for the return value of the DVD titles related STREAM_CTRL. One rather obscure corner case isn't taken care of: if the ordered chapters file has file local options set, they are reset on playback restart. This is unexpected, because edition switching is meant to behave like seeking back to the beginning of the file.
* video_out: free memory if initializing a VO failswm42012-09-181-1/+3
| | | | This was a minor memory leak with no real impact.
* mplayer: do not cancel playback if VF/VO config failswm42012-09-181-2/+6
| | | | | | | | | | | | | | | | Usually failing to initialize the video chain does not stop playback, and continues with audio-only. But when VF/VO config failed (the second step in initializing them), playback was canceled and advanced to the next file. Make it more consistent and just switch off video if it fails. Also, if no audio track is selected, go to next file anyway. The player core goes into some sort of idle mode if no video and audio track is selected, and we don't want to trigger it here. (It's unclear whether that is a bug or feature: it's meant to work around some corner cases, but maybe it shouldn't be triggered when switching off video & audio tracks in normal playback.)
* core: move implementation for -audiofile to the frontendwm42012-09-186-313/+129
| | | | This should behave as before, with the same set of caveats.
* core: manage tracks in the frontendwm42012-09-1812-1017/+694
| | | | | | | | | | | | | | | Introduce a general track struct for every audio/video/subtitle track known to the frontend. External files (subtitles) are now represented as tracks too. This mainly serves to clean up the subtitle selection code: now every subtitle is simply a track, instead of using a messy numbering that goes by subtitle type (as it was stored in the global_sub_pos field). The mplayer fontend will list external subtitle files as additional tracks. The timeline code now tries to match the exact demuxer IDs of all tracks. This may cause problems when Matroska files with different track numberings are used with EDL timelines. Change demux_lavf not to set demuxer IDs, since most time they are not set.
* core: refactor MPContext.demuxer field accesseswm42012-09-183-132/+142
| | | | | | | | | | | | | | | | Whenever the demuxer is accessed to retrieve metadata, use the newly introduced master_demuxer field instead. If a timeline is used, the master_demuxer will still refer to the main file, instead to segments. Instead of mpctx->demuxer->stream, access mpctx->stream; even though they are the same, the code becomes shorter. For the TV code, introduce a function get_tvh() to access the TV handle, instead of duplicating the code all over the place. Often the demuxer field is checked to determine whether something is currently played; prefer other methods over that. Note that the code before always accessed the current timeline segment, and would e.g. read file metadata of the current segment. Now it always returns metadata for the master file. This may have various wanted and unwanted effects.
* command: remove sub_remove commandwm42012-09-073-70/+0
| | | | | | | This messes deeply with the subtitle bookkeeping data structures, and would have to be reimplemented anyway. It's not sure what this was even useful for. Possibly for slave mode.
* command: remove sub_log commandwm42012-09-075-53/+1
| | | | | Not very useful, and introduced special cases. Just get rid of it, can be reintroduced if in a better way if someone misses this feature.
* core, timeline: don't keep separate stream fieldwm42012-09-075-60/+41
| | | | | | | | | | | The timeline code kept pairs of stream and demuxer references around. The reference to the stream is redundant, because it can be accessed through the demuxer. Simplify the code by removing the redundant stream reference. Also, set mpctx->stream to the current segment when using timeline. Fix a small memory leak in tl_matroska.c introduced earlier.
* timer: remove timer_namewm42012-09-074-14/+0
| | | | This was unreferenced and useless.
* osd: reset OSD progression displaywm42012-09-071-28/+9
| | | | | | | | | | | | | | The code for showing OSD progression ('P' key) set a flag in a mp_osd_msg_t to do its work. OSD messages can be re-used for completely unrelated purposes (it's unclear why), so this has to be reset if an old OSD progression message is reused for something different. Be sure to reset the full message. Remove the messy code for searching the OSD stack. Use the existing rm_osd_msg() function to remove the old message (if there was one), and always create a new message. The new code should be functionally equivalent to the old code. The "started" flag wasn't reset before, but since the time is always overwritten, this might be actually more correct.
* libaf: rename af_format.h to format.hwm42012-08-2921-20/+20
| | | | | | | | | | af_format.h declares some symbols which are defined in format.c. The fact that af_format.c is a completely unrelated file is rather confusing. Having the header and implementation file use the same base name is more uniform. (af_format.c is the audio conversion filter, while af_format.h and format.c are about audio formats and their properties.) Also fix all source files which include this file.
* options, libaf: unify audio format name handlingwm42012-08-294-123/+36
| | | | | | | | | Remove the duplicated list of audio format names from m_option.c. Remove "long" audio format names, and let af_fmt2str() print the usual short format names. The long names were overly verbose, and were actually rarely user visible. The only difference between af_fmt2str() and af_fmt2str_short() is that the former prints unknown format values as hexadecimal string as fallback.
* options, codecs.conf, img_format: unify imgfmt name handlingwm42012-08-295-196/+41
| | | | | | | | | | | | | Remove the duplication of image format name lists from codec-cfg.c and img_format.c. Remove the list of "long" image format names from img_format.c. One user visible change is that now mplayer won't print "long" format names anymore: e.g. instead of "Planar 420P 10-bit little-endian", the name "420p10le" is used. This is consistent with the names used by the option parser, and also less noisy. Partially based on mplayer2 commit f98e47574de15, with some differences.
* cleanup: remove XvMC remains, reformat img_format.cUoti Urpala2012-08-285-46/+33
| | | | | Remove remaining references to XvMC. It was already not supported; remove references to the imgfmt too. Reformat img_format.c.
* cocoa_common: improve conditional dock hiding from 3259e4a7aStefano Pigozzi2012-08-281-2/+3
| | | | | | Make the conditional hiding logic introduced in commit 3259e4a7a2a938 ("cocoa_common: make fullscreen menubar/dock hiding conditional") work when mplayer is started with the `fs` and `xineramascreen` options.
* OSD/commands: use osdlevel=3 for osd_show_progression commandUoti Urpala2012-08-281-14/+25
| | | | | | | | | | | | | | The osd_show_progression command ('P' key) created text similar to what --osdlevel=3 shows, and set that as an OSD message. This message was static and wasn't updated while visible, even if video position changed (very noticeable during fast forward, when real OSD position changes rapidly). Instead of setting a static message, create a new message type that makes the OSD update code behave as if osd level was set to 3 for the duration of the message. The OSD progress bar isn't updated while the message is active. Based on mplayer2 commit 458001463b2252fc by uau.
* af_scaletempo: fix crash on channel reconfigurationwm42012-08-261-0/+6
| | | | | | | | | | | | | | | | | | This crash happened when audio channels were reconfigured from 6 channels to 2, and playback speed was set to 2. The crash is caused by passing a negative size to memcpy. It appears reinitialization doesn't clear the buffer. As the result, the buffer can be larger as the maximum buffer size, i.e. the invariant bytes_queued <= bytes_queue is violated. Fix this by resetting the buffer length on reconfiguring (set the bytes_queued vairable to 0). Also reset some other state for clarity and robustness, although these changes aren't strictly needed for avoiding the actual crash. This may also get rid of some noise played right after reinitialization, as the re-used buffer was in the wrong audio format.
* DOCS: add big picture overview over the codewm42012-08-261-0/+206
| | | | | Apparently this was useful for some. Isn't as detailed as general.txt and others, but broader and less outdated.
* DOCS: remove outdated/useless fileswm42012-08-252-34/+0
|
* Merge remote-tracking branch 'cantabile/manpage_fixes'wm42012-08-255-121/+68
|\
| * manpage: update default jpeg quality for vo_imagecantabile2012-08-241-1/+1
| |
| * manpage: update default value of --softvol-maxcantabile2012-08-241-1/+1
| |
| * manpage: --screenshot-template: update %n, add %{prop}cantabile2012-08-241-6/+14
| | | | | | | | | | | | Explanation of %{prop} taken from the commit message of commit 12c44610ad6963bb58c01cc4415cc7befef386e1 (screenshot: make screenshot filenames configurable).
| * manpage: update the list of available screenshot formatscantabile2012-08-241-3/+7
| | | | | | | | Also update the default value of --screenshot-jpeg-quality
| * manpage: update example of the status linecantabile2012-08-241-3/+3
| |
| * manpage: fix ambiguous statement about --(no-)keepaspectcantabile2012-08-241-1/+1
| |
| * manpage: mention that videos' colormatrix and color range flags are honoredcantabile2012-08-241-2/+4
| |
| * manpage: don't mention nonexistent VOs, command line switches, etc.cantabile2012-08-243-84/+17
| | | | | | | | Very likely doesn't remove all outdated things.
| * manpage: fix various typoscantabile2012-08-245-20/+20
| |
* | configure: disable optimization if --enable-debug is usedwm42012-08-251-4/+8
| | | | | | | | | | | | | | Enabling optimization _still_ causes annoyances when using a debugger, and it increaes compilation times too. Now --enable-debug basically replaces the -O2 flag with -g.
* | configure: minor improvement to summary outputwm42012-08-251-6/+2
| | | | | | | | | | | | | | Remove printing VO modules that were removed earlier, but were enabled by configure tests that are still needed. Print "libavcodecs" with the "Codecs: " output.
* | configure: restore DVB supportwm42012-08-251-0/+2
| | | | | | | | The code defining CONFIG_DVB[IN] was accidentally removed some time ago.
* | input: add ability to disable all default bindings for an input sectionwm42012-08-243-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a flags parameter to mp_input_set_section(). Add a flag that defines whether bindings in the default section are used or not. This is useful for special functionality, where the normal key bindings may have unwanted effects. For example, it shouldn't be possible to seek during encoding. However, you want to be able to cancel the encoding process gracefully. For that purpose, the "encode" section of input.conf could be made exclusive: mp_input_set_section(mpctx->input, "encode", MP_INPUT_NO_DEFAULT_SECTION); And input.conf could contain this definition: RIGHT seek 10 q {encode} quit Then only the key "q" would be bound during encoding.
* | vf_dlopen: add a generic filter to load external filtersRudolf Polzer2012-08-2311-0/+1014
| | | | | | | | | | | | Usage: -vf dlopen=filename.so:args... Examples of such filters are provided in TOOLS/vf_dlopen/
* | img_format, m_option: make image format name list globally availablewm42012-08-233-81/+111
|/ | | | And add functions for converting them from/to the name string.
* osd_libass: fix displaying empty text, fix API usagewm42012-08-211-11/+6
| | | | | | | | | | | | | | If empty text is rendered, the bounding box is empty. Instead of continuing with a bogus bounding box that would result in garbage being rendered on screen, make the OSD image invisible. This happened when playing demuxer SRT subtitles (e.g. SRT embedded in MKV) with -no-ass at the moment a subtitle line disappeared. Unrelated to this issue, fix libass API usage. Delete the event with libass_flush_events(), instead of trying to reuse the previous event. Based on a patch by uau.
* Adjust ffmpeg/libav #includes to work with recent upstream changesUoti Urpala2012-08-2113-17/+27
| | | | | | | | The <libavutil/avutil.h> stopped including <libavutil/common.h> recursively in recent ffmpeg/libav git revisions. As a result, some files no longer got needed definitions, causing a build failure. Modify #include lines in various files to fix build with the latest versions of ffmpeg/libav headers.
* video: honor the video's colormatrix and color range flagscantabile2012-08-215-0/+49
| | | | | | If either of them is not defined, the old behavior is used: - the colormatrix is guessed based on resolution. - the color range is assumed to be tv aka limited range.
* manpage: correct the definition of full range videocantabile2012-08-211-1/+1
|
* manpage: document -use-filename-title removal/replacementwm42012-08-201-0/+1
|
* parser-cfg: specify which config file contains the unknown optioncantabile2012-08-201-2/+2
| | | | Also add some punctuation to the warning message.
* mplayer: enable talloc leak report if special environment is variable setwm42012-08-201-4/+7
| | | | | | | | | | | | | | | | | The functionality enabled with the --leak-report option is very useful for debugging. Introduce a check for the MPLAYER_LEAK_REPORT environment variable, and enable talloc leak report if it's set to "1". The environment variable encourages enabling leak report permanently during development. It's also a bit harder to get wrong: if the --leak-report option is not the first option, it's silently ignored. You can't put this option into a config file either. Enabling this with --enable-debug in configure is not an option, because the leak report code doesn't seem to be thread-safe, and thus is a bit dangerous. Also, move the code to the very beginning to make sure leak report is enabled before any other talloc function is used. Otherwise, these allocations could be missed.
* mplayer: fix command line arguments log outputwm42012-08-201-1/+1
| | | | | | | In commit 94782e464d985b6e65, code was added to remove the first command line argument. (Because that is essentially useless.) The code for printing with command line on -v still assumed the first argument should be skipped.
* osd: get rid of useless initialization functionwm42012-08-203-29/+1
| | | | | The function merely printed redundant messages that were not visible by default.
* sub: remove unused definitionswm42012-08-201-12/+0
|
* demux_gif: change format of packets to make it work againwm42012-08-201-9/+23
| | | | | | | | | | | | | | The only decoder which could handle demux_gif's output was vd_raw, which has been removed recently. Instead of re-adding vd_raw, make it work with vd_ffmpeg. By coincidence, the FourCC "raw " fits our needs and it understood by the ffmpeg raw decoder (apparently used in mov files going by libavcodec/rawdec.c). Since there doesn't seem to be any good way to transport the palette in mplayer dmuxer packets, create an AVPacket for this purpose. (struct sh_video provides a "global" palette. Rather than hacking vd_ffmpeg to use it, it seems cleaner to make demux_gif use AVPacket, which supports a per-frame palette.)
* vd_ffmpeg, demux_mng: allow general raw formats, fix MNG demuxerwm42012-08-202-9/+20
| | | | | | | | | | | | | | | Change vd_ffmpeg such that if sh_video->format is a mplayer pixel format, and there's no other codec information, try to play it as raw video. (The case of no codec information happens if the "generic" ffmpeg decoder is instantiated, which is tried last. This means clashes with actual existing formats are less likely.) demux_mng did not initialize all fields of the bih, which made vd_ffmpeg do invalid memory accesses when trying to copy the extradata. Also, use IMGFMT_RGB32 instead of creating the FourCC directly. (They should be the same, but what if mplayer changes the IMGFMT_* values.) This also fixes demux_rawvideo.
* libmpcodecs: remove redundant audio and video decoderswm42012-08-2027-7822/+1
| | | | | | | | Probably all of these are supported by libavcodec. Missing things can be added back. Also remove qtpalette.h. It was used by demux_mov.c, and should have been deleted with commit 1fde09db6f4ce.
* Remove support for libdvwm42012-08-2011-593/+0
| | | | | This removes the libdv demuxer and audio/video decoders. FFmpeg has support for it, and it's even preferred over the internal decoders.
* Remove support for libnemesi RTSP streamingwm42012-08-208-632/+0
| | | | | Removed due to being a maintainance burden. Support for FFmpeg is available.
* Remove support for LIVE555 RTSP streamingwm42012-08-2014-1476/+2
| | | | | | | | | | | | The main excuse for removing this is that LIVE555 deprecated the API the mplayer implementation was using. The old API still seems to be somewhat supported, but must be explicitly enabled at LIVE555 compilation, so mplayer won't always work on any user installation. The implementation was also very messy, in C++, and FFmpeg support is available as alternative. Remove it completely.
* libmpdemux: remove demux_real, demux_viv, demux_audiowm42012-08-2015-4275/+58
| | | | | | libavformat replaces demux_audio completely. I don't know/care what vivo (demux_viv) is. libavformat has a Real demuxer; it seems it works slightly better, with a different set of bugs.
* build: remove leftover bits for internal libdvdread supportwm42012-08-202-28/+0
| | | | | | | Support for internal libdvdread has been removed in commit 41fbcee1f55, but some bits have been missed in Makefile/configure. Support for libdvdread as normal library is left unchanged.
*