summaryrefslogtreecommitdiffstats
path: root/stream
Commit message (Collapse)AuthorAgeFilesLines
* stream_smb: remove dead codewm42013-12-221-22/+1
| | | | | Yep, smb_username/password were unused since forever, even in MPlayer. Removal untested. (Does anyone even use smb://?)
* stream_radio: suppress error with -Werror=format-security compilation flagMiro Hrončok2013-12-221-1/+1
| | | | Signed-off-by: wm4 <wm4@nowhere>
* stream: minor cookie cleanupwm42013-12-222-26/+23
| | | | | Avoid global state (reload cookie file every time), actually free loaded cookies, use mp_get_user_path() for cookie file.
* options: move network related options to MPOptswm42013-12-223-19/+20
|
* msg: rename mp_msg_log -> mp_msgwm42013-12-212-4/+4
| | | | Same for companion functions.
* path lookup functions: mp_msg conversionswm42013-12-211-3/+0
| | | | | | | | | | | | | | | | | There's a single mp_msg() in path.c, but all path lookup functions seem to depend on it, so we get a rat-tail of stuff we have to change. This is probably a good thing though, because we can have the path lookup functions also access options, so we could allow overriding the default config path, or ignore the MPV_HOME environment variable, and such things. Also take the chance to consistently add talloc_ctx parameters to the path lookup functions. Also, this change causes a big mess on configfiles.c. It's the same issue: everything suddenly needs a (different) context argument. Make it less wild by providing a mp_load_auto_profiles() function, which isolates most of it to configfiles.c.
* quvi: mp_msg conversionswm42013-12-213-17/+30
|
* stream: mp_msg conversionswm42013-12-2130-721/+539
| | | | We also drop some slave mode stuff from stream_vcd.
* demux: mp_msg conversionswm42013-12-2110-209/+217
| | | | | | | The TV code pretends to be part of stream/, but it's actually demuxer code too. The audio_in code is shared between the TV code and stream_radio.c, so stream_radio.c needs a small hack until stream.c is converted.
* m_option, m_config: mp_msg conversionswm42013-12-211-1/+1
| | | | | | | | Always pass around mp_log contexts in the option parser code. This of course affects all users of this API as well. In stream.c, pass a mp_null_log, because we can't do it properly yet. This will be fixed later.
* stream: remove stale MAX_STREAM_PROTOCOLS definewm42013-12-191-2/+0
|
* Reduce recursive config.h inclusions in headerswm42013-12-183-1/+2
| | | | | | In my opinion, config.h inclusions should be kept to a minimum. MPlayer code really liked including config.h everywhere, though, even in often used header files. Try to reduce this.
* stream: move O_BINARY dummy definitionwm42013-12-181-4/+0
|
* Remove the _ macrowm42013-12-181-0/+2
| | | | | This was a gettext-style macro to mark strings that should be translated.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-1731-37/+37
|
* Merge mp_talloc.h into ta/ta_talloc.hwm42013-12-172-2/+2
|
* Move options/config related files from mpvcore/ to options/wm42013-12-1717-22/+22
| | | | | | | | | Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.
* Move libquvi stuff to stream/resolve/wm42013-12-173-0/+321
|
* Move mpvcore/input/ to input/wm42013-12-171-1/+1
|
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-1617-168/+166
| | | | | | | | | The tmsg stuff was for the internal gettext() based translation system, which nobody ever attempted to use and thus was removed. mp_gtext() and set_osd_tmsg() were also for this. mp_dbg was once enabled in debug mode only, but since we have log level for enabling debug messages, it seems utterly useless.
* dvdnav: select longest title by defaultwm42013-12-141-6/+26
| | | | This way we probably do the right thing, and avoid all the menu shit.
* dvdnav: crappy hack to respect timed still frameswm42013-12-142-21/+12
| | | | | | Before this, they were displayed forever. Since some dvd screens seem not to allow escaping from the still frame using the menu, this could get you stuck forever.
* dvdnav, tv: force-disable cachingwm42013-12-144-4/+5
| | | | | | | | | On dvdnav, caching kind of works but not really. (Not our fault, at least not fully. It's due to libdvdnav being slightly misdesigned; see previous commit for some explanations.) The TV code is implemented in the demuxer, and the stream implementation is just a wrapper, so caching makes no sense here.
* dvdnav: enable cachingwm42013-12-141-2/+1
| | | | | | No idea why this was disabled. It was in the original MPlayer code, which doesn't make much sense to me, because using the MPlayer stream cache seems 100% broken due to design issues.
* stream_dvdnav: drop stream buffers on seekwm42013-12-141-3/+5
|
* cache: add a way to explicitly resume cachewm42013-12-142-0/+5
|
* cache: try harder on EOFwm42013-12-141-5/+11
| | | | | | | | | | | | | EOF is a special case. Normally, the reader will block until the cache thread has new data. Obviously we don't want to do this on EOF, because we'd potentially block forever. On the other hand, EOF will put the cache thread into a waiting state, so if EOF recovers, this will happen at a "later" point. This is bad if there is some kind of external event that ends the EOF condition. In this case, a steram_read() call would still return EOF. Make it so that the reader waits at least for one iteration of the cache trying to rad a new block. Also adjust some debug messages to not print file positions in hex.
* stream: don't seek when seeking to the same positionwm42013-12-141-0/+3
| | | | | | There was already something similar in the code that did the actual seek, but I think seeking to the same position could still trigger an actual seek due to weid interaction with the buffer.
* stream: add function for dropping the bufferwm42013-12-142-2/+11
| | | | | And use it in demux_lavf.c. It looks like otherwise, some data might be left over, depending on how the hell av_seek_frame() behaves.
* dvdnav: remove highlights if no PCI availablewm42013-12-131-1/+3
| | | | | Not sure if this actually can happen. It doesn't remove the problem that mpv sometimes shows highlights on nav screens which have no highlight.
* Add prelimimary (basic, possibly broken) dvdnav supportwm42013-12-125-0/+807
| | | | | | | | | | | | | | | | | | | | | | | | | This readds a more or less completely new dvdnav implementation, though it's based on the code from before commit 41fbcee. Note that this is rather basic, and might be broken or not quite usable in many cases. Most importantly, navigation highlights are not correctly implemented. This would require changes in the FFmpeg dvdsub decoder (to apply a different internal CLUT), so supporting it is not really possible right now. And in fact, I don't think I ever want to support it, because it's a very small gain for a lot of work. Instead, mpv will display fake highlights, which are an approximate bounding box around the real highlights. Some things like mouse input or switching audio/subtitles stream using the dvdnav VM are not supported. Might be quite fragile on transitions: if dvdnav initiates a transition, and doesn't give us enough mpeg data to initialize video playback, the player will just quit. This is added only because some users seem to want it. I don't intend to make mpv a good DVD player, so the very basic minimum will have to do. How about you just convert your DVD to proper video files?
* stream: fix clang warningStefano Pigozzi2013-12-071-1/+1
| | | | Good clang catches programming errors. `open(2)` takes `int` not `mode_t`.
* player: load external subs for uncompressed rar archiveswm42013-12-062-0/+13
| | | | | | | | | | | | Uncompressed rar archives can be transparently opened, but the filename the player doesn't have the direct filename (but something starting with rar://... instead). This will lead to external subtitles not being loaded. This doesn't handle multi-volume rar files, but in that cases just use the --autosub-match=fuzzy option. Fixes #397 on github.
* Use O_CLOEXEC when creating FDswm42013-11-309-16/+32
| | | | | | | | | | | | | | This is needed so that new processes (created with fork+exec) don't inherit open files, which can be important for a number of reasons. Since O_CLOEXEC is relatively new (POSIX.1-2008, before that Linux specific), we #define it to 0 in io.h to prevent compilation errors on older/crappy systems. At least this is the plan. input.c creates a pipe. For that, add a mp_set_cloexec() function (which is based on Weston's code in vo_wayland.c, but more correct). We could use pipe2() instead, but that is Linux specific. Technically, we have a race condition, but it won't matter.
* build: make pthreads mandatorywm42013-11-281-6/+1
| | | | | | | | | | | pthreads should be available anywhere. Even if not, for environment without threads a pthread wrapper could be provided that can't actually start threads, thus disabling features that require threads. Make pthreads mandatory in order to simplify build dependencies and to reduce ifdeffery. (Admittedly, there wasn't much complexity, but maybe we will use pthreads more in the future, and then it'd become a real bother.)
* Reduce stheader.h includes, move stream types to mp_common.hwm42013-11-234-4/+0
|
* demux: remove gsh field from sh_audio/sh_video/sh_subwm42013-11-231-6/+6
| | | | | | | | | This used to be needed to access the generic stream header from the specific headers, which in turn was needed because the decoders had access only to the specific headers. This is not the case anymore, so this can finally be removed again. Also move the "format" field from the specific headers to sh_stream.
* stream_lavf: fix a small memory leakwm42013-11-211-1/+5
| | | | Also add an explanation why this special code path for rtsp is needed.
* timeline: add edl:// URIswm42013-11-193-0/+24
| | | | | Questionable change from user perspective, but internally needed to implement the next commit. Also useful for testing timeline stuff.
* stream_dvb: remove bogus free callswm42013-11-181-5/+0
| | | | | | The priv struct is now allocated by talloc in stream.c. It doesn't need to be manually freed, and using free() instead of talloc_free() probably crashes.
* stream: split out pthread helper functionwm42013-11-171-26/+3
| | | | Also split the function itself into 3.
* demux: use talloc for certain stream headerswm42013-11-141-1/+1
| | | | | | | Slightly simplifies memory management. This might make adding a demuxer cache wrapper easier at a later point, because you can just copy the complete stream header, without worrying that the wrapper will free the individual stream header fields.
* tvi_v4l2: remove VBI stuffwm42013-11-131-100/+0
| | | | | | | | This used to be needed for teletext support. Teletext commit has been removed (see commit ebaaa41f), and it appears this code is inactive. It was just forgotten with the removal. Get rid of it completely. Untested. (Like all changes to the TV code.)
* tvi_v4l2: let libv4l2 convert to a known pixel formatbugmen0t2013-11-131-47/+58
| | | | | | | | | | | Signed-off-by: wm4 <wm4@nowhere> Significant modifications over the original patch by not overriding syscalls with macros ("#define open v4l2open") for fallback, but the other way around ("#define v4l2open open"). As consequence, the calls have to be replaced throughout the file. Untested, although the original patch probably was tested.
* stream: don't include linux/types.h in some fileswm42013-11-133-4/+0
| | | | | | Apparently this is not portable to FreeBSD. It turns out that we (probably) don't use any symbols defined by this header directly, so the includes are not needed.
* Remove sh_audio->samplesizewm42013-11-093-14/+5
| | | | | | | | | This member was redundant. sh_audio->sample_format indicates the sample size already. The TV code is a bit strange: the redundant sample size was part of the internal TV interface. Assume it's really redundant and not something else. The PCM decoder ignores the sample size anyway.
* audio: replace af_fmt2str_short -> af_fmt_to_strwm42013-11-071-3/+2
| | | | Also, remove all af_fmt2str usages.
* stream_lavf: don't duplicate list of rtmp protocolswm42013-11-041-6/+4
| | | | Assume a rtmp prefix means rtmp instead.
* stream_lavf: support more libavformat protocolswm42013-11-041-1/+3
|
* Merge branch 'master' into have_configurewm42013-11-041-5/+11
|\ | | | | | | | | Conflicts: configure
| * stream: more consistent checks for whether stream is seekablewm42013-11-031-6/+10
| | | | | | | | | | | | | | | | | | Never check s->seek (except in init), because it'd have to check s->flags anyway. Also, for fast skippable streams (like pipes), don't set the bit that indicates support for seek forward. Make sure s->end_pos is always 0 for unseekable streams. Lots of code outside of stream.c uses this to check seeking support.
| * stream: reconnecting doesn't make sense if stream is not seekablewm42013-11-031-0/+2
| | | | | | | | | | | | | | This stops mpv from being stuck in reconnecting at the end of the file with some unseekable streams. Test URL: http://playerservices.streamtheworld.com/pls/CBC_R1_VCR_H.pls
* | configure: uniform the defines to #define HAVE_xxx (0|1)Stefano Pigozzi2013-11-037-72/+72
|/ | | | | | | | | | | | | | | | | | | | | The configure followed 5 different convetions of defines because the next guy always wanted to introduce a new better way to uniform it[1]. For an hypothetic feature 'hurr' you could have had: * #define HAVE_HURR 1 / #undef HAVE_DURR * #define HAVE_HURR / #undef HAVE_DURR * #define CONFIG_HURR 1 / #undef CONFIG_DURR * #define HAVE_HURR 1 / #define HAVE_DURR 0 * #define CONFIG_HURR 1 / #define CONFIG_DURR 0 All is now uniform and uses: * #define HAVE_HURR 1 * #define HAVE_DURR 0 We like definining to 0 as opposed to `undef` bcause it can help spot typos and is very helpful when doing big reorganizations in the code. [1]: http://xkcd.com/927/ related
* Fix some more -Wshadow warningswm42013-11-013-4/+4
| | | | | | These aren't printed with newer gcc or clang versions for some reason. All of them seem to be about local variables shadowing global functions.
* Enable -Wshadowwm42013-11-011-3/+3
| | | | | | | | | This one really did bite me hard (see previous commit), so enable it by default. Fix some cases of shadowing throughout the codebase. None of these change behavior, and all of these were correct code, and just tripped up the warning.
* ao_alsa: don't include alloca.hwm42013-10-251-1/+0
| | | | | | | | It's true that ALSA uses alloca() in some of its API functions, but since this is hidden behind macros in the ALSA headers, we have no reason to include alloca.h ourselves. Might help with portability (FreeBSD).
* tv: simplify ifdefferywm42013-10-171-8/+2
| | | | Too ugly to leave it be.
* Copyright, LICENSE: switch to GPL version 2 or laterwm42013-10-131-1/+2
| | | | | | | | | | | | | | | Now that talloc has been removed, the license can be switched back to GPLv2+. Actually, there never was a GPLv2+ licensed MPlayer (fork or not) until now, but removal of some GPLv2-only code makes this possible now. Rewrite the Copyright file to explain the reasons for the licenses MPlayer and forks use. The old Copyright file didn't contain anything interesting anymore, and all information it contained is available at other places in the source tree. The reason for the license change itself is that it should improve interoperability with differently licensed code in general. This essentially reverts commit 1752808.
* audio/out: add sndio supportChristian Neukirchen2013-10-033-0/+127
| | | | Based on an earlier patch for mplayer by Alexandre Ratchov <alex@caoua.org>
* cosmetics: replace "CTRL" defines by enumswm42013-10-021-25/+27
| | | | Because why not.
* network: add options to control TLS verificationwm42013-09-271-0/+3
|
* mplayer: attempt to make playback resume work with DVD/BDwm42013-09-224-6/+3
| | | | | | | | | | | | | | | | The problem with DVD/BD and playback resume is that most often, the filename is just "dvd://", while the actual path to the DVD disk image is given with --dvd-device. But playback resume works on the filename only. Add a pretty bad hack that includes the path to the disk image if the filename starts with dvd://, and the same for BD respectively. (It's a bad hack, but I want to go to bed, so here we go. I might revert or improve it later, depending on user feedback.) We have to cleanup the global variable mess around the dvd_device. Ideally, this should go into MPOpts, but it isn't yet. Make the code paths in mplayer.c take MPOpts anyway.
* network: fix rtsp playbackwm42013-09-221-1/+1
| | | | | | | | | | | | | | By default, libavformat uses UDP for rtsp playback. This doesn't work very well. Apparently the reason is that the buffer sizes libavformat chooses for UDP are way too small, and switching to TCP gets rid of this issue entirely (thanks go to Reimar Döffinger for figuring this out). In theory, you can set buffer sizes as libavformat options, but that doesn't seem to help. Add an option to select the rtsp transport, and make TCP the default. Also remove an outdated comment from stream.c.
* stream_lavf: print lavf options that could not be setwm42013-09-221-0/+6
| | | | | | | | | Mainly for debugging. Usually, we just set options for all possible protocols, and we can't really know whether a certain protocol is used beforehand. That's also the reason why avio_open2() takes a dictionary, instead of letting the user set options directly with av_opt_set(). Or in other words, we don't know whether an option that could be set is an error or not, thus we print the messages only at verbose level.
* stream_dvd: prevent segmentation fault with some broken filesStefano Pigozzi2013-09-141-2/+2
| | | | | | | I have a sample where some final chapters are missing. This was causing a segmentation fault when trying to fetch chapter times for them. This makes the code ignore those chapters.
* stream_bluray: return number of titleswm42013-09-101-6/+11
| | | | So that the "titles" property returns the number of titles.
* stream: force demuxer of cached stream, fixes cdda:// + cachewm42013-09-101-0/+1
|
* path: add a common mp_is_url() functionwm42013-09-041-4/+3
| | | | Remove the duplicated code.
* tv: attempt to support mjpeg streamswm42013-0