summaryrefslogtreecommitdiffstats
path: root/stream
Commit message (Collapse)AuthorAgeFilesLines
* stream_file: enable cache for FUSE filesystems on OpenBSD and FreeBSDgall0ws2018-06-051-1/+1
|
* options: add --http-proxywm42018-05-311-0/+4
| | | | Often requested, trivial.
* stream_file: properly detect stdin as pipewm42018-05-251-17/+16
| | | | | | | | | | | | There is some code that checks a FD for whether it is a regular file or not. If it's not a regular file, it e.g. enables use of poll() to avoid blocking forever. But this was done only for FDs that were open()ed by us, not from stdin special handling or fd://. Consequently, " | mpv -" could block the player. Fix this by moving the code and running for it on all FDs. Also, set p->regular_file even on mingw.
* stream_libarchive: mark as needing cachewm42018-04-151-0/+1
| | | | | Seeking back can be excessively slow with most formats, so it'll benefit from this.
* demux, stream: ignore packets and errors on forced exitwm42018-03-261-1/+2
| | | | | | | | | | When this happens, network calls are forcibly aborted (more or less), but demuxers might keep going, as most of them do not check for forced exits properly. This can possibly lead to broken packets being added. Also do not attempt to read more packets in this situation. Also do not print a stream open failed message if opening was aborted anyway.
* stream_file: enable cache for FUSE filesystems on OS XPhilip Sequeira2018-03-151-1/+2
| | | | Requested in #634. Better late than never?
* stream_file: add more network file systems (Linux)Philip Sequeira2018-03-151-0/+1
| | | | Fixes #5643.
* tv: Recognise v4l2 'JPEG' fourccPhilip Langdale2018-03-043-2/+7
| | | | | | | | | | | | | Naturally, there's more than one fourcc that indicates an mjpeg stream. I have a particular ancient webcam here (Logitech QuickCam Messanger) that only supports the single 'JPEG' format, but there are other devices out there which support both 'JPEG' and 'MJPG' with no visible differences, and others where the streams are slightly different. Regardless of those details, it remains correct to treat 'JPEG' the same as 'MJPG' from a stream consumption perspective.
* stream_file: add mode for reading appended fileswm42018-02-211-7/+48
| | | | | | | | | | | | | Do this because retrying reading on higher levels (like the demuxer) usually causes tons of problems. A hack like this is simpler and could allow to remove some of the higher level retry behavior. This works by trying to detect whether the file is appended. If we reach EOF, check if the file size changed compared to the initial value. If it did, it means the file was appended at least once, and we set the p->appending flag. If that flag is set, we simply retry reading more data every time we encounter EOF. The only way to do this is polling, and we poll for at most 10 times, after waiting for 200ms every time.
* stream_lavf: remove deprecated hls protocol from whitelistwm42018-01-251-1/+1
| | | | | | The use of the FFmpeg hls protocol (as opposed to demuxer) is "discouraged", and probably only causes additional potential security problems at best, so drop it.
* stream_bluray: always show list of available titlesRicardo Constantino2018-01-231-2/+2
|
* stream_bluray: silence libbluray's debug messages unless we want themRicardo Constantino2018-01-231-0/+4
| | | | libbluray's way too verbose on default loglevel with non-breaking issues.
* Fix undefined preprocessor behaviorwm42018-01-181-1/+5
| | | | | | | | | | | This commit eliminates the following clang warning: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] Going by the clang commit message, this seems to be explicitly specified as UB by the standard, and they added this warning because MSVC apparently results in different behavior. Whatever, we can just avoid the warning with some small changes.
* stream_bluray: support detecting UHD BD directoriesRicardo Constantino2018-01-111-10/+7
| | | | Close #5325
* cache: fix --cache-initial status messagewm42018-01-071-4/+3
| | | | | | | | | | | | | | | For quite some time, msg.c hasn't output partial log messages anymore, and instead buffered them in memory. This means the MP_INFO() statement here just kept appending the message to memory, instead of outputting it. Easy enough to fix by abusing the status line (which means the frontend and this code will "fight" for the status line, but this code seems to win usually, as the frontend doesn't update it so often). Users should probably really switch to --cache-pause-initial. Fixes #5360.
* stream: use native libavformat reconnection featurewm42018-01-044-64/+3
| | | | | | | | | | | | | | | | | | Remove our own hacky reconnection code, and use libavformat's feature for that. It's disabled by default, and until recently it did not work too well. This has been fixed in recent ffmpeg git master[1], so there's no reason to keep our own code. [1] FFmpeg/FFmpeg@8a108bdea06fac43af9f44b6d2538f357451167a We set "reconnect_delay_max" to 7, which limits the maximum time it waits. Since libavformat doubles the wait time on each reconnect attempt (starting with 1), and stops trying to reconnect once the wait time is over the reconnect_delay_max value, this allows for 4 reconnection attempts which should add to 11 seconds maximum wait time. The default is 120, which seems too high for normal playback use. (The user can still override these parameters with --stream-lavf-o.)
* stream_lavf: minor fixes to HTTP reconnection supportwm42018-01-022-6/+14
| | | | | | | | | | | | | Don't drop the stream buffers, because the read call (that must have been failing) might try to extend an existing read buffer in the first place. Just move the messy seek logic to stream_lavf.c. (In theory, stream_lavf should probably make libavformat connect at the correct offset instead of using a seek to reconnect it again. This patch doesn't fix it, but at least it's a good argument to have the messing with the position not in the generic code.) Also update the comment about avio not supporting reconnecting. It has that feature now. Maybe we should use it, but only after it gets fixed.
* stream_libarchive: fix seeking fallbackwm42017-12-241-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | In commit 1199c1e3, we added checks to every libarchive API call to make sure the archive was closed on ARCHIVE_FATAL - otherwise, libarchive could endow us with free CVEs (such as it apparently happens when you continue reading a rar archive that uses features not yet supported by libarchive). This broke the fallback for seeking in unseekable archive formats. Of course libarchive won't tell us directly whether a format implementation has seek support or not - and OF COURSE it returns ARCHIVE_FATAL if it has no seek support. (The error string, which you can retrieve via API, is actually more detailed, and also claims it's an "internal error". I don't think so, libarchive.) Returning ARCHIVE_FATAL means we have to assume free CVEs are ahead, and we have to close the archive. Which breaks the fallback in a dumb way (we have no way of telling which of those cases happened anyway). Fix this by assuming that all seek errors are potentially due to lack of seek support. If the seek call fails, reopen the archive, and set a flag so the seek API is never tried again. (This means we can still skip ahead for forward seeks, which is more efficient than skipping from the start of the archive entry.) Also fix an old typo in an error message.
* cache: propagate underlying stream seek errors in some caseswm42017-12-241-1/+12
| | | | | This just put the cache into an endless loop. This can happen simply if any seek call of the underlying stream returns an error.
* cache: lower default size to 2*10MBwm42017-12-231-2/+2
| | | | | | | | | | | | Reduce it from 75MB in both directions (forward/backwards) to 10MB each. The stream cache is kind of becoming useless in favor of the demuxer cache. Using both doesn't make much sense, because they will contain duplicated data for no reason. Still leave it at 10MB, which may help with mp4 a bit. libavformat's mp4 demuxer tends to seek too much, so we try to avoid triggering network level seeks by having some caching in the stream layer.
* dvb: Add multiple frontends support: MAX_FRONTENDS now 8.rim2017-12-164-88/+99
|
* msg: reinterpret a bunch of message levelsNiklas Haas2017-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | I've decided that MP_TRACE means “noisy spam per frame”, whereas MP_DBG just means “more verbose debugging messages than MSGL_V”. Basically, MSGL_DBG shouldn't create spam per frame like it currently does, and MSGL_V should make sense to the end-user and provide mostly additional informational output. MP_DBG is basically what I want to make the new default for --log-file, so the cut-off point for MP_DBG is if we probably want to know if for debugging purposes but the user most likely doesn't care about on the terminal. Also, the debug callbacks for libass and ffmpeg got bumped in their verbosity levels slightly, because being external components they're a bit less relevant to mpv debugging, and a bit too over-eager in what they consider to be relevant information. I exclusively used the "try it on my machine and remove messages from MSGL_* until it does what I want it to" approach of refactoring, so YMMV.
* stream_libarchive: Fix locale includes on macOSsfan52017-12-031-0/+5
| | | | Fixes #5108
* stream_libarchive, osdep: use stubs for POSIX 2008 locale on MinGWwm42017-11-121-0/+1
|
* stream_libarchive: workaround various types of locale braindeathwm42017-11-122-4/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix that libarchive fails to return filenames for UTF-8/UTF-16 entries. The reason is that it uses locales and all that garbage, and mpv does not set a locale. Both C locales and wchar_t are shitfucked retarded legacy braindeath. If the C/POSIX standard committee had actually competent members, these would have been deprecated or removed long ago. (I mean, they managed to remove gets().) To justify this emotional outbreak potentially insulting to unknown persons, I will write a lot of text. Those not comfortable with toxic language should pretend this is a religious text. C locales are supposed to be a way to support certain languages and cultures easier. One example are character codepages. Back when UTF-8 was not invented yet, there were only 255 possible characters, which is not enough for anything but English and some european languages. So they decided to make the meaning of a character dependent on the current codepage. The locale (LC_CTYPE specifically) determines what character encoding is currently used. Of course nowadays, this is legacy nonsense. Everything uses UTF-8 for "char", and what doesn't is broken and terrible anyway. But the old ways stayed with us, and the stupidity of it as well. C locales were utterly moronic even when they were invented. The locale (via setlocale()) is global state, and global state is not a reasonable way to do anything. It will break libraries, or well modularized code. (The latter would be forced to strictly guard all entrypoints set set/restore locales, assuming a single threaded world.) On top of that, setting a locale randomly changes the semantics of a bunch of standard functions. If a function respects locale, you suddenly can't rely on it to behave the same on all systems. Some behavior can come as a surprise, and of course it will be dependent on the region of the user (it doesn't help that most software is US-centric, and the US locale is almost like the C locale, i.e. almost what you expect). Idiotically, locales were not just used to define the current character encoding, but the concept was used for a whole lot of things, like e. g. whether numbers should use "," or "." as decimal separaror. The latter issue is actually much worse, because it breaks basic string conversion or parsing of numbers for the purpose of interacting with file formats and such. Much can be said about how retarded locales are, even beyond what I just wrote, or will wrote below. They are so hilariously misdesigned and insufficient, I can't even fathom how this shit was _standardized_. (In any case, that meant everyone was forced to implement it.) Many C functions can't even do it correctly. For example, the character set encoding can be a multibyte encoding (not just UTF-8, but awful garbage like Shift JIS (sometimes called SHIT JIZZ), yet functions like toupper() can return only 1 byte. Or just take the fact that the locale API tries to define standard paper sizes (LC_PAPER) or telephone number formatting (LC_TELEPHONE). Who the fuck uses this, or would ever use this? But the badness doesn't stop here. At some point, they invented threads. And they put absolutely no thought into how threads should interact with locales. So they kept locales as global state. Because obviously, you want to be able to change the semantics of basic string processing functions _while_ they're running, right? (Any thread can call setlocale() at any time, and it's supposed to change the locale of all other threads.) At this point, how the fuck are you supposed to do anything correctly? You can't even temporarily switch the locale with setlocale(), because it would asynchronously fuckup the other threads. All you can do is to enforce a convention not to set anything but the C local (this is what mpv does), or to duplicate standard functions using code that doesn't query locale (this is what e.g. libass does, a close dependency of mpv). Imagine they had done this for certain other things. Like errno, with all the brokenness of the locale API. This simply wouldn't have worked, shit would just have been too broken. So they didn't. But locales give a delicious sweet spot of brokenness, where things are broken enough to cause neverending pain, but not broken enough that enough effort would have spent to fix it completely. On that note, standard C11 actually can't stringify an error value. It does define strerror(), but it's not thread safe, even though C11 supports threads. The idiots could just have defined it to be thread safe. Even if your libc is horrible enough that it can't return string literals, it could just just some thread local buffer. Because C11 does define thread local variables. But hey, why care about details, if you can just create a shitty standard? (POSIX defines strerror_r(), which "solves" this problem, while still not making strerror() thread safe.) Anyway, back to threads. The interaction of locales and threads makes no sense. Why would you make locales process global? Who even wanted it to work this way? Who decided that it should keep working this way, despite being so broken (and certainly causing implementation difficulties in libc)? Was it just a fucked up psychopath? Several decades later, the moronic standard committees noticed that this was (still is) kind of a bad situation. Instead of fixing the situation, they added more garbage on top of it. (Probably for the sake of "compatibility"). Now there is a set of new functions, which allow you to override the locale for the current thread. This means you can temporarily override and restore the local on all entrypoints of your code (like you could with setlocale(), before threads were invented). And of course not all operating systems or libcs implement this. For example, I'm pretty sure Microsoft doesn't. (Microsoft got to fuck it up as usual, and only provides _configthreadlocale(). This is shitfucked on its own, because it's GLOBAL STATE to configure that GLOBAL STATE should not be GLOBAL STATE, i.e. completely broken garbage, because it requires agreement over all modules/libraries what behavior should be used. I mean, sure, makign setlocale() affect only the current thread would have been the reasonable behavior. Making this behavior configurable isn't, because you can't rely on what behavior is active.) POSIX showed some minor decency by at least introducing some variations of standard functions, which have a locale argument (e.g. toupper_l()). You just pass the locale which you want to be used, and don't have to do the set locale/call function/restore locale nonense. But OF COURSE they fucked this up too. In no less than 2 ways: - There is no statically available handle for the C locale, so you have to initialize and store it somewhere, which makes it harder to make utility functions safe, that call locale-affected standard functions and expect C semantics. The easy solution, using pthread_once() and a global variable with the created locale, will not be easily accepted by pedantic assholes, because they'll worry about allocation failure, or leaking the locale when using this in library code (and then unloading the library). Or you could have complicated library init/uninit functions, which bring a big load of their own mess. Same for automagic DLL constructors/destructors. - Not all functions have a variant that takes a locale argument, and they missed even some important ones, like snprintf() or strtod() WHAT THE FUCK WHAT THE FUCK WHAT THE FUCK WHAT THE FUCK WHAT THE FUCK WHAT THE FUCK WHAT THE FUCK WHAT THE FUCK WHAT THE FUCK I would like to know why it took so long to standardize a half-assed solution, that, apart from being conceptually half-assed, is even incomplete and insufficient. The obvious way to fix this would have been: - deprecate the entire locale API and their use, and make it a NOP - make UTF-8 the standard character type - make the C locale behavior the default - add new APIs that explicitly take locale objects - provide an emulation layer, that can be used to transparently build legacy code without breaking them But this wouldn't have been "compatible", and the apparently incompetent standard committees would have never accepted this. As if anyone actually used this legacy garbage, except other legacy garbage. Oh yeah, and let's care a lot about legacy compatibility, and let's not care at all about modern code that either has to suffer from this, or subtly breaks when the wrong locales are active. Last but not least, the UTF-8 locale name is apparently not even standardized. At the moment I'm trying to use "C.UTF-8", which is apparently glibc _and_ Debian specific. Got to use every opportunity to make correct usage of UTF-8 harder. What luck that this commit is only for some optional relatively obscure mpv feature. Why is the C locale not UTF-8? Why did POSIX not standardize an UTF-8 locale? Well, according to something I heard a few years ago, they're considering disallowing UTF-8 as locale, because UTF-8 would violate certain ivnariants expected by C or POSIX. (But I'm not sure if I remember this correctly - probably better not to rage about it.) Now, on to libarchive. libarchive intentionally uses the locale API and all the broken crap around it to "convert" UTF-8 or UTF-16 (as contained in reasonably sane archive formats) to "char*". This is a good start! Since glibc does not think that the C locale uses UTF-8, this fails for mpv. So trying to use archive_entry_pathname() to get the archive entry name fails if the name contains non-ASCII characters. Maybe use archive_entry_pathname_utf8()? Surely that should return UTF-8, since its name seems to indicate that it returns UTF-8. But of fucking course it doesn't! libarchive's horribly convoluted code (that is full of locale API usage and other legacy shit, as well as ifdefs and OS specific code, including Windows and fucking Cygwin) somehow fucks up and fails if the locale is not set to UTF-8. I made a PR fixing this in libarchive almost 2 years ago, but it was ignored. So, would archive_entry_pathname_w() as fallback work? No, why would it? Of course this _also_ involves shitfucked code that calls shitfucked standard functions (or OS specific ifdeffed shitfuck). The truth is that at least glibc changes the meaning of wchar_t depending on the locale. Unlike most people think, wchar_t is not standardized to be an UTF variant (or even unicode) - it's an encoding that uses basic units that can be larger than 8 bit. It's an implementation defined thing. Windows defines it to 2 bytes and UTF-16, and glibc defines it to 4 bytes and UTF-32, but only if an UTF-8 locale is set (apparently). Yes. Every libarchive function dealing with strings has 3 variants: plain, _utf8, and _w. And none of these work if the locale is not set. I cannot fathom why they even have a wchar_t variant, because it's redundant and fucking useless for any modern code. Writing a UTF-16 to UTF-8 conversion routine is maybe 3 pages of code, or a few lines if you use iconv. But libarchive uses all this glorious bullshit, and ends up with 3 not working API functions, and with over 4000 lines of its own string abstraction code with gratuitous amounts of ifdefs and OS dependent code that breaks in a fairly common use case. So what we do is: - Use the idiotic POSIX 2008 API (uselocale() etc.) (Too bad for users who try to build this on a system that doesn't have these - hopefully none are left in 2017. But if there are, torturing them with obscure build errors is probably justified. Might be bad for Windows though, which is a very popular platform except on phones.) - Use the "C.UTF-8" locale, which is probably not 100% standards compliant, but works on my system, so it's fine. - Guard every libarchive call with uselocale() + restoring the locale. - Be lazy and skip some libarchive calls. Look forward to the unlikely and astonishingly stupid bugs this could produce. We could also just set a C UTF-8 local in main (since that would have no known negative effects on the rest of the code), but this won't work for libmpv. We assume that uselocale() never fails. In an unexplainable stroke of luck, POSIX made the semantics of uselocale() nice enough that user code can fail failures without introducing crash or security bugs, even if there should be an implementation fucked up enough where it's actually possible that uselocale() fails even with valid input. With all this shitty ugliness added, it finally works, without fucking up other parts of the player. This is still less bad than that time when libquivi fucked up OpenGL rendering, because calling a libquvi function would load some proxy abstraction library, which in turn loaded a KDE plugin (even if KDE was not used), which in turn called setlocale() because Qt does this, and consequently made the mpv GLSL shader generation code emit "," instead of "." for numbers, and of course only for users who had that KDE plugin installed, and lived in a part of the world where "." is not used as decimal separator. All in all, I believe this proves that software developers as a whole and as a culture produce worse results than drug addicted butt fucked monkeys randomly hacking on typewriters while inhaling the fumes of a radioactive dumpster fire fueled by chinese platsic toys for children and Elton John/Justin Bieber crossover CDs for all eternity.
* stream_libarchive: stop reading on ARCHIVE_FATALwm42017-11-021-4/+41
| | | | | | | | | | | | | | | | According to https://github.com/libarchive/libarchive/pull/773#issuecomment-334892291 we're not allowed to "continue reading" (post above) or performing "more operations" (comments in archive.h header), whatever that means. Assume closing and freeing the archive is still ok. Since the codec already includes logic for closing and reopening the archive for seeking in unseekable archives, this probably isn't too bad. Untested due to lack of crashing sample (I lost my original test case, and as recently user-provided one didn't crash).
* cache: throttle wakeupswm42017-10-201-2/+14
| | | | | | | | | | | | | | In the extreme case, reading 1 byte would wake up the cache to make the cache thread read 1 byte. This would be extremely inefficient. This will not normally happen in our cache implementation, but it's still present to some lesser degree. Normally you'd set a predefined "cache too low" boundary, after which you would restart reading. For some reason something like this is already present using a hardcoded value (FILL_LIMIT - I don't even know the deeper reason why this exists). So use that to reduce wakeups. This doesn't fix redundant wakeups on EOFs, which is especially visible should something keep retrying reading on EOF (like in an endless loop).
* Add checks for HAVE_GPL to various GPL-only source fileswm42017-10-109-0/+41
| | | | | | | | This should actually cover all of them, if you take into account that some unchanged GPL source files include header files with such checks. Also this was done already for the libaf derived code. This is only for "safety" and to avoid misunderstandings.
* dvb: SYS_DVBC_ANNEX_B is now supported if ATSC is activated.Oliver Freyermuth2017-10-091-0/+2
| | | | Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: Skip channel if ATSC device does not support cable / terr.Oliver Freyermuth2017-10-091-1/+3
| | | | | | | This matches what is done for the other multi-delivery-system cards. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: Implement parsing of modulation for VDR-style channels config.Oliver Freyermuth2017-10-091-0/+50
| | | | | | This is required for ATSC cable / terrestrial support. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: Fixes for ATSC tuning.Oliver Freyermuth2017-10-092-2/+19
| | | | | | | | | ATSC is a mix of terrestrial and cable, and depending on modulation is actually using DVBC_ANNEX_B. Thus, we need to override the delivery system depending on the modulation, channel by channel. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* stream_dvb: Multiply frequency and sample rate by 1000 for VDR.Oliver Freyermuth2017-10-091-4/+3
| | | | | | | These values are kept with a different unit in VDR style config for all delivery systems, not only for DVB-S / DVB-S2. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb_tune: Pull out DVBv5 raw tuning part, add verbosity.Oliver Freyermuth2017-10-091-23/+24
| | | | | | | | Dump the complete raw tuning commands to allow for debugging on low level. Also, remove code duplication and some variable shadowing. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: Explicitly clear via DVBv5 before reverting to DVBv3.Oliver Freyermuth2017-10-091-2/+12
| | | | Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* dvb: Use more elaborate tuning for DVBv5 tuning.Oliver Freyermuth2017-10-091-23/+111
| | | | | | | | | Also, in case tuning fails with timeout even though the ioctl was accepted by the device, fall back to DVBv3 tuning. This may go wrong for multi-delivery-system cards, so issue an error message in that case. Signed-off-by: Oliver Freyermuth <o.freyermuth@googlemail.com>
* build: switch preliminary LGPL mode from v3 to v2.1wm42017-10-051-8/+1
| | | | | | | | | | | iive agreed to relicense things that are still in mpv to LGPLv2.1. So change the licenses of the affected files, and rename the configure switch for LGPL mode to --enable-preliminary-lgpl2. (The "preliminary" part will probably be removed from the configure switch soon as well.) Also player/main.c hasn't had GPL parts since a few commits ago.
* stream_lavf: use avio_read_partial()wm42017-09-011-0/+4
| | | | Possibly improves latency and such things.
* stream: add an assert() to an obscure seek casewm42017-08-171-0/+1
| | | | | | | | This affects small seeks backwards while within the buffer. Demuxers usually avoid this, so it's probably not triggered very often. (Although demux_mkv.c potentially triggers it often, and it uses stream_peek() to explicitly guarantee that it can use this code to seek back.) The condition is complex enough to warrant an assertion.
* vo_opengl: support loading custom user texturesNiklas Haas2017-07-271-27/+1
| | | | | | | | | | | Parsing the texture data as raw strings makes the textures the most portable and self-contained. In order to facilitate different types of shaders, the parse_user_shader interaction has been changed to instead have it loop through blocks and call the passed functions for each valid block parsed. This is more modular and also cleaner, with better code separation. Closes #4586.
* Avoid calling close(-1)wm42017-06-291-2/+4
| | | | | | | | | | While this is perfectly OK on Unix, it causes annoying valgrind warnings, and might be otherwise confusing to others. On Windows, the runtime can actually abort the process if this is called. push.c part taken from a patch by Pedro Pombeiro.
* stream_bluray: change license to LGPLwm42017-06-261-7/+7
| | | | | | | | While I'm not particularly attached to this, the history is pretty simple, and all relevant authors have agreed. 2f004875: removed in 2c693a47, patch author was not asked. 1ef239a4: removed, author was not asked.
* demux_mf, stream_mf: change license to LGPLwm42017-06-241-7/+7
| | | | | | | | | | | | | | | | | | | cehoyos, who did not agree to the relicensing, added bcb5c78ce3. If there was copyright, we consider it gone, because the table changed. It does not map file extension to a FourCC anymore, and codecs.conf is gone. The new mapping is a libavcodec codec name (happens to be the same as the file extension). The same applies to commits 60ecafec, b749836b, 5b3e3be1. None of these authors were contacted. These were before the code was replaced with a table (in d0326807). The parts outside of demux_mf.c were removed a long time ago. Like in the previous comment, we don't think any copyright applies at least to the new code (at least after the FourCC removal). iive authored 0aa37a0d, which is probably still left in some form, and makes demux_mf.c "LGPL 3 or later". stream_avdevice.c (unrelated) has been marked as LGPL before.
* stream: move cache option declarations to cache.cwm42017-06-231-0/+27
| | | | | | | | If they are copyrightable, iive's changes (commits listed in cache.c) would make them LGPL 3+. To avoid that options.c becoming LGPL 3, move the option declarations to cache.c. struct mp_cache_opts is still in options.h, but we consider that irrelevant, and options.h will become LGPL 2.1+ later.
* build: simplify OSS checks and remove changes by "bugmen0t"wm42017-06-221-8/+0
| | | | | | | | | | | | | | | | | | The user bugmen0t was apparently a shared github account with publicly available login. Thus, we can't get LGPL relicensing permission from the people who used this account. To relicense successfully, we have to remove all their changes. This commit should remove 20d1fc13, f26fb009, defbe48d. It also should remove whatever test fragments were copied from the ancient configure, as well as some configure logic (potentially that device path stuff). I think this change still preserves the most important use-cases of OSS: BSDs, and the Linux OSS emulation (the latter for testing only). According to an OSS user, the 4front checks were probably broken anyway. The SunAudio stuff was probably for (Open)Solaris, which is dead. ao_oss.c itself will remain GPL, and still contains bugmen0t changes.
* stream: change license to LGPLwm42017-06-192-28/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All relevant authors have agreed. There are two exceptions, patches by authors who could not be reached. This commit tries to remove their copyright. a0f08fbe: messes with the seeking code corner cases. The EOF flag logic was changed at some point, and always had a flaky history (see e.g. 347cf972 50274ca3 70411f27 5999efb9 0d5e6084 ff08d0c3 2e2f77e3 de5566f0 9554a844, all which happened after that patch, MPlayer ones without that patch). I claim that all of the copyright the patch might have added is gone. Except the message in stream_seek(), which this commit removes. The other code removed/changed in stream_seek() is probably not from that patch, but it doesn't hurt to be sure, and also makes it more readable. (It might change the behavior so that sometimes the eof flag is set after a seek, but it doesn't matter here.) 2aa6acd9: it looks like the seek_forward() modified by this patch was later moved to stream.c and renamed to stream_skip_read() in a790f2133. (Looking closer at it, it was actually modified again a bunch of times, fixing the logic.) I rewrote it in this commit. The code ended up rather similar, which probably could lead to doubts whether this was done properly, but I guess the reader of this will just have to believe me. I knew what stream_skip_read() was supposed to do (which was reinforced when I tried to replace it on the caller side), without reading the pre-existing code in detail. I had to "relearn" the logic how buf_pos and bug_len work - it was actually easy to see from stream_read_char() how to skip the data, essentially by generalizing its logic from 1 byte to N bytes. From the old code I only "used" the fact that it's obviously a while(len>0) look, that has to call stream_fill_buffer repeatedly to make progress. At first I actually didn't use stream_fill_buffer_by(), but the variant without _by, but readded it when I checked why the old code used it (see cd7ec016e7). This has to be good enough. In the end, it's hard to argue that this could be implemented in a way not using such a loop. Other than this, I could add the usual remarks about how this code was not modularized in the past, and how stream.c contained DVD code, and how this was later modularized, moving the copyright to other files, and so on. Also, if someone wrote a stream module, and was not asked about LGPL relicensing, we don't consider the entry in stream_list[] copyrightable.
* Drop/move img_fourcc.hwm42017-06-185-4/+38
| | | | | | | | | | | | | | | This file is an leftover from when img_format.h was changed from using the ancient FourCCs (based on Microsoft multimedia conventions) for pixel formats to a simple enum. The remaining cases still inherently used FourCCs for whatever reasons. Instead of worrying about residual copyrights in this file, just move it into code we don't want to relicense (the ancient Linux TV code). We have to fix some other code depending on it. For the most part, we just replace the MP_FOURCC macro with libavutil's MKTAG (although the macro definition is exactly the same). In demux_raw, we drop some pre-defined FourCCs, but it's not like it matters. (Instead of --demuxer-rawvideo-format use --demuxer-rawvideo-mp-format.)
* stream_file: option to close fd after use -> fdclose://sfan52017-06-161-5/+8
| | | | | fdclose://123 will instruct mpv to close the file descriptor when it is no longer needed (usually when playing finishes).
* stream_lavf: change license to LGPLwm42017-06-161-7/+7
| | | | | | | | | | All authors agreed. The author of 1ee8ce75 did not respond, but it was a mpv pull request, and at this time DOCS/contribute.md and the "Copyright" file stated that all contributions must include LGPL relicensing permission. But you could claim that this was too "hidden". Sort of a corner case, I guess, but not my problem.
* stream: rewrite url escaping/unescaping functionswm42017-06-131-36/+48
| | | | | | | | | | | | | | | | | | | | | | | | | The original functions come from 24c6f11c8b8, which says that these functions were copied from another project. This other project is GPL and was written by an unknown author, so there is no hope to relicense them to LGPL. Replace the existing functions with code written by Avi Halachmi. He did not see the old code, but wrote it based on the function signature and an extended description of what they should do (http://sprunge.us/edia). Some additional help was provided by me (in particular the function of the "ok" parameter and how to implement it - not in the original ASFRecorder code). Some of the code is hilariously similar, but these are coincidences. The name of the variable "c" probably "leaked" from me, but "o" is a true coincidence. The code was integrated by me - my only change is changing the function names to the old ones, moving the order of the top-level declarations, and changing "default_ok" to "url_default_ok", and changing the strings from char* to char[]. The author of the new code is Avi Halachmi.
* cache: move duplicated condition to a functionwm42017-05-151-6/+12
| | | | | While subtly duplicating such checks happens a lot in this file, this particular case can be easily factored into a function.
* cache: fix unnecessary seek blocking from f4d62dc4a0Uoti Urpala2017-05-151-9/+18
| | | | | | | | | | | | | | | | | | | | | Commit 374600cec0 ("cache: propagate seek failures") changed stream-level seeks to be done in the calling thread so possible errors could be reported. This commit included some rationale why doing the stream-level seeks synchronously was not a big issue. However, the following fixup commit f4d62dc4a0 changed the seek code to always synchronize with the cache thread and do seek handling there. This is a problem because it affects even seeks within already cached data (which require no stream-level seek). With a network server that sends data in bursts, the cache thread can be blocked in a read call for a long time; the added synchronization means that seeking within already downloaded data can have unnecessary long delays. Change cache_seek() to check whether the seek is expected to result in a stream-level seek, and skip synchronization if it is not. This means that seeks within the cached portion of the file now again happen immediately without possibly waiting for network. Signed-off-by: wm4 <wm4@nowhere>
* cache: clarify that copyright will be changed to LGPL v2.1 if possiblewm42017-05-111-0/+2
| | | | | | Clearly the licensing situation isn't confusing enough. I don't know why that guy insists on LGPLv3.
* stream_smb: disable by default, mark as GPLv3wm42017-05-111-1/+1
| | | | | | | | | | It seems libsmbclient has been GPLv3 for years. Also, it's certainly not LGPL (unlike some of its support libs like talloc). Thus, mpv built with Samba support is GPLv3. Disable it by default, so we don't have to go through the trouble to indicate the correct license in our output, and we don't trick people into distributing stuff under the wrong license.
* stream_file: change license to LGPLwm42017-05-111-10/+8
| | | | | | | | | | | | | | | | | | | | | This has a messy history all back to the initial commit with multiple refactors, but it seems almost all authors agreed. Exceptions: 2aa6acd9747: patch by someone who could not be reached. Whether or not this code is still in mpv is unknown, but the affected code was moved to stream.c at one point anyway. 3859bbd9fef: not sure if this is a patch by the mentioned person (I assume not) or the committer (who agreed to LGPL), but it seems the change is too trivial to affect copyright. It seems even the FD check can be dropped, which I'm doing in this commit. 58846451f0e: author doesn't reply. But reverting this and letting someone who has never seen this commit before redo it would lead to exactly the same code. So I'm claiming that the change is not copyrightable.
* cookies: change license to LGPLwm42017-05-112-15/+14
| | | | | | | All authors have agreed. One minor exception is 21a9221e7bb2 (patch by someone who wasn't asked), but we just remove the added line again. It seems unneeded.
* cache: change license to LGPL v3wm42017-05-081-7/+12
| | | | | | | | | | | | | All authors have agreed to the relicensing. iive has insisted on "LGPL v3 or later", which makes the file LGPL v3. His commits are the following: 84ec57750883 9b0d8c680f63. All other contributions are LGPL v2.1. I hope we can remove these changes completely one day to make this file LGPL v2.1. iive also authored commit 3934b160a829, but this code is completely gone today. (fork() and shared memory use was removed completely in favor of threads.)
* stream_null: change license to LGPLwm42017-05-081-7/+7
|
* wscript: decouple dvdnav check from dvdreadRicardo Constantino2017-03-311-1/+1
| | | | | | | | | Reallows enabling dvdnav without enabling dvdread which was broken in 77cbb3543 when they were both disabled by default. Since dvdnav requires dvdread, we can enable dvdread:// even if --enable-dvdread isn't passed. Fixes #4290
* stream/stream_dvdnav: show list of titles on verboseRicardo Constantino2017-03-291-0/+7
| | | | Same as stream_bluray, but only if no title is selected already.
* stream/stream_dvdnav: don't ignore setting titleRicardo Constantino2017-03-291-1/+1
| | | | | Probably a typo in 5e30e7a04. Fixes #4283
* stream_dvd: fix subs/audio detection on DVDs containing multi-PGC titlesqrwyeui2017-03-151-3/+3
| | | | | | | | | | On some DVDs, title number is not necessarily the same as the (first) PGC number. (Most often they are equal, since there's usually exactly one PGC per title, which is likely why this issue wasn't noticed before.) When searching for audio/subtitle metadata, we want to look at the actual PGC we're about to play. See discussion in issue #4235. Signed-off-by: wm4 <wm4@nowhere>
* dvb: add support for DVB-T2ivan-832017-03-064-633/+777
| | | | | | | | | | | | | | | | | | | | | | | | Probably does much more: + add support DVB-T2 * DVB params set to AUTO by default * MAX_CARDS: 4 -> 16 * DMX_SET_BUFFER_SIZE: 64kb -> 256kb + add DTV_CLEAR call before tune + add logic from https://github.com/olifre/mpv/commits/dvb-mixed-api-scan * rename type to delsys * single playlist per adapter * card -> adapter * fix channels order in playlist * update internal api * auto fallback to old DVB API on tune * fix DELSYS_SUPP_MASK value * remove tone - unused * add channel mem zeroize in config parser + add code from libdvbv5 for detect delivery systems * SYS_DVBC_ANNEX_AC replaced to SYS_DVBC_ANNEX_A + SYS_DVBC_ANNEX_C Signed-off-by: wm4 <wm4@nowhere>
* Revert "dvb: add support for DVB-T2"wm42017-02-144-766/+625
| | | | | | | | This reverts commit df91e492fd3365cf7db9c6ba4a721f8fcce0521c. Multiple issues such as weird code with undefined behavior (like (like conf_file*). The PR wasn't properly reviewed anyway (my error), so this commit should be reviewed and then merged again.
* dvb: add support for DVB-T2ivan-832017-02-134-625/+766
| | | | | | | | | | | | | | | | | | | | | | | | Probably does much more: + add support DVB-T2 * DVB params set to AUTO by default * MAX_CARDS: 4 -> 16 * DMX_SET_BUFFER_SIZE: 64kb -> 256kb + add DTV_CLEAR call before tune + add logic from https://github.com/olifre/mpv/commits/dvb-mixed-api-scan * rename type to delsys * single playlist per adapter * card -> adapter * fix channels order in playlist * update internal api * auto fallback to old DVB API on tune * fix DELSYS_SUPP_MASK value * remove tone - unused * add channel mem zeroize in config parser + add code from libdvbv5 for detect delivery systems * SYS_DVBC_ANNEX_AC replaced to SYS_DVBC_ANNEX_A + SYS_DVBC_ANNEX_C Signed-off-by: wm4 <wm4@nowhere>
* dvb: move priv allocation to dvb_openThomas V2017-02-101-1/+1
| | | | | | | This fixes a crash when changing channels; previously stream->priv would not be initialized when dvb_get_state reused the existing state. Signed-off-by: Thomas VanSelus <tvanselus@diospyros.us>
* tv: Zero-out newly-allocated handle in tv_new_handle()Frédéric Brière2017-02-051-4/+1
| | | | | | | Some fields (notably tv_channel_list) were left uninitialized, potentially causing problems later on. Fixes #4096
* stream: get rid of streamtype enumwm42017-02-0212-31/+9
| | | | | | | | | Because it's kind of dumb. (But not sure if it was worth the trouble.) For stream_file.c, we add new explicit fields. The rest are rather special uses and can be killed by comparing the stream impl. name. The changes to DVD/BD/CD/TV are entirely untested.
* stream: better method signal caching, rename weird uncached_stream fieldwm42017-02-022-7/+9
| | | | | | | | "uncached_stream" is a pretty bad name. It could be mistaken for a boolean, and then its meaning would be inverted. Rename it. Also add a "caching" field, which signals that the stream is a cache or reads from a cache. This is easier to understand and more flexible.
* tvi_dummy: don't return bad dummy PTSwm42017-02-021-2/+3
| | | | This makes the player spam timestamp warnings. Return NOPTS instead.
* stream: minor cleanup to previous commitwm42017-01-271-12/+7
| | | | | | | This is almost cosmetic, but removes the duplicated EOF-setting. Somewhat oddly, this will enter the reconnect path and exit it immediately again - should be fine.
* stream: set EOF if stream is canceledwm42017-01-261-1/+3
| | | | | | | | | Commit 7be495b3 added the cancellation test, but forgot to set the eof flag. This could lead to demux_mkv.c not terminating if the stream was cancelled in some code paths. This function is what is supposed to set the EOF flag in the first place, so just add the missing code.
* stream_lavf: add support for data URIsRicardo Constantino2017-01-251-0/+1
| | | | | | | Only FFmpeg supports them and they need to be in the format data:// like other protocols or prefixed with ffmpeg:// or lavf://. Closes #4058
* stream: check for playback aborts on reading toowm42017-01-241-0/+2
| | | | | | | | | Benefits demux_mkv.c, or demux_lavf.c during probing. In particular demux_lavf.c can sometimes get "stuck" when reading from a slow/blocking source, and if probing needs more than a few iterations. Since this is a read of an atomic variable with relaxed semantics, this should have no impact on reading speed at all, not even theoretically.
* player: remove --stream-capture option/propertywm42017-01-212-39/+0
| | | | | | | | | | | | | | | This was excessively useless, and I want my time back that was needed to explain users why they don't want to use it. It captured the byte stream only, and even for types of streams it was designed for (like transport streams), it was rather questionable. As part of the removal, un-inline demux_run_on_thread() (which has only 1 call-site now), and sort of reimplement --stream-dump to write the data directly instead of using the removed capture code. (--stream-dump is also very useless, and I struggled coming up with an explanation for it in the manpage.)
* stream_bluray: use proper 0-based idxRicardo Constantino2017-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Even though the title list code was copied from FFmpeg/libbluray, I didn't check that mpv used 0-based title indexing. $ mpv bd://1 --bluray-device=. --msg-level=bd=v [bd] Opening bd:// [bd] List of available titles: [bd] idx: 1 duration: 00:00:36 (playlist: 00000.mpls) [bd] idx: 2 duration: 01:31:30 (playlist: 00001.mpls) [bd] idx: 3 duration: 00:00:50 (playlist: 00003.mpls) bd://1 actually opens idx 2 from the list, not 1. bd://mpls/1 opens playlist 00001.mpls as expected. With this commit: $ mpv bd://1 --bluray-device=. --msg-level=bd=v [bd] Opening bd:// [bd] List of available titles: [bd] idx: 0 duration: 00:00:36 (playlist: 00000.mpls) [bd] idx: 1 duration: 01:31:30 (playlist: 00001.mpls) [bd] idx: 2 duration: 00:00:50 (playlist: 00003.mpls) should play the expected idx 1.
* cache: remove redundant free()wm42017-01-091-3/+1
| | | | | | This code used to check/free multiple things, so the argument to free() was not always NULL. After the code was simplified, the free() became redundant.
* demux, stream: add option to prevent opening referenced fileswm42016-12-045-0/+16
| | | | Quite irresponsibly hacked together. Sue me.
* tv: fix option typewm42016-11-222-3/+3
| | | | | It appears this makes it actually compatible with the property. It was an ancient MPlayer artifact all along.
* stream_bluray: check title index/playlist rangeschnusch2016-10-171-6/+20
| | | | | Blu-ray title index/playlist must be in the range 0-99999, otherwise an error will be returned
* stream_bluray: select title by playlistschnusch2016-10-171-18/+34
| | | | | Blu-ray titles can now be selected by playlist number like this: bd://mpls/[playlist]
* stream_file: don't use poll() on directorieswm42016-10-141-3/+5
| | | | | | | | | | POSIX leaves poll() behavior on directories unspecified. While on Linux, it seems to behave the same way as regular files (always return immediately), this is not guaranteed. At least with OSX 10.12, it seems to wait, which essentially means that opening directories will "hang". Fixes #3530 and #3649.
* stream_libarchive: add some more points at which reading can be stoppedwm42016-10-011-1/+4
|
* stream_lavf: check seekable flag correctlywm42016-09-271-1/+1
| | | | | | AVIOContext.seekable is actually a bitfield. Currently, it has only AVIO_SEEKABLE_NORMAL defined, but it might be extended with a hint for non-byte seekability. Thus we should check it correctly.
* stream_lavf: fix determining seekabilitywm42016-09-261-3/+23
| | | | | | | | | | | | | | | | | | | | demux_lavf.c forces seek to being determined as supported if STREAM_CTRL_HAS_AVSEEK is returned as success. But it always succeeds with current FFmpeg versions. (Seems like Libav commit cae448cf broke this in early 2016.) Now we can't determine via private API whether the underlying protocol supports read_seek anymore. The affected protocols (mostly rtmp) also set seekable=0, meaning they signal they're not seekable, even though read_seek would work. (My guess is that this can't be fixed because even though seekable is in theory a combination of elaborate flags [of which only 1 is defined, AVIO_SEEKABLE_NORMAL], a seekable!=0 always means it's byte-seekable in some way.) So the FFmpeg API is being garbage _again_, and all what we can do is determining this via protocol name and a whitelist. Should fix the behavior reported in #1701.
* stream/stream_lavf: user-agent option is deprecatedRiCON2016-09-181-1/+1
| | | | | | There was both user-agent and user_agent options, the former is deprecated in FFmpeg/FFmpeg@27714b462 master. Libav uses both forms. This avoids constant `[ffmpeg] http: the user-agent option is deprecated, please use user_agent option` warnings using ytdl_hook.
* stream_cb: don't add "*://" to protocol listwm42016-09-102-5/+1
| | | | | | | | | --list-protocol was printing a *:// entry, which looked strange at best. The "*" protocol was used to always match everything, so stream_cb.c could hook in custom protocols with a prefix chosen by the API user. Change it instead so that an empty protocol list means "match all", which also gets rid of the special-cased "*" entry.
* stream, demux, config: remove some dead/unneeded option-related codewm42016-09-092-92/+0
| | | | | | | | | | This has all been made unnecessary recently. The change not to copy the global option struct in particular can be made because now nothing accesses the global options anymore in the demux and stream layers. Some code that was accidentally added/changed in commit 5e30e7a0 is also removed, because it was simply committed accidentally, and was never used.
* stream_cdda: remove weird option parsing stuffwm42016-09-091-29/+12
| | | | | | | | | | Mostly untested. This is not compatible. It removes the URL fields for track range and cdrom speed (what did this even do). The device is not not to be prefixed with an additional "/" if it's put into the URL. I can't be bothered to keep these things compatible, just rip your damn CDs instead.
* tv: remove weird option parsing stuffwm42016-09-091-17/+0
| | | | Mostly untested.
* stream_dvb: remove weird option parsing stuffwm42016-09-091-24/+24
| | | | Mostly untested.
* stream_dvd, stream_dvdnav: remove weird option parsing stuffwm42016-09-084-66/+93
| | | | | | Same deal as with stream_bluray. Untested because I don't give a fuck about your shitty DVDs.
* stream_bluray: fix a minor memory leakwm42016-09-081-2/+3
|
* stream_bluray: remove weird option parsing stuffwm42016-09-081-51/+45
| | | | | | | Instead, parse manually. This is to get rid of the option API usages, which seem unnecessary and shoehorned. (Just look at the URL pseudo parsing and the dumb url_options map. They were pretty much artifacts from refactoring old mplayer code.)
* osdep: rename atomics.h to atomic.hwm42016-09-071-1/+1
| | | | | The standard header is stdatomic.h, so the extra "s" freaks me out every time I look at it.
* demux: do not access global optionswm42016-09-063-27/+65
| | | | | | | | | | | | | | | | | Don't access MPOpts directly, and always use the new m_config.h functions for accessing them in a thread-safe way. The goal is eventually removing the mpv_global.opts field, and the demuxer/stream-layer specific hack that copies MPOpts to deal with thread-safety issues. This moves around a lot of options. For one, we often change the physical storage location of options to make them more localized, but these changes are not user-visible (or should not be). For shared options on the other hand it's better to do messy direct access, which is worrying as in that somehow renaming an option or changing its type would break code reading them manually, without causing a compilation error.
* stream_cb: remove broken castwm42016-08-311-1/+1
| | | | | | | seek_fn is supposed to return the new file offset, or a negative error code. Our code doesn't use the offset, and only wants to know if any errors happened. The int cast is completely broken and might treat a successful seek as failed depending on whether the sign bit will be set.
* cache: don't use a backbuffer if the cache is as large as the filewm42016-08-261-10/+14
| | | | | | | | | | | | It's just wasted memory. One corner case is when a file grows during playback, but this is rare and usually happens on-disk only. The cache size was generally limited before this change already, so no reason to care. As an unrelated change, move the cache size info to the resize_cache() function. There's really no reason not to do this, and it's slightly more informative if the user changes the cache size at runtime.
* stream_memory: disable stream cachewm42016-08-261-0/+1
| | | | Obviously makes no sense and just wastes resources.
* stream/stream_bluray: display list of available titles on verboseRicardo Constantino2016-08-111-0/+6
| | | | Based on similar code on FFmpeg and libbluray's list_titles example.
* stream: fix double-free if cache init failswm42016-08-081-1/+3
| | | | | | | | | | | | If the normal stream cache init fails, and a file cache was initialized before, we free the file cache as well. But since the file cache is chained to the real stream, the real stream will also be freed. This has to be prevented by clearing the pointer to the original stream in the uncached_stream field. This could in particular be triggered by using --cache-initial=1000 and aborting playback during loading. (Without that option, stream cache init failure is far less likely.)
* client API: add stream_cb API for user-defined stream implementationsAman Gupta2016-08-073-0/+128
| | | | | | Based on #2630. Some heavy changes by committer. Signed-off-by: wm4 <wm4@nowhere>
* tvi_v4l2: fix style in the uninit functionBen Boeckel2016-08-051-4/+6
|
* tvi_v4l2: explicitly brace the codeBen Boeckel2016-08-051-1/+4
| | | | | It's fine either way, but this code is weirdly formatted. Make it more explicit.
* libarchive: sanitize non-UTF8 archive entrieswm42016-07-181-2/+2
| | | | | | | | | Some client API users simply don't like such filenames. For their sake, don't return them, but return a dummy filename instead. (Returning a latin1-ized version would work too, but is slightly more work.) Also remove the "\n" from the replacement dummy filename. This was accidental.
* libarchive: unify entry iteration between stream/demux layerswm42016-07-182-26/+51
| | | | No really good reason to duplicate this.
* cache: minor simplificationwm42016-07-111-7/+10
| | | | | Every cache_wakeup_and_wait() caller has to deal with asynchronous stream abort, so why not make it somehow part of the function.
* cache: fix previous commitwm42016-07-111-1/+11
| | | | | | | | | | | The cache reader thread actually unlocks the mutex protecting the underlying stream while reading from it. That's why other code goes out of its way to run certain stream operations on the cache thread. Do the same. We could have this simpler by creating a mechanism that would "park" the cache thread and make it wait for the lock (while we have it) in order to gain exclusive access. This could be done in the future.
* cache: propagate seek failureswm42016-07-111-7/+17
| | | | | | | | | | | Eagerly execute seeks to the underlying stream in the cache seek entrypoint itself. While asynchronous execution is a goal of the cache, it doesn't matter too much for seeks. They always were executed within the lock, so the reader was blocked anyway. It's not necessary to ensure async. execution here either, because seeks are relatively rare, and the demuxer can just stay blocked for a while. Fixes: mpv http://samples.mplayerhq.hu/V-codecs/DIV5/ayaneshk-test.avi
* Fix misspellingsstepshal2016-06-261-1/+1
|
* build: silence -Wunused-resultNiklas Haas2016-06-071-1/+1
| | | | | | | | For clang, it's enough to just put (void) around usages we are intentionally ignoring the result of. Since GCC does not seem to want to respect this decision, we are forced to disable the warning globally.
* stream: separate posix/win32 cancellation codewm42016-05-201-27/+55
| | | | | | | | | This code evolved into an ifdef mess as support for cancellation on Windows was added. Make the Windows-specific code completely separate. It looks cleaner, and it also means that some of the posix code is not uselessly enabled on Windows. The latter made msvcrt.dll output warnings because it does not like -1 passed as FD to read/write. (The same would be harmless on POSIX.)
* cache: simplify speed calculationswm42016-05-121-19/+7
| | | | | | | | | | Remove the attempted cleverness; keep it dumb. This strictly calculates the average speed over an at least 1 second window (longer if I/O blocks it). Since this doesn't reset the speed anymore when reading stops by going idle, the results might actually be more accurate now.
* stream_cdda: enable cache by defaultwm42016-05-101-0/+2
| | | | Requested.
* stream_memory: add hex:// protocolwm42016-04-201-2/+35
| | | | Completely useless, expect for some special purposes.
* cache: disable useless "Cache is not responding" warningwm42016-04-031-1/+1
| | | | | | | | | | | | | | | Tuning it in a way to be actually useful is too much effort. As alternative, there's the "buffering" detection, which operates on a much higher level. The only disadvantage is that it's harder to guess for the user whether this is a network problem, or if e.g. libavformat is probing too much data when opening a stream. Maybe the cache-speed property is helpful here. For now, do not remove the associated code, but just silence the warning. Fixes #3019.
* build: make DVB test stricterwm42016-04-021-0/+2
| | | | | | | | | | | | | | | | | | | I got a report that the build on a recent aarch64 Linux kernel failed. DVB support was detected, but errored on compilation: In file included from ../stream/stream_dvb.c:57:0: ../stream/dvbin.h:72:5: error: unknown type name 'fe_bandwidth_t' fe_bandwidth_t bw; Make the test stricter, which should take care of this. (I couldn't find out what exactly triggered the failure, nor could I attempt to reproduce it.) The change in stream/dvbin.h is to make sure that this isn't caused by incorrect header inclusion. It now includes the same files as the configure test.
* cache: fix incorrect EOF conditionwm42016-03-291-1/+2
| | | | | | Don't assume EOF if we didn't try to read anything in the first place. Fixes regressions in particular with low cache sizes, which triggered the other code paths more often.
* cache: use a single STREAM_CTRL for various cache infowm42016-03-292-23/+23
| | | | | | | | Instead of having a separate for each, which also requires separate additional caching in the demuxer. (The demuxer adds an indirection, since STREAM_CTRLs are not thread-safe.) Since this includes the cache speed, this should fix #3003.
* command: add cache-speed propertywm42016-03-202-14/+48
| | | | | | | Should reflect I/O speed. This could go into the terminal status line. But I'm not sure how to put it there, since it already uses too much space, so it's not there yet.
* cache: remove unused STREAM_CTRL_RESUME_CACHEwm42016-03-032-5/+0
| | | | Went way with DVD/BD menu support.
* demux: remove relative seekingwm42016-02-281-33/+4
| | | | | | | | | | | | | | | | | | | Ever since a change in mplayer2 or so, relative seeks were translated to absolute seeks before sending them to the demuxer in most cases. The only exception in current mpv is DVD seeking. Remove the SEEK_ABSOLUTE flag; it's not the implied default. SEEK_FACTOR is kept, because it's sometimes slightly useful for seeking in things like transport streams. (And maybe mkv files without duration set?) DVD seeking is terrible because DVD and libdvdnav are terrible, but mostly because libdvdnav is terrible. libdvdnav does not expose seeking with seek tables. (Although I know xbmc/kodi use an undocumented API that is not declared in the headers by dladdr()ing it - I think the function is dvdnav_jump_to_sector_by_time().) With the current mpv policy if not giving a shit about DVD, just revert our half-working seek hacks and always use dvdnav_time_search(). Relative seeking might get stuck sometimes; in this case --hr-seek=always is recommended.
* stream_dvb: fix minor resource leakswm42016-02-121-0/+3
| | | | | | Fixes CID 1350062 and 1350061. Just for the sake of shutting up Coverity.
* stream_dvb: remove dead codewm42016-02-121-5/+0
| | | | Fixes CID 1350063.
* dvb: fix segmentation fault in case no valid configuration is found.Oliver Freyermuth2016-01-241-2/+3
| | | | This was introduced in c55b242 .
* dvb: remove trailing whitespacewm42016-01-222-18/+18
|
* dvb: fix compilation with older Linux headerswm42016-01-221-1/+2
| | | | | | | At least DTV_ENUM_DELSYS is not available in older versions. It's hard to tell when this identifier was introduced, but it appears it was probably API version 5.5.
* stream_dvb: add verbose output in non-DVBv5 querying.Oliver Freyermuth2016-01-211-1/+3
| | | | | May help in future debugging in case of old kernels with modern / obscure devices.
* stream_dvb: use DVBv5 API also for DVB-C tuning.Oliver Freyermuth2016-01-211-8/+39
| | | | | | | | | | | Using the new API is a necessity for multiple-delivery-system devices, since the old API does not offer a way to switch the delivery system of the card. This should in principle also be done for DVB-T / ATSC, especially since most DVB-T devices also support DVB-C, but I can not test such an implementation due to lack of hardware (currently) so it seems better to leave the existing, tested code-path in place for now.
* stream_dvb: improve messages on delivery-type detection.Oliver Freyermuth2016-01-211-10/+14
| | | | | | | | No need use use all capital letters, and don't warn if DVB-S2 is supported in addition since we handle that in DVB-S case already. Also, print the delivery system number for still unhandled delivery systems to simplify debugging.
* stream_dvb: don't requery tuner type, rely on initial query.Oliver Freyermuth2016-01-211-11/+9
| | | | | | | | | Saves one unnecessary additional ioctl per tuning by just reusing existing information. Should also fix the case of multiple supported delivery types since we now rely on the initial query from the chosen configuration after channel list parsing instead of requerying the device.
* stream_dvb: support frontends with multiple delivery systems.Oliver Freyermuth2016-01-213-59/+122
| | | | | | | | | Most common case would be DVB-C / DVB-T combination cards. Cards with multiple delivery systems are only supported starting from DVBv5 API (Kernel 2.6.38). In this case, we loop over all delivery systems and just treat them as different cards would be treated: They all get their own TUNER-type, channel-list parsing etc.
* Relicense some non-MPlayer source files to LGPL 2.1 or laterwm42016-01-193-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This covers source files which were added in mplayer2 and mpv times only, and where all code is covered by LGPL relicensing agreements. There are probably more files to which this applies, but I'm being conservative here. A file named ao_sdl.c exists in MPlayer too, but the mpv one is a complete rewrite, and was added some time after the original ao_sdl.c was removed. The same applies to vo_sdl.c, for which the SDL2 API is radically different in addition (MPlayer supports SDL 1.2 only). common.c contains only code written by me. But common.h is a strange case: although it originally was named mp_common.h and exists in MPlayer too, by now it contains only definitions written by uau and me. The exceptions are the CONTROL_ defines - thus not changing the license of common.h yet. codec_tags.c contained once large tables generated from MPlayer's codecs.conf, but all of these tables were removed. From demux_playlist.c I'm removing a code fragment from someone who was not asked; this probably could be done later (see commit 15dccc37). misc.c is a bit complicated to reason about (it was split off mplayer.c and thus contains random functions out of this file), but actually all functions have been added post-MPlayer. Except get_relative_time(), which was written by uau, but looks similar to 3 different versions of something similar in each of the Unix/win32/OSX timer source files. I'm not sure what that means in regards to copyright, so I've just moved it into another still-GPL source file for now. screenshot.c once had some minor parts of MPlayer's vf_screenshot.c, but they're all gone.
* cache: add mechanism for disabling readaheadwm42016-01-182-1/+17
| | | | Will be used in a following commit.
* player, stream_dvb: implement dvb-channel-name property.Oliver Freyermuth2016-01-143-1/+37
| | | | | | | | | On read, it returns the name of the current DVB program, on write, it triggers a channel-switch to the program if it is found in the channel list of the currently active card. Compared to the dvb-channel property which already exists and is a pair of integers (card + channel number) this has the limitation of not switching the card, but is probably of much more common use.
* stream_dvb: global protection mutex and usage bit for global_dvb_state.Oliver Freyermuth2016-01-142-1/+21
| | | | | | | | | | | | | The mutex is used in dvbin_open and dvbin_close only since these are the only entry / exit points to the stream. When opening, it is first checked (mutexed) whether the state already exists and is in use, then a STREAM_ERROR is returned, since there may be only one stream_dvb active at a time. State-creation itself is also protected by mutex. In dvbin_close, the usage-bit is set to false (mutexed) in case of channel switch. In case of stream-teardown, the state is destructed (also protected by mutex).
* stream_dvb: implement GET_METADATA and return program name.Oliver Freyermuth2016-01-141-2/+13
| | | | Now title will be the current channel name also after channel switch.
* stream_dvb: persist state-information across channel-switches.Oliver Freyermuth2016-01-142-35/+71
| | | | | | | | | The state-structure is kept in a static pointer and reused on recreation of the stream. To not leak the state and the FDs within upon mpv shutdown, the state-structure is still destructed gracefully in dvbin_close(), unless a channel switch has been initiated directly before. This fixes channel-switching for DVB which was broken since a609877.
* dvb: rename dvb_config_t to dvb_state_t, keep config and state there.Oliver Freyermuth2016-01-143-117/+128
| | | | | | | | | The state-struct now contains everything which can be kept after initial initialization. This includes the channel-lists, configuration, device-fds and also information like current channel and current card. The dvb_priv_t is kept containing the mp-options, a pointer to the state and to the logger. After this restructuring, the state-struct contains all information which can be persisted across channel switching.
* stream: stream_read_complete() reads from current pos, not 0wm42016-01-121-1/+1
| | | | (Well, I hope no caller really relied on this anyway.)
* mpv_talloc.h: rename from talloc.hDmitrij D. Czarkoff2016-01-116-6/+6
| | | | This change helps avoiding conflict with talloc.h from libtalloc.
* cache: remove useless return valuewm42016-01-111-5/+2
| | | | It was unused, and also returned the wrong value in some cases.
* dvb: cleanup dvb_params struct, remove some unneeded fdsOliver Freyermuth2016-01-073-11/+8
| | | | | | | One was just used as an alias, the other one (sec_fd) was not used at all. Signed-off-by: wm4 <wm4@nowhere>
* win32: fix fd://James Ross-Gowan2016-01-071-3/+4
| | | | | | | | Windows definitely supports Unix-style fd inheritance. This mostly worked when launched from mpv.exe, though mpv should change the file mode to O_BINARY. When launched from mpv.com, the wrapper must pass the list of handles (stored in the undocumented lpReserved2 and cbReserved2 fields) to the mpv process.
* stream_lavf: remove tabswm42015-12-221-2/+2
| | | | Death to tabs.
* Fix some typos in code commentsAman Gupta2015-12-211-1/+1
| | | | Signed-off-by: wm4 <wm4@nowhere>
* stream: drop PVR supportwm42015-12-102-1619/+0
| | | | | | | | | This is only for specific Hauppage cards. According to the comments in who is actively using this feature. Get it out of the way. Anyone who still wants to use this should complain. Keeping this code would not cause terribly much additional work, and it could be restored again. (But not if the request comes months later.)
* stream_libarchive: make libarchive seek callback lazyKevin Mitchell2015-11-091-3/+22
| | | | This fixes problems seeking http streams to their end.
* stream_libarchive: add multivolume supportKevin Mitchell2015-11-092-16/+156
| | | | | | | | | | | | | | This commit introduces logic to read other volumes from the same source as the primary archive. Both .rar formats as well as 7z are supported for now. It also changes the libarchive callback structure to be per-volume consistent with the libarchive intenal client data array constructed with archive_read_append_callback_data. Added open, close and switch callbacks. Only the latter is strictly required to make sure that the streams always start at position 0, but leaving all volumes open can eat a lot of memory for archives with many parts.
* libarchive: remove redundant log prefixKevin Mitchell2015-11-091-3/+3
| | | | "libarchive:" is already added by the logging system
* stream/audio: fix unchecked strdupswm42015-10-304-11/+23
| | | | | See #2435. It's literally a waste of time trying to fix minor memory leaks in this old, unused, and crappy code.
* options: add support for client certificate authenticationJoschka Tillmanns2015-10-201-0/+4
| | | | | | | | Client certificates are supported by ffmpeg as documented here: > https://www.ffmpeg.org/ffmpeg-protocols.html#tls Signed-off-by: wm4 <wm4@nowhere>
* stream: minor cleanup to verbose loggingwm42015-09-302-3/+4
| | | | | | Don't print the URL that is opened twice. stream.c and stream_lavf.c each printed it once. Remove the logging from stream_lavf.c, and move the log call to a more interesting point.
* cache: do not include backbuffer size in total stream cache sizewm42015-09-101-1/+1
| | | | | | | | | This causes weirdness with the "cache-size" property and option. Only the read handler of the property included the backbuffer, while all others did not. Make it consistent, and subtract the backbuffer size from the cache size. Fixes #2305.
* stream_libarchive: read tar only in "unsafe" modewm42015-08-221-2/+4
| | | | | | | | | | As expected, probing with libarchive is a disaster. Both libavformat and libarchive are too eager to misdetect file formats just because files "might" be of a specific type. In this case, it's mp3 vs. tar. To be fair, neither file format has an actual header. I'm not sure why we'd need tar support, but since libarchive provides it, and idiots on the internet apparently pack media files in tar sometimes (really, idiots), keep it for now, and probe tar last.
* stream_libarchive: disable raw filterwm42015-08-201-2/+0
| | | | | Too many false positives (it accepts things like unspecific text files), and also relatively useless.
* stream_libarchive: fix libarchive callback signaturewm42015-08-201-1/+1
| | | | | | | | | | | libarchive uses a quite confusing ifdeffery mess for some of the types used in callbacks. Currently, archive_read_set_seek_callback() causes a warning at least on Windows due to mismatching return type. The header file uses __LA_INT64_T as return type, so I think the user is intended to use int64_t. (The ssize_t return type for the read_cb seems correct, on the other hand.)
* stream_libarchive: restrict number of allowed formatswm42015-08-181-2/+11
| | | | | Most of what is not in this list is extremely obscure, or increases the file format misdetection rate.
* stream: provide a stream_get_size() convenience functionwm42015-08-185-11/+17
| | | | | And use it everywhere, instead of retrieving the size manually. Slight simplification.
* demux_libarchive: open flat compressed fileswm42015-08-172-3/+9
| | | | | | | | Things like .gz etc., which have no real file header. A mixed bag, because it e.g. tends to misdetect mp3 files as compressed files or something (of course it has no mp3 support - I don't know as what it detects them). But requested by someone (or maybe not, I'm not sure how to interpret that).
* stream: libarchive wrapper for reading compressed archiveswm42015-08-173-0/+274
| | | | | | | | | | | | | | | | | | | | This works similar to the existing .rar support, but uses libarchive. libarchive supports a number of formats, including zip and (most of) rar. Unfortunately, seeking does not work too well. Most libarchive readers do not support seeking, so it's emulated by skipping data until the target position. On backwards seek, the file is reopened. This works fine on a local machine (and if the file is not too large), but will perform not so well over network connection. This is disabled by default for now. One reason is that we try libarchive on every file we open, before trying libavformat, and I'm not sure if I trust libarchive that much yet. Another reason is that this breaks multivolume rar support. While libarchive supports seeking in rar, and (probably) supports multivolume archive, our support of libarchive (probably) does not. I don't care about multivolume rar, but vocal users do.
* stream: remove remaining DVD/BD menu definitionswm42015-08-032-88/+0
|
* stream_bluray: remove menu implementationwm42015-08-031-358/+11
|
* stream_dvdnav: rip out lower-level menu implementationwm42015-08-031-255/+7
| | | | Separate because it might cause regressions.
* win32: revert wchar_t changeswm42015-08-011-1/+1
| | | | | | | | | | | Revert "win32: more wchar_t -> WCHAR replacements" Revert "win32: replace wchar_t with WCHAR" Doing a "partial" port of this makes no sense anymore from my perspective. Revert the changes, as they're confusing without context, maintenance, and progress. These changes were a bit premature anyway, and might actually cause other issues (locale neutrality etc. as it was pointed out).
* win32: more wchar_t -> WCHAR replacementswm42015-07-301-1/+1
| | | | | | | | | | | | | This was essentially missing from commit 0b52ac8a. Since L"..." string literals have the type wchar_t[], we can't use them for UTF-16 strings. Use C11 u"..." string literals instead. These have the type char16_t[], but we simply assume char16_t is the same underlying type as WCHAR. In practice, they're both unsigned short. For this reason use -std=c11 on Windows. Since Windows is a "special" environment (we require either MinGW or Cygwin), we don't need to worry too much about compiler compatibility.
* cache: make backbuffer size configurablewm42015-07-221-5/+12
| | | | | | | | | | Allow setting an arbitrary amount, instead of the fixed 50%. This is nto striclty backwards compatible. The defaults don't change, but the --cache/--cache-default options now set the readahead portion. So in practice, users who configured this until now will see the double amount of cache being used, _plus_ the 75MB default backbuffer will be in use.
* cache: fix backbuffer logicwm42015-07-221-4/+5
| | | | | | Currently, this is perfectly equivalent, because back_size is hardcoded to buffer_size/2. But this fixes the logic for the case the back_size can be configured freely.
* stream_file: remove an indirectionwm42015-07-101-17/+13
| | | | Remove the "fd" local variable, and always use "p->fd" directly.
* stream_file: cosmetics: shorten variable namewm42015-07-101-10/+10
| | | | Can't be bothered to type this much.
* stream_file: initialize `fd`Ben Boeckel2015-07-091-1/+2
| | | | | Use the fd variable and delay assignment to priv->fd to mirror other branches of the if/else tree.
* stream_file: add fd:// protocolwm42015-07-091-2/+10
|
* Disable DVD and BD menu support (to be removed)wm42015-06-262-0/+4
| | | | | | | | | | | | | | | | | | DVD/BD menu support never worked right, and are a pain to maintain. In particular, DVD menus never actually worked correctly, because highlights were not rendered correctly. Fixing this requires major effort, which I'm not interested to spend. Most importantly, the requirement to switch streams without losing the DVD/BD state caused major weirdness in the playback core. It was implemented by somehow syncing the playback state to the DVD/BD implementation (in stream_dvdnav.c etc.), and then reloading the demuxer without destroying and recreating the stream. This caused a bunch of special-cases which I'm looking forward to remove. For now, don't just remove everything related to menu support and just disable it. If someone volunteers, it can be restored (i.e. rewritten) in a reasonable way. If nobody volunteers soon, it goes.
* cache: limit readahead size to half the cache size at the beginningwm42015-05-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | Normally, the cache keeps 50% of the buffer for seeking backwards. Until now, the cache just used the full buffer size at the beginning of a file, because the 50% normally reserved for the backbuffer are unused. This caused a problem: when streaming from http, the player would first read about 150MB (default cache size), then stop until 75MB of the cache has been played. (Until the 75MB position, the cache is fully used, so nothing new can be read. After that, part of the backbuffer starts getting unreserved, and can be used for readahead.) This long read pause can cause the server to terminate the connection. Reconnecting may be possible, but if youtube-dl is used, the media URL may have become invalid. Fix this by limiting readahead to 50% even if unnecessary. The only exception is when the whole file would fit in the cache. In this case, it won't matter if we can't reconnect, because the cache covers everything anyway, and hopefully the cache will stay valid. Likely fixes #2000.
* vo_opengl: add support for custom shadersNiklas Haas2015-05-272-0/+16
|
* command: add protocol-list propertywm42015-05-232-6/+22
| | | | Fixes #1972.
* Remove trailing whitespacesMichael Vetter2015-05-151-4/+4
|
* threads: use utility+POSIX functions instead of weird wrapperswm42015-05-111-3/+6
| | | | | | | There is not much of a reason to have these wrappers around. Use POSIX standard functions directly, and use a separate utility function to take care of the timespec calculations. (Course POSIX for using this weird format for time values.)
* path: make mp_path_join accept normal C stringswm42015-05-092-4/+4
| | | | | Instead of bstr. Most callers of this function do not need bstr. The bstr version of this function is now mp_path_join_bstr().
* stream: don't print reconnection message if no stream supportwm42015-04-291-3/+5
| | | | | | | This code does not know whether the stream supports reconnecting until STREAM_CTRL_RECONNECT is called. So the message should be printed after it. To avoid that reconnects that succeed on the first try go unnoticed, print a warning on success.
* cache: exit early on cancellationwm42015-04-211-0/+3
| | | | | | | An approximate measure to make it exit possibly slightly earlier. Relatively speaking, some time will pass between cancellation and the cache actually being requested to exit, so it's good if the cache returns EOF immediately.
* cache: another minor simplificationwm42015-04-211-11/+5
| | | | | | | | The caller can check for cache interruption instead. There's no need to define special return values and such. It would be rather hard to make waiting for the condition and stream cancellation atomic too (and pointless, since the underlying stream will also be "cancelled" and exit early), so nothing about cancellation being a separate call will change.
* cache: simplify the check for printing the "cache stuck" messagewm42015-04-211-16/+6
| | | | | | | | | | | | This put some effort into distinguishing between two messages to print - all worthless. Even more so, this kept printing the message, which doesn't feel overly useful either. (The message will be printed repeatedly anyway if network recovers for a while and then gets stuck again.) All in all, the demuxer cache triggering the buffering state does a better job here. But don't remove it completely, since knowing that the network did nothing for a relatively short time is still useful.
* command: disc-mouse-on-button propertyxylosper2015-04-213-6/+12
| | | | | This property indicates whether mouse cursor is located on button or not for disc naviation.
* stream_file: minor simplificationwm42015-04-171-11/+8
| | | | | Now all this platform-specific code doesn't depend on stream or stream_file internals anymore.
* player: allow playing directorieswm42015-04-172-4/+5
| | | | | | | | | | | If a directory is encountered, replace it with its contents in the internal playlist. This is messed into demux_playlist.c, because why not. STREAMTYPE_DIR could be avoided by unconditonally trying opendir() in demux_playlist.c, but it seems nicer not to do weird things like calling it on real files. This does not work on Windows, because msvcrt is retarded.
* Update license headersMarcin Kurczewski2015-04-1331-159/+127
| | | | Signed-off-by: wm4 <wm4@nowhere>
* stream_rar: update commentwm42015-03-291-4/+2
| | | | The stream filter non-sense was removed, which makes it much easier.
* stream_lavf: workaround broken rtmp "timeout" optionwm42015-03-191-4/+7
| | | | | | | | | | The libavformat rtmp protocol's "timeout" option has two problems: 1) Unlike all other protocols, it's in seconds and not microseconds 2) It enables "listen" mode, which breaks playback Make the --network-timeout do nothing in the rtmp case. Fixes #1704.
* options: introduce --cache=yes choicewm42015-03-121-0/+2
| | | | | | I think this is what I alwass missed ever since I found the MPlayer cache options: a way to enable the cache on local files with the default settings, whatever they are.
* stream: use relaxed atomic loads for checking playback abortswm42015-03-091-1/+1
| | | | | | | Seems appropriate, and will probably avoid performance surprises with scary architectures which don't have trivial implementations for atomic loads. (Consider that demux_mkv calls this very often now, and libavformat demuxers and streams did this for a while now.)
* stream/smb: mark as network stream for --cache=autoKevin Mitchell2015-03-091-0/+1
| | | | | | | This causes the cache to be enabled with --cache=auto. It was not done previously because the small cache size 320k actually led to worse performance. However, with the current default cache size of 25000kb, caching notably improves performance.
* options: add M_OPT_FILE to new options that are missing itPhilip Sequeira2015-03-071-1/+1
| | | | Fixes shell completion.
* cache: assume file size from EOF positionwm42015-03-041-2/+8
| | | | | | If we're caching a stream with unknown size, and we reach EOF, then consider the EOF position the file size. Typically makes sense when reading from a pipe or a http connection that did not send a size.
* stream_cdda: add option to enable cdtext, and disable it by defaultwm42015-03-031-3/+5
| | | | Fixes #1615.
* stream_cdda: fix parameter passingwm42015-03-031-2/+0
| | | | | All cdda options (except --cdrom-drive) were ignored, because the priv struct (with the options set) was just replaced. Oops.
* player: refine rar:// playlist-safety handlingwm42015-03-023-6/+2
| | | | | | | | | | | | It was possible to make the player play local files by putting rar:// links into remote playlists, and some other potentially unsafe things. Redo the handling of it. Now the rar-redirector (the thing in demux_playlist.c) sets disable_safety, which makes the player open any playlist entries returned. This is fine, because it redirects to the same file anyway (just with different selection/interpretation of the contents). On the other hand, rar:// itself is now considered fully unsafe, which means that it is ignored if found in normal playlists.
* stream_dvb: Always define NO_STREAM_ID_FILTER if missing.Oliver Freyermuth2015-02-281-1/+1
| | | | | | | It is also used for initialization in channel-list setup. Should fix compilation on FreeBSD, and is more correct since it is used unconditionally. Reverts 6445648 .
* stream: remove stream filter conceptwm42015-02-274-42/+15
| | | | Unused since the previous commit. (Apparently it was a stupid idea.)
* stream_rar: treat rar files as playlistswm42015-02-272-77/+8
| | | | | | | | | | | | Refactors an older hack, which for some reason used a more complicated way. This generates the playlist representing the contents of the rar file in demux_playlist.c. The pseudo-demuxer could easily be separate from the the playlist parsers (and in fact there's almost no shared code), but I don't think this obscure feature deserves a separate file. Sample files created with: rar a -v20000k -m0 files.rar file1.mkv file1.mkv
* cache: use MPCLAMP() macrowm42015-02-251-9/+2
|
* cache: limit to file sizewm42015-02-251-1/+8
| | | | | Saves some memory. Should be especially helpful if many small files are loaded, like when mass-loading subtitle files and the cache is enabled.
* stream_file: open pipes non-blockingwm42015-02-201-4/+33
| | | | | Now the player can actually be quit if a pipe was opened, but nobody is writing to it.
* cache: silence "EOF reached" messagewm42015-02-181-1/+1
| | | | | | | | | | | | | This message will be printed relatively often once EOF is reached. In some cases this is rather annoying, for example when playing HLS. (With HLS, the stream is just a playlist file, while libavformat opens actual media files without mpv's knowledge, so the cache is completely useless and hits EOF instantly.) That it retries reading is apparently a good thing: at least local files can grow, and even after the player got the EOF, playback _could_ be resumed by basically polling and detecting that there is more data. So I'm not changing this behavior yet.
* dvb_tune: fix invalid syntaxwm42015-02-111-1/+1
| | | | Oops.
* stream: get rid of remaining uses of the end_pos fieldwm42015-02-067-26/+25
| | | | | | | | Most things stopped using this field for better support of growing files. Go through the trouble to repalce the remaining uses, so it can be removed. Also move the "streaming" field; saves 4 bytes (wow!).
* stream: minor cleanupswm42015-02-064-88/+64
| | | | | | | | | | | | | | | | Fix return types and return values to make them more consistent. Some reformatting and making code more concise. In stream_reconnect(), avoid the additional mp_cancel_test() call by moving the "connection lost" message below the mp_cancel_wait() call, which effectively leads to the same behavior when the stream was already canceled. (The goal is not to show the message in this case.) Merge stream_seek_long() into stream_seek(). It was the only caller. Always clear the eof flag on seeks. Reduce access to stream internals in cache.c and stream_lavf.c.
* stream: slightly improve reconnect behaviorwm42015-02-062-18/+29
| | | | | Wait for a longer time between reconnects. Introdeuce and use mp_cancel_wait(), so that quitting is still immediate.
* stream_lavf: fix build with Libavwm42015-02-061-2/+5
| | | | | | The API function used is FFmpeg-only. Sigh...
* options: add --network-timeoutwm42015-02-061-0/+3
| | | | | | Not quite sure if this actually works as intended. Fixes #1566.
* stream_cdda: fix bugs in chapter time retrievalwm42015-02-041-2/+2
| | | | | | | | | | | | | | | | | | Looks like a bunch of off-by-one errors. The track number was mistakenly offset by 1 - this shifted all chapters by one, and make the first chapter start on the second track (so the "chapter" property returned -1 in the first track since it was before the first chapter). Also, the calculation of the sector destination was messed up. This comes from commit 32d818f0, where I apparently attempted to calculate the position to one byte before the section, but unfortunately math doesn't work this way and it was nonsense. Just drop this idea; while it may help with seeking (probably...), it also returns slightly different times. The user shall use hr-seeks if accurate seeking is required. Hopefully fixes #1560.
* command: add dummy get implementation for tv-channel propertywm42015-02-021-0/+1
| | | | | A small cosmetic change with the effect that pressing 'k' shows "unavailable" instead of "error" (even if no TV code is active).
* stream: reject overly long URLswm42015-01-211-0/+4
|
* stream_lavf: escape disallowed characters in http URLswm42015-01-212-5/+24
| | | | | | | | | | | | | | | | | In my opinion, libavformat should be doing this. But a patch handling a very safe case rejected, so I suppose we have to do it manually. (This patch was only escaping spaces, which can never work because they break the basic syntax of the HTTP protocol.) This commit attempts to do 2 things: - Try to guess whether libavformat will use the URL for http. This is not always trivial, because some protocols will recursively pass part of the user URL to http in some way. - Try to fix invalid URLs. We fix only the simplest case: only characters that are never valid are escaped. This excludes invalid escape codes, which happen with freestanding '%' characters. Fixes #1495.
* dvd: try to improve seekingwm42015-01-191-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | libdvdnav is garbage. Seeking by time is incredibly inexact, which is in part due to the fact that it does not use the DVD seek tables. Instead, it assumes CBR for certain ranges within the DVD, which makes especially small seeks unreliable. I have no good fix for this, other than hacking libdvdnav (I'd rather prefer to remove mpv DVD support completely than doing this). So here's a shitty hack that tries to workaround these problems. A basic observation is that seeking in VLC seems to work quite well; however it seems to be based on seeking by blocks (unless there is a subtle "trick" I didn't see in the source code). mpv usually seeks by timestamps, so this is not an option for us. However, we can pretend we are doing this in the DVD layer. The previous commit added a way to pass through relative seeks. This commit uses the relative seek. STREAM_CTRL_SEEK_TO_TIME is backwards compatible (there's still dvdread and bluray), so most code is about extracing the relative seek information and turning it into a block seek. (Another way would have been using SEEK_FACTOR stuff, but that would probably make for a less reliable way to handle this situation.) Additionally, if a hr-seek is done, add an offset by 10 seconds. As long as the error done by libdvdnav is not worse, this should help with hr- seeks - although it makes them much slower.
* stream_dvb: silence bogus compiler warningwm42015-01-191-1/+1
| | | | | | This complains within dvb_strtok_r() that savePtr is uninitialized. There doesn't seem to be any code path where this can happen though, so it's probably a false positive. Silence it anyway.
* cache: cache-position needs to be int64_tOliver Freyermuth2015-01-131-1/+1
| | | | | | Both max_filepos and offset are int64_t, so pos can overflow, e.g. causing endless loops in stream implementation.
* stream_dvb: Add MP_ERR if polling worked, but read fails.Oliver Freyermuth2015-01-131-0/+4
| | | | Read can still fail, e.g. if the buffer is invalid.
* stream_pvr: uncrustifywm42015-01-061-1306/+1188
| | | | Mostly automatic, with some manual changes.
* dvb: uncrustifywm42015-01-063-1272/+1261
| | | | Mostly automatic, some manual changes.
* stream_dvb: Enable streaming mode, activates cache.Oliver Freyermuth2015-01-061-0/+1
| | | | | | | | | This causes more constant reading from the DVB device, and seems not to hurt the stream-controls. As the device cache seems to fill up when not reading from it for several seconds, reading into the cache fixes desync-issues after the initial analyzeduration of the demuxer.
* stream_dvb: Do not add special PIDs if we anyways record the full TP.Oliver Freyermuth2015-01-061-23/+22
| | | | | | This just exchanges two blocks of code: If we record the full transponder, no need to explicitly add some PIDs to the filter list.
* stream_dvb: Add possibility to dump a full transponder.Oliver Freyermuth2015-01-062-4/+11
| | | | | | | | | | | | Was already possible before by injecting the magic PID 8192 into channels.conf, the flag makes this much more useable and we also have it documented. Useful not only for debugging, but also for incomplete channels.conf (mplayer format...), multi-channel recording, or channels which do dynamic PID switchng. full-transponder is also useful for channels which switch PIDs on-the-fly. ffmpeg can handle this, but it needs the full stream with all PIDs.
* stream_dvb: Record PIDs with human-readable content, bump max demuxer count.Oliver Freyermuth2015-01-062-1/+15
| | | | | | | | | | | There is the STD which contains service-names (ffmpeg can understand it), and the EIT which contains the EPG (ffmpeg does not parse it, but e.g. VLC does). As we now have more PIDs in general, increase the maximum number of demuxers we can open. ffmpeg has an internal limit of 64 PIDs, we are still far from that.
* stream_dvb: Also demux PMT if possible, reactivate TPID parsing.Oliver Freyermuth2015-01-064-12/+113
| | | | | | | | | | | | If VDR-channel-config is used, we know the service_id. Using that, PMT can be extracted from PAT (code for that inspired by szap-s2 again). For this, we need to demux PAT with a special filter-setup, and once PMT was found it can be added to the PID-list. PMT is only resolved the first time one tunes to a channel, then stored in the channel-list in memory. With PMT available, ffmpeg can safely decode the teletext-pids.
* stream_dvb: Extend token-list for pid-parsing, magically allows to parse ↵Oliver Freyermuth2015-01-061-3/+33
| | | | | | | | | | | VDR-style PID-lists. I also added a comment explaining the potentially occuring structures for future reference. For tokenization, a custom strtok_r implementation is used, inspired by strtok_r as implemented in musl and ffmpeg, hopefully slightly more readable (av_strtok_r is not available in libav, and strtok_r is not available everywhere).
* stream_dvb: Move out PID-parsing, disable TPID parsing.Oliver Freyermuth2015-01-061-26/+38
| | | | | | | Move PID-string parsing into a separate function, reduces code-duplication. Drop TPID-parsing again since teletext-stream seems not really correctly identified (ffmpeg guessed mp3 in my test...). Parsing now done using strtok + sscanf instead of sscanfs with fixed numbers of expected fields - gives more correct checking of PID-overflow, will allow VDR-style PID-field parsing.
* stream_dvb: Add TPID (teletext-pid) parsing from VDR-style channel-lists.Oliver Freyermuth2015-01-061-23/+28
| | | | | The PID-parsing is not really nicely done and also does not yet handle the special VDR-style syntax. A later commit will move the parsing to a separate function handling that which also checks that the maximum PID-count is not exceeded.
* stream_dvb: Handle VDR-config location-field as DISEQc-field.Oliver Freyermuth2015-01-061-6/+26
| | | | | | | In mplayer-style channels-config, we had a LNB-field used for that. In old VDR times, the location-field was also containing DISEQc information, now it does that only indirectly (location => LNB => vdr knows from lnb-config). We only accept it as this if the field is fully numeric.
* dvb: Extend understanding of VDR channel config: stream_id, inversion.Oliver Freyermuth2015-01-064-9/+33
| | | | | | | Now also "stream ID" (for DVB-S2) and "inversion" are understood. The parameter-string can also provide information on FEC, rolloff etc. For DVB-S, "auto" which mpv uses by default should be fine, I can also confirm it works. For non-DVB-S cards, it might be useful to also parse this information in case of a vdr-channel list. As I have no such hardware and thus would have to do it blindly, I added a FIXME. Mostly complete vdr-channels.conf format documentation is at http://www.vdr-wiki.de/wiki/index.php/Channels.conf (german only).
* stream_dvb: Very basic vdr-type channels.conf support.Oliver Freyermuth2015-01-061-24/+80
| | | | | | | | | | | Still incomplete. Initialize is_dvb_s2 boolean in channel-struct. We first check whether the channels.conf-line at hand is sscanf'able with a vdr-style pattern. If yes, we assume it is a vdr-channel-config (we check whether sscanf consumed the full line). The vdr-style config also contains a parameter-string which contains information about polarization + delivery type (e.g. DVB-S2). With this change, S2-tuning works with a VDR-channel list. Missing (later commits): - vdr-parameter-string also contains other information, e.g. invert-flag, needs to be parsed. - Diseqc-lnb-number is not present in VDR-config (I believe it is handled via the location-parameter + lnb-config there). For backwards compatibility, the location-parameter can be the lnb-number - we should test whether it is an int and assume this in this case. - VID, AID and TID-lists are extremely ugly in their syntax for VDR. At the moment, only the first number is parsed (and TID fully ignored), needs to be fixed.
* dvb: Extend dvb_channel struct, needs to know whether channel is S2.Oliver Freyermuth2015-01-063-11/+19
| | | | | | It contains now also a boolean which tells whether this is an DVB-S2 channel (not initialized yet - tbd in next commit). We could also pass through the type of the delivery system (would be more flexible), but the delivery-system-enum is only available with S2API, so this is more backwards-compatible. If someone has DVB-T2 / DVB-C2 hardware and extends the code to deal with it, this should be changed.
* dvb_tune: (DVB-S) Initial S2API support.Oliver Freyermuth2015-01-061-13/+79
| | | | | | | | | | | Also allows demuxers to buffer, and we explicitly discard stale QPSK events. Inspiration taken from the szap-s2 implementation. S2API is only used if available and for DVB-S cards - it might also be useful to have that for DVB-T2 / DVB-C2 tuning later, but I do not have the HW / no DVB-T2 broadcasting station nearby to test functionality. This should do no functional changes, only usage of the different API. The S2API is more extensible and a requirement for all the HD-deliveries (e.g. DVB-S2) and since 2.6.28 is the successor of the old API. Tuning to DVB-S2 channels actually already "works" like this if the delivery is hardcoded in - for a fully working implementation, the channels.conf.sat would need an additional field indicating the delivery type (VDR-type channels.conf have that). This commit also: - Cleans up some debug output. - Moves an unneeded usleep(100000) (only needed for diseqc switching for SAT) into the DVB-S-only part of the implementation.
* dvbin: Prepare S2API-implementation, support different DVB-API versions.Oliver Freyermuth2015-01-061-1/+17
| | | | | | | | | | Define a new macro "DVB_USE_S2API" to be used to switch to S2API if available, also document what is the main difference in the new S2API. StreamID-handling is only supported since API 5.2, and some macros were renamed or only added later with 5.8 (somewhere around kernel 3.6), so some define-fixups are needed to support these intermediate kernel header versions.
* stream_pvr: sort channel list by --tv-channels orderwm42014-12-281-2/+25
| | | | | | | | | | Apparently this is what users would expect. Going the way of least resistance (in terms of messing with this old, rarely used code), sorting them by some kind of addition timestamp (called priority in the patch) is the easiest. Fixes #1390.
* stream: always make stream dumping/capturing append to output filewm42014-12-271-1/+1
| | | | Partially fixes #1393 (but not really).
* stream_pvr: remove redundant log prefixeswm42014-12-261-103/+82
|
* stream_pvr: increase timeout, slightly better error reportingwm42014-12-261-5/+10
| | | | | | | An attempt to find out what's wrong with issue #1382. I don't even know why a timeout would be needed; for robustness with broken devices maybe?
* stream: always disable cache for pseudo-streamswm42014-12-242-1/+3
| | | | | Streams which don't have a full_buffer function never return any actual data. Slight improvement over commit 5640c195.
* stream_edl: disable cachingwm42014-12-231-0/+1
| | | | | | | | | | | stream_edl merely makes demux_edl act "special", which checks for the stream type explicitly and then does something with its URL. If a cache is added before the stream, it'll try to use the cache's URL (i.e. an empty string), and will then obviously fail to parse the URL. While this is slightly stupid, just disabling the entirely useless cache is the most effective solution. Fixes #1378.
* dvd: add the last chapterwm42014-12-161-1/+1
| | | | | | | | | | | | As suggested in issue #1251. I think the main point is that it acts as a hack to return to the DVD menu when jumping past the last chapter, because it will reach title-EOF, instead of explicitly jumping to the next file (which usually exits the player). This basically reverts commit 8b7418d, except it doesn't include an off-by-1 error (apparently). Closes #1251.
* command, dvd: add property which returns list of DVD titleswm42014-12-133-22/+63
| | | | | | | | | This was requested. It seems libdvdread can't get the duration for titlesets other than the currently opened title. The data structures contain dangling pointers for these, and MPlayer works this around by opening every title separately for the purpose of dumping the title list.
* stream_cdda: don't return number of tracks as number of titleswm42014-12-131-5/+0
| | | | | | Apparently, we treat different tracks as titles, so returning the number of titles (which is user-visible as "disc-titles" property) is completely misguided.
* dvd: drop last chapterwm42014-12-131-2/+2
| | | | | | | Apparently, libdvdnav always reports a last chapter that points to the exact end of the title. This is useless for us. Again, same possible caveats as with the previous commit.
* dvd: add an extra chapter at position 0wm42014-12-131-2/+2
| | | | | | | This way, chapter 0 will always point to the start of the title. At least this is the intention; it's likely that DVDs as well as libdvdnav do random things that lead to random results.
* dvd, bd: don't unnecessarily block on demuxer/stream all the timewm42014-12-041-2/+2
| | | | | | | | | | | | | | | | | | This was completely breaking any low-level caching. Change it so that at least demuxer caching will work. Do this by using the metadata cache mechanism to funnel through the menu commands. For some incomprehensible reason, I had to reorder the events (which affects their delivery priority), or they would be ignored. Probably some crap about the event state being cleared before it could be delivered. I don't give a shit. All this code sucks. It would probably be better to let discnav.c access the menu event "queue" directly, and to synchronize access with a mutex, instead of going through all the caching layers, making things complicated and slow.
* Do not call strerror()wm42014-11-268-75/+81
| | | | | | | | | | | | | | | | | | | | | | | | | ...because everything is terrible. strerror() is not documented as having to be thread-safe by POSIX and C11. (Which is pretty much bullshit, because both mandate threads and some form of thread-local storage - so there's no excuse why implementation couldn't implement this in a thread-safe way. Especially with C11 this is ridiculous, because there is no way to use threads and convert error numbers to strings at the same time!) Since we heavily use threads now, we should avoid unsafe functions like strerror(). strerror_r() is in POSIX, but GNU/glibc deliberately fucks it up and gives the function different semantics than the POSIX one. It's a bit of work to convince this piece of shit to expose the POSIX standard function, and not the messed up GNU one. strerror_l() is also in POSIX, but only since the 2008 standard, and thus is not widespread. The solution is using avlibc (libavutil, by its official name), which handles the unportable details for us, mostly. We avoid some pain.
* Silence some Coverity warningswm42014-11-211-0/+1
| | | | None of this really matters.
* Remove some unneeded NULL checkswm42014-11-211-3/+2
| | | | Found by Coverity; also see commit 85fb2af3.
* stream: fix endian swappingwm42014-11-211-2/+2
| | | | | | | | | | In addition to the messed-up expression, the endianness was also inverted. The code reads big endian by default. It "worked" by coincidence, but for little endian, codepoints outside of latin1 were broken. The broken expression was found by Coverity.
* stream: reduce ifdeffery for win32 somewhatwm42014-11-182-16/+8
| | | | Remove the ones which are not strictly needed.
* stream: signal a Windows event object on cancelJames Ross-Gowan2014-11-182-0/+35
| | | | | This will be used in the following commit to cancel subprocesses started by Lua.
* cache: don't relay STREAM_CTRL_AVSEEK if it's unsupportedwm42014-11-011-0/+4
| | | | | | | | Thanks to STREAM_CTRL_HAS_AVSEEK, we actually know whether CTRL_AVSEEK is implemented at all, and we can avoid a blocking wait on the cache if demux_lavf sends CTRL_AVSEEK even if it won't wait. I'm hoping this can't currently happen, but why hope if we can explicitly prevent it. It'll make us more robust against future changes in libavformat.
* demux_lavf, stream_lavf: drop local buffers on time-seekswm42014-10-301-1/+3
| | | | | There was chance that some data was left in various local buffers after time-seeks. Probably doesn't actually matter.
* demux_lavf: mark as seekable if protocol supports seeking by timewm42014-10-303-0/+9
| | | | | | | | | | | | Basically, this will mark the demuxer as seekable with rtmp* and mmsh protocols. These protocols have network-level time seeking, and whether you can seek on the byte level does not matter. Until now, seeking was typically only enabled because of the cache, and a (nonsensical) warning was shown accordingly. It still could happen that the server doesn't actually support thse requests (or simply rejects them), so this is somewhat imperfect.
* Drop libquvi supportwm42014-10-253-334/+0
| | | | | | | | | | | No development activity (or even any sign of life) for almost a year. A replacement based on youtube-dl will probably be provided before the next mpv release. Ask on the IRC channel if you want to test. Simplify the Lua check too: libquvi linking against a different Lua version than mpv was a frequent issue, but with libquvi gone, no direct dependency uses Lua, and such a clash is rather unlikely.
* tv: remove some differences between immediate/normal modewm42014-10-251-38/+23
| | | | | | | | | | | The immediate mode (which is the default) uses a tiny ringbuffer and doesn't grab timestamps. This leads to quite bad behavior due to the fact that there's an additional buffer between playloop and TV code (the demuxer thread, which doesn't exist in MPlayer). Always grab the timestamps and use a decently-sized buffer. I still have no clue what I'm doing, and hacked it until it appeared to work. Report regressions if you experience any.
* tv: reduce waiting loop from 10ms to 1mswm42014-10-251-2/+2
| | | | | | | | | | | | I can't believe how shitty this (MPlayer-derived) code is. Maybe it should be fixed or be replaced with using libavdevice, but that doesn't seem worth the effort. Anyway, for now reduce the time it's blocking to wait for new frames from 10ms to 1ms, because 10ms might be a bit too tight: it could deliver the frame up to 10ms late - now it's only up to 1ms. (And yes, it does that instead of using condition variables. It also abuses volatile variables as atomics. It's hilarious.)
* stream: fix --stream-dump dropping the file headerwm42014-10-251-10/+12
| | | | | | | | | | | | | | | | | | stream_rar.c peeks the first few bytes when trying to open, which means that opening any stream reads at least 2KB of data (internal buffer size) on opening. This broke --stream-dump, which saved only the data following this initial buffer. Hack it around by writing the current buffer to the capture file too, and move stream_capture_write() above stream_set_capture_file() for this purpose. Cleaner solutions might include: handling the terrible rar thing differently, or using the "proper" stream API for dumping. (The latter is not done, because --stream-dump shares code with the --stream-capture misfeature.) Fixes #1215.
* stream: remove duplicate messagewm42014-10-251-1/+1
|
* tv: remove duplicated crapwm42014-10-251-124/+76
| | | | | The logging functions already add a prefix. Original MPlayer devs must have liked code duplication a lot.
* tv: unqueue buffers correctly (maybe, maybe not)wm42014-10-251-5/+7
| | | | | I clue no idea what I'm doing, but at least it doesn't hang anymore when closing a tv:// stream using a v4l2 loopback device.
* stream: stupid compilation workaround for win32wm42014-10-191-1/+1
| | | | | | | | On win32, open() is a function-like macro. The line of code changed with this commit accidentally expanded the macro. Prevent this macro expansion. Not sure why that happened now. Since as far as I remember system functions can be defined as macros, this affects in theory not only win32.
* Set thread name for debuggingwm42014-10-191-0/+1
| | | | | | | | | | Especially with other components (libavcodec, OSX stuff), the thread list can get quite populated. Setting the thread name helps when debugging. Since this is not portable, we check the OS variants in waf configure. old-configure just gets a special-case for glibc, since doing a full check here would probably be a waste of effort.
* lua: add an utility function for starting processeswm42014-10-192-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because 1) Lua is terrible, and 2) popen() is terrible. Unfortunately, since Unix is also terrible, this turned out more complicated than I hoped. As a consequence and to avoid that this code has to be maintained forever, add a disclaimer that any function in Lua's utils module can disappear any time. The complexity seems a bit ridiculous, especially for a feature so far removed from actual video playback, so if it turns out that we don't really need this function, it will be dropped again. The motivation for this commit is the same as with 8e4fa5fc. Note that there is an "#ifndef __GLIBC__". The GNU people are very special people and thought it'd be convenient to actually declare "environ", even though the POSIX people, which are also very special people, state that no header declares this and that the user has to declare this manually. Since the GNU people overtook the Unix world with their very clever "embrace, extend, extinguish" strategy, but not 100%, and trying to build without _GNU_SOURCE is hopeless; but since there might be Unix environments which support _GNU_SOURCE features partially, this means that in practice "environ" will be randomly declared or not declared by system headers. Also, gcc was written by very clever people too, and prints a warning if an external variable is declared twice (I didn't check, but I suppose redeclaring is legal C, and not even the gcc people are clever enough to only warn against a definitely not legal C construct, although sometimes they do this), ...and since we at mpv hate compiler warnings, we seek to silence them all. Adding a configure test just for a warning seems too radical, so we special-case this against __GLIBC__, which is hopefully not defined on other libcs, especially not libcs which don't implement all aspects of _GNU_SOURCE, and redefine "environ" on systems even if the headers define it already (because they support _GNU_SOURCE - as I mentioned before, the clever GNU people wrote software THAT portable that other libcs just gave up and implemented parts of _GNU_SOURCE, although probably not all), which means that compiling mpv will print a warning about "environ" being redefined, but at least this won't happen on my system, so all is fine. However, should someone complain about this warning, I will force whoever complained about this warning to read this ENTIRE commit message, and if possible, will also force them to eat a printed-out copy of the GNU Manifesto, and if that is not enough, maybe this person could even be forced to convince the very clever POSIX people of not doing crap like this: having the user to manually declare somewhat central symbols - but I doubt it's possible, because the POSIX people are too far gone and only care about maintaining compatibility with old versions of AIX and HP-UX. Oh, also, this code contains some subtle and obvious issues, but writing about this is not fun.
* stream: better error message for unmatched protocolwm42014-10-171-1/+3
| | | | See #1187.
* demux_lavf: set stream network options if applicablewm42014-10-142-29/+47
| | | | | | | | | | | Normally, we pass libavformat demuxers a wrapped mpv stream. But in some cases, such as HLS and RTSP, we let libavformat open the stream itself. In these cases, set typical network properties like useragent according to the mpv options. (We still don't set it for the cases where libavformat opens other streams on its own, e.g. when opening the companion .sub file for .idx files - not sure if we maybe should always set these options.)
* stream_lavf: expose concat://wm42014-10-141-0/+1
| | | | | | | Apparently there's an use for this; see #1178. I won't redocument obscure FFmpeg features, so add a hint to the manpage that some protocols are documented in FFmpeg instead.
* stream: change internal instead of external pos when dropping bufferswm42014-10-081-0/+1
| | | | | | | | | | | | | | | | | | | stream provides a read buffer (so even something like stream_read_char() is very fast). This means the stream reads ahead by a few KBs, and implies that the internal position (s->pos, which would match e.g. the file position in stream_file.c), and the external position (stream_tell()) can be different. stream_tell() shows how these are related. When dropping buffers, which happens on byte-level discontinuities with a bunch of streams (including DVB), we should not change the position as seen by the demuxer. On the other hand, the internal position is not really meaningful, since these streams aren't seekable anyway. So just change the code such that stream_drop_buffers() doesn't change the demuxer visible position. I'm hoping that this will fix a few problems with DVB. (Also see previous commit.)
* stream_dvb: use stream_drop_buffers()wm42014-10-081-2/+1
|
* stream: don't drop buffers on failed seekswm42014-09-291-6/+2
| | | | | | | | | | | Might matter when libavformat tries to do tiny seekbacks in an unseekable stream, and the seekback buffer isn't large enough. In this case, seeking would fail, and would drop the current buffer. The seekback would end up dropping future data. This change probably doesn't have any observable effects. libavformat normally has its own stream buffer, and demux_mkv.c tries carefully never to seek back.
* cache_file: refuse to cache unseekable streamswm42014-09-291-0/+5
| | | | | | | | | This makes no sense to use with DVD/BD/DVB and some others, and these streams happen to be unseekable. Also, other kinds of unseekable streams (like reading from pipe) should work, but will exhibit sketchy behavior if they need to seek. So just disable it, and leave these problems to the memory cache (cache.c).
* stream_bluray: autodetect AVCHD directorieswm42014-09-271-3/+4
| | | | Fixes #1127.
* stream: change malloc+memset to callocBruno George Moraes2014-09-273-8/+2
| | | | | | | Also removed some memset that were left on some calloc that was already in the code. Signed-off-by: wm4 <wm4@nowhere>
* stream_bluray: allow opening BDMV directories directlywm42014-09-262-0/+88
| | | | | | | | Similar as the previous commits. Most of the code is actually copied from the stream_dvdnav.c code, but I'd rather prefer to duplicate it, than to entangle them. The latter would probably result in terrible things in a few years.
* stream_dvdnav: allow opening DVD directories directlywm42014-09-262-0/+54
| | | | | | | | Same hack as with stream_dvd.c. VIDEO_TS.IFO files are now opened via stream_dvdnav.c. Directories containing a VIDEO_TS.IFO or VIDEO_TS/VIDEO_TS.IFO file are also opened with it.
* stream_dvd: better .ifo probingwm42014-09-255-21/+66
| | | | | | | | | | | | | | | stream_dvd.c includes a pseudo-protocol that recognizes .IFO files, and plays them using libdvdread. This was relatively lazy, and could perhaps easily trigger with files that just had the .ifo extension. Make the checks stricter, and even probe the file header. Apparently the first bytes in an .ifo file are always "DVDVIDEO-VTS", so check for this. Refuse to load the main "video_ts.ifo". The plan is to use stream_dvdnav for it. This also removes at least 1 memory leak.
* Remove mpbswap.hwm42014-09-251-2/+1
| | | | | | This was once central, but now it's almost unused. Only vf_divtc still uses it for extremely weird and incomprehensible reasons. The use in stream.c is trivial. Replace these, and remove mpbswap.h.
* stream_cdda, demux_raw: always use s16lewm42014-09-251-8/+0
| | | | | | | | | | | | | stream_cdda's output format is linked to demux_raw's default audio format, and at least we don't care enough to provide a separate mechanism to let stream_cdda explicitly set the format, so they must match. Judging from the existing code, it looks like CDDA always outputs little endian. stream_cdda.c changed this back to native endian (what demux_raw expects). Just make them both little endian. This requires less code, and also having a raw demuxer's behavior depend on the endianness of the machine isn't very sane anyway.
* audio: drop swapped-endian audio formatswm42014-09-234-6/+6
| | | | | | | | | | | | | | | | | | | | Until now, the audio chain could handle both little endian and big endian formats. This actually doesn't make much sense, since the audio API and the HW will most likely prefer native formats. Or at the very least, it should be trivial for audio drivers to do the byte swapping themselves. From now on, the audio chain contains native-endian formats only. All AOs and some filters are adjusted. af_convertsignendian.c is now wrongly named, but the filter name is adjusted. In some cases, the audio infrastructure was reused on the demuxer side, but that is relatively easy to rectify. This is a quite intrusive and radical change. It's possible that it will break some things (especially if they're obscure or not Linux), so watch out for regressions. It's probably still better to do it the bulldozer way, since slow transition and researching foreign platforms would take a lot of time and effort.
* stream: fix build with emulated atomicswm42014-09-131-3/+3
| | | | | This code was legal with C11 atomics, but it fails with our compatibility wrapper.
* stream: redo playback abort handlingwm42014-09-137-26/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mechanism originates from MPlayer's way of dealing with blocking network, but it's still useful. On opening and closing, mpv waits for network synchronously, and also some obscure commands and use-cases can lead to such blocking. In these situations, the stream is asynchronously forced to stop by "interrupting" it. The old design interrupting I/O was a bit broken: polling with a callback, instead of actively interrupting it. Change the direction of this. There is no callback anymore, and the player calls mp_cancel_trigger() to force the stream to return. libavformat (via stream_lavf.c) has the old broken design, and fixing it would require fixing libavformat, which won't happen so quickly. So we have to keep that part. But everything above the stream layer is prepared for a better design, and more sophisticated methods than mp_cancel_test() could be easily introduced. There's still one problem: commands are still run in the central playback loop, which we assume can block on I/O in the worst case. That's not a problem yet, because we simply mark some commands as being able to stop playback of the current file ("quit" etc.), so input.c could abort playback as soon as such a command is queued. But there are also commands abort playback only conditionally, and the logic for that is in the playback core and thus "unreachable". For example, "playlist_next" aborts playback only if there's a next file. We don't want it to always abort playback. As a quite ugly hack, abort playback only if at least 2 abort commands are queued - this pretty much happens only if the core is frozen and doesn't react to input.
* stream: change cache return valueswm42014-09-072-7/+7
| | | | | Basically a cosmetic change, because currently the player just continues even if the cache fails initializing.
* stream_lavf: assume icy title data is terminated with ';'wm42014-09-061-1/+1
| | | | Should fix #1071.
* player: don't allow remote playlists to load local fileswm42014-09-013-4/+11
| | | | | | | | Because that might be a bad idea. Note that remote playlists still can use any protocol marked with is_safe and is_network, because the case of http-hosted playlists containing URLs using other streaming protocols is not unusual.
* player: always load playlistswm42014-08-314-3/+37
| | | | | | | | | Until now, you had to use --load-unsafe-playlists or --playlist to get playlists loaded. Change this and always load playlists by default. This still attempts to reject unsafe URLs. For example, trying to invoke libavdevice pseudo-demuxer is explicitly prevented. Local paths and any http links (and some more) are always allowed.
* cache_file: add a mode that creates a temporary filewm42014-08-301-1/+2
| | | | | | | Since we have to be portable, our options for creating temporary files are somewhat limited. tmpfile() happens to be available everywhere, so use that. This function doesn't allow having a "visible" filename or location, so we use the magic string "TMP" for this.
* stream: correctly propagate uncached stream typewm42014-08-301-1/+1
| | | | | This makes the ordered chapter code not think that a stream from the local filesystem is not a local file (it checks uncached_type).
* Move compat/ and bstr/ directory contents somewhere elsewm42014-08-294-5/+5
| | | | | | | | | bstr.c doesn't really deserve its own directory, and compat had just a few files, most of which may as well be in osdep. There isn't really any justification for these extra directories, so get rid of them. The compat/libav.h was empty - just delete it. We changed our approach to API compatibility, and will likely not need it anymore.
* stream: tweaks to network reconnection codewm42014-08-293-3/+6
| | | | | | | | | | | | | | Don't reconnect to the cache (since the cached stream already handles reconnection). This is necessary, because since commit 0b428e44 the "streaming" field (which also controls whether attempting to reconnect makes sense at all) is inherited to the cache stream wrapper. Also, let the stream reset its own position on reconnect. This removes some assumptions and messy handling from the reconnect function. Make sure the cache is dropped on reconnect. This takes care of readjusting the stream position if necessary. (Also drop the cache on DVB channel switching commands.)
* tv: initialize frequencies to 0Ben Boeckel2014-08-281-2/+2
|
* player: redo how stream caching and pausing on low cache workswm42014-08-271-0/+1
| | | | | | | | | | | | | | | | | | | Add the --cache-secs option, which literally overrides the value of --demuxer-readahead-secs if the stream cache is active. The default value is very high (10 seconds), which means it can act as network cache. Remove the old behavior of trying to pause once the byte cache runs low. Instead, do something similar wit the demuxer cache. The nice thing is that we can guess how many seconds of video it has cached, and we can make better decisions. But for now, apply a relatively naive heuristic: if the cache is below 0.5 secs, pause, and wait until at least 2 secs are available. Note that due to timestamp reordering, the estimated cached duration of video might be inaccurate, depending on the file format. If the file format has DTS, it's easy, otherwise the duration will seemingly jump back and forth.
* stream_dvb: restore --dvbin-file optionwm42014-08-062-7/+15
| | | | | | | Got lost some time ago. Although I'm not sure if it actually does anything on MPlayer (it exists there, but might broken, not sure). Fixes #988 (untested).
* stream_dvb: fix channels.conf preference orderwm42014-08-061-3/+4
| | | | | | | | channels.conf was never used (even though its config path was resolved). Also remove the non-sense with the access() call. Fixes #987 (untested).
* Improve setting AVOptionswm42014-08-021-5/+1
| | | | | | | | Use OPT_KEYVALUELIST() for all places where AVOptions are directly set from mpv command line options. This allows escaping values, better diagnostics (also no more "pal"), and somehow reduces code size. Remove the old crappy option parser (av_opts.c).
* stream: hack-fix rtmp-level seekingwm42014-07-303-7/+15
| | | | | | | | | | | | | This didn't work, because the timebase was wrong. According to the ffmpeg doxygen, if the stream index is -1 (which is what we used), the timebase is AV_TIME_BASE. But this didn't work, and it really expected the stream's timebase. Quite "surprising", since this feature (avio_seek_time) is used by rtmp only. Fixing this properly is too hard, so hack-fix our way around it. STREAM_CTRL_SEEK_TO_TIME is also used by DVD/BD, so a new STREAM_CTRL_AVSEEK is added. We simply pass-through the request verbatim.
* stream_lavf: allow setting AVOptions with --stream-lavf-owm42014-07-301-0/+17
| | | | | This commit also creates a private option struct for stream_lavf.c, but since I'm lazy, I'm not moving any existing options to it.
* demux: add a demuxer threadwm42014-07-161-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a thread to the demuxer which reads packets asynchronously. It will do so until a configurable minimum packet queue size is reached. (See options.rst additions.) For now, the thread is disabled by default. There are some corner cases that have to be fixed, such as fixing cache behavior with webradios. Note that most interaction with the demuxer is still blocking, so if e.g. network dies, the player will still freeze. But this change will make it possible to remove most causes for freezing. Most of the new code in demux.c actually consists of weird caches to compensate for thread-safety issues (with the previously single-threaded design), or to avoid blocking by having to wait on the demuxer thread. Most of the changes in the player are due to the fact that we must not access the source stream directly. the demuxer thread already accesses it, and the stream stuff is not thread-safe. For timeline stuff (like ordered chapters), we enable the thread for the current segment only. We also clear its packet queue on seek, so that the remaining (unconsumed) readahead buffer doesn't waste memory. Keep in mind that insane subtitles (such as ASS typesetting muxed into mkv files) will practically disable the readahead, because the total queue size is considered when checking whether the minimum queue size was reached.
* Revert "Remove DVD and Bluray support"wm42014-07-156-0/+2608
| | | | | | This reverts commit 4b93210e0c244a65ef10a566abed2ad25ecaf9a1. *shrug*
* Remove DVD and Bluray supportwm42014-07-146-2608/+0
| | | | It never worked well. Just remux your DVD and BD images to mkv.
* stream_dvdnav: suspend read on vts change even if the requested title is not ↵Alessandro Ghedini2014-07-131-1/+0
| | | | found
* stream: don't sleep for reconnecting network if playback is stoppedwm42014-07-121-0/+2
| | | | | | Also silences the bogus message if that happens. CC: @mpv-player/stable
* cache_file: fix operation if stream size is unknownwm42014-07-121-2/+3
| | | | | | | | | | | | | Happens when playing from a pipe. Note that seeking forward doesn't work. It would be possible to create a workaround for that by reading and skipping data until the target position is reached (and writing the skipped data into the cache file), but I'm not sure about that. Fixes #928. CC: @mpv-player/stable
* Revert "build: avoid defining _GNU_SOURCE"wm42014-07-101-3/+0
| | | | | | This reverts commit 2e6a8f260ca169e2e1a5646eecfc322de6f77307. Too many problems for now, such as with OSX and asprintf().
* build: include <strings.h> for strcasecmp()wm42014-07-104-0/+4
| | | | | | | It happens to work without strings.h on glibc or with _GNU_SOURCE, but the POSIX standard requires including <strings.h>. Hopefully fixes OSX build.
* build: deal with endian messwm42014-07-101-1/+2
| | | | | | | | | | | | | | | | | | | | There is no standard mechanism for detecting endianess. Doing it at compile time in a portable way is probably hard. Doing it properly with a configure check is probably hard too. Using the endian definitions in <sys/types.h> (usually includes <endian.h>, which is not available everywhere) works under circumstances, but the previous commit broke it on OSX. Ideally all code should be endian dependent, but that is not possible due to the dependencies (such as FFmpeg, some video output APIs, some audio output APIs). Create a header osdep/endian.h, which contains various fallbacks. Note that the last fallback uses libavutil; however, it's not clear whether AV_HAVE_BIGENDIAN is a public symbol, or whether including <libavutil/bswap.h> really makes it visible. And in fact we don't want to pollute the namespace with libavutil definitions either. Thus it's only the last fallback.
* build: avoid defining _GNU_SOURCEwm42014-07-091-0/+3
| | | | | | | | | _GNU_SOURCE defines the kitchen sink, and also prefers glibc definitions where glibc and POSIX conflict. Even though POSIX is worth less than toilet paper, we still prefer the POSIX definitions. rar.c needs asprintf(), which is _GNU_SOURCE-only. So we define _GNU_SOURCE too specifically for this file.
* cache, dvd, bluray: simplify stream time handlingwm42014-07-071-42/+16
| | | | | | | | | | | | | | | | | | We used a complicated and approximate method to cache the stream timestamp, which is basically per-byte. (To reduce overhead, it was only cached per 8KB-block, so it was approximate.) Simplify this, and read/keep the timestamp only on discontinuities. This is when demux_disc.c actually needs the timestamp. Note that caching is currently disabled for dvdnav, but we still read the timestamp only after some data is read. libdvdread behaves well, but I don't know about libbluray, and the previous code also read the timestamp only after reading data, so try to keep it safe. Also drop the start_time offset. It wouldn't be correct anymore if used with the cache, and the idea behind it wasn't very sane either (making the player to offset the initial playback time to 0).
* stream_dvdnav: more debugging outputwm42014-07-061-2/+5
|
* stream: remove now unused STREAM_CTRL_GET_START_TIMEwm42014-07-064-19/+0
| | | | demux_disc.c takes care of this now.
* tv: move demuxer parts to separate filewm42014-07-052-250/+13
| | | | | Now all demuxer implementations (at least demuxer API-wise) are in the demux directory.
* demux: minor simplification to internal APIwm42014-07-051-3/+3
| | | | Also some other unrelated minor changes.
* dvd, bluray, cdda: add demux_disc containing all related hackswm42014-07-058-24/+7
| | | | | | | | | | | | DVD and Bluray (and to some extent cdda) require awful hacks all over the codebase to make them work. The main reason is that they act like container, but are entirely implemented on the stream layer. The raw mpeg data resulting from these streams must be "extended" with the container-like metadata transported via STREAM_CTRLs. The result were hacks all over demux.c and some higher-level parts. Add a "disc" pseudo-demuxer, and move all these hacks and special-cases to it.
* demux, stream: change metadata notificationwm42014-07-052-41/+28
| | | | | | | | | | | | (Again.) This time, we simply make it event-based, as it should be. This is done for both demuxer metadata and stream metadata. For some ogg-over-icy streams, 2 updates are reported on stream start. This is because libavformat reports an update right on start, while including the same info in the "static" metadata. I don't know if that's a bug or a feature.
* stream_dvdnav: check the length of all titles with dvdnav://longesttholin2014-07-041-1/+1
| | | | | | | | The last title was ignored before. CC: @mpv-player/stable Signed-off-by: wm4 <wm4@nowhere>
* stream_dvdnav: free pointer to priv->filename on closetholin2014-07-041-0/+2
| | | | | | CC: @mpv-player/stable Signed-off-by: wm4 <wm4@nowhere>
* stream_dvdnav: make sure seeking bounds are within rangetholin2014-07-041-1/+5
| | | | | | | | libdvdnav returns an error is the seek position is out of range. CC: @mpv-player/stable Signed-off-by: wm4 <wm4@nowhere>
* cache_file: use unicode on windowswm42014-07-021-0/+2
| | | | This enables the MinGW Windows crap wrapper for fopen().
* cache: clear DVD timestampswm42014-07-021-0/+3
| | | | | | | | | | | | When resizing the cache, the buffer for the DVD timestamps is initialized with 0. This causes the player to always return playback position 0 with any file format (not just DVD), and also makes all relative seeks relative to position 0. Fix this by clearing the timestamps explicitly. Closes #899. CC: @mpv-player/stable
* Audit and replace all ctype.h useswm42014-07-015-7/+4
| | | | | | | | | | | | | | | | Something like "char *s = ...; isdigit(s[0]);" triggers undefined behavior, because char can be signed, and thus s[0] can be a negative value. The is*() functions require unsigned char _or_ EOF. EOF is a special value outside of unsigned char range, thus the argument to the is*() functions can't be a char. This undefined behavior can actually trigger crashes if the implementation of these functions e.g. uses lookup tables, which are then indexed with out-of-range values. Replace all <ctype.h> uses with our own custom mp_is*() functions added with misc/ctype.h. As a bonus, these functions are locale-independent. (Although currently, we _require_ C locale for other reasons.)
* options: add --list-protocols optionAlessandro Ghedini2014-06-302-0/+24
|
* Basic xdg directory implementationKenneth Zhou2014-06-261-12/+7
| | | | | | | | | | Search $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS for config files. This also negates the need to have separate user and global variants of mp_find_config_file() Closes #864, #109. Signed-off-by: wm4 <wm4@nowhere>
* stream: add a file cachewm42014-06-223-16/+183
| | | | | | | | | For remarks, pretty much see the manpage additions. Could help with network streams that require too much seeking (maybe), or might be extended to help with the use case of watching and downloading a file at the same time. In general, it might be a useless feature and could be removed again.
* stream: minor cleanupswm42014-06-223-10/+7
| | | | | Remove unused stream type constants. Move some now DVD specific crap to stream_dvd.c.
* stream_dvd, stream_dvdnav: map dvd:// to dvdnavwm42014-06-202-3/+3
| | | | The old stream_dvd.c implementation is still available under dvdread://.
* stream_dvd: fix potential endless loop on seekingwm42014-06-201-1/+2
| | | | | Attempt to fix a reported freeze with some DVDs. Unknown if this helps, and it still might read the whole DVD before terminating.
* cache: avoid race condition between cache wakeup and idlingwm42014-06-161-0/+1
| | | | | | | | | | When the reader is out of data, it tries to wake up the cache thread to get more data. In theory, there's a small race condition, which could cause the cache to miss the wakeup and idle before reaction. Most certainly didn't cause real issues, because even if this extremely unlikely race condition happens, the cache won't idle for longer than 1 second (the hardcoded cache idle time).
* tv: if timestamp is unset, return NOPTSwm42014-06-141-4/+4
| | | | | | Well, not sure if this really improves anything, but at least it's less of a WTF to the playback core than always returning the same timestamp for every frame.
* tv: remove some non-sensewm42014-06-141-2/+2
| | | | | | There's really no need to convert this to float and then back. This is mostly of cosmetic nature, double precision was probably enough to avoid rounding.
* tv: fix compilation without clock_gettime, don't claim to be MPlayerwm42014-06-141-1/+1
| | | | mp_msg() doesn't exist anymore in this form. Oops.
* tv: add missing header for clock_gettimewm42014-06-131-0/+1
| | | | | | | Not sure how this symbol becomes visible in glibc (probably accidental or mandatory recursive inclusion via the other standard or Linux- specific headers), but normally this include file is needed to get the symbol.
* cache: print cache size only in verbose modewm42014-06-121-2/+2
| | | | Seems pretty useless in general, so this reduces output noise.
* tv: fix a hidden static variablewm42014-06-121-9/+9
|
* stream_bluray: fix some const declarationswm42014-06-121-6/+6
| | | | Like in commit 99f5fe.
* tv: use correct timestampsiive2014-06-121-12/+48
| | | | | | | | | | | | | | | | | | Squashed from the following mplayer-svn commits. The '#' is removed from the bug ID to prevent github from doing something stupid. Instead of adding the mplayer configure check for clock_gettime(), the POSIX identifiers are used for checking presence of the function. Use correct type of timestamps when recording from v4l2. Fix 2176 Patch by Jarek Czekalski <jarekczek at poczta onet pl>. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37222 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow building of v4l2 without clock_gettime(). Add overly verbose message in case monotone timestamps are required by the kernel. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37223 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add more constwm42014-06-1119-31/+31
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* stream_dvd: minor cleanupswm42014-06-113-141/+44
| | | | | We don't need a separate stream_dvd.h header file anymore. Some dead functions become apparent; remove them.
* stream_dvd, stream_dvdnav, stream_bluray: remove global option variableswm42014-06-117-67/+61
|
* stream_dvb: remove global option variableswm42014-06-112-20/+22
|
* stream_cdda: remove global option variableswm42014-06-113-33/+37
|
* stream: add a generic way to setup stream priv defaultswm42014-06-112-0/+3
| | | | | | | | | | | | | | | Usually, each stream driver declares the size and option list of its private data. This was pretty natural for when most streams still used global variables to setup their defaults. They did by pointing priv_defaults to the (mutable) struct containing the option values. But falls short when storing the option values in MPOpts. So provide a somewhat inelegant but simple way to let the stream implementation setup the priv struct at initialization time. This is done with the get_defaults callback. It should return a copy of the struct used in MPOpts. (A copy, because if MPOpts is changed, string fields might be deallocated, and if that field is not described by stream_info.options, it won't be copied on init.)
* stream_pvr: remove global option variableswm42014-06-114-188/+84
|
* tv: remove printing of useless comment informationwm42014-06-114-14/+3
|
* tv: remove global option variableswm42014-06-115-194/+244
| | | | | | Pretty much nothing changes, but using -tv-scan with suboptions doesn't work anymore (instead of "-tv-scan x" it's "-tv scan-x" now). Flat options ("-tv-scan-x") stay compatible.
* command: redo ancient TV/DVB/PVR commandswm42014-06-115-10/+113
| | | | | | | | | | | | | | | | | | Convert all these commands to properties. (Except tv_last_channel, not sure what to do with this.) Also, internally, don't access stream details directly, but dispatch commands with stream ctrls. Many of the new properties are a bit strange, because they're write- only. Also remove some OSD output these commands produced, because I couldn't be bothered to port these. In general, this makes everything much cleaner, and will also make it easier to e.g. move the demuxer to its own thread. Don't bother updating input.conf, but changes.rst documents how old commands map to the new ones. Mostly untested, due to lack of hardware.
* stream/cache: handle failure of seeking underlying streamwm42014-06-051-1/+4
| | | | | | | | | | | | This could for example happen when serving an incomplete file from http, and the demuxer tries reading data from the end of the file when opening it (e.g. with avi). Seeking past EOF fails with http, so the file could never be opened, and the cache would get stuck trying to seek to the position. We can't really make the cache report seek failure directly (it would suck for various reasons), so just make the cache report EOF if seeking fails.
* stream: remove VCD supportwm42014-06-016-989/+0
| | | | | | | | | If a single person complains, I will readd it. But I don't expect that this will happen. The main reason for removing this is that it's some of the most unclean code remaining, it's unmaintained, and I've never ever heard of someone using it.
* tv: remove sysinfo() usagewm42014-05-301-10/+0
| | | | | | This call was used limited the buffer size if installed RAM was below 16 MB. This stopped being useful a decade ago. The check could also overflow on 32 bit systems. Just get rid of it.
* af_fmt2bits: change to af_fmt2bps (bytes/sample) where appropriateMarcoen Hirschberg2014-05-281-1/+1
| | | | | | In most places where af_fmt2bits is called to get the bits/sample, the result is immediately converted to bytes/sample. Avoid this by getting bytes/sample directly by introducing af_fmt2bps.
* audio: rename i_bps to 'bitrate' to avoid confusionMarcoen Hirschberg2014-05-281-1/+1
| | | | Since i_bps now contains bits/sec, rename it to reflect this change.
* audio: change values from bytes-per-second to bits-per-secondMarcoen Hirschberg2014-05-281-4/+5
| | | | | | | The i_bps members of the sh_audio and dev_video structs are mostly used for displaying the average audio and video bitrates. Keeping them in bits-per-second avoids truncating them to bytes-per-second and changing them back lateron.
* stream: unbreak writeable streamswm42014-05-271-2/+2
| | | | | | | | | So, basically this worked only with streams that were not local files, because stream_dvd.c "intercepts" local files to check whether they point to DVD images. This means if a stream is not writeable, we have to try the next stream implementation. Unbreaks 2-pass encoding.
* stream_cdda: fix compilationwm42014-05-241-1/+1
| | | | See previous commit. Sigh...
* stream_smb: fix compilationwm42014-05-241-4/+4
| | | | Accidentally forgotten in commit a4d487.
* stream_file: readjust some windows ifdefferywm42014-05-241-23/+9
| | | | | | | | | | Also sneak in some cosmetics. setmode() exists on Windows/msvcrt only, so there's no need for a config test. I couldn't reproduce the problem with seekable pipes on wine, so axe it. (I'm aware that it still could be an issue on real Windows.)
* stream: remove chaos related to writeable streamswm42014-05-2419-83/+41
| | | | | | | | | | For some reason, we support writeable streams. (Only encoding uses that, and the use of it looks messy enough that I want to replace it with FILE or avio today.) It's a chaos: most streams do not actually check the mode parameter like they should. Simplify it, and let streams signal availability of write mode by setting a flag in the stream info struct.
* stream_lavf: remove redundant message prefixeswm42014-05-241-6/+6
|
* stream: don't use end_poswm42014-05-2412-69/+67
| | | | | | | | | | | | | | | | | | | Stop using it in most places, and prefer STREAM_CTRL_GET_SIZE. The advantage is that always the correct size will be used. There can be no doubt anymore whether the end_pos value is outdated (as it happens often with files that are being downloaded). Some streams still use end_pos. They don't change size, and it's easier to emulate STREAM_CTRL_GET_SIZE using end_pos, instead of adding a STREAM_CTRL_GET_SIZE implementation to these streams. Make sure int64_t is always used for STREAM_CTRL_GET_SIZE (it was uint64_t before). Remove the seek flags mess, and replace them with a seekable flag. Every stream must set it consistently now, and an assertion in stream.c checks this. Don't distinguish between streams that can only be forward or backwards seeked, since we have no such stream types.
* stream: kill start_pos, remove --sb optionwm42014-05-249-9/+17
| | | | | | | | | | | | | | | | | | | | stream.start_pos was needed for optical media only, and (apparently) not for very good reasons. Just get rid of it. For stream_dvd, we don't need to do anything. Byte seeking was already removed from it earlier. For stream_cdda and stream_vcd, emulate the start_pos by offsetting the stream pos as seen by the rest of mpv. The bits in discnav.c and loadfile.c were for dealing with the code seeking back to the start in demux.c. Handle this differently by assuming the demuxer is always initialized with the stream at start position, and instead seek back if initializing the demuxer fails. Remove the --sb option, which worked by modifying stream.start_pos. If someone really wants this option, it could be added back by creating a "slice" stream (actually ffmpeg already has such a thing).
* cache: be silent if no initial fill is requestedwm42014-05-221-1/+3
| | | | Hides the "Cache fill:" message with default settings.
* cache: redo options and default settingswm42014-05-203-35/+34
| | | | | | | | | | | | Some options change from percentages to number of kilobytes; there are no cache options using percentages anymore. Raise the default values. The cache is now 25000 kilobytes, although if your connection is slow enough, the maximum is probably never reached. (Although all the memory will still be used as seekback-cache.) Remove the separate --audio-file-cache option, and use the cache default settings for it.
* threads: use mpv time for mpthread_cond_timedwait wrapperwm42014-05-181-2/+2
| | | | | | Use the time as returned by mp_time_us() for mpthread_cond_timedwait(), instead of calculating the struct timespec value based on a timeout. This (probably) makes it easier to wait for a specific deadline.
* stream_smb: increase to 128k read_chuuk from default 8kKevin Mitchell2014-05-121-0/+1
| | | | | | | | | | | | | | | | | Previous to this commit, read_chunk was not set in stream_smb. The cache was therefore filled in small 8K chunks. This resulted in poor performance when compared to, for example, smbnetfs on the same network. The value of 128k is chosen both because it is emperically the "levelling off point" for throughput into mpv's cache, and because it is the value chosen by smbnetfs when serving smb shares to mpv. Note that this change has no effect unless --cache is explicitly specified as smb:// streams do not activate cache by default. This is because the default cache size of 320K is so small it actually makes smb:// perfomance worse. For best results use at least --cache=1024.
* stream_bluray: remove unused variableswm42014-05-041-3/+0
| | | | | They were used for printing slave mode stuff, which was recently removed.
* options: remove deprecated --identifyMartin Herkt2014-05-043-75/+1
| | | | | | | Also remove MSGL_SMODE and friends. Note: The indent in options.rst was added to work around a bug in ReportLab that causes the PDF manual build to fail.
* stream: use libavformat interrupt callbackwm42014-04-251-1/+12
| | | | | | This will allow to cancel opening slow/stuck network streams faster. How well his work probably depends on the protocol implementation in libavformat.
* stream: remove interrupt callback global variableswm42014-04-253-28/+8
| | | | | | | | | | | | This used global variables for the asynchronous interrupt callback. Pick the simple and dumb solution and stuff the callback into mpv_global. Do this because interrupt checking should also work in the connect phase, and currently stream creation equates connecting. Ideally, this would be passed to the stream on creation instead, or connecting would be separated from creation. But since I don't know yet which is better, and since moving stream/demuxer into their own thread is something that will happen later, go with the mpv_global solution.
* stream: use uninterruptible sleep on reconnectingwm42014-04-251-2/+8
| | | | | | | | | | This is the only function which actually used the time argument of stream_check_interrupt(). Considering that the whole player freezes anyway, this is not worth the complication. Also generally reduce the maximum wait time due to timeout. Introduce exponential backoff, which makes the first reconnect retries faster, but still waits up to 500ms in the later retries.
* stream: remove unused functionswm42014-04-251-25/+0
| | | | | | | Interestingly, their last use was removed with commit bbbea793, over 4 months ago. Also remove a stray struct demux_stream forward declaration.
* cache: remove redundant log prefixwm42014-04-231-1/+1
|
* threads: fix function namewm42014-04-231-2/+2
| | | | Closer to the corresponding standard function pthread_cond_timedwait.
* Fix some libav* include statementswm42014-04-192-2/+1
| | | | | | | | | | | | | Fix all include statements of the form: #include "libav.../..." These come from MPlayer times, when FFmpeg was somehow part of the MPlayer build tree, and this form was needed to prefer the local files over system FFmpeg. In some cases, the include statement wasn't needed or could be replaced with mpv defined symbols.
* stream_dvdnav: print more debugging infowm42014-04-171-1/+6
|
* stream_dvd: fix seeking regressionwm42014-04-171-8/+48
| | | | | | | | | | | | This was accidentally completely destroyed with commit 24f1878e. I didn't notice it when testing, because forward seeking still worked mostly. The issue was that dvd_seek_to_time() actually called stream_seek(), which was supposed to call the byte-level seek function dvd_seek(). So we have to restore this function, and replace all generic stream calls with stream_dvd.c internal ones. This also affects stream->pos (now a random number as far as stream_dvd.c is concerned) and stream_skip().
* Remove radio://wm42014-04-133-1040/+0
| | | | | It was disabled by default, works only for analogue radio, and I bet nobody uses it.
* Kill all tabswm42014-04-1323-2382/+2382
| | | | | | | | | | | I hate tabs. This replaces all tabs in all source files with spaces. The only exception is old-makefile. The replacement was made by running the GNU coreutils "expand" command on every file. Since the replacement was automatic, it's possible that some formatting was destroyed (but perhaps only if it was assuming that the end of a tab does not correspond to aligning the end to multiples of 8 spaces).
* stream_dvd, cache: hack seeking with --cache + dvd:// back into workingwm42014-04-092-41/+1
| | | | | | | | | | | | | | | | | | | This was broken at some unknown point (even before the recent cache changes). There are several problems: - stream_dvd returning a random stream position, confusing the cache layer (cached data and stream data lost their 1:1 corrospondence by position) - this also confused the mechanism added with commit a9671524, which basically triggered random seeking (although this was not the only problem) - demux_lavf requesting seeks in the stream layer, which resulted in seeks in the cache or the real stream Fix this by completely removing byte-based seeking from stream_dvd. This already works fine for stream_dvdnav and stream_bluray. Now all these streams do time-based seeks, and pretend to be infinite streams of data, and the rest of the player simply doesn't care about the stream byte positions.
* cache: fix description of the offset fieldwm42014-04-091-1/+3
| | | | This field sure is a bit strange. I hope the description is correct now.
* cache: change a define to an enumwm42014-04-091-3/+3
| | | | More consistent.
* cache: fix checks/output on initializationwm42014-04-091-8/+3
| | | | | | | resize_cache() checks the size itself and clamps the size to the valid range if necessary, so we don't need these checks. In fact, the checks are different. Also, output the cache size after clamping, instead of before.
* stream_file: Check the handle for network streamsJames Ross-Gowan2014-04-091-9/+34
| | | | | | | | | | | | | | | | | | | Use NtQueryVolumeInformationFile instead of GetDriveType for detecting remote filesystems on Windows. This has the advantage of working directly on the file handle instead of needing a path and it works unmodified in Cygwin where the previous code wouldn't understand Cygwin paths or symlinks. There is some risk in using NtQueryVolumeInformationFile, since it's an internal function and its behaviour could change at any time or it could be removed in a future version of Windows, however it's documented[1] in the WDK and it's used successfully by Cygwin, so it should be fine. If it's removed, the code should fail gracefully by treating all files as local. [1]: http://msdn.microsoft.com/en-us/library/windows/hardware/ff567070.aspx Signed-off-by: wm4 <wm4@nowhere>
* cache: simplifywm42014-04-091-25/+17
| | | | | | | Merge the cache_read function into cache_fill_buffer, since there's not much reason to keep them separate. Also, simply call read_buffer() to see if there's any readable data, instead of checking for the condition manually.
* cache: allow resizing at runtimewm42014-04-092-21/+78
| | | | | | | | | | | The only tricky part is keeping the cache contents, which is made simple by allocating the new cache while still keeping the old cache around, and then copying the old data. To explain the "Don't use this when playing DVD or Bluray." comment: the cache also associates timestamps to blocks of bytes, but throws away the timestamps on seek. Thus you will experience strange behavior after resizing the cache until the old cached region is exhausted.
* cache: minor simplificationwm42014-04-091-11/+7
| | | | | | | | The only difference is that the MP_DBG message is not printed anymore if the current user read position is outside of the current cache range. (In order to handle seek_limit==0 gracefully in the normal case of linear reading, change the comparison from ">=" to ">".)
* cache: adjust stream position if necessarywm42014-04-091-1/+6
| | | | | | | | | Until now, this could never happen, because new data was simply always appended to the end of the cache. But for making stream cache resizing easier, doing it this way seems advantageous. It also makes it harder to make the internal state inconsistent. (Before this change it could happen that cache and stream position went out of sync if the read position was adjusted "inappropriately".)
* cache: no short reads in read_bufferwm42014-04-091-16/+21
| | | | | | | Until now, cache_read() (which calls read_buffer()) could return short reads. This was a simplification allowed by the stream interface. But for cache resizing, it will be more practical to make read_buffer() do a full read.
* cache: move ringbuffer read into a separate functionwm42014-04-091-17/+32
| | | | No functional changes yet.
* cache: fix typo in commentwm42014-04-091-1/+1
|
* cache: always update cached controls after running a stream controlwm42014-04-091-0/+1
| | | | | | | Seems like a good idea. One possible bad effect would be slowing down uncached controls, but they're already slow. The good thing is that many controls make intrusive changes to the stream (at least controls which do write accesses), so the cached parameters should be updated.
* stream_bluray: move lookup of AACS error codes into a functionwm42014-03-301-30/+16
| | | | Mostly a cosmetic change. Makes the code a little bit shorter.
* stream_bluray: check AACS and BD+ protectionsxylosper2014-03-301-5/+80
| | | | | | | There are two kind of encryption for Blu-ray disc, AACS and BD+, and both of them can be checked through BLURAY_DISC_INFO object. This commit makes the bluray and bdnav streams refuse playback if AACS/BD+ is detected and decryption is failed.
* player: rename dvdnav to discnavxylosper2014-03-303-2/+2
| | | | | Now, navigation works both of DVD and non-BD-J Blu-ray. Therefore, rename all 'dvdnav' strings which are not DVD specific to 'discnav'
* stream_bluray: cosmetic refactoringxylosper2014-03-301-74/+33
| | | | | Remove unused variables. Declare variables when they are needed. Adjust brackets for mpv's convention. Clean up too many empty lines.
* stream_bluray: select initial angle only if peeking title succeededxylosper2014-03-301-39/+52
| | | | | | The angles should be set and queried only if a valid title is selected. Also, in navigation mode, there are some limitations which make it impossible to query current title/angle.
* stream_bluray: use more proper error code for stream controlxylosper2014-03-301-7/+7
| | | | | | Use STREAM_OK instead of hardcoded value 1. Handle failure of setting title as an unsupported behaviour rather than an error.
* stream_bluray: implement navigation interface for Blu-ray streamxylosper2014-03-293-62/+447
| | | | | | | | | | | | | | This commit introduces new stream protocols: bdnav(and others). bdnav stream shares lots of codes with original bluray stream, so it's not separated in different source file. Major difference from bluray is that bdnav does not support longest title because there is no way to query that information. bdnav://menu and bdnav://first correspond to top menu title and first play title respectively, though they often point same title. Also, binary position based seeking has been removed, because it didn't have no point.
* stream_bluray: remove BD_EVENT_IDLEwm42014-03-261-3/+0
| | | | | | | | This was actually supposed to be removed with pull reuqest #671, but I accidentally re-added it with a rebasing mistake. This probably also coincidentally fixes compilation with older libbluray (issue #672).
* stream_bluray: use bd_get_playlist_info()xylosper2014-03-261-4/+10
| | | | | | | | Use bd_get_playlist_info() instead of bd_get_title_info(). The previous implementation couldn't query current playlist and this made it impossible to call bd_get_playlist_info() which is more desirable than bd_get_title_info() because, for Blu-rays, playlist is the unit of playback not title. This commit fixes that.
* stream_bluray: cache current playback informationsxylosper2014-03-261-20/+34
| | | | | | | | The cost of calling bd_get_title_info() is quite expensive and requires lots of CPU usage. Using BD_EVENT_PLAYLIST and BD_EVENT_TITLE, it's possible to cache BLURAY_TITLE_INFO object for current title and BD_EVENT_ANGLE handler caches current angle. In my test case, with this commit, CPU usage can be saved about 15-20%.
* stream_bluray: implement event handler for libblurayxylosper2014-03-261-0/+16
| | | | | | This commit brings libbluray's event queue into stream_bluray. Signed-off-by: wm4 <wm4@nowhere>
* mf: fix operation with --cachewm42014-03-261-0/+1
| | | | | | | | | | | | demux_mf.c explicitly checks for the stream type to check whether images are opened via pattern (mf://..., i.e. stream_mf.c) or directly. Of course the stream type is not set to STREAMTYPE_MF if the stream is wrapped through the cache, so it tried to open the pattern directly as file, which failed. Fix this by disabling caching for mf://. The cache doesn't make sense here anyway, because each file is opened and closed every frame (perhaps to avoid memory bloat).
* stream_cdda: print cd text header only if there are any cd text fieldswm42014-03-261-2/+6
|
* stream_cdda: remove unused stuffwm42014-03-263-251/+2
| | | | | | This cd_info_t struct was practically unused. The only thing it did was storing the track name of the form "Track %d" in a very roundabout way. Remove it. (It made more sense when there was still CDDB support.)
* stream_cdda: fix track time accuracywm42014-03-261-2/+2
| | | | | | | | | | Don't use an integer division to get the time, since that would round on second boundaries. Also round up the time by sector size. Seeking rounds down due to alignment constraints, but if we round up the time, we can make it land on the exact destination sector. This fixes that the track change code printed the previous track when seeking by chapter.
* dvdnav: make MP_NAV_EVENT_RESET_ALL handled properlyxylosper2014-03-251-30/+37
| | | | | | | | | | | dvdnav.c did not handle event in regular sequence. Usually this does not make any trouble except around MP_NAV_EVENT_RESET_ALL. Those events should be handled in regular sequence. If they're mixed, it can make wrong result. For instance, MP_NAV_EVENT_HIGHLIGHT right after MP_NAV_EVENT_RESET_ALL should not be ignored but it might be because MP_NAV_EVENT_RESET_ALL makes the demuxer reloaded and osd hidden.
* stream: remove old chapter handling codewm42014-03-255-103/+0
| | | | | | | | Stream-level chapters (like DVD etc.) did potentially not have timestamps for each chapter, so STREAM_CTRL_SEEK_TO_CHAPTER and STREAM_CTRL_GET_CURRENT_CHAPTER were needed to navigate chapters. We've switched everything to use timestamps and that seems to work, so we can simplify the code and remove this old mechanism.
* stream_cdda: report track timeswm42014-03-251-27/+8
| | | | | | | | | Report the time for each chapter (tracks are treated as chapters). This allows us to get rid of the "old" chapter mechanism, and also behaves better with the frontend. This makes assumptions about the audio formats, but that format is hardcoded anyway in the rawaudio demuxer defaults (and always was).
* stream_bluray: fix for significant memory leakxylosper2014-03-241-0/+1
| | | | | It's obvious but, since STREAM_CTRL_GET_TIME_LENGTH is called frequently, the amount of leaked memory here is quite big.
* stream_bluray: fix for zero-based title index for Blu-rayxylosper2014-03-181-7/+11
| | | | | | | | | | The title for stream_bluray DID start from 1 and I misunderstood that it started from 0 because mpv accepted bd://0 as a proper argument. In fact, 0 title was an alias for the longest title but it was not handled as a special value. This commit fixes these behavious. 'disc-title' property for Blu-ray now starts from 0 and the default title can be specified by 'longest' title just like stream_dvdnav: bd://longest. Of course, 'longest' can be omitted.
* command: make 'disc-title' property writablexylosper2014-03-181-1/+8
| | | | | | | | This commit makes 'disc-title' property writable using STREAM_CTRL_SET_CURRENT_TITLE. This commit also contains implementation of STREAM_CTRL_SET_CURRENT_TITLE for stream_bluray. Currently, 'disc-title' is writable only for stream_dvdnav and stream_bluray and stream_dvd is not supported.
* stream_dvd/stream_dvdnav: make disc-title for DVDs start from 0xylosper2014-03-172-27/+35
| | | | | | | | This commit makes 'disc-title' properties for DVDs start from 0. There was an inconsistency around 'disc-title' property between DVDs (from 1) and Blu-rays (from 0). This fixes #648. Signed-off-by: wm4 <wm4@nowhere>
* Remove some more unneeded version checkswm42014-03-161-11/+2
| | | | | All of these check against things that happened before the latest supported FFmpeg/Libav release.
* stream_dvdnav: implement STREAM_CTRL_GET_NUM_TITLES for dvdnavxylosper2014-03-151-0/+7
| | | | | | This commit provides impelmentation of STREAM_CTRL_GET_NUM_TITLES for dvdnav stream. Other streams for DVD or Blu-ray are already provide STREAM_CTRL_GET_NUM_TITLES.
* command: set 'media-title' property for bluray disc with meta-dataxylosper2014-03-135-11/+19
|
* stream_file: network file system detection for LinuxPhilip Sequeira2014-03-121-0/+28
| | | | | | Addresses issue #558 on Linux systems. Signed-off-by: wm4 <wm4@nowhere>
* dvd: treat missing volume ID as "unsupported", not errorwm42014-02-232-4/+4
| | | | | This is probably better and more consistent with the rest of the code, although it doesn't change any currently existing behavior in this case.
* cache: cache DVD volume IDwm42014-02-231-0/+13
| | | | | Since this might be queried every frame or so, it's important not to stall the cache by doing a synchronous stream_control().
* dvd: check for empty DVD volume IDwm42014-02-232-3/+7
| | | | | The only DVD sample I have just returns an empty string for this. Let command.c use the filename if the ID is empty.
* command: use DVD volume ID for media-title propertyxylosper2014-02-233-0/+17
| | | | | | Signed-off-by: wm4 <wm4@nowhere> Closes #582.
* stream_file: cache remote files on WindowsJames Ross-Gowan2014-02-181-0/+17
| | | | Same as 6896469 but for Windows.
* stream_file: activate cache with files on network file systemsStefano Pigozzi2014-02-171-0/+28
| | | | | | | | Detected 'protocols' are AFP, nfs, smb and webdav. This can be extended on request. This is currently only implemented for BSD systems (using fstatfs). This addresses issue #558 on the above platforms.
* stream_lavf: prefix icy metadata with "icy-"wm42014-02-061-1/+1
| | | | | ICY metadata is not always of good quality, and especially if there are proper tags. We don't want the ICY metadata override the tags.
* cache: refuse to seek outside of cache boundarieswm42014-01-311-4/+18
| | | | | | | | | | | | | | | | | Note that this still happens in the stream level, so we can't have nice highlevel behavior restricting seeking. Instead, if a seek leads to the demuxer requesting data outside of the cached range, the seek will simply fail. This might confuse the demuxer, and the resulting behavior is not necessarily useful. Note that this also doesn't try to skip data on a forward seek. This would just freeze the stream with slow unseekable streams. One nice thing is that stream.h has a separate function for merely skipping data (separate from seeking forward), which is pretty useful in this case: we want skipping of data to work, even if we reject seeking forward by skipping data as too expensive. This probably is or will be useful for demux_mkv.c.
* stream_pvr: Fix fd check, -1 indicates invalid, not 0.reimar2014-01-231-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36677 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream: print stream_read_line warnings by defaultwm42014-01-191-1/+1
| | | | | | | | This is probably ok. Probing could hit this case very often, since it'll mean running this function on potentially binary data, but on the other hand, probing usually uses a memory stream (to limit the amount of data read), and memory streams have s->log silenced (details see open_memory_stream()).
* stream: treat embedded 0 bytes as error in stream_read_linewm42014-01-191-1/+1
| | | | Text files should never contain these.
* stream: redo stream_read_line()wm42014-01-191-114/+54
| | | | | | | | | This simplifies the implementation and should make it more robust. For example, we return an error if a line is longer than the provided buffer (instead of splitting the line). The code is much shorter, because now finding the new line and reading characters is done in one go.
* cookies.c: cols must (and does) have 7 elements.reimar2014-01-191-1/+1
| | | | | | | Doesn't affect the generated code, but avoids confusion in both humans and newer Coverity versions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36623 b3059339-0415-0410-9bf9-f77b7e298cf2
* vcd_read: Fix sizeof argument.reimar2014-01-191-1/+1
| | | | | | | | | The struct we need to copy is actually a cdrom_msf0, not cdrom_msf. Even though the kernel for no good reason reads it in as a cdrom_msf struct, but only uses the part shared with cdrom_msf0 - this is probably a kernel bug. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36622 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: remove debug codewm42014-01-171-1/+0
| | | | | | This was accidentally committed. <rcombs> `mp_sleep_us(100000);` <-- are you drunk?
* cache: reduce message spamwm42014-01-161-7/+16
| | | | Output only 1 message every 5 seconds at most.
* player: avoid stalling when starting a network streamwm42014-01-142-0/+2
| | | | | | | | | | | | Starting a network stream could stall by executing uncacheable stream control requests (STREAM_CTRL_GET_LANG and STREAM_CTRL_GET_DVD_INFO). Being uncacheable means the player has to wait until the cache is done reading the current block of data. These requests can't be cached because they're too complicated, so the only way to avoid them is special casing the DVD and Bluray streams (which are the only things which need these requests), and not doing them in other cases. (This is kind of inelegant, but so is the rest of the DVD/BD code.)
* player: strip 'file://' from filenames on playback startwm42014-01-082-12/+27
| | | | | | | | | | | | This fixes two things: 1. Dropping files on the VO window will auto-load subtitles (since most drag & drop code prefixes the filenames with 'file://', and the subtitle auto-load code considers 'file://' non-local) 2. Fix behavior of the %x screenshot filename template (similar problem) One could force all that code to special-case 'file://' URLs, but just replacing the filename on playback start is simpler.
* quvi: add option to not fetch subtitlesAndre D2014-01-051-1/+1
| | | | Signed-off-by: wm4 <wm4@nowhere>
* stream_pvr: fix crash on initializationwm42014-01-031-0/+1
| | | | Fallout from the mp_msg conversions.
* stream: always respect sector_size, fixes cdda://wm42014-01-021-1/+1
| | | | | | | | | | | | Streams like CDDA have special requirements in what quantities data can be read: you can only read a sector at once, not more and not less. The stream_peek() function didn't respect that and set less (used internal buffer size of 2048 bytes, instead of CD sector size of 2352 bytes), so no data was read and EOF was accidentally set, making playback with cdda:// fail. This is a regression since commit 9a723f, but that commit merely exposed the issue (the redundant seek would clear the EOF flag).
* 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-09-041-2/+6
| | | | | | | | | | MPlayer handles this correctly, because MPlayer still has the FourCC codec dispatch (codecs.conf). We need to handle this case specially, because the libavformat rawvideo decoder will of course not eat mjpeg. mjpeg is the only supported format, though. (Even MPlayer needs to convert between V4L2 formats and MPlayer FourCCs, and mjpeg is the only non-raw format.)
* stream: read at least a full buffer with stream_peek()wm42013-08-281-1/+1
| | | | | | | | | | | | | Until now, stream_peek() read only the bare minimum it had to read from the stream. But this could cause problems, such as being very inefficient when peeking a lot, or conflicting with ability to seek back. (The latter issue can be caused by peeking a few bytes, and then doing a stream_read() with a size that is 1 byte longer: this would read the peeked data, then call stream_fill_buffer(), which throws away the previously peeked bytes - so you can't seek back anymore. This is mitigated by a hack in demux_open(): it peeks a full buffer, to avoid that peeking/reading during demuxer probing [or before that, in a stream filter] can cause the buffer to be dropped.)
* stream: add uncompressed rar supportwm42013-08-265-0/+747
| | | | | | | | | | | | | | | | | Apparently, it is popular to store large files in uncompressed rar archives. Extracting files is not practical, and some media players suport playing directly from uncompressed rar (at least VLC and some DirectShow components). Storing or accessing files this way is completely idiotic, but it is a common practice, and the ones subjected to this practice can't do much to change this (at least that's what I assume/hope). Also, it's a feature request, so we say yes. This code is mostly taken from VLC (commit f6e7240 from their git tree). We also copy the way this is done: opening a rar file by itself yields a playlist, which contains URLs to the actual entries in the rar file. Compressed entries are simply skipped.
* stream: change open code, add stream filter conceptwm42013-08-262-55/+83
| | | | | | | | | | Add a stream filter concept, in which streams can be opened on top of an underlying "source" stream. Change the open code to make this easier, and also to account for some mechanisms that will be needed for this. The following commit will add stream_rar, which contains such a stream filter.
* stream: don't drop buffer when creating the cachewm42013-08-261-3/+0
| | | | | | | | | This is really not needed. While we really can't take a loaded buffer over to the cache, there's no reason why the cache couldn't read this buffer normally. On the other hand, this code could cause trouble when probing from a stream before the cache has been enabled.
* stream: fix url_options field, make protocols field not fixed lengthwm42013-08-2617-77/+82
| | | | | | | | | | | | | | | | | | | | The way the url_options field was handled was not entirely sane: it's actually a flexible array member, so it points to garbage for streams which do not initialize this member (it just points to the data right after the struct, which is garbage in theory and practice). This was not actually a problem, since the field is only used if priv_size is set (due to how this stuff is used). But it doesn't allow setting priv_size only, which might be useful in some cases. Also, make the protocols array not a fixed size array. Most stream implementations have only 1 protocol prefix, but stream_lavf.c has over 10 (whitelists ffmpeg protocols). The high size of the fixed size protocol array wastes space, and it is _still_ annoying to add new prefixes to stream_lavf (have to bump the maximum length), so make it arbitrary length. The two changes (plus some more cosmetic changes) arte conflated into one, because it was annoying going over all the stream implementations.
* core: add a playlist demuxerwm42013-08-262-0/+20
| | | | | | | | | Modeled after the old playlist_parser.c, but actually new code, and it works a bit differently. Demuxers (and sometimes streams) are the component that should be used to open files and to determine the file format. This was already done for subtitles, but playlists still use a separate code path.
* stream: allow potentially faster skippingwm42013-08-221-3/+12
| | | | | | | | | | Instead of always skipping in STREAM_BUFFER_SIZE blocks, allow an arbitrary size. This allows - in theory - faster forward seeking in pipes. (Maybe not a very significant change, but it reduces the number of things that depend on STREAM_BUFFER_SIZE for no good reason. Though we still use that value as minimum read size.)
* stream: don't require streams to set s->pos in seek callbackwm42013-08-229-22/+11
| | | | Instead, set s->pos depending on the success of the seek callback.
* stream: move file forward skipping to common stream implementationwm42013-08-223-52/+29
| | | | | | | | | | | stream_file.c contains some code meant for forward seeking with pipes. This simply reads data until the seek position is reached. Move this code to stream.c. This stops stream_file from doing strange things (messing with stream internals), and removes the code duplication too. We also make stream_seek_long() use the new skip code. This is shorter and much easier to follow than the old code, which basically did strange things.
* stream_avdevice: remove redundant dummy callbackwm42013-08-221-6/+0
|
* stream_file: uncrustifywm42013-08-221-132/+140
|
* stream_bluray: fix bd:// url segfault introduced by commit bc1d61Noble Huang2013-08-121-6/+2
|
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-0628-46/+46
| | | | Followup commit. Fixes all the files references.
* stream_radio: fix some thingswm42013-08-051-2/+2
| | | | | | | | | Using the radio set/step channel commands would have crashed (that was broken for about a year, nobody ever noticed). The "capture" part of a radio:// URI was incorrectly passed (this was broken quite recently). Still couldn't test it fully. I have no radio device. I suspect nobody uses this feature or will ever use it again.
* stream: parse URL escapes for file://wm42013-08-024-0/+41
| | | | | | | | | | | | | | | | | So for example "file:///file%20name.mkv" will open "file name.mkv". I'm not sure whether we want/need this. The old code didn't do it. Also, it's not really clear whether this is handled correctly. It seems the corresponding freedesktop.org "standard" allows a (useless) hostname part, which we should skip in theory. The number of slashes is not really clear either. We can open relative filenames (by removing one of the slashes from the example above), which is perhaps an unneeded feature. How does this even work with Windows paths? This issues can probably be corrected later. The URL unescape code is based on code from m_option.c removed with a recent commit.
* stream: redo URL parsing, replace m_struct usage with m_configwm42013-08-0219-362/+280
| | | | | | | | | | | | | Move the URL parsing code from m_option.c to stream.c, and simplify it dramatically. This code originates from times when http code used this, but now it's just relict from other stream implementations reusing this code. Remove the unused bits and simplify the rest. stream_vcd is insane, and the priv struct is different on every platform, so drop the URL parsing. This means you can't specify a track anymore, only the device. (Does anyone use stream_vcd? Not like this couldn't be fixed, but it doesn't seem worth the effort, especially because it'd require potentially touching platform specific code.)
* stream: remove inactive URL option fieldswm42013-07-303-23/+0
| | | | | | | | | The URL option parser only accesses certain fields. Remove the fields that are not accessed, and thus are completely unused and inaccessible. Historically, these fields were supposed to be settable using an extra list of options passed to open_stream(). Commit f518cf7 removed these extra options. Apparently nothing ever actually used this facility.
* stream_dvd: fix .ifo redirectionwm42013-07-301-2/+1
| | | | This was blatantly broken after stream->url was changed to talloc.
* Fix some -Wshadow warningswm42013-07-233-8/+5
| | | | | | In general, this warning can hint to actual bugs. We don't enable it yet, because it would conflict with some unmerged code, and we should check with clang too (this commit was done by testing with gcc).
* stream_vcd.c: fix compilation on win32Diogo Franco (Kovensky)2013-07-222-3/+8
| | | | | The mp_vcd_priv_t struct doesn't have a file descriptor but a file handle on win32.
* cache: fix time check for printing warningwm42013-07-201-1/+1
| | | | | This actually waited 2 seconds, because CACHE_WAIT_TIME happened to be 0.5.
* stream: remove unused vcd functionswm42013-07-154-22/+0
| | | | Gets rid of warnings.
* Merge branch 'remove_old_demuxers'wm42013-07-1421-323/+190
|\ | | | | | | | | | | | | | | The merged branch doesn't actually just remove old demuxers, but also includes a branch of cleanups and some refactoring. Conflicts: stream/stream.c
| * demux: remove useless author/comment fieldswm42013-07-121-4/+1
| | | | | | | | Same deal as with previous commit.
| * stream: remove useless author/comment fieldswm42013-07-1217-58/+19
| | | | | | | | | | | | | | | | | | These were printed only with -v. Most streams had them set to useless or redundant values, so it's just badly maintained bloat. Since we remove the "author" field too, and since this may have copyright implications, we add the contents of the author fields to the file headers, except if the name is already part of the file header.
| * stream: remove unused functionswm42013-07-121-36/+0
| | | | | | | | These were used by old demuxers.
| * stream: remove fd memberwm42013-07-128-66/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stream implementations could set this to a unix file descriptor. The generic stream code could use it as fallback for a few things. This was confusing and insane. In most cases, the stream implementations defined all callbacks, so setting the fd member didn't have any advantages, other than avoiding defining a private struct to store it. It appears that even if the stream implementation used close() on the fd (or something equivalent), stream.c would close() it a second time (and on windows, even would call closesocket()), which should be proof for the insanity of this code. For stream_file.c, additionally make sure we don't close stdin or stdout if "-" is used as filename. For stream_vcd.c, remove the control() code. This code most likely didn't make the slightest sense, because it used a different type for stream->priv. It also leaked memory. Maybe it worked, but it's incorrect and insignificant anyway, so kill it. This code was added with commit 9521c19 (svn commit 31019). Untested for all protocols other than stream_file.c.
| * stream: use talloc for some string memberswm42013-07-121-7/+7
| | | | | | | | Minor simplification.
| * stream: don't require streams to set a typewm42013-07-129-34/+13
| | | | | | | | | | Set the type only for streams that have special treatment in other parts of the code.
| * Cleanup some include statementswm42013-07-1210-16/+8
| |
| * demux: rewrite probing and demuxer initializationwm42013-07-123-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * core: change open_stream and demux_open signaturewm42013-07-1217-65/+47
| | | | | | | | | | | | | | | | | | | | | | This removes the dependency on DEMUXER_TYPE_* and the file_format parameter from the stream open functions. Remove some of the playlist handling code. It looks like this was needed only for loading linked mov files with demux_mov (which was removed long ago). Delete a minor bit of dead network-related code from stream.c as well.
| * demux: change signature of open functions, cleanupswm42013-07-111-19/+15
| | | | | | | | Preparation for redoing the open functions.
| * video: eliminate frametime variablewm42013-07-111-2/+0
| |
| * core: don't access demux_stream outside of demux.c, make it privatewm42013-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generally remove all accesses to demux_stream from all the code, except inside of demux.c. Make it completely private to demux.c. This simplifies the code because it removes an extra concept. In demux.c it is reduced to a simple packet queue. There were other uses of demux_stream, but they were removed or are removed with this commit. Remove the extra "ds" argument to demux fill_buffer callback. It was used by demux_avi and the TV pseudo-demuxer only. Remove usage of d_video->last_pts from the no-correct-pts code. This field contains the last PTS retrieved after a packet that is not NOPTS. We can easily get this value manually because we read the packets ourselves. Reuse sh_video->last_pts to store the packet PTS values. It was used only by the correct-pts code before, and like d_video->last_pts, it is reset on seek. The behavior should be exactly the same.
| * tv: add hack in preparation of demux_stream removalwm42013-07-111-4/+17
| | | | | | | | | | | | | | | | | | | | Currently, all demuxer fill_buffer functions have a demux_stream parameter. We want to remove that, but the TV code still depends on it. Add a hack to remove that dependency. The problem with the TV code is that reading video and audio frames blocks, so in order to avoid a deadlock, you should read either of them only if the decoder actually requests new data.
| * mplayer: fix incorrect audio sync after format changeswm42013-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | This is not directly related to the handling of format changes itself, but playing audio normally after the change. This was broken: the output byte rate was not recalculated, so audio-video sync was simply broken. Fix this by calculating the byte rate on the fly, instead of storing it in sh_audio. Format changes are relatively common (switches between stereo and 5.1 in TV recordings), so this fixes a somewhat critical bug.
| * Merge branch 'master' into remove_old_demuxerswm42013-07-084-26/+6
| |\ | | | | | | | | | | | | | | | Conflicts: DOCS/man/en/changes.rst DOCS/man/en/options.rst
| * | demux: remove separate arrays for audio/video/sub streams, simplifywm42013-07-081-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These separate arrays were used by the old demuxers and are not needed anymore. We can simplify track switching as well. One interesting thing is that stream/tv.c (which is a demuxer) won't respect --no-audio anymore. It will probably work as expected, but it will still open an audio device etc. - this is because track selection is now always done with the runtime track switching mechanism. Maybe the TV code could be updated to do proper runtime switching, but I can't test this stuff.
| * | demux: remove some old stream header functionswm42013-07-081-2/+4
| | |
| * | Remove old demuxerswm42013-07-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | w32: silence some warningsJames Ross-Gowan2013-07-131-1/+1
| | |
* | | stream_vcd: use intptr_t cast for _open_osfhandle in accordance to MSDNJonathan Yong2013-07-131-1/+1
| | |
* | | stream: remove some more forgotten network stuffwm42013-07-121-13/+0
| | | | | | | | | | | | Was not cleanly removed with internal network code removal.
* | | options: add --cache-default optionwm42013-07-102-17/+12
| |/ |/| | | | | | | | | | | | | | | | | | | | | Add this option, which lets users set the cache size without forcing it even when playing from the local filesystem. Also document the default value explicitly. The Matroska linked segments case is slightly simplified: they can never come from network (mostly because it'd be insane, and we can't even list files from network sources), so the cache will never be enabled automatically.
* | cache: fix compilation without posix timersStefano Pigozzi2013-07-081-0/+1
| | | | | | | | | | | | This is a regression caused by 854303a. This commit removed the include of `sys/time.h` which was included in `cache.c` through a chain of recurvive includes.
* | stream/tv: remove unused dshow-specific optionsMartin Herkt2013-07-082-26/+1
| |
* | stream_radio: fix buildwm42013-07-081-0/+4
|/ | | | | | | This was accidentally broken with 37c5c11 and has been nroken for 5 months. Does anyone (want to) use this at all?
* stream: unbreak streams with large sector sizes (stream_cdda)wm42013-07-071-1/+2
| | | | | | | Commit 7b16d4b changed some stream implementations to check the buffer size passed to them. This made stream_cdda stop working, because the default buffer size is smaller than the CDIO frame size. So pass the sector size instead of the (arbitrary) default buffer size.
* stream: don't treat position 0 speciallywm42013-07-071-7/+6
| | | | | | | | | Seeking to position 0 meant to try reconnecting with some streams, actually just the internal http implementation. This has been removed, so we don't need the special handling anymore. This means we don't have to be stuck in a retry loop if the stream doesn't even support reconnect.
* Remove some leftovers from network removalwm42013-07-073-182/+1
| | | | | | | | stream_vstream.c in particular was actually dependent on the network code, and didn't compile anymore. Cleanup the protocol list in mpv.rst, and add some missing ones supported by libavformat to stream_lavf.c.
* stream: remove weird STREAMTYPE_STREAM special handlingwm42013-07-076-50/+27
| | | | | | | | | This was an old leftover from an earlier cleanup (which happened in 2003), and which used "special" stuff for streams that could be only forward-seeked. Also, don't add mode flags to s->flags; they're supposed to be in s->mode instead.
* stream: re-add accidentally removed seek callwm42013-07-071-0/+7
| | | | | | | This was under CONFIG_NETWORKING, so in theory it should have been save to remove. But actually this disables forward skipping when reading from a pipe. (Still a questionable feature, because it doesn't behave well with libavformat - but it was not supposed to be changed.)
* Remove internal network supportwm42013-07-0722-5996/+9
| | | | | | | | | | | This commit removes the "old" networking code in favor of libavformat's code. The code was still used for mp_http, udp, ftp, cddb. http has been mapped to libavformat's http support since approximately 6 months ago. udp and ftp have support in ffmpeg (though ftp was added only last month). cddb support is removed with this commit - it's probably not important and rarely used if at all, so we don't care about it.
* core: make network options available even if old net code is disabledwm42013-07-075-23/+3
| | | | Preparation for removing the old network code.
* stream: make eof flag more consistentwm42013-07-041-1/+6
| | | | | | When reading something successfully, the eof flag should never be 1, so clear it in these situations. The eof flag will be set properly on the next read call.
* stream_lavf: request and read streamcast/ICY metadatawm42013-07-021-4/+89
| | | | Requires recent ffmpeg git, otherwise will do nothing.
* core: update metadata during playback, allow streams to export metadatawm42013-07-022-1/+23
| | | | | | | STREAM_CTRL_GET_METADATA will be used to poll for streamcast metadata. Also add DEMUXER_CTRL_UPDATE_INFO, which could in theory be used by demux_lavf.c. (Unfortunately, libavformat is too crappy to read metadata mid-stream for mp3 or ogg, so we don't implement it.)
* cache: fix per-block metadata memory leakwm42013-07-021-0/+1
|
* stream: redo memory streamswm42013-06-283-8/+91
| | | | | Make memory streams actual streams. This causes fewer weird corner cases and actually allows using demuxers with them.
* Merge branch 'sub_mess2'wm42013-06-252-46/+77
|\ | | | | | | ...the return.
| * stream: remove stream_unread_buffer()wm42013-06-252-21/+0
| | | | | | | | Replaced with stream_peek().
| * stream: add stream_peek functionwm42013-06-252-0/+35
| | | | | | | | | | Makes probing easier, and this is perhaps a simpler interface than stream_unread_buffer().
| * stream: never let read functions return values < 0wm42013-06-251-3/+5
| | | | | | | | | | | | | | | | | | | | stream_read_unbuffered() can sometimes return negative values on error. Change that to return 0 - the negative values are nowhere used anyway. If distinguishing errors and EOF is really needed, a flag could be added instead. This also fixes the stream_read_partial() call in cache.c, which assumes the return values is always >= 0.
| * stream: readd memory streamswm42013-06-252-5/+21
| |
| * stream: remove padding parameter from stream_read_complete()wm42013-06-232-18/+17
| | | | | | | | | | | | | | | | Seems like a completely unnecessary complication. Instead, always add a 1 byte padding (could be extended if a caller needs it), and clear it. Also add some documentation. There was some, but it was outdated and incomplete.
* | cache: cache number of chapterswm42013-06-241-0/+10
| | | | | | | | | | | | | | | | | | Querying this caused the cache to block and wait. Some parts of the frontend (like progress bar) call this very often, so cache performance was ruined in these cases. Also print a message in -v mode when the cache is blocked for a STREAM_CTRL. This should make debugging similar issues easier.
* | cache: fix stream_pts cachingwm42013-06-181-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or rather, keep hacking it until it somehow works. The problem here was that trying to avoid calling STREAM_CTRL_GET_CURRENT_TIME too often didn't really work, so the cache sometimes returned incorrect times. Also try to avoid the situation that looking up the time with an advanced read position doesn't really work, as well as when trying to look it up when EOF or cache end has been reached. In that case we have read_filepos == max_filepos, which is "outside" of the cache, but querying the time is still valid. Should also fix the issue that demuxing streams with demux_lavf and if STREAM_CTRL_GET_CURRENT_TIME is not supported messed up the reported playback position. This stuff is still not sane, but the way the player tries to fix the playback time and how the DVD/BD stream inputs return the current time based on the current byte position isn't sane to begin with. So, let's leave it at bad hacks. The two changes that touch s->eof are unrelated and basically of cosmetic nature (separate commit would be too noisy.)
* | osdep: remove shmem wrapperwm42013-06-181-1/+0
| | | | | | | | This is unused now that the cache is always threaded.
* | cache: actually use time instead of retry count for slow cache warningwm42013-06-181-9/+11
|/ | | | | There's actually no reason to maintain a retry count, and this is more robust against spurious wakeups.
* cache: fix build on OSX (again)wm42013-06-161-0/+7
| | | | | | | | | | | | | OSX doesn't support the POSIX API we were using. We check for _POSIX_TIMERS. 0 or -1 means unsupported. See: http://pubs.opengroup.org/onlinepubs/009696699/functions/clock_getres.html http://pubs.opengroup.org/onlinepubs/009696699/basedefs/unistd.h.html The workaround of using gettimeofday() is suggested by Apple: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man3/pthread_cond_timedwait.3.html Thanks to AStorm for providing help here.
* cache: fix compilation on Libavwm42013-06-161-1/+8
| | | | Appears Libav doesn't have av_clip64(). So implement our own.
* cache: use correct header for clock_gettimewm42013-06-161-0/+1
| | | | Fixes compilation on OSX.
* stream: don't set sector size on cachewm42013-06-161-3/+1
| | | | | | | | | This is useless on the cache side. The sector is needed only to deal with stream implementations which are not byte addressable, and the cache is always byte addressable. Also set a default read_chunk value. (This value is never used unless you chain multiple caches, but it's cleaner.)
* cache: attempt to improve slow cache warningwm42013-06-161-26/+35
| | | | | Still sucks. The old cache behavior (before removing the fork code) wasn't great either, though.
* cache: report more precise stream timewm42013-06-161-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | DVD and bluray packet streams carry (essentially) random timestamps, which don't start at 0, can wrap, etc. libdvdread and libbluray provide a linear timestamp additionally. This timestamp can be retrieved with STREAM_CTRL_GET_CURRENT_TIME. The problem is that this timestamp is bound to the current raw file position, and the stream cache can be ahead of playback by an arbitrary amount. This is a big problem for the user, because the displayed playback time and actual time don't match (depending on cache size), and relative seeking is broken completely. Attempt to fix this by saving the linear timestamp all N bytes (where N = BYTE_META_CHUNK_SIZE = 16 KB). This is a rather crappy hack, but also very effective. A proper solution would probably try to offset the playback time with the packet PTS, but that would require at least knowing how the PTS can wrap (e.g. how many bits is the PTS comprised of, and what are the maximum and reset values). Another solution would be putting the cache between libdvdread and the filesystem/DVD device, but that can't be done currently. (Also isn't that the operating system's responsibility?)
* stream: don't align stream position if not neededwm42013-06-161-3/+1
| | | | | This is pointless, and just increases latency on seeking. For streams that have a sector size set, this is still needed, though.
* stream: don't adjust stream position if seek succeeds, but read failswm42013-06-161-3/+2
| | | | | | | This was probably done this way to ensure that after a successful seek, the reported stream position is the same as the requested seek position. But it doesn't make too much sense, since both stream->pos and the stream implementation's internal position will go out of sync.
* stream: fix some aspects of EOF handlingwm42013-06-161-10/+22
| | | | | | | | | | | | | The stream EOF flag should only be set when trying to read past the end of the file (relatively similar to unix files). Always clear the EOF flag on seeking. Trying to set it "properly" (depending whether data is available at seek destination or not) might be an ok idea, but would require attention to too many special cases. I suspect before this commit (and in MPlayer etc. too), the EOF flag wasn't handled consistently when the stream position was at the end of the file. Fix one special case in ebml.c and stream_skip(): this function couldn't distinguish between at-EOF and past-EOF either.
* stream: don't set EOF flag in stream implementationswm42013-06-167-13/+1
| | | | | | | | | | EOF should be set when reading more data fails. The stream implementations have nothing to say here and should behave correctly when trying to read when EOF was actually read. Even when seeking, a correct EOF flag should be guaranteed. stream_seek() (or actually stream_seek_long()) calls stream_fill_buffer() at least once, which also updates the EOF flag.
* stream: remove stream_reset()wm42013-06-162-12/+3
| | | | | | | | | This function was called in various places. Most time, it was used before a seek. In other cases, the purpose was apparently resetting the EOF flag. As far as I can see, this makes no sense anymore. At least the stream_reset() calls paired with stream_seek() are completely pointless. A seek will either seek inside the buffer (and reset the EOF flag), or do an actual seek and reset all state.
* stream: check for interruption when trying to reconnect streamwm42013-06-161-3/+3
| | | | | | | This happens with something like "mpv https://www.youtube.com/watch". The URL is obviously not valid, but the stream layer tries to reconnect. This commit at least allows to use the terminal to abort gracefully. (Other than killing the process.)
* stream: cosmeticswm42013-06-162-26/+12
|
* stream: reset buffer even on EOF/errorwm42013-06-161-4/+2
| | | | This probably didn't matter anywhere, but it's more proper.
* cache: use threads instead of fork()wm42013-06-163-542/+403
| | | | | | | | | | | | | | | | | | | Basically rewrite all the code supporting the cache (i.e. anything other than the ringbuffer logic). The underlying design is untouched. Note that the old cache2.c (on which this code is based) already had a threading implementation. This was mostly unused on Linux, and had some problems, such as using shared volatile variables for communication and uninterruptible timeouts, instead of using locks for synchronization. This commit does use proper locking, while still retaining the way the old cache worked. It's basically a big refactor. Simplify the code too. Since we don't need to copy stream ctrl args anymore (we're always guaranteed a shared address space now), lots of annoying code just goes away. Likewise, we don't need to care about sector sizes. The cache uses the high-level stream API to read from other streams, and sector sizes are handled transparently.
* stream: add partial read functionwm42013-06-162-17/+28
| | | | | This is a nice way to avoid an additional copy of the data when reading with stream_read().
* stream: add stream_unread_buffer()wm42013-06-162-4/+33
| | | | | | | | | | | | | | | | | | | | | | demux_lavf probes up to 2 MB of data in the worst case. When the ffmpeg demuxer is actually opened, the stream is seeked back to 0, and the previously read data is thrown away. This wasn't a problem for playback of local files, but it's less than ideal for playing from slow media (like web streams), and breaks completely if the media is not seekable (pipes, some web streams). This new function is intended to allow fixing this. demux_lavf will use it to put the read probe data back into the buffer. The simplest way of implementing this function is by making it transparently extend the normal stream buffer. This makes sure no existing code is broken by new weird special cases. For simplicity and to avoid possible performance loss due to extra dereferencing when accessing the buffer, we just extend the static buffer from 8 KB to 2 MB. Normally, most of these 2 MB will stay uncommitted, so there's no associated waste of memory. If demux_lavf really reads all 2 MB, the memory will be committed and stay unused, though.
* cache: make the stream cache a proper stream that wraps other streamswm42013-06-165-331/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the cache was franken-hacked on top of the stream API. You had to use special functions (like cache_stream_fill_buffer() instead of stream_fill_buffer()), which would access the stream in a cached manner. The whole idea about the previous design was that the cache runs in a thread or in a forked process, while the cache awa functions made sure the stream instance looked consistent to the user. If you used the normal functions instead of the special ones while the cache was running, you were out of luck. Make it a bit more reasonable by turning the cache into a stream on its own. This makes it behave exactly like a normal stream. The stream callbacks call into the original (uncached) stream to do work. No special cache functions or redirections are needed. The only different thing about cache streams is that they are created by special functions, instead of being part of the auto_open_streams[] array. To make things simpler, remove the threading implementation, which was messed into the code. The threading code could perhaps be kept, but I don't really want to have to worry about this special case. A proper threaded implementation will be added later. Remove the cache enabling code from stream_radio.c. Since enabling the cache involves replacing the old stream with a new one, the code as-is can't be kept. It would be easily possible to enable the cache by requesting a cache size (which is also much simpler). But nobody uses stream_radio.c and I can't even test this thing, and the cache is probably not really important for it either.
* stream: remove pointless checkwm42013-06-091-7/+3
|
* stream: remove unused functionwm42013-06-091-9/+0
|
* stream: move VCD specific stuff to stream_vcdwm42013-06-093-5/+4
| | | | I don't even know what VCDs are. A prehistoric version of the DVD or so.
* stream_cdda, stream_vcd: check read buffer sizewm42013-06-092-0/+5
| | | | | | | | These assumed that the buffer provided with fill_buffer() was at least sector sized, instead of checking the size parameter. This is just a cleanup, since every caller made sure to align everything on sector sizes, if a stream has the sector size set.
* stream_dvd: remove some deadly insane codewm42013-06-091-15/+0
| | | | | | Of course all of stream_dvd.c (as well as libdvdread) is completely insane, but at least this hack for ancient broken compilers on really obscure platforms should be safe to remove.
* stream: misleading statementwm42013-06-091-1/+1
|
* core: use STREAM_CTRL instead of accessing stream_dvd internalswm42013-06-093-0/+24
| | | | | | | | | | | | Some code in mplayer.c did stuff like accessing (dvd_priv_t *)st->priv. Do this indirectly by introducing STREAM_CTRL_GET_DVD_INFO. This is extremely specific to DVD, so it's not worth abstracting this further. This is a preparation for turning the cache into an actual stream, which simply wraps the cached stream. There are other streams which are accessed in the way DVD was, at least TV/radio/DVB. We assume these can't be used with the cache. The code doesn't look thread-safe or fork aware.
* stream: rename cache2.c to cache.cwm42013-06-091-0/+0
| | | | | | | I never found cache1.c (whatever it was named, if it ever existed). cache2.h will be deleted later, so don't go through the trouble of renaming it.
* cache2: uncrustifywm42013-06-091-452/+521
|
* demux: fix "-demuxer mpegps", don't force demuxer in stream_dvdwm42013-06-021-1/+0
| | | | | | | | | | Internally, stream_dvd.c returned DEMUXER_TYPE_MPEG_PS, and the same value was hardcoded to enforced usage of demux_lavf in demux.c. But "-demuxer mpegps" basically did the same, so that switch was broken for this format. Undo this and don't request a demuxer in stream_dvd.c. demux_lavf.c is (probably) good enough to probe correctly with DVD. Otherwise, we'd actually have to do something completely different to force the libavformat demuxer.
* stream: kill STREAM_CTRL_RESETwm42013-05-262-4/+0
| | | | Was unused.
* stream: kill memory streamswm42013-05-262-23/+3
| | | | | These are unused by now, and it relied on some assumptions that have been broken by now.
* stream: de-inline some larger functionswm42013-05-262-70/+73
| | | | | | | | | | | | | | | | Tests with demux_mkv show that the speed doesn't change (or actually, it seems to be faster after this change). In any case, there is not the slightest reason why these should be inline. Functions for which this will (probably) actually matter, like stream_read_char, are still left inline. This was tested with demux_mkv's indexing. For broken files without index, demux_mkv creates an on-the-fly index. If you seek to a later part of the file, all data has to be read and parsed until the wanted position is found. This means demux_mkv will do mostly I/O, calling stream_read_char() and stream_read(). This should be the most I/O intensive non-deprecated part of mpv that uses the stream interface. (demux_lavf has its own buffering.)
* Replace calls to usec_sleep()wm42013-05-262-4/+4
| | | | | | This is just dumb sed replacement to mp_sleep_us(). Also remove the now unused usec_sleep() wrapper.
* Replace all calls to GetTimer()/GetTimerMS()wm42013-05-262-4/+4
| | | | | | | | | | | | | | | | | | | | | | GetTimer() is generally replaced with mp_time_us(). Both calls return microseconds, but the latter uses int64_t, us defined to never wrap, and never returns 0 or negative values. GetTimerMS() has no direct replacement. Instead the other functions are used. For some code, switch to mp_time_sec(), which returns the time as double float value in seconds. The returned time is offset to program start time, so there is enough precision left to deliver microsecond resolution for at least 100 years. Unless it's casted to a float (or the CPU reduces precision), which is why we still use mp_time_us() out of paranoia in places where precision is clearly needed. Always switch to the correct time. The whole point of the new timer calls is that they don't wrap, and storing microseconds in unsigned int variables would negate this. In some cases, remove wrap-around handling for time values.
* Silence some compiler warningswm42013-05-211-8/+7
| | | | None of these were actual issues.
* core: add --stream-capturewm42013-05-123-0/+41
| | | | | | This is a partial revert of commit 7059c15, and basically re-adds --capture, just with different option names and slightly different semantics.
* Merge branch 'audio_changes'wm42013-05-121-4/+6
|\ | | | | | | | | Conflicts: audio/out/ao_lavc.c
| * core: use channel map on demuxer level toowm42013-05-121-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps passing the channel layout correctly from decoder to audio filter chain. (Because that part "reuses" the demuxer level codec parameters, which is very disgusting.) Note that ffmpeg stuff already passed the channel layout via mp_copy_lav_codec_headers(). So other than easier dealing with the demuxer/decoder parameters mess, there's no real advantage to doing this. Make the --channels option accept a channel map. Since simple numbers map to standard layouts with the given number of channels, this is downwards compatible. Likewise for demux_rawaudio.
* | stream_bluray: report chapter timeswm42013-05-091-0/+21
| | | | | | | | This was forgotten in commit 7294303.
* | stream_bluray: general timeline supportwm42013-05-091-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | Uses the same mechanisms as stream_dvd to report the virtual playback time as known by libdvdread/libbluray, instead of the raw demuxer output. This should solve many problems with BD playback, like correct display of playback time and duration. On the other hand, this causes some new problems. For example, the reported stream time has a rather low resolution (1-2 seconds), so doing precise seeking on it is near impossible.
* | stream_bluray: make code a bit more obviouswm42013-05-091-4/+4
| |
* | stream: report chapter times, use time seeks for DVD chapterswm42013-05-063-6/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the stream layer to report chapter times. Extend stream_dvd to do this. I'm not 100% sure whether the re-used code is bug-free (because it was used for slave-mode and/or debugging only). MAke the frontend do time-based seeks when switching DVD chapters. I'm not sure if there's a real reason STREAM_CTRL_SEEK_TO_CHAPTER exists (maybe/hopefully not), but we will see. Note that querying chapter times in demuxer_chapter_time() with the new STREAM_CTRL_GET_CHAPTER_TIME could be excessively slow, especially with the cache enabled. The frontend likes to query chapter times very often. Additionally, stream_dvd uses some sort of quadratic algorithm to list times for all chapters. For this reason, we try to query all chapters on start (after the demuxer is opened), and add the chapters to the demuxer chapter list. demuxer_chapter_time() will get the time from that list, instead of asking the stream layer over and over again. This assumes stream_dvd knows the list of chapters at the start, and also that the list of chapters never changes during playback. This seems to be true, and the only exception, switching DVD titles, is not supported at runtime (and doesn't need to be supported).
* | Fix some cppcheck / scan-build warningswm42013-05-065-32/+5
| | | | | | | | | | | | | | | | These were found by the cppcheck and scan-build static analyzers. Most of these aren't interesting (the 2 previous commits fix some interesting cases found by these analyzers), and they don't nearly fix all warnings. (Most of the unfixed warnings are spam, things MPlayer never cared about, or false positives.)
* | stream: fix bad cache behavior introduced by recent commitwm42013-05-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 4d14a42, a seemingly harmless change, introduced very bad cache behavior when the cache isn't forked, such as on Windows, where it uses threads. Apparently the cache code was designed for forking, and an unknown obscure condition causes severe performance degradation if a STREAM_CTRL is sent to the cache on every frame. Since the cache code is literally insane (uses shared memory + fork(), and has hacks to make it work with threads, is messed into the stream code in extra-hacky ways), we just fix it by caching the STREAM_CTRL in question. This is also done for some other STREAM_CTRLs that are called on each frame, such as playback duration. This indicates that the cache code has some inherent problem with answering such requests in a timely matter, and that there's no easy way around this. (Even if the cache is eventually rewritten, these things will probably have to be cached, otherwise you'd have to forcibly block until the stream implementation is done with a blocking read. The real question is why it worked fine with the forked cache, though.)
* | stream: add start time reportingwm42013-05-053-0/+9
| | | | | | | | | | | | Will be needed to override the demuxer's start time reporting. We could be lazy and special-case it since the result is always 0 for the streams that care, but doing it properly is better.
* | core: don't report byte-based playback position with dvdwm42013-05-054-0/+17
| | | | | | | | | | | | | | | | | | | | DVD playback uses a demuxer that signals to the frontend that timestamp resets are possible. This made the frontend calculate the OSD playback position based on the byte position and the total size of the stream. This actually broke DVD playback position display. Since DVD reports a a linear playback position, we don't have to rely on the demuxer reported position, so disable this functionality in case of DVD playback. This reverts the OSD behavior with DVD to the old behavior.
* | stream: remove unused new_ds_stream()wm42013-05-032-13/+0
| |
* | stream_bluray: remove the broken -bluray-chapter optionreimar2013-04-272-16/+2
| | | | | | | | | | | | | | | | | | | | Remove the broken -bluray-chapter option. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36175 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: DOCS/man/en/mplayer.1 cfg-common.h
* | stream_bluray: fix querying current chapterreimar2013-04-271-3/+1
| | | | | | | | | | | | | | | | | | br://: Fix querying current chapter. This also fixes specifying an end chapter via -chapter. Based on patch by Olivier Rolland [billl users.sourceforge.net] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36173 b3059339-0415-0410-9bf9-f77b7e298cf2
* | options: untangle track range parsing for stream_cddawm42013-04-211-17/+14
|/ | | | | | | | | Remove the "object settings" based track range parsing (needed by stream_cdda only), and make stream_cdda use CONF_TYPE_INT_PAIR. This makes the -vf parsing code completely independent from other options. A bit of that code was used by the mechanism removed with this commit.
* stream_cddb: fix compilation on MinGW-w64Stephen Hutchinson2013-04-061-1/+1
| | | | | Like the VCD case, stream_cddb.c relies on ntddcdrm.h, which is no longer under the ddk directory.
* vcd_read_win32.h: fix compilation on MinGW-w64Stephen Hutchinson2013-04-061-1/+1
| | | | | | | ntddcdrm.h is no longer under the 'ddk' directory in MinGW-w64, and since MPV focuses on it instead of the old MinGW32, there's no reason to keep that dir prefix, as it stops VCD support from being built at all for Windows.
* http: handle broken QuickTime Streaming Server headersreimar2013-04-041-3/+9
| | | | | | | | | | | | | Handle the severely broken headers QuickTime Streaming Server sends. Instead of ending the header with \r\n\r\n it ends with \r\n<4 byte MP3 header>\r\n. And programs like wget just silently accept this without even printing a warning!! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35988 b3059339-0415-0410-9bf9-f77b7e298cf2 Note: see previous commit.
* http: fix for broken SHOUTcast streamsreimar2013-04-041-0/+6
| | | | | | | | | | | | | Support broken icy-metaint response from QuickTime Streaming Server. The full version string is "QuickTime Streaming Server 6.1.0/532". It sends a HTTP response header that contains an MP3 header! Fixes bug #2133. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35987 b3059339-0415-0410-9bf9-f77b7e298cf2 Note that in mpv, "http://" is mapped to ffmpeg currently, and this code is unused by default.
* vcd_read: cleanup ifdefsreimar2013-04-041-14/+7
| | | | | | | | | Clean up ifdefs so they make sense even if none or multiple are defined. Also choose Linux as fallback case instead of failing, this allows the code to compile e.g. on Android. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35971 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream: silence clang empty statement warningswm42013-03-191-12/+8
| | | | | | | | | | clang printed warnings like: stream/stream.c:692:65: warning: if statement has empty body [-Wempty-body] GET_UTF16(c, src < end - 1 ? get_le16_inc(&src) : 0,; This macro expands to "if(cond) ;". Replace it with an empty statement that doesn't lead to a clang warning.
* network: set default user-agent to MPlayer'swm42013-02-261-1/+1
| | | | | | | SHOUTcast bans "Mozilla" in the user-agent, Vimeo bans "Lavf" (part of the libavformat normal user-agent). "MPlayer 1.1-..." seems to work everywhere, and is close to the intented use (mpv is based on MPlayer, after all).
* core: redo how codecs are mapped, remove codecs.confwm42013-02-101-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use codec names instead of FourCCs to identify codecs. Rewrite how codecs are selected and initialized. Now each decoder exports a list of decoders (and the codec it supports) via add_decoders(). The order matters, and the first decoder for a given decoder is preferred over the other decoders. E.g. all ad_mpg123 decoders are preferred over ad_lavc, because it comes first in the mpcodecs_ad_drivers array. Likewise, decoders within ad_lavc that are enumerated first by libavcodec (using av_codec_next()) are preferred. (This is actually critical to select h264 software decoding by default instead of vdpau. libavcodec and ffmpeg/avconv use the same method to select decoders by default, so we hope this is sane.) The codec names follow libavcodec's codec names as defined by AVCodecDescriptor.name (see libavcodec/codec_desc.c). Some decoders have names different from the canonical codec name. The AVCodecDescriptor API is relatively new, so we need a compatibility layer for older libavcodec versions for codec names that are referenced internally, and which are different from the decoder name. (Add a configure check for that, because checking versions is getting way too messy.) demux/codec_tags.c is generated from the former codecs.conf (minus "special" decoders like vdpau, and excluding the mappings that are the same as the mappings libavformat's exported RIFF tables). It contains all the mappings from FourCCs to codec name. This is needed for demux_mkv, demux_mpg, demux_avi and demux_asf. demux_lavf will set the codec as determined by libavformat, while the other demuxers have to do this on their own, using the mp_set_audio/video_codec_from_tag() functions. Note that the sh_audio/video->format members don't uniquely identify the codec anymore, and sh->codec takes over this role. Replace the --ac/--vc/--afm/--vfm with new --vd/--ad options, which provide cover the functionality of the removed switched. Note: there's no CODECS_FLAG_FLIP flag anymore. This means some obscure container/video combinations (e.g. the sample Film_200_zygo_pro.mov) are played flipped. ffplay/avplay doesn't handle this properly either, so we don't care and blame ffmeg/libav instead.
* Check return values of some mp_find_..._config_file function calls for NULLwm42013-02-091-2/+5
|
* Remove BSD legacy TV/radio support (BT848 stuff)wm42013-02-064-1053/+0
| | | | | FreeBSD actually supports V4L2, and V4L2 supports this chip. Also, this chip is from 1997. Farewell.
* build: make it work on somewhat older ffmpeg versionswm42013-01-311-1/+1
| | | | | | Tested with n0.10.4. All these version checks are rather tricky, because Libav and FFmpeg change the same thing at slightly different versions.
* stream: set default HTTP user agent to "Mozilla/5.0"wm42013-01-311-1/+1
| | | | | | | | | | | Playing vimeo links using quvi support didn't work, even though clive could. clive is using quvi and curl to download videos from streaming sites, so if clive works mpv should always work as well. It didn't, and it turned out that it was due to the user agent. Change the default from whatever Lavf sends to what clive and cclive use. This will probably always work, as c(c)live are by the same author as libquvi, and there's a high chance it has been tested with all the supported sites.
* stream: fix reconnecting on broken network connectionswm42013-01-243-21/+50
| | | | | | | | | | | | | | | | This didn't work properly for HTTP with libavformat. The builtin HTTP implementation reconnects automatically on its own, while libavformat doesn't. Fix this by adding explicit reconnection support to stream_lavf.c, which simply destroys and recreates the AVIO context. It mostly works, though sometimes it mysteriously fails, spamming crap all over the terminal and feeding broken data to the decoders. This is probably due to itneractions with the cache. Also, reconnecting to unseekable HTTP streams will make it read the entire stream until the previous playback position is reached again. It's not known whether this change makes behavior with "strange" protocols like RTP better or worse.
* stream: uncrustify stream.c/.hwm42013-01-242-582/+664
| | | | The formatting almost made me break out in tears.
* stream: implement some HTTP specific options for stream_lavfwm42013-01-247-7/+61
| | | | | | | | | | | | | | | | | | The "http:" protocol has been switched to use ffmpeg's HTTP implementation some time ago. One problem with this was that many HTTP specific options stopped working, because they were obviously implemented for the internal HTTP implementation only. Add the missing things. Note that many options will work for ffmpeg only, as Libav's HTTP implementation is missing these. They will silently be ignored on Libav. Some options we can't fix: --ipv4-only-proxy, --prefer-ipv4, --prefer-ipv6 As far as I can see, not even libavformat internals distinguish between ipv4 and ipv6. --user, --passwd ffmpeg probably supports specifying these in the URL directly.
* cookies: fix crashwm42013-01-241-3/+3
| | | | | This was broken in 3f85094 (probably merge mistake). I guess nobody ever uses this feature.
* stream_cdda: support latest libcdio versionUoti Urpala2013-01-241-1/+31
|
* Silence two compiler warningswm42013-01-161-3/+2
| | | | Both should be harmless.
* video: decouple internal pixel formats from FourCCswm42013-01-135-84/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mplayer's video chain traditionally used FourCCs for pixel formats. For example, it used IMGFMT_YV12 for 4:2:0 YUV, which was defined to the string 'YV12' interpreted as unsigned int. Additionally, it used to encode information into the numeric values of some formats. The RGB formats had their bit depth and endian encoded into the least significant byte. Extended planar formats (420P10 etc.) had chroma shift, endian, and component bit depth encoded. (This has been removed in recent commits.) Replace the FourCC mess with a simple enum. Remove all the redundant formats like YV12/I420/IYUV. Replace some image format names by something more intuitive, most importantly IMGFMT_YV12 -> IMGFMT_420P. Add img_fourcc.h, which contains the old IDs for code that actually uses FourCCs. Change the way demuxers, that output raw video, identify the video format: they set either MP_FOURCC_RAWVIDEO or MP_FOURCC_IMGFMT to request the rawvideo decoder, and sh_video->imgfmt specifies the pixel format. Like the previous hack, this is supposed to avoid the need for a complete codecs.cfg entry per format, or other lookup tables. (Note that the RGB raw video FourCCs mostly rely on ffmpeg's mappings for NUT raw video, but this is still considered better than adding a raw video decoder - even if trivial, it would be full of annoying lookup tables.) The TV code has not been tested. Some corrective changes regarding endian and other image format flags creep in.
* Remove netstream supportwm42013-01-133-472/+0
| | | | | | | | | | | | | | | | | | | | | | This allowed to move the input stream layer across the network, allowing the user to play anything that mplayer could play remotely. For example, playing a DVD related on a remote server (say, with the host name "remotehost1") could be done by starting the netstream server on that remote server, and then running: mplayer mpst://remotehost1/dvd:// This would open the DVD on the remote host, and transfer the raw DVD sector reads over network. It works the same for other protocols, and all accesses to the stream layer are marshaled over network. It's comparable to the way the cache layer (--cache) works. It has questionable use and most likely was barely used at all. There's lots of potential for breakage, because it doesn't translate the stream CTRLs to network packets. Just get rid of it. The server used to be in TOOLS/netstream.c, and was accidentally removed earlier.
* Fix lots of bugs in mp_http URL handlingRudolf Polzer2013-01-102-7/+10
| | | | | Many instances of "http" were not changed to "mp_http", which made many aspects of the mp_http protocol handler broken.
* stream_lavf: warn if protocol not foundwm42012-12-281-1/+6
| | | | | | | | If ffmpeg returns AVERROR_PROTOCOL_NOT_FOUND, print a warning that ffmpeg should be compiled with network support. Note that stream_lavf.c itself includes a whitelist of directly supported ffmpeg protocols, so it can't happen that a completely unknown/madeup protocol triggers this message. (Unless the ffmpeg:// or lavf:// prefixes are used.)
* stream_dvd: fix angle mathRudolf Polzer2012-12-221-8/+7
| | | | | Stop changing the dvd_angle variable while opening a DVD. Fixes issues with multiple dvd:// URLs on one command line.
* path: add mp_find_config_file and reorganize some of the codeStefano Pigozzi2012-12-152-30/+39
| | | | | | | | | | | | | | Add `mp_find_config_file` to search different known paths and use that in ass_mp to look for the fontconfig configuration file. Some incidental changes spawned by this feature where: * Buffer allocation for the strings containing the paths is now performed with talloc. All of the allocations are done on a NULL context, but it still improves readability of the code. * Move the OSX function for lookup inside of a bundle: this code path was currently not used by the bundle generated with `make osxbundle`. The plan is to use it again in a future commit to get a fontconfig config file.
* Fix compilation with Libavwm42012-12-111-0/+2
| | | | | | | | | | Doesn't define AVPROBE_SCORE_RETRY for some reason. They use AVPROBE_SCORE_MAX/4 directly internally. AV_DISPOSITION_ATTACHED_PIC is not defined with the most recent Libav release. AVIOContext.av_class exists in Libav, but is apparently disabled in old releases. Disable it for now until people stop torturing me with old crap releases.
* audio: remove support for native alaw/mulaw/adpcm outputwm42012-12-111-3/+0
| | | | | | This is considered a worthless feature. Note that alaw/mulaw/adpcm input is unaffected: such data is handed to libavcodec and "decoded" to linear PCM.
* stream_lavf/demux_lavf: export/use HTTP MIME typewm42012-12-113-15/+17
| | | | | | | | | | | | | | | | | This is a fix for web radio streams that send raw AAC [1]. libavformat's AAC demuxer probe is picky enough to request hundreds of KBs data, which makes for a slow startup. To speed up stream startup, try use the HTTP MIME type to identify the format. The webstream in question sends an AAC specific MIME type, for which demux_lavf will force the AAC demuxer, without probing anything. ffmpeg/ffplay do the same thing. Note that as of ffmpeg commit 76d851b, av_probe_input_buffer() does the mapping from MIME type to demuxer. The actual mapping is not publicly accessible, and can only be used by calling that function. This will hopefully be rectified, and ideally ffmpeg would provide a function like find_demuxer_from_mime_type(). [1] http://lr2mp0.latvijasradio.lv:8000
* stream: handle mms streaming with ffmpegwm42012-12-113-14/+23
| | | | | | | | | | | | | | | | | | | | Use ffmpeg (stream_lavf) instead of internal mms support (asf_streaming.c) for mms://, mmsh://, mmst:// URLs. The old implementation is available under mp_mms:// etc. There are some caveats with this: - mms:// now always maps to mmsh://. It won't try mmst://. (I'm not sure if mms:// URLs really can use the mmst protocol, though.) - MMS streams under the http:// prefix are not handled. (ffmpeg ticket #2001.) (Was already broken in mpv since c02f25.) - It downloads all video streams now. MMS streams often have redundant video streams, which encode the main stream at different quality. The client is supposed to select one according to its bandwidth requirements. (Explicit MMS stream selection has been broken in mpv for a while, because MPOpts.vid maps to the stream number, not the demuxer's stream ID - but the old logic doesn't work anyway when using demuxer_lavf as opposed to demux_asf.)
* stream_dvd: add a stream_seek() callRudolf Polzer2012-12-071-0/+2
| | | | | This fixes use of -chapter together with -correct-pts and demux_lavf and stream_dvd.
* stream_ftp: cleanupsal2012-12-031-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stream ftp: Pass full buffer size to snprintf Previously the buffer size was always passed as one less than the underlying buffer's size. This is not using the underlying buffer to its full potential according to the C99 standard. The last byte of the buffers were never used. No vulnerabilities should have been caused by this mistake because the strings stored in the buffers were zero terminated at all times. Neither were out-of-array writes nor reads possible. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35488 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: open_f: Mark parameter file_format unused We have nothing to say about it, so we do not set *file_format. No need for compilers to emit a warning about it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35489 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Set type to STREAMTYPE_STREAM Previously this was not set at all from within the stream_ftp module. This caused the run-time warning message "Streams need a type!". The actual behaviour should not be affected by this change. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35490 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Use C99 designated initializers Simplify the initialization of the stream private struct's defaults. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35491 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Remove unneeded cast At worst these kind of casts can hide real errors. As it is, it is just not needed at all, thus remove it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35492 b3059339-0415-0410-9bf9-f77b7e298cf2
* core: automatically pause on low cachewm42012-12-032-1/+9
| | | | | | | | | | | | | | | When the cache fill status goes below a certain threshold, automatically pause the player. When the cache is filled again, unpause again. This is intended to help with streaming from http. It's better to pause a while, rather than exposing extremely crappy behavior when packet reads during decoding block the entire player. In theory, we should try to increase the cache if underruns happen too often. Unfortunately, changing the cache implementation would be very hard, because it's insane code (forks, uses shared memory and "volatile" etc.). So for now, this just reduces the frequency of the stuttering if the network is absolutely too slow to play the stream in realtime.
* stream_lavf: use ffmpeg for http/https streamingwm42012-12-032-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internal mplayer http implementation is terrible and old. Try to use ffmpeg instead. Enable ffmpeg https as well (we don't have native support for it and never will). Enable the cache for ffmpeg streams. In theory, we want to enable the cache for network streams only (or at least, not enable it for files), but there doesn't seem to be any way to query this. ffmpeg has its own read-cache, but apparently it doesn't get filled asynchronously (only to the degree internal socket/kernel buffers do). Should it turn out that the mplayer implementation is better than ffmpeg's in some way (unlikely), this commit might be reverted until ffmpeg is ready. So far, the ffmpeg implementation seems to work very well though. The original mplayer stream implementation is made available under "mp_http://" and "mp_http_proxy://". This is for testing, until the http implementation is completely removed. Note that this is unlikely to happen soon: ffmpeg doesn't support Microsoft streaming, while mplayer has some support. This code has dependencies on http. Note: "http_proxy://" doesn't work anymore. Use "httpproxy://" to get the ffmpeg implementation of it. Using https requires enabling OpenSSL in ffmpeg by adding the --enable-openssl switch to ffmpeg's configure.
* cache: simplify furtherwm42012-12-038-34/+28
| | | | | | | | | | | | This commit is separate from the previous one to separate our own changes from changes merged from mplayer2 (as far as that was possible). Make it easier for stream implementations to request being cached. Set a default cache size in stream.c, and remove them from various stream implementations. Only MS streaming support sets a meaningful cache size. Make querying cache size saner. This reduces the amount of #ifdefs needed.
* cache: refactor how cache enabling is doneUoti Urpala2012-12-038-27/+24
| | | | | | | | | | | | | | | | | | | | | | | | Code enabling the cache by default for network streams did that by modifying the value of the "cache" option. This wasn't sane, as multiple streams may be created and all share the same options. Change the code to not modify options but store data in the stream instance instead. Conflicts: core/mplayer.c demux/demux.c stream/cache2.c stream/network.c stream/network.h stream/pnm.c stream/stream.c stream/stream_rtp.c Merged from mplayer2 commit e26070. Note that this doesn't solve any actual bug, as the playlist crashing bug has been fixed before. Since the global cache size option value is not overwritten anymore, the option doesn't need to be restored on end of playback (M_OPT_LOCAL).
* demux_lavf: add support for libavdevicewm42012-12-033-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libavdevice supports various "special" video and audio inputs, such as screen-capture or libavfilter filter graphs. libavdevice inputs are implemented as demuxers. They don't use the custom stream callbacks (in AVFormatContext.pb). Instead, input parameters are passed as filename. This means the mpv stream layer has to be disabled. Do this by adding the pseudo stream handler avdevice://, whose only purpose is passing the filename to demux_lavf, without actually doing anything. Change the logic how the filename is passed to libavformat. Remove handling of the filename from demux_open_lavf() and move it to lavf_check_file(). (This also fixes a possible bug when skipping the "lavf://" prefix.) libavdevice now can be invoked by specifying demuxer and args as in: mpv avdevice://demuxer:args The args are passed as filename to libavformat. When using libavdevice demuxers, their actual meaning is highly implementation specific. They don't refer to actual filenames. Note: libavdevice is disabled by default. There is one problem: libavdevice pulls in libavfilter, which in turn causes symbol clashes with mpv internals. The problem is that libavfilter includes a mplayer filter bridge, which is used to interface with a set of nearly unmodified mplayer filters copied into libavfilter. This filter bridge uses the same symbol names as mplayer/mpv's filter chain, which results in symbol clashes at link-time. This can be prevented by building ffmpeg with --disable-filter=mp, but unfortunately this is not the default. This means linking to libavdevice (which in turn forces linking with libavfilter by default) must be disabled. We try doing this by compiling a test file that defines one of the clashing symbols (vf_mpi_clear). To enable libavdevice input, ffmpeg should be built with the options: --disable-filter=mp and mpv with: --enable-libavdevice Originally, I tried to auto-detect it. But the resulting complications in configure did't seem worth the trouble.
* stream_ftp: fix compilation with libavStefano Pigozzi2012-11-221-1/+1
| | | | | Fixup commit for a04b35013a055926ab57f60137518a204ce9e753. That commit was cherry-picked from mplayer(1) and thus assumes ffmpeg.
* stream_ftp: support longer filenamesal2012-11-211-31/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was split into 8 patches. Squash them together, as they affect stream_ftp.c only. stream ftp: readline: Fix off-by-one error Even if max bytes are available read at most max - 1 bytes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35427 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/stream_ftp.c stream ftp: readline: Always initialize output parameter buf Only exception if passed parameter max is less than or equal to zero. That cannot happen with the current code. Additionally change readresp function to always copy the first response line if the parameter rsp is non-NULL. This fixes some error reporting that used uninitialized stack arrays. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35428 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: readline: Always try to read complete lines If there is not enough space in the provided line buffer just skip the remaining bytes until reaching EOL. Usually we are only interested in the first 5 characters and for everything else the (on-stack) response buffer should still be big enough. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35429 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Revise file descriptor usage * Set unbound descriptor variables to -1 * Always test >= 0 to see if a variable refers to a valid descriptor git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35430 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Only send QUIT command if connected Do not attempt to send commands without control connections. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35431 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Create buffers before opening control connection git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35432 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Allocate command buffer on-heap git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35433 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Increase command buffer size Allow for more longish file names (be it because of length or more lengthy characters). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35434 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream: fix dvd:// + cache crashingwm42012-11-203-3/+5
| | | | | | The language string was dynamically allocated, which completely fails if the cache is forked (which it usually is). Change it back to a fixed length string, like the original code had it.
* stream, demux_lavf: minor cleanup for stream size codewm42012-11-202-0/+10
|
* stream, demux: replace off_t with int64_twm42012-11-2017-48/+48
| | | | | | On reasonable systems, these types were the same anyway. Even on unreasonable systems (seriously, which?), this may reduce potential breakage.
* stream: change STREAM_CTRL_GET_SIZE argument type to uint64_treimar2012-11-204-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | Update endpos each time libavformat asks for it. Fixes playback of still downloading files to not stop before we really reached the end. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35107 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: libmpdemux/demux_lavf.c Change STREAM_CTRL_GET_SIZE argument type from off_t to uint64_t. Also fix the incorrect type of the uint64_res variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35360 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: libmpdemux/demux_lavf.c libmpdemux/muxer_lavf.c Note: also merges the "forgotten" cache support from r35107.
* asf_streaming: remove broken MMSU support codeupsuper2012-11-201-15/+3
| | | | | | | | | | | | | | Comment out unused code git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35359 b3059339-0415-0410-9bf9-f77b7e298cf2 Removing mmsu-related code MMSU was never supported by MPlayer, and the protocol has been deprecated. Since the code is not in use at all, Removing it should not break anything. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35420 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix potential bugs and issues, general cleanupsreimar2012-11-209-89/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of these are reimar fixing issues found by Coverity static analyzer, and possibly some more cleanup commits independent from this. Since these commits are rather noisy, squash them all together. Try to make code a bit clearer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35294 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: audio/out/ao_alsa.c Check the correct variable for NULL. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35323 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless unreachable code (the loop condition already checks the 0xff case). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35325 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix typo that might have caused reading beyond the string end. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35326 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not needlessly use "long" types. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35331 b3059339-0415-0410-9bf9-f77b7e298cf2 Use AV_RB32 to avoid sign extension issues and validate offset before using it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35332 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove nonsense casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35343 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix crash in case sh_audio allocation failed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35348 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix potential NULL dereference. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35351 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: libmpcodecs/ad_ffmpeg.c Note: Slightly modified. Fix malloc failure check to check the correct variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35353 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid code duplication and pointless casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35363 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/tv.c Error out if an invalid channel list name was specified instead of continuing and reading outside array bounds all over the place. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35364 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/tv.c Make array "static const". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35365 b3059339-0415-0410-9bf9-f77b7e298cf2 Properly free resources even when encountering many parse errors. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35367 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: parser-cfg.c Avoid leaks in error handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35380 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not do sign comparisons on "char" type which can be both signed or unsigned. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35381 b3059339-0415-0410-9bf9-f77b7e298cf2 Free cookies file data after parsing it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35382 b3059339-0415-0410-9bf9-f77b7e298cf2 http_set_field only makes a copy of the string, so we still need to free it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35383 b3059339-0415-0410-9bf9-f77b7e298cf2 check4proxies does not modify input URL, so mark it const. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35390 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove proxy "support" from stream_rtp and stream_upd, trying to use a http proxy for UDP connections makes no sense. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35394 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/stream_rtp.c stream/stream_udp.c Add url_new_with_proxy function to reduce code duplication and memleaks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35395 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/pnm.c stream/stream_live555.c stream/stream_nemesi.c stream/stream_rtsp.c Fix off-by-one errors in file descriptor validity checks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35402 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35403 b3059339-0415-0410-9bf9-f77b7e298cf2 Abort when opening the file failed instead of calling "write" with an invalid descriptor. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35404 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove pointless local variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35411 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/http.c
* cookies: don't read cookie files from ancient browserswm42012-11-161-42/+3
| | | | | | | | | | | | Remove the code that attempted to read cookie files from well-known browser locations. This code was written for ancient browsers, and only knew about Mozilla and Netscape. While it's possible that these browsers are still alive and still use the same config locations and cookie file formats, the only Mozilla-based browser that still matters is Firefox. Firefox uses a sqlite database for cookies, located in a slightly different config path. Just remove this code.
* network: fix crash with -playlist http://...wm42012-11-141-0/+2
| | | | | | | | | | | | The function fixup_network_stream_cache() accesses stream->opts, which is NULL in some cases when loading playlists. stream->opts is a pointer to the global MPOpts struct. For simplicity, this parameter is left NULL in some cases. Usually, this doesn't matter, because barely anything in stream/ uses MPOpts anyway. Hack-fix this for now by not accessing MPOpts and disabling the stream cache in this case. Calling open_stream() with options==NULL now basically means: do not use cache settings.
* Rename directories, move files (step 2 of 2)wm42012-11-1245-109/+108
| | | | | | | | | | | | Finish renaming directories and moving files. Adjust all include statements to make the previous commit compile. The two commits are separate, because git is bad at tracking renames and content changes at the same time. Also take this as an opportunity to remove the separation between "common" and "mplayer" sources in the Makefile. ("common" used to be shared between mplayer and mencoder.)
* Rename directories, move files (step 1 of 2) (does not compile)wm42012-11-121-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tis drops the silly lib prefixes, and attempts to organize the tree in a more logical way. Make the top-level directory less cluttered as well. Renames the following directories: libaf -> audio/filter libao2 -> audio/out libvo -> video/out libmpdemux -> demux Split libmpcodecs: vf* -> video/filter vd*, dec_video.* -> video/decode mp_image*, img_format*, ... -> video/ ad*, dec_audio.* -> audio/decode libaf/format.* is moved to audio/ - this is similar to how mp_image.* is located in video/. Move most top-level .c/.h files to core. (talloc.c/.h is left on top- level, because it's external.) Park some of the more annoying files in compat/. Some of these are relicts from the time mplayer used ffmpeg internals. sub/ is not split, because it's too much of a mess (subtitle code is mixed with OSD display and rendering). Maybe the organization of core is not ideal: it mixes playback core (like mplayer.c) and utility helpers (like bstr.c/h). Should the need arise, the playback core will be moved somewhere else, while core contains all helper and common code.
* stream: open_stream_plugin() should set error code on failurewm42012-11-011-0/+1
| | | | | clang analyzer complained about *ret (&r) containing garbage in open_stream_full(). This should fix it.
* http: fix potential NULL pointer issuewm42012-11-011-10/+9
| | | | | | Found by clang analyzer. This called strlen(NULL), if the uri field in the http_hdr wasn't set. It seems all callers of this function set the field properly, so remove the bogus fallback to "/".
* http: fix potential NULL pointer issuewm42012-11-011-1/+4
| | | | Found by clang analyzer. Untested.
* cookies: replace sprintf with snprintfreimar2012-10-311-5/+7
| | | | | | | | | | Use snprintf instead of sprintf. No good reason beyond paranoia and Coverity complaining about it. In a very theoretical, construed case the adds might overflow or the environment might change in-between the getenv calls. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35307 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cddb: replace sprintf with snprintfreimar2012-10-311-12/+14
| | | | | | | | | | Replace sprintf with snprintf. To my knowledge the only "real" issue this fixes is that setting certain environment variables to very long strings might have caused overflows. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35306 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: remove references to CONFIG_TV_DSHOWwm42012-10-301-8/+1
|
* stream: fix redirection for proxy URLsreimar2012-10-303-15/+55
| | | | | | | | | | | Fix redirection for proxy URLs. Should fix bug #2091. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35207 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/url.c
* url: simplifycboesch2012-10-303-25/+43
| | | | | | | | | | | | | | | | | | | | Use mp_asprintf in make_noauth_url and make_http_proxy_url. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32971 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cboesch Conflicts: stream/url.c Note: the mp_asprintf() function was introduced in r32970, and put into its own files. We just put that directly into url.c, as we use talloc_asprintf() in general, and mp_asprintf() is for url.c code only. (Making url.c use talloc would probably result in a big mess.) Make proxy and url parameter const in get_noauth_url and get_http_proxy_url. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32972 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: cboesch
* stream: add STREAM_CTRL_GET_CURRENT_TITLEib2012-10-304-0/+14
| | | | | | | | Add new stream control command STREAM_CTRL_GET_CURRENT_TITLE for DVDs. This provides the current title (aka track) number of a DVD. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35263 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: enable STREAM_CTRL_GET_NUM_TITLESib2012-10-301-0/+3
| | | | | | | | Allow STREAM_CTRL_GET_NUM_TITLES with cache enabled. This is missing in r34474. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35258 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: fix long hangsreimar2012-10-301-1/+1
| | | | | | | | | | Avoid sleeping 0 ms, this can cause sleep to be not called at all. This will then cause long hangs e.g. when sleeping on single-CPU/core computers. Should fix bug #2084. Patch suggested by Visenri [visenri yahoo es] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35119 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_file: explicitly signal EOFreimar2012-10-301-0/+2
| | | | | | | | | Explicitly signal EOF when reaching the end of a file/pipe. Fixes a 4 second delay due to stream_reconnect for e.g. echo | mplayer - git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35112 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_ftp: fix double free in one error caseUoti Urpala2012-10-301-1/+0
|
* stream_ffmpeg: handle rtsp:// URLs by default, add lavf://Uoti Urpala2012-10-282-17/+23
| | | | | | | | | | | Make stream_ffmpeg handle rtsp:// URLs by default, without requiring ffmpeg://rtsp://. Previously (after removal of other rtsp implementations) rtsp:// fell back to using HTTP, which was unlikely to work. Also add lavf:// as an alternative to ffmpeg:// to force the stream implementation. Since libavformat can come from Libav rather than FFmpeg, using the ffmpeg name in the prefix is misleading.
* stream: remove NULL checks for open callswm42012-10-141-13/+3
| | | | | | | open_stream() and open_output_stream() checked for filename==NULL, and if true, printed an error message asking to report this as bug. Internal logic errors should just crash. Use assert() instead.
* core: show quvi page title in window title, clean up libquvi handlingwm42012-10-142-132/+24
| | | | | | | | | | | | | | | | | Clean up handling of libquvi (which resolves URLs of streaming sites into URLs to the actual media playable by mpv). Move the code out of open.c to quvi.c, and invoke it explicitly from mplayer.c, instead of trying to resolve every filename passed to open_stream(). This allows easily passing metadata from the quvi context to the frontend. Expose QUVIPROP_PAGETITLE as "media-title" property, and use that instead of "filename" for the mplayer window title. (For YouTube, this is the video title.) It's cleaner too. Handle a potential reliability issue: check quvi_getprop return values. Since open.c contains barely anything but the open_stream() stub, move that to stream.c and delete open.c.
* Rename to "mpv"wm42012-10-121-1/+1
| | | | | | | | | | | | | | | | | | This changes the name of this project to mpv. Most user-visible mentions of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the default config file location are changed as well. The new default config file location is: ~/.mpv/ Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI, which has been removed from mplayer2 ages ago. We don't have a logo, and the MS Windows resource files sort-of require one, so leave etc/mplayer.ico/.xpm as-is. Remove the debian and rpm packaging scripts. These contained outdated dependencies and likely were more harmful than useful. (Patches which add working and well-tested packaging are welcome.)
* core, timeline: cache external ordered chapter files tooStefano Pigozzi2012-09-184-7/+17
| | | | | | | | | | | | | | | | | | | | | | | Previously, Matroska source files other than the initially opened one were always accessed without caching. Enable cache for extra files too. A separate cache process/thread is started for each file, which is less than optimal but probably better than no caching if the user explicitly enabled cache. This commit only implements caching for Matroska ordered chapters (not for EDL timeline). To build the timeline we need to demux the files in the current directory to look for segments with matching uuid. This first demux is done with no cache since we don't need to read a lot of the stream. If the file is recognized as one of the needed sources it's reopened with cache enabled. Also move the stream_cache_size global variable to the options struct. Conflicts: cfg-mplayer.h mplayer.c stream/stream.h timeline/tl_matroska.c
* bluray: add bd:// as stream prefixwm42012-09-181-1/+1
| | | | The existing short prefix, br://, was not very intuitive.
* core: fix DVD subtitle selectionwm42012-09-183-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* libaf: rename af_format.h to format.hwm42012-08-293-3/+3
| | | | | | | | | | 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.
* Adjust ffmpeg/libav #includes to work with recent upstream changesUoti Urpala2012-08-211-3/+4
| | | | | | | | 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.
* Remove support for libnemesi RTSP streamingwm42012-08-202-83/+0
| | | | | Removed due to being a maintainance burden. Support for FFmpeg is available.
* Remove support for LIVE555 RTSP streamingwm42012-08-204-146/+0
| | | | | | | | | | | | 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-202-2/+2
| | | | | | 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.
* Remove dvdnav support (DVD menus)wm42012-08-164-1085/+0
| | | | | | | | | | | | | | | | When the internal mplayer MPEG demuxer was removed (commit 1fde09db), the default demuxer when using dvdnav was set to libavformat. Now it turns out that this doesn't work with libavformat. It will terminate playback right after the audio runs out (instead of looping it like the video, or whatever it's supposed to do). I'm not sure what exactly the problem is, but since 1. even mplayer-svn can't handle DVD menus directly (missing highlights), 2. DVD menus are essentially worthless, and 3. I don't directly watch DVDs, don't bother with it and remove it. For basic playback, there's still libdvdread support. Also, use pkg-config for libdvdread, and drop support for in-tree libdvdread. Remove support for in-tree libdvdcss as well.
* Remove win32/qt/xanim/real binary codecs loadingwm42012-08-162-4242/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the win32 loader - the win32 emulation layer, as well as the code for using DirectShow/DMO/VFW codecs. Remove loading of xanim, QuickTime, and RealMedia codecs. The win32 emulation layer is based on a very old version of wine. Apparently, wine code was copied and hacked until it was somehow able to load a limited collection of binary codecs. It poked around in the code segment of some known binary codecs to disable unsupported win32 API calls to make them work. Example from module.c: for (i=0;i<5;i++) RVA(0x19e842)[i]=0x90; // make_new_region ? for (i=0;i<28;i++) RVA(0x19e86d)[i]=0x90; // call__call_CreateCompatibleDC ? for (i=0;i<5;i++) RVA(0x19e898)[i]=0x90; // jmp_to_call_loadbitmap ? for (i=0;i<9;i++) RVA(0x19e8ac)[i]=0x90; // call__calls_OLE_shit ? for (i=0;i<106;i++) RVA(0x261b10)[i]=0x90; // disable threads Just to show how utterly insane this code is. You wouldn't want even your worst enemy to have to maintain this. In fact, it seems nobody made major changes to this code ever since it was committed. Most formats can be decoded by libavcodecs these days, and the loader couldn't be used on 64 bit platforms anyway. The same is (probably) true for the other binary codecs. General note about how support for win32 codecs could be added back: It's not possible to replace the win32 loader code by using wine as library, because modern wine can not be linked with native Linux programs for certain reasons. It would be possible to to move DirectShow video decoding into a separate process linked with wine, like the CoreAVC-for-Linux patches do. There is also the mplayer-ww fork, which uses the dshownative library to use DirectShow codecs on Windows.
* stream_file: print strerror() when failing to open a fileUoti Urpala2012-08-161-1/+3
| | | | | | | | | | stream_file always printed "File not found" if it could not open a file, even though this could be due to other reasons such as permission problems. Print strerror() information instead. This changes the output for "mplayer /etc/shadow" from File not found: '/etc/shadow' to Cannot open file '/etc/shadow': Permission denied
* win32: fix compilation on MinGWwm42012-08-071-9/+9
| | | | | | | | | | | | | | | The commit 74df1d8e05aa2 (and f752212c62353) replaced the configure endian check with byte order macros defined by standard headers. It turns out that MinGW-w64 actually doesn't define these macros in the sys/types.h system header. (I assumed it does, because a quick test seemed to work. But that was because gcc -W -Wall doesn't warn against undefined macros. You need -Wundef for that.) MinGW-w64 has a sys/params.h header defining these macros, but sys/types.h doesn't include it, so it's useless without special casing the mplayer code. Add a hack top configure instead. Define the macros directly, and assume MinGW-w64 only works on little endian machines. The other changes are basically random typos and superficial oversights.
* options: get rid of ambiguous option parsingwm42012-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Options parsing used to be ambiguous, as in the splitting into option and values pairs was ambiguous. Example: -option -something It wasn't clear whether -option actually takes an argument or not. The string "-something" could either be a separate option, or an argument to "-option". The code had to call the option specific parser function to resolve this. This made everything complicated and didn't even have a real use. There was only one case where this was actually used: string lists (m_option_type_string_list) and options based on it. That is because this option type actually turns a single option into a proxy for several real arguments, e.g. "vf*" can handle "-vf-add" and "-vf-clr". Options suffixed with "-clr" are the only options of this group which take no arguments. This is ambiguous only with the "old syntax" (as shown above). The "new" option syntax always puts option name and value into same argument. (E.g. "--option=--something" or "--option" "--something".) Simplify the code by making it statically known whether an option takes a parameter or not with the flag M_OPT_TYPE_OLD_SYNTAX_NO_PARAM. If it's set, the option parser assumes the option takes no argument. The only real ambiguity left, string list options that end on "-clr", are special cased in the parser. Remove some duplication of the logic in the command line parser by moving all argument splitting logic into split_opt(). (It's arguable whether that can be considered code duplication, but now the code is a bit simpler anyway. This might be subjective.) Remove the "ambiguous" parameter from all option parsing related code. Make m_config unaware of the pre-parsing concept. Make most CONF_NOCFG options also CONF_GLOBAL (except those explicitly usable as per-file options.)
* mplayer, stream_tv: move variable initializationwm42012-08-031-1/+1
| | | | It's not clear why that was done in mplayer's main function.
* tv: reduce code duplicationmplayer-svn2012-08-031-21/+14
| | | | | | | Reduce some code duplication. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34995 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* stream_pvr: fix buffer overflowmplayer-svn2012-08-031-16/+13
| | | | | | | | | stream_pvr: Use sizeof() to get destination buffer size. The code in lines 382/384 used the wrong constant. Fixes bug #2066. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34895 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* stream: detect prematurely closed connectionmplayer-svn2012-08-031-1/+2
| | | | | | | | | | | | | Detect prematurely closed connection. Then we get a streaming_stopped status but we have a end_pos and have not reached it yet, do not accept it as EOF but instead try reconnection. For example a forced restart of a webserver will usually result in the connection being closed before EOF. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34873 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* stream: retry reconnecting several timesmplayer-svn2012-08-031-8/+22
| | | | | | | | | | | | | Retry reconnecting several times. Also add a delay, otherwise a server closing any incoming connection immediately would make MPlayer stop even if it happens only for 1 second or so. With this change, no server/network outage of any kind shorter than 5 seconds should cause MPlayer to give up anymore. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34871 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* commands, dvd, dvdnav, bluray: cleanup sub/audio track language displaymplayer-svn2012-08-037-23/+99
| | | | | | | | | | | | | | | | | | | | | Code cleanup: Use a stream_control instead of global functions to get the language associate with a audio or subtitle stream from the streaming layer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34736 b3059339-0415-0410-9bf9-f77b7e298cf2 Support showing the stream language with br:// playback. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34737 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix DVDs showing the subtitle language as "unknown" for a long time. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34777 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar Note: heavily modified by wm4 for this fork of mplayer.
* cache2: allow cache sizes up to 4 TBmplayer-svn2012-08-032-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove variable that is only assigned but never used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34791 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow using a cache size of up to 4 TB. Obviously anything close to 4 GB will always fail on 32 bit systems. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34792 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace off_t by int64_t in cache code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34793 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove casts that are no longer necessary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34794 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix header file after r34793. Patch by Stephen Sheldon, sfsheldo gmail com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34802 b3059339-0415-0410-9bf9-f77b7e298cf2 Put #include <inttypes.h> into the header file where it should be. Reported by Stephen Sheldon, sfsheldo gmail com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34798 b3059339-0415-0410-9bf9-f77b7e298cf2 Correct r34798. The header only needs stdint.h while the C file needs inttypes.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34799 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* stream: add new stream control command STREAM_CTRL_GET_NUM_TITLESmplayer-svn2012-08-034-0/+12
| | | | | | | | | This provides the total number of titles (aka tracks) of CDs / VCDs / DVDs. Additionally, add a titles property to the get_property slave command. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34474 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: ib
* cache2: flush cache and sync stream position/eof after seeking STREAM_CTRLsmplayer-svn2012-08-031-10/+33
| | | | | | | | | | | | | | | | | | | | This avoid some strange differences in behaviour between -cache and -nocache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34461 b3059339-0415-0410-9bf9-f77b7e298cf2 cache2: fix seeking with e.g. flv files This is a regression that was introduced in r34461. Found and bisected by Anssi Hannula [anssi.hannula iki fi]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34575 b3059339-0415-0410-9bf9-f77b7e298cf2 cache2: print an error when streams behave in a way that the cache cannot handle git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34576 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* stream/http: add a test file for ultravox in commentmplayer-svn2012-08-031-0/+3
| | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34431 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* cache2: make cache process exit when main process diesmplayer-svn2012-08-031-0/+13
| | | | | | | | Make cache process detect when the main process disappeared and make it exit on its own in that case. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34371 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* Replace 'q' printf length modifier by 'll'mplayer-svn2012-08-031-1/+1
| | | | | | | 'q' is just a deprecated synonym of 'll' that should no longer be used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34224 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: diego
* cache2: make warnings easier to understandmplayer-svn2012-08-031-2/+2
| | | | | | | | | | | | Mark two warnings that usually only indicate a performance issue as such. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33955 b3059339-0415-0410-9bf9-f77b7e298cf2 Another attempt to make message easier to understand. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33956 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar
* Remove teletext supportwm42012-08-035-128/+18
| | | | | | | | Teletext requires special OSD support. Because I can't even test teletext, I can't restore support for it. Since teletext can be considered ancient and obscure, and since it doesn't make sense to keep the remaining teletext code without being able to use it, I'm removing it.
* stream: remove V4L TV input and V4L radio supportwm42012-08-023-2072/+0
| | | | There are V4L2 drivers, and the old V4L stuff seems plain unnecessary.
* mplayer: rip out --capture supportwm42012-08-023-20/+0
| | | | | | | While this was an interesting idea, it wasn't actually useful. Basically it dumped the raw data (as requested by the demuxer) into a file. The result is only useful if the file format was raw or maybe some MPEG packet stream, but not with most modern file formats.
* stream: remove stream_cuewm42012-08-022-643/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | stream_cue, which provided the cue:// protocol handler, was extremely hacky and didn't even manage to play some samples I tried. Remove it, because it's plain unneeded. There is much better support for .cue files elsewhere: - libcdio can play pairs of .cue/.bin files: mplayer cdda:// --cdrom-device=your_cue_file.cue Note that if the .cue file is not accompanied by a .cue file, but an encoded file for example, this most likely won't work. - mplayer can play .cue files directly: mplayer your_cue_file.cue This works, even if the .cue file comes with encoded files that are not .bin . Note that if you play .bin files, mplayer will assume a specific raw audio format. If the format doesn't match, mplayer will play noise and destroy your speakers. Note that format mismatches are extremely common, because the endianness seems to be essentially random. (libcdio uses a clever algorithm to detect the endian, and doesn't have this problem.)
* stream: remove native RTSP/RTP/PNM supportwm42012-08-0130-10376/+2
| | | | | | There are still various other RTSP implementations available, such as libnemesi, live555, and libav. The mplayer native version was a huge chunk of old unmaintained code.
* Change <endian.h> include to <sys/types.h>wm42012-07-311-1/+1
| | | | | This seems to be more portable. Should fix compilation on OSX and FreeBSD. Apparently also works on MinGW-w64.
* Remove some demuxers and decoderswm42012-07-301-21/+0
| | | | | | | | | | | | | | | | | | Most of these demuxers and decoders are provided in better form by libav, while the mplayer builtin ones are essentially unmaintained. The only legimitate use case for not using the libav ones was working around libav bugs or bugs related to the way mplayer uses libav. Instead of trying to keep dead code alive, development effort should go into improving libav or the mplayer libav glue code. Note that the libav demuxer have been preferred over the mplayer builtin ones for a while in mplayer2. There were some exceptions: playing DVDs with dvdnav or playing network sources. (That's because some stream modules and network.c requested explicit file formats, such as DEMUXER_TYPE_MPEG_PS, which mapped to builtin demuxers.) With this commit, they are switched to use libav. One caveat is that the requested format is not passed to libavformat, instead we rely on the auto probing to select the correct libav demuxer (see code in demux_open_stream()).
* Remove compile time/runtime CPU detection, and drop some platformswm42012-07-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mplayer had three ways of enabling CPU specific assembler routines: a) Enable them at compile time; crash if the CPU can't handle it. b) Enable them at compile time, but let the configure script detect your CPU. Your binary will only crash if you try to run it on a different system that has less features than yours. This was the default, I think. c) Runtime detection. The implementation of b) and c) suck. a) is not really feasible (it sucks for users). Remove all code related to this, and use libav's CPU detection instead. Now the configure script will always enable CPU specific features, and disable them at runtime if libav reports them not as available. One implication is that now the compiler is always expected to handle SSE (etc.) inline assembly at runtime, unless it's explicitly disabled. Only checks for x86 CPU specific features are kept, the rest is either unused or barely used. Get rid of all the dump -mpcu, -march etc. flags. Trust the compiler to select decent settings. Get rid of support for the following operating systems: - BSD/OS (some ancient BSD fork) - QNX (don't care) - BeOS (dead, Haiku support is still welcome) - AIX (don't care) - HP-UX (don't care) - OS/2 (dead, actual support has been removed a while ago) Remove the configure code for detecting the endianness. Instead, use the standard header <endian.h>, which can be used if _GNU_SOURCE or _BSD_SOURCE is defined. (Maybe these changes should have been in a separate commit.) Since this is a quite violent code removal orgy, and I'm testing only on x86 32 bit Linux, expect regressions.
* bstr: rename bstr() function to bstr0(), and typedef bstr to struct bstrwm42012-07-281-1/+1
| | | | | Replace all uses of bstr() with bstr0(). Also remove the ridiculous C++ workaround.
* Add support for playing video from streaming sites with libquviwm42012-07-281-2/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This enables playing URLs from libquvi supported streaming sites directly, e.g. "mplayer http://www.youtube.com/watch?v=...." Anything opened with mplayer is checked with libquvi. If it looks like a URL of a supported streaming site, libquvi is used to extract the media URL, which is then passed to the lower level mplayer code instead of the HTML URL. Hopefully the libquvi URL checker works well enough that it doesn't cause any problems with normal URLs, files, or whatever else mplayer's stream layer accepts. Add the --libquvi-format option. the option value is directly passed to libquvi as requested format. The only values that seem to work for any streaming site seem to be "best" (best quality) and "default" (lowest quality). The mplayer option defaults to "best" (overriding libquvi's default). Outstanding issues: - Does libquvi checking every opened file really not cause problems? Should there be a runtime option to disable libquvi use? (Probably not an issue.) - Should we check/set the supported protocol? By default libquvi has support for all protocols enabled. In the worst case, it might return an URL using a protocol not supported by mplayer, even though it could extract URLs with other protocols too. (Probably not an issue.) - Somehow export metadata (like media title) to the mplayer frontend?
* Merge remote-tracking branch 'origin/master'wm42012-07-281-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .gitignore bstr.c cfg-mplayer.h defaultopts.c libvo/video_out.c The conflict in bstr.c is due to uau adding a bstr_getline function in commit 2ba8b91a97e7e8. This function already existed in this branch. While uau's function is obviously derived from mine, it's incompatible. His function preserves line breaks, while mine strips them. Add a bstr_strip_linebreaks function, fix all other uses of bstr_getline, and pick uau's implementation. In .gitignore, change vo_gl3_shaders.h to use an absolute path additional to resolving the merge conflict.
| * demux, vd_ffmpeg: fix demux keyframe flag, set AV_PKT_FLAG_KEYUoti Urpala2012-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was some confusion about the "flags" field in demuxer packets. Demuxers set it to either 1 or 0x10 to indicate a keyframe (and the field was not used to indicate anything else). This didn't cause visible problems because nothing read the value. Replace the "flags" field with a boolean "keyframe" field. Set AV_PKT_FLAG_KEY based on this field in packets fed to libavcodec video decoders (looks like PNG and ZeroCodec are the only ones which depend on values from demuxer; previously this was hardcoded to true for PNG). Make demux_mf set the keyframe field in every packet. This matters for PNG files now that the demuxer flag is forwarded to libavcodec. Fix logic setting the field in demux_mkv. It had probably not been updated when adding SimpleBlock support. This probably makes no difference for any current practical use.
* | Merge remote-tracking branch 'origin/master'wm42012-04-291-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bstr.c bstr.h libvo/cocoa_common.m libvo/gl_common.c libvo/video_out.c mplayer.c screenshot.c sub/subassconvert.c Merge of cocoa_common.m done by pigoz. Picking my version of screenshot.c. The fix in commit aadf1002f8a will be redone in a follow-up commit, as the original commit causes too many conflicts with the work done locally in this branch, and other work in progress.
| * stream_cdda: print CDTEXT if availablewm42012-04-281-17/+51
| | | | | | | | | | | | | | | | | | | | The per-CD info will be printed on playback start, per-track info when a track is played. (This is not a technical restriction, and just goes along with the existing code.) The following fields are not included in output, because these are supposedly binary: CDTEXT_DISCID, CDTEXT_GENRE, CDTEXT_SIZE_INFO, CDTEXT_TOC_INFO, CDTEXT_TOC_INFO2.
| * configure, stream_cdda: remove libcdparanoia supportwm42012-04-281-59/+11
| | | | | | | | | | libcdparanoia is barely developed anymore, while libcdio is still quite active.
| * cosmetics: stream_cdda.c: reformatwm42012-04-281-359/+368
| |
| * stream_cdda: various fixesreimar2012-04-281-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix cdda speed default value, range and use more robust condition. Based on patch by Ingo Brückl [ib wupperonline de]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34458 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not call paranoia_overlapset with 0, it actually causes cdparanoia to just hang. Instead use it to set/unset PARANOIA_MODE_OVERLAP. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34459 b3059339-0415-0410-9bf9-f77b7e298cf2 Fail if trying to seek beyond the last chapter, not just if it is beyond the end of the disc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34460 b3059339-0415-0410-9bf9-f77b7e298cf2 cdda: set position to an actual EOF position when we set EOF. This avoids some inconsistency like the stream indicating EOF but a read still returning more data. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34462 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow PARANOIA_MODE_FULL with skipping. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34467 b3059339-0415-0410-9bf9-f77b7e298cf2 Don't call paranoia_modeset() for PARANOIA_MODE_DISABLE. cdparanoia destroys start sector information after such a call. Since it is pointless without setting a mode anyway, don't do it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34468 b3059339-0415-0410-9bf9-f77b7e298cf2 Add comment to a condition that is just a hack around a cdparanoia bug. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34472 b3059339-0415-0410-9bf9-f77b7e298cf2 Add checks for errors in stream_cdda's get_track_by_sector(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34495 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix seeking beyond EOF in stream_cdda to work with cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34577 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream_ffmpeg: fix broken line from 30afc64532ff61Uoti Urpala2012-04-181-1/+1
| | | | | | | | | | | | | | Commit 30afc64532ff61 ("stream_ffmpeg: switch to libavformat avio API") somehow contained a nonsense line which broke the control() function. Fix. Also add avformat_network_init() to central libav initialization code to avoid warnings.
* | Merge remote-tracking branch 'origin/master'wm42012-04-281-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_alsa.c libao2/ao_dsound.c libao2/ao_pulse.c libao2/audio_out.h mixer.c mixer.h mplayer.c Replace my mixer changes with uau's implementation, which is based on my code.
| * stream_pvr: fix field size / snprintf size mismatchUoti Urpala2012-04-111-1/+1
| | | | | | | | | | | | | | struct station_elem_s had a field "name[8]", but the rest of the code used PVR_STATION_NAME_SIZE as field size in snprintf and some other calls accessing the field. Change the field size to PVR_STATION_NAME_SIZE so it matches the accesses.
* | Merge remote-tracking branch 'origin/master'wm42012-04-134-340/+1
|\| | | | | | | | | Conflicts: libvo/vo_kva.c
| * build: remove OS/2 supportUoti Urpala2012-04-064-340/+1
| |
* | stream_cdda: print CDTEXT if availablewm42012-04-011-17/+51
| | | | | | | | | | | | | | | | | | | | The per-CD info will be printed on playback start, per-track info when a track is played. (This is not a technical restriction, and just goes along with the existing code.) The following fields are not included in output, because these are supposedly binary: CDTEXT_DISCID, CDTEXT_GENRE, CDTEXT_SIZE_INFO, CDTEXT_TOC_INFO, CDTEXT_TOC_INFO2.
* | configure, stream_cdda: remove libcdparanoia supportwm42012-04-011-59/+11
| | | | | | | | | | libcdparanoia is barely developed anymore, while libcdio is still quite active.
* | stream_cdda: reformatwm42012-04-011-359/+368
| |
* | stream_cdda: various fixesreimar2012-04-011-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix cdda speed default value, range and use more robust condition. Based on patch by Ingo Brückl [ib wupperonline de]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34458 b3059339-0415-0410-9bf9-f77b7e298cf2 Do not call paranoia_overlapset with 0, it actually causes cdparanoia to just hang. Instead use it to set/unset PARANOIA_MODE_OVERLAP. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34459 b3059339-0415-0410-9bf9-f77b7e298cf2 Fail if trying to seek beyond the last chapter, not just if it is beyond the end of the disc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34460 b3059339-0415-0410-9bf9-f77b7e298cf2 cdda: set position to an actual EOF position when we set EOF. This avoids some inconsistency like the stream indicating EOF but a read still returning more data. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34462 b3059339-0415-0410-9bf9-f77b7e298cf2 Allow PARANOIA_MODE_FULL with skipping. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34467 b3059339-0415-0410-9bf9-f77b7e298cf2 Don't call paranoia_modeset() for PARANOIA_MODE_DISABLE. cdparanoia destroys start sector information after such a call. Since it is pointless without setting a mode anyway, don't do it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34468 b3059339-0415-0410-9bf9-f77b7e298cf2 Add comment to a condition that is just a hack around a cdparanoia bug. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34472 b3059339-0415-0410-9bf9-f77b7e298cf2 Add checks for errors in stream_cdda's get_track_by_sector(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34495 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix seeking beyond EOF in stream_cdda to work with cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34577 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge remote-tracking branch 'origin/master'wm42012-04-011-2/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bstr.c bstr.h etc/input.conf input/input.c input/input.h libao2/ao_pulse.c libmpcodecs/vf_ass.c libmpcodecs/vf_vo.c libvo/gl_common.c libvo/x11_common.c mixer.c mixer.h mplayer.c
| * stream_vstream: fix vstream_error format stringUoti Urpala2012-04-011-2/+3
| | | | | | | | | | Code printing a variable already-formatted string passed it to mp_msg as the format string argument. Use "%s" instead.
* | Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-164-7/+9
|\| | | | | | | | | | | | | | | Conflicts: command.c mp_core.h mplayer.c screenshot.c
| * windows support: unicode filenameswm42012-03-093-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows uses a legacy codepage for char* / runtime functions accepting char *. Using UTF-8 as the codepage with setlocale() is explicitly forbidden. Work this around by overriding the MSVCRT functions with wrapper macros, that assume UTF-8 and use "proper" API calls like _wopen etc. to deal with unicode filenames. All code that uses standard functions that take or return filenames must now include osdep/io.h. stat() can't be overridden, because MinGW-w64 itself defines "stat" as a macro. Change code to use use mp_stat() instead. This is not perfectly clean, but still somewhat sane, and much better than littering the rest of the mplayer code with MinGW specific hacks. It's also a bit fragile, but that's actually little different from the previous situation. Also, MinGW is unlikely to ever include a nice way of dealing with this.
| * cleanup: Silence compilation warnings on MinGW-w64wm42012-03-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the code, especially the dshow and windows codec loader parts, are extremely hacky and likely full of bugs. The goal is merely getting rid of warnings that could obscure more important warnings and actual bugs, instead of fixing actual problems. This reduces the number of warnings from over 500 to almost the same as when compiling on Linux. Note that many problems stem from using the ancient wine-derived windows headers. There are some differences to the "proper" windows header. Changing the code to compile with the proper headers would be too much trouble, and it still has to work on Unix. Some of the changes might actually break compilation on legacy MinGW, but we don't support that anymore. Always use MinGW-w64, even when compiling to 32 bit. Fixes some warnings in the win32 loader code on Linux too.
* | Merge remote-tracking branch 'origin/master' into my_masterwm42012-03-0510-207/+31
|\| | | | | | | | | | | Conflicts: mplayer.c screenshot.c
| * configure, ao_alsa: drop support for obsolete ALSA versionsUoti Urpala2012-02-271-184/+0
| | | | | | | | | | Drop compatibility code for ALSA versions prior to 1.0.9. Change the configure check to use pkg-config only.
| * build: switch to libavutil bswap.h and intreadwrite.hUoti Urpala2012-02-018-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | Remove the private bswap and intreadwrite.h implementations and use libavutil headers instead. Originally these headers weren't publicly installed by libavutil at all. That already changed in 2010, but the pure C bswap version in installed headers was very inefficient. That was recently (2011-12) improved and now using the public bswap version probably shouldn't cause noticeable performance problems, at least if using a new enough compiler.
| * Update Libav API usesUoti Urpala2012-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change various code to use the latest Libav API. The libavcodec error_recognition setting has been removed and replaced with different semantics. I removed the "--lavdopts=er=<value>" option accordingly, as I don't think it's widely enough used to be worth attempting to emulate the old option semantics using the new API. A new option with the new semantics can be added later if needed. Libav dropped APIs that were necessary with all Libav versions until quite recently (like setting avctx->age), and it would thus not be possible to keep compatibility with previous Libav versions without adding workarounds. The new APIs also had some bugs/limitations in the recent Libav release 0.8, and it would not work fully (at least some avcodec options would not be set correctly). Because of those issues, this commit makes no attempt to maintain compatibility with anything but the latest Libav git head. Hopefully the required fixes and improvements will be included in a following Libav point release.
* | stream: refuse to open directorieswm42012-02-191-0/+9
|/ | | | It's pointless.
* stream_vcd: fix option value allocated with strdupUoti Urpala2012-01-161-2/+4
| | | | | | A string freed with m_struct_free() was allocated with strdup(). This would cause a crash when using vcd:// streams. Fix to use talloc_strdup().
* stream_ffmpeg: switch to libavformat avio APIUoti Urpala2012-01-021-19/+31
| | | | | | stream_ffmpeg was using the libavformat URLContext API. This API has been deprecated (for public use at least) in libavformat. Switch to the AVIOContext API.
* configure, build: require at least Libav 0.7Uoti Urpala2011-12-222-6/+0
| | | | | | | | | | | | | | | | Require versions of the Libav libraries corresponding to Libav release 0.7. These are: libavutil 51.7.0 libavcodec 53.5.0 libavformat 53.2.0 libswscale 2.0.0 libpostproc 52.0.0 Also disable the fallback to simple header check if these libraries could not be found with pkg-config; now compiling without pkg-config support for these always requires explicitly setting --enable-libav and any needed compiler/linker flags. The simple check would have let compilation proceed even if a version mismatch was detected.
* configure, build: remove --disable-libav supportUoti Urpala2011-12-112-4/+0
| | | | | Remove support for building the player without libavcodec and libavformat. These libraries are now always required.
* stream_cdda: fix incorrectly allocated option fieldUoti Urpala2011-07-301-3/+5
| | | | | | | After commit 39e373aa8d ("options: allocate dynamic options with talloc") dynamically allocated options must be allocated with talloc. stream_cdda allocated a string used with the option machinery using strdup(). Fix. Also silence a warning.
* options: change option parsing to use bstrUoti Urpala2011-07-291-1/+1
| | | | | | Using bstr allows simpler parsing code, especially because it avoids the need to modify or copy strings just to terminate extracted substrings.
* options: indicate ambiguous option parameters explicitlyUoti Urpala2011-07-291-1/+1
| | | | | | | | Command line options like "-foo xyz" are ambiguous: "xyz" may be a parameter to the option "foo" or an unrelated argument. Instead of relying on the struct m_config mode field (commandline/file) pass parameters to specify ambiguous mode explicitly. Meant for "--foo" options which are never ambiguous on command line either.
* cleanup: do libav* initialization on startupUoti Urpala2011-07-181-1/+0
| | | | | | | Do the global initialization of libavcodec and libavformat (avcodec_register_all(), av_register_all()) immediately on program startup and remove the initialization calls from various individual modules that use libavcodec/libavformat functionality.
* stream_bluray: switch to new libbluray APIRico Tzschichholz2011-07-101-7/+7
| | | | | | Switch to new libbluray API with three parameters to bd_get_title_info(). libbluray versions using the old API are no longer supported.
* cleanup: silence most of the clang warningsClément Bœsch2011-07-091-3/+4
|
* stream.c: make reconnect checks more robustreimar2011-07-061-14/+21
| | | | | | | | | | | Improve checks for when to try reconnecting to be more thorough and readable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33809 b3059339-0415-0410-9bf9-f77b7e298cf2 Reindent, add empty lines. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33810 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream.c: Pass streaming_ctrl eof on to struct stream fieldreimar2011-07-061-0/+2
| | | | | | | | Fixes a possible endless loop with HTTP files where seeking to the very end returns the full file again instead of e.g. an error. Apache/2.2.4 seems to show this behaviour. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33808 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/network: don't clobber buffer byte counts on errorreimar2011-07-061-0/+1
| | | | | | | Ensure we do not add strange values to amount of buffered bytes read on error. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33807 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/network: distinguish EOF/error in streaming control APIreimar2011-07-061-1/+2
| | | | | | Signal EOF vs. error also via streaming control API (not yet evaluated). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33806 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: don't modify argument when stream control failsreimar2011-07-061-2/+3
| | | | | | | | | | | | | | | When handling STREAM_CTRL calls for the cached stream, do not modify the return parameter if the underlying stream returns an error for the operation. Avoids issues with some places that don't check the return value of stream_control. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33802 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove condition that is now always true. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33803 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/tvi_v4l[2]: fix calculation of free RAM for buffersiive2011-07-062-16/+10
| | | | | | | | | | | | | | Do a proper calculation of free RAM to be used as V4L buffers. The code uses sysinfo to query the available RAM, however it used ancient form available in some early development 2.3.x kernels. Newer form reports the size in memory units (usually same as page size), as result the code would fall back on 2 buffers even on multi GB system. The commit does: Improve the check in configure to ensure that we do use sysinfo struct with present mem_unit. Use free RAM instead of total RAM (to avoid swapping). Tweak memory constants and simplify code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33732 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: tvi_dshow: add "static", fix printf formatdiego2011-07-061-9/+16
| | | | | | | | | | | | | tvi_dshow: Mark functions not used outside of the file as static. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33706 b3059339-0415-0410-9bf9-f77b7e298cf2 tvi_dshow: Adjust mp_msg printf conversion specifier to avoid warnings stream/tvi_dshow.c:2807: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int' stream/tvi_dshow.c:2821: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'long unsigned int' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33710 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: allow STREAM_CTRL_GET_CURRENT_TIME with cachereimar2011-07-061-3/+12
| | | | | | | | | | | | | Change code to allow STREAM_CTRL_GET_CURRENT_TIME with cache enabled. Due to that time being from what is currently read into the cache it is unfortunately somewhat inaccurate and unsmooth, however for streams that do have stream timestamps it is till a lot better than going by the demuxer alone. In particular it fixes bug #1081, when starting a DVD with -chapter following seeks would be relative to the start of the DVD instead of the current position. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33605 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: cache2.c: Fix commentreimar2011-07-061-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33600 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: stream_dvdnav.c: Remove pointless ()reimar2011-07-061-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33604 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvd: fix dvd_get_current_time()reimar2011-07-061-5/+5
| | | | | | Fix dvd_get_current_time so the cell argument actually has a purpose. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33603 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_pvr: Replace <sys/fcntl.h> include by <fcntl.h>reimar2011-07-061-1/+1
| | | | | | | | Replace sys/fcntl.h include by fcntl.h include used everywhere else. Also fixes compilation with the Android NDK. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33584 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cdda: work around libcdparanoia caching issuesreimar2011-07-061-0/+3
| | | | | | | | | | | Constrain libcdparanoia's caching which badly breaks playback with -nocache (libcdparanoia requests a huge chunk at once, then lets the disk spin down while that is being played, leading to a pause when the disk needs to spin back up after the big chunk is finished). Switching to libcdio by default which does not have this ssue might be a better long-term solution though. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33557 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream: show negative seek position value in error messagereimar2011-07-061-1/+2
| | | | | | | Make "Invalid seek to negative position" message more useful by printing the actual value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33556 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cue: Avoid probing empty filename in cue_find_bin()iive2011-07-061-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33521 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cue: fix multiple bugsreimar2011-07-061-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spelling fix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33510 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify: remove an unnecessary loop variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33511 b3059339-0415-0410-9bf9-f77b7e298cf2 Add some "const". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33512 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify NULL check. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33513 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid crash if terminating " is missing. Part of patch by Ivan Kalvachev [ikalvachev gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33514 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix 0-termination being placed one byte too far. Part of patch by Ivan Kalvachev [ikalvachev gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33515 b3059339-0415-0410-9bf9-f77b7e298cf2 Ensure 0-termination even if line does not start with FILE " Part of patch by Ivan Kalvachev [ikalvachev gmail com]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33516 b3059339-0415-0410-9bf9-f77b7e298cf2 Only accept regular files as .bin files for .cue files. In particular avoids trying to use directories as .bin when e.g. we failed to extract a filename. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33517 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a duplicated open() call that could lead to a file-descriptor leak in some cases. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33518 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid possible crash if cue filename is very short. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33519 b3059339-0415-0410-9bf9-f77b7e298cf2 Simplify by using av_strlcpy. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33520 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge branch 'mplayer1_changes'Uoti Urpala2011-06-297-14/+22
|\
| * stream.c: make some stream messages translatableib2011-06-291-6/+7
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33454 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Windows: stream_cddb.c: include <path.h> for MinGWvayne2011-06-291-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33449 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cleanup: Make vcd_seek_to_track() static in more filesreimar2011-06-294-4/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33436 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cache2.c: Avoid warnings about discarding volatilereimar2011-06-291-4/+10
| | | | | | | | | | | | | | | | | | In practice this should not really make a difference, but the code is not significantly worse and it is more correct. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33435 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33447 b3059339-0415-0410-9bf9-f77b7e298cf2
* | stream/tvi_v4l2: Add V4L2 support for OpenBSD (and NetBSD)Uoti Urpala2011-06-291-0/+4
|/ | | | Patch by Brad <brad@comstyle.com>.
* cleanup: shut up more warningsClément Bœsch2011-05-067-18/+15
|
* cleanup: remove more warningsClément Bœsch2011-05-026-7/+6
|
* Merge branch 'mplayer1_changes'Uoti Urpala2011-05-028-9/+76
|\
| * cache: call stream read with at least sector size spacereimar2011-05-011-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | Ensure we always pass a buffer of at least sector size to the read function. This is never an issue with streams that have actual sectors, as the reads will always return a multiple of sector size and the cache is always used in blocks of sector size. However the rtp protocol misuses this so it can just assume it always has a sufficiently large buffer available and thus fails without this extra hack. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33120 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream: http: Allow setting custom http headercehoyos2011-04-132-0/+9
| | | | | | | | | | | | Patch by Nikolay Nikolaev, nicknickolaev yahoo com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33082 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream_dvdnav: output ID_DVD_VOLUME_ID also for dvdnav://cehoyos2011-04-131-1/+1
| | | | | | | | | | | | Patch by Mike Castle, dalgoda+mplayer gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33081 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream_dvdnav: identify: show more title informationcehoyos2011-04-121-0/+3
| | | | | | | | | | | | | | | | | | Add ID_DVD_TITLE_x_CHAPTERS and ID_DVD_CURRENT_TITLE to the output of dvdnav:// -identify. Patch by Mike Castle, dalgoda+mplayer A gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32982 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream: try to reset stream once if read failsreimar2011-04-121-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reading from a stream fails, try one more time after a reset. This should re-establish for example timed-out network connections. Fixes bug #1841. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32954 b3059339-0415-0410-9bf9-f77b7e298cf2 100l, fix incorrect len when retrying read. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32957 b3059339-0415-0410-9bf9-f77b7e298cf2 Improve stream reset on read error, should now fix bug #1841 in more cases, e.g. also with -cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32977 b3059339-0415-0410-9bf9-f77b7e298cf2 Add ugly hack to compensate DVDNAV's ugly hacks and fix seeking. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33122 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream_dvdnav: don't skip last title for dvdnav:// -identifycehoyos2011-04-121-1/+1
| | | | | | | | | | | | Patch by Mike Castle, dalgoda+mplayer gmail git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32944 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream: Make stream_write_buffer() check for short writesranma2011-04-124-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of the calling sites to stream_write_buffer were checking the return value to see if all bytes got written (nothing in current code actually calls it any more after MEncoder was removed). This was causing (very occasionally) problems with mencoder when using output pipes AND running under a sandbox or when being straced (ptrace is the culprit). Theoretically this problem can happen without pipes or ptrace. Only stream_file, stream_smb and stream_ffmpeg implement write_buffer and ffmpeg already handles this internally. Original patch by Sang-Uok Kum. Signed-off-by: Tobias Diedrich <ranma@google.com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32881 b3059339-0415-0410-9bf9-f77b7e298cf2
* | cleanup: avoid various GCC warningsClément Bœsch2011-04-202-2/+1
| |
* | options: change -alang and -slang to use string list typeClément Bœsch2011-04-204-28/+19
| | | | | | | | | | | | | | | | | | 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.
* | stream.[ch], ass_mp: new stream function for whole-file readsUoti Urpala2011-03-032-0/+44
| | | | | | | | | | | | Add new stream_read_complete() function which reads the complete contents of file. Use that in ass_mp.c which had custom code to do the same.
* | cleanup: demuxer.[ch]: remove unused code, make functions staticUoti Urpala2011-02-221-0/+3
|/ | | | | | | 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.
* stream/url.c: escape characters >= 127 in URLsreimar2011-02-151-2/+1
| | | | | | Escape character values >= 127 in URLs as required by the RFC. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32833 b3059339-0415-0410-9bf9-f77b7e298cf2
* terminal output: show cache fill changes in "PAUSED" messagereimar2011-02-152-5/+9
| | | | | | | | | | | Convert cache_fill_status into a function so we always get the latest state, not whatever it was after the last read. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32818 b3059339-0415-0410-9bf9-f77b7e298cf2 Update PAUSED status line with cache fill status if it changed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32819 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix compilation with old FFmpeg versionsUoti Urpala2011-02-082-0/+11
| | | | | | | | | | | | 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
* cache: suggest increasing cache size in the "not filling!" messagereimar2011-01-311-1/+1
| | | | | | | Change "cache not filling" warning to include a hint to increase the cache size. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32815 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/http: assume MakeMKV webservers always support rangesreimar2011-01-311-2/+6
| | | | | | | | | | | Add MakeMKV to list of webservers always supporting ranges even when they claim otherwise. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32785 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix hack to check for MakeMKV server being inverted. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32807 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/tvi_v4l2.c: simplify by using getfps helper functionreimar2011-01-311-9/+2
| | | | | | | Use getfps helper function everywhere, simplifies code and avoids a possible division by 0. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32755 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: Replace two malloc+memset with calloc.cboesch2011-01-292-6/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32723 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/http: support 307 (Temporary Redirect) responsescboesch2011-01-291-0/+2
| | | | | | Patch by chocolateboy (chocolateboy from cpan org) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32717 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge branch 'sub'Uoti Urpala2011-01-261-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * sub/OSD: move some related files to sub/Uoti Urpala2011-01-261-1/+1
| |
* | cleanup: remove unused MEncoder-related codeClément Bœsch2011-01-251-1/+0
|/ | | | | Remove some code and variables that were no longer used after MEncoder removal. Also remove some MEncoder references in comments.
* stream.h: check against huge negative values in stream_seek()reimar2010-12-161-0/+4
| | | | | | | | Add validity check for stream_seek argument to avoid a integer overflow for huge negative values that would break the internal state of the stream buffer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32702 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/http: Add support for login/password in http_proxy env variablecboesch2010-12-163-3/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32673 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/: delete base64_encode(), use libavutil av_base64_encode()cboesch2010-12-163-74/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32672 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/network.c, stream/http.c: cleanupcboesch2010-12-162-13/+4
| | | | | | | | | | | | | | | | | | Simplify mime_type_table loop git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32644 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove dead define git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32645 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove GCC warning hack not needed anymore git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32646 b3059339-0415-0410-9bf9-f77b7e298cf2 Use calloc instead of malloc+memset. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32647 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/http: Do not keep authentication in URL when proxiedcboesch2010-12-163-2/+24
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32640 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/http: Add Proxy-Authorization header to authenticate on proxiescboesch2010-12-163-4/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32634 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/http: don't use proxy values for "Authorization" headercboesch2010-12-161-1/+1
| | | | | | | "Authorization" header is for the destination server URL, even through a proxy. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32633 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: remove NULL checks before free() all over the codecboesch2010-11-147-35/+23
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/url.c: Unescape username/password when parsing URLsreimar2010-11-141-1/+4
| | | | | | | This makes MPlayer handle it the same way as curl, and it also is the only method that works with http_proxy://...http://user:password@... git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32621 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: read up to 64 KiB at once from stream_filereimar2010-11-143-1/+7
| | | | | | | | | Make the file protocol read up to 64 KiB at once when the cache is used, assuming that files will generally be readable with high bandwidth. This should improve performance when playing e.g. from high-latency network shares. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32616 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/network.c: Replace hardcoded str size with sizeofcboesch2010-11-141-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32603 b3059339-0415-0410-9bf9-f77b7e298cf2
* options: move some demux options to option structClément Bœsch2010-11-111-1/+0
| | | | | Following options were moved: audiofile, audiofile-cache, subfile, demuxer, audio-demuxer, sub-demuxer, [no]extbased.
* cleanup: don't check for NULL before free()diego2010-11-0817-127/+78
| | | | | | patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvd: fill_buffer(): use given buffer, not stream's defaultreimar2010-11-081-2/+5
| | | | | | | | | Fix dvd:// fill_buffer function to actually write into the specified buffer and check that the buffer is sufficiently large. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32591 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32592 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvd: minor cleanupreimar2010-11-081-7/+4
| | | | | | | | | | | | | | Remove a pointless and stupid condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32588 b3059339-0415-0410-9bf9-f77b7e298cf2 Change code to something understandable (but equivalent). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32589 b3059339-0415-0410-9bf9-f77b7e298cf2 100l, add missing return. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32590 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache, stream: avoid extra memcpy when using cachereimar2010-11-073-38/+59
| | | | | | | | | | Add a stream_read_internal() function that reads directly into a given buffer instead of the stream's internal one. Use this to read directly into cache memory, avoiding a memcpy(). This requires also adding a stream_seek_internal() as the normal seek function reads into the stream's buffer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32559 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: cache2.c: Remove some irrelevant commented-out codereimar2010-11-071-8/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32555 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvd: millisecond accuracy for chapters in -identify outputcigaes2010-11-071-3/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32539 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a simple capture feature (-capture)Uoti Urpala2010-11-023-0/+22
| | | | | | | | | | | | | | | | | If a specified key is pressed during playback, the current stream is captured to a file, similar to what -dumpstream achieves. original patch by Pásztor Szilárd, don tricon hu Taken from the following svn commits, but with several fixes and modifications (one obvious user-visible difference is that the default key binding is 'C', not 'c'): git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32524 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32529 b3059339-0415-0410-9bf9-f77b7e298cf2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32530 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_network: Fix possible crash for invalid http_proxy URLsreimar2010-11-021-0/+4
| | | | | | Check for URLs like just "http_proxy://". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32508 b3059339-0415-0410-9bf9-f77b7e298cf2
* rtsp_rtp.c: Add missing avstring include for av_strlcpyreimar2010-11-021-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32496 b3059339-0415-0410-9bf9-f77b7e298cf2
* rtsp_rtp.c: Replace snprintf by av_strlcpyreimar2010-11-021-1/+1
| | | | | | Patch by Frédéric Marchal [fmarchal perso be]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32487 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove #warning preprocessor directivesdiego2010-11-021-1/+0
| | | | | | | | The #warning preprocessor directive is non-standard and not available with all compilers. Furthermore, the warnings it causes are noisy and have not led to getting any of the underlying issues fixed in the space of a decade. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32480 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove remaining %lf printf conversionsreimar2010-11-022-5/+5
| | | | | | Most cases are just code in comments. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32438 b3059339-0415-0410-9bf9-f77b7e298cf2
* build: enable/disable all FFmpeg libraries togetherUoti Urpala2010-11-022-2/+2
| | | | | | | | | 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
* stream/tv: move new_handle() function from header to tv.cdiego2010-11-028-29/+31
| | | | | | | Move TV input new_handle static function to tv.c and make it non-static. There is no need to duplicate the function in the binary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32225 b3059339-0415-0410-9bf9-f77b7e298cf2
* tvi_def.h: sizeof(type) -> sizeof(*ptr)diego2010-11-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32224 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove vim/emacs coding style hints from sourcesdiego2010-11-021-4/+0
| | | | | | The hints are inconsistent and pointless if only present in a few files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32223 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleanup: malloc+memset->calloc, sizeof(TYPE)->sizeof(*ptr)reimar2010-11-022-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32181 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32182 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32183 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace some sizeof(type) by sizeof(*pointer) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32184 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32186 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32187 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32188 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizoef(type) by sizeof(*ptrvar). Besides being consistent with FFmpeg style, this reduces the size of a patch to rename these types to not conflict with the windows.h definitions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32189 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32191 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32192 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(type) by sizeof(*ptrvar) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32193 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a useless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32194 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(type) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32195 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove a useless cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32196 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace several sizeof(WAVEFORMATEX) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32197 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace one more instance of sizeof(WAVEFORMATEX); fix compilation. patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32199 b3059339-0415-0410-9bf9-f77b7e298cf2 Avoid some pointless uses of sizeof() and one related cast. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32200 b3059339-0415-0410-9bf9-f77b7e298cf2 Merge one malloc() + memset() invocation into calloc(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32202 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32203 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(WAVEFORMATEX) occurrences. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32205 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace malloc+memset by calloc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32206 b3059339-0415-0410-9bf9-f77b7e298cf2 Replace sizeof(BITMAPINFOHEADER) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32207 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/tv: move free_handle() from header to tv.cdiego2010-11-026-18/+20
| | | | | | | Move TV input free_handle static function to tv.c and make it non-static. There is no need to duplicate the function in the binary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32174 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: Remove unused cache_stats functiondiego2010-11-021-10/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32121 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: Move cache_fill_status extern declaration to cache2.hdiego2010-11-021-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32120 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/http.c: Move mime_type_table extern declaration to network.hdiego2010-11-022-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32108 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream: make stream_read_line() terminate line on EOFreimar2010-11-021-1/+1
| | | | | | | Make sure we return an "empty" line on eof, to make sure we get no buffer overflows in case some code fails to check the return value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31999 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_file: Simplify and document MinGW stdin hackreimar2010-11-021-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31964 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvd[nav]: Add const qualifiers to string argumentsreimar2010-11-024-8/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31957 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify code: make open_stream() accept NULL file_format argumentreimar2010-11-021-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31952 b3059339-0415-0410-9bf9-f77b7e298cf2
* printf format fixes ("%d" -> "%zd")diego2010-11-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Add 'z' length modifier to %d printf format specifier for size_t argument. stream/http.c:675: warning: format '%d' expects type 'int', but argument 4 has type 'size_t' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31933 b3059339-0415-0410-9bf9-f77b7e298cf2 Add 'z' length modifier to %d printf format specifiers for size_t arguments. libmpdemux/demux_avi.c:553: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t' libmpdemux/demux_avi.c:553: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31935 b3059339-0415-0410-9bf9-f77b7e298cf2 Add 'z' length modifier to %d printf format specifiers for size_t arguments. libmpdemux/demux_lmlm4.c:75: warning: format '%d' expects type 'int', but argument 5 has type 'ssize_t' libmpdemux/demux_lmlm4.c:163: warning: format '%d' expects type 'int', but argument 6 has type 'ssize_t' libmpdemux/demux_lmlm4.c:163: warning: format '%d' expects type 'int', but argument 7 has type 'ssize_t' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31937 b3059339-0415-0410-9bf9-f77b7e298cf2 Add 'z' length modifier to %d printf format specifier for size_t argument. stream/asf_streaming.c:676: warning: format '%d' expects type 'int', but argument 5 has type 'size_t' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31938 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: add sanity-check for sector sizereimar2010-11-022-2/+9
| | | | | | | Add sanity-check for sector size to avoid strange crashes if it is too large. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31914 b3059339-0415-0410-9bf9-f77b7e298cf2
* spelling fixessiretart2010-11-025-9/+9
| | | | | | | | | | Found by the Debian QA tool 'lintian' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31913 b3059339-0415-0410-9bf9-f77b7e298cf2 reintroduce typo in genres.h that was fixed fixed r31913 to match the id3v2 spec git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31920 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: Don't mess up current position if time-based seek failsreimar2010-11-021-1/+2
| | | | | | | | Avoid STREAM_CTRL_SEEK_TO_TIME messing up the current position for stream types which do not support it. Fixes seeking in local flv files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31907 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvd: Improve seeking by positiondiego2010-11-021-15/+8
| | | | | | | | | The current code takes the angle into account. This is a mistake since the position is independent of the angle. patch by Olivier Rolland, billl users.sourceforge net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31895 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvd: Improve seeking by chaptersdiego2010-11-021-5/+12
| | | | | | | | | | | The current code seeks to the start of the chapter. From this position, it then tries to figure out the starting cell. This is completely suboptimal and error prone since the starting cell can be directly deduced from the chapter. patch by Olivier Rolland, billl users.sourceforge net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31894 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvd: fix incorrect assumption about chapter countdiego2010-11-021-10/+38
| | | | | | | | | Fix the incorrect assumption that the number of chapters of a DVD title is equal to the number of cells. patch by Olivier Rolland, billl users.sourceforge net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31893 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_dvb.c: avoid compiler warning by adding initializationdiego2010-11-021-0/+1
| | | | | | | | Initialize conf_file variable to kill the warning: stream/stream_dvb.c:755: warning: 'conf_file' may be used uninitialized in this function Blessed and suggested by Nico Sabbi. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31877 b3059339-0415-0410-9bf9-f77b7e298cf2
* configure: Rename "network" variable and option to "networking"diego2010-11-022-6/+6
| | | | | | This avoids conflicts with the FFmpeg variable of the same name. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31749 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache: Use sigaction() instead of signal()reimar2010-11-021-3/+6
| | | | | | | | | | | Signal() has an unavoidable race-condition on "broken by backwards-compatibility" systems like Solaris. (Upon receiving a signal, the handler is reset to SIG_DFL, thus a second signal will kill the process. The problem could also be reduced by re-installing the handler inside the handler, but there's still a race-condition and the risk of the handler being called inside the handler). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31738 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream.c: add <libavutil/common.h> include needed for GET_UTF16reimar2010-11-021-0/+2
| | | | | | Patch by Erik Auerswald {auerswal unix-ag.uni-kl.de} git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31658 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_bluray: implement slave mode compatible controlsben2010-11-021-6/+119
| | | | | | Added stream controls: get/set for chapters and angles. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31640 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_bluray: add unencrypted Blu-ray playbackben2010-11-023-0/+244
| | | | | | | Support for unencrypted Blu-ray playback through libbluray. Use it through: mplayer br:////path/to/disc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31631 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factorize MPlayer/MEncoder version string handling.diego2010-11-022-10/+6
| | | | | | | 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
* stream: Use MSG_NOSIGNAL flag if available for send().reimar2010-11-027-8/+15
| | | | | | | | This avoids MPlayer quitting due to SIGPIPE at least for these cases. Ignoring SIGPIPE in general would break window-closing with some window-managers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31566 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/dvbin.h: Use angular brackets for system #includes.diego2010-11-021-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31516 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cddb: move structs to the file they're used indiego2010-11-022-18/+18
| | | | | | Move cddb_data_t and cd_toc_t structs to the only place they are used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31514 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cdda: change printf format for cdda_tracks to %ddiego2010-11-021-1/+1
| | | | | | | Adjust printf length modifier, fixes the warning: stream/stream_cdda.c:358: warning: format '%ld' expects type 'long int', but argument 4 has type 'int' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31512 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cdda.c: Reorder functions to avoid forward declarations.diego2010-11-021-110/+106
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31511 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cdd*: Move declarations for stream_cddb.c functions to cdd.hdiego2010-11-022-4/+4
| | | | | | This fixes a bunch of warnings about missing function prototypes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31509 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_cddb: Remove unused static functionsdiego2010-11-021-31/+0
| | | | | | | | | | | Remove unused static function cddb_get_freedb_sites(), fixes the warning: stream/stream_cddb.c:747: warning: 'cddb_get_freedb_sites' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31508 b3059339-0415-0410-9bf9-f77b7e298cf2 Remove unused static function cddb_freedb_sites_parse(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31510 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_ccda: Move cdda_priv structure to the only place it is useddiego2010-11-022-23/+21
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31506 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream/tcp.c: Prefer the use of inet_ntop over inet_ntoaattila2010-11-021-3/+3
| | | | | | | inet_ntop is ipv6 safe. This fixes bug #1491. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31498 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream.h: support backswards stream_skip() within bufferreimar2010-11-021-1/+1
| | | | | | | Never just ignore a backwards skip, even if the stream is not seekable it might still be in a buffer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31465 b3059339-0415-0410-9bf9-f77b7e298cf2
* tv.h: Change function pointer types to proper declarationsreimar2010-11-026-13/+16
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31388 b3059339-0415-0410-9bf9-f77b7e298cf2 Note that the code is still questionable after this commit - the shared data structure has pointers to "struct priv", but different files use different incompatible definitions for that struct.
* cache: Respect -cache-seek-min also for on-disk filesreimar2010-11-021-3/+5
| | | | | | | Should reduce issues with mp4/mov (playing those may involve a lot of seeking inside the file). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31371 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge svn changes up to r31291Uoti Urpala2010-06-021-0/+18
|\
| * Add a referrer option to set the HTTP Referer field.reimar2010-05-301-0/+18
| | | | | | | | | | | | | | Patch by chocolateboy [chocolate cpan org] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31288 b3059339-0415-0410-9bf9-f77b7e298cf2
| * misc cosmetics: K&R style nits, #include placement, indentationdiego2010-05-291-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31263 b3059339-0415-0410-9bf9-f77b7e298cf2
* | stream_radio.c: fix corrupt line from e3061749Uoti Urpala2010-06-021-1/+1
| |
* | Merge svn changes up to r31256Uoti Urpala2010-05-303-6/+38
|\|
| * Fix typo in message.reimar2010-05-281-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31256 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream_check_interrupt should sleep even if no callback is set.reimar2010-05-281-1/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31255 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 100l, stream_check_for_interrupt argument is not in usec,reimar2010-05-281-3/+3
| | | | | | | | | | | | | | so we would end up sleeping for 10s instead of 10ms. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31254 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Document time scale for stream_check_interrupt argument.reimar2010-05-281-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31253 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Improve handling of cache process/thread hanging/being killed.reimar2010-05-281-3/+23
| | | | | | | | | | | | | | In particular allow a single STRG+C to quit MPlayer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31251 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix cache process accidentally being killed by SIGUSR1.reimar2010-05-281-0/+7
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31250 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31244Uoti Urpala2010-05-301-6/+6
|\|
| * Fix a bunch of typos in the stream cache code.diego2010-05-271-6/+6
| | | | | | | | | | | | | | patch by Giorgio Vazzana, mywing81 gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31242 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Drop pointless _st suffix from 'struct stream'.diego2010-05-276-29/+29
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31237 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31226Uoti Urpala2010-05-302-4/+15
|\|
| * Retry reading even if we hit eof before.reimar2010-05-262-3/+6
| | | | | | | | | | | | | | This allows playing growing files even with a large cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31226 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Re-enable wakeup-on-signal for cache process.reimar2010-05-261-5/+10
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31224 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Disable waking the cache process up via a signal, itreimar2010-05-261-1/+4
| | | | | | | | | | | | | | currently causes read errors due to not handling EINTR. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31223 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add support for STREAM_CTRL_SEEK_TO_TIME in ffmpeg streamshyc2010-05-251-1/+10
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31218 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31211Uoti Urpala2010-05-301-45/+78
|\| | | | | | | | | The merged cache2.c changes are known to have problems. Will merge further fixes to them before merging this to the master branch.
| * Slightly reduce number of #ifsreimar2010-05-231-22/+20
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31204 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use an extra define to simplify ifdefsreimar2010-05-231-14/+20
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31203 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Try reducing the #ifdef mess for the different cache variants.reimar2010-05-231-15/+13
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31202 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Extract the cache main loop into a separate function.reimar2010-05-231-14/+19
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31201 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Optimize cache behaviour for the many-consecutive-seeks case.reimar2010-05-231-1/+13
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31199 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add code to wake up cache process when e.g. a seek is needed.reimar2010-05-231-0/+14
| | | | | | | | | | | | | | | | Dramatically reduces seeking times with lavf ogg demuxer. Needs a spearate implementation for the thread-based cache implementation. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31198 b3059339-0415-0410-9bf9-f77b7e298cf2
* | cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"Uoti Urpala2010-05-293-7/+13
| | | | | | | | | | | | | | Change 'struct vf_instance' pointer arguments to more standard style as in the subject. Also some other minor formatting fixes. Patch by Diego Biurrun.
* | stream.h: remove bad EOF check in stream_seek()Uoti Urpala2010-05-221-2/+0
| | | | | | | | Also remove a redundant stream->eof = 0 in demuxer.c.
* | Merge svn changes up to r31033Uoti Urpala2010-04-267-3/+26
|\|
| * Do not print the "Loading cookie file" message twice.reimar2010-04-051-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31024 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Try to fix VCD compilation on non-Linux systems.reimar2010-04-056-1/+26
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31023 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31020Uoti Urpala2010-04-261-0/+35
|\|
| * Export VCD tracks as chapters, just like for cue:// URLs.reimar2010-04-051-0/+35
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31019 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r31004Uoti Urpala2010-04-262-3/+6
|\|
| * Remove commented-out #include of a non-existing file.diego2010-04-031-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30992 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change type to uint8_t to avoid checks depending on char signedness.reimar2010-04-021-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30983 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Sanitize ICY metadata a bit before printing it.reimar2010-03-311-0/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30980 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30967Uoti Urpala2010-04-262-2/+5
|\|
| * Make http_read_response fail if parsing the response failed.reimar2010-03-231-1/+4
| | | | | | | | | | | | | | | | Avoids possible crashes since other code assumes http_hdr->protocol is a valid string if it succeeds. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30951 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename get_path.[ch] --> path.[ch].diego2010-03-201-1/+1
| | | | | | | | | | | | | | These files now contain different functions related to path handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30943 b3059339-0415-0410-9bf9-f77b7e298cf2
* | options: move -chapter values to option structUoti Urpala2010-04-255-45/+3
| | | | | | | | | | | | | | | | | | | | | | -chapter can optionally take a range with a start and an end. Add a new option type which supports such values and use that instead of a custom per-option function. This commit also fixes a build configuration bug: before the availability of the -chapter option depended on DVD functionality being enabled in the binary, even though the option works with other sources too.
* | demux_lavf, stream_ffmpeg: support librtmp seeksUoti Urpala2010-04-231-1/+10
| |
* | stream_ffmpeg, demux_lavf: Use flv demuxer for rtmp streamsUoti Urpala2010-04-232-0/+8
| | | | | | | | | | | | | | | | | | | | Use lavf's flv demuxer for rtmp/rtmps/... stream types. Letting generic format probing handle this could work, but with the current probing implementation it'd at least depend on not-really-guaranteed details of the stream layer (probing different formats and then decoding depends on seeking back in between; rtmp streams don't support such seeking directly so would need to rely on details of caching behavior).
* | stream_ffmpeg.c: change reads back to url_read_complete()Uoti Urpala2010-04-231-1/+1
| | | | | | | | | | | | | | | | Change reading data from FFmpeg from url_read() back to url_read_complete(). url_read_complete() behavior has changed in FFmpeg and no longer returns an error for partial reads at EOF so it's usable now. Using it is probably not significantly better than url_read(), but at least it handles EAGAIN.
* | Delete things related to old translation systemUoti Urpala2010-03-1034-35/+0
| | | | | | | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* | Merge svn changes up to r30876Uoti Urpala2010-03-104-10/+5
|\|
| * Define O_BINARY in stream/stream.h unless it is defined yet, and use itkomh2010-03-064-10/+5
| | | | | | | | | | | | | | | | | | | | | | in other places. This removes platform specific checks and prevents repeated definitions of O_BINARY. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30850 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30848Uoti Urpala2010-03-106-324/+263
|\|
| * Define HAVE_SETMODE conditionally, and use it in stream/stream_file.c insteadkomh2010-03-041-4/+4
| | | | | | | | | | | | | | | | of platform specific predefined macros. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30829 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add a VCD support for OS/2komh2010-03-032-0/+254
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30819 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Drop support for old-style DVB code.diego2010-03-023-320/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30818 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30815Uoti Urpala2010-03-103-102/+217
|\|
| * Remove unused and useless define.reimar2010-03-011-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30815 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix memleak due to strdup'd filename not being freed.reimar2010-03-011-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30814 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move functions into proper order to avoid extra declarations.reimar2010-03-011-15/+12
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30813 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Deduplicate code to set stream start_pos/end_pos.reimar2010-03-011-12/+15
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30812 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Set stream->pos correctly after seeking to a VCD title.reimar2010-03-011-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30811 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Ensure that cue_current_pos.track is not set to an invalid value afterreimar2010-03-011-8/+5
| | | | | | | | | | | | | | attempting to seek to e.g. track 0. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30810 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix off-by-one error in chapter<->VCD track conversion.reimar2010-03-011-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30809 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix cue_read_toc_entry to also reject negative track numbersreimar2010-03-011-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30808 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Implement cue:// track switching via chapter forward/backward like for audio ↵reimar2010-03-011-0/+28
| | | | | | | | | | | | CDs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30807 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix cue_vcd_get_track_end to not change the current position.reimar2010-03-011-4/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30806 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid fd_bin and fd_cue global variables.reimar2010-03-011-9/+9
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30805 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid a global variable and a strcpy.reimar2010-03-011-6/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30804 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Reindent.reimar2010-03-011-19/+19
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30803 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid code duplication and excessively deep nesting in cue_find_binreimar2010-03-011-37/+32
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30802 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use sizeof instead of hardcoded size.reimar2010-03-011-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30801 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Extend stream_read_line to support reading lines from UTF-16 encoded filesreimar2010-02-282-6/+102
| | | | | | | | | | | | | | and use this to support reading UTF-16 encoded subtitle files in subreader.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30799 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30798Uoti Urpala2010-03-109-104/+114
|\|
| * Move stream_read_line implementation from stream.h to stream.c,reimar2010-02-282-26/+27
| | | | | | | | | | | | | | | | it is not speed critical and the function call overhead is not relevant for its overall speed anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30796 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Simplify handling of 0-termination in stream_read_linereimar2010-02-281-3/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30795 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove useless cast.reimar2010-02-281-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30794 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add cddb:// support for OS/2komh2010-02-281-0/+74
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30788 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix warning "missing braces around initializer".cehoyos2010-02-271-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30782 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused functions.cehoyos2010-02-271-60/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30781 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix cd_info_new() prototype.cehoyos2010-02-271-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30775 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Threaded cache fixes: do not free the stream_t struct twice on windowsreimar2010-02-271-8/+6
| | | | | | | | | | | | | | | | and make sure the cache thread quits also for streams without a control function (e.g. http). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30773 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused static function streaming_stop().cehoyos2010-02-271-6/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30765 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Restructure #ifs to be clearer, also ensures that we return from the threadreimar2010-02-271-3/+3
| | | | | | | | | | | | | | proc instead of calling exit() on __MINGW32__. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30754 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30748Uoti Urpala2010-03-108-47/+47
|\|
| * Do not cast the results of malloc/calloc/realloc.diego2010-02-264-18/+16
| | | | | | | | | | | | | | | | These functions return void*, which is compatible with any pointer, so there is no need for casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Mark stream open filename parameter as const, the filename string is notreimar2010-02-253-7/+7
| | | | | | | | | | | | | | modified by these functions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30739 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused function declaration.reimar2010-02-251-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30736 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make local-only cddb functions static.reimar2010-02-251-19/+19
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30735 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove declarations of functions now already declared in stream.hreimar2010-02-251-3/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30733 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30732Uoti Urpala2010-03-105-13/+13
|\|
| * Define O_BINARY if it is undefined.komh2010-02-251-5/+5
| | | | | | | | | | | | | | | | This removes a platform check for open(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30727 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Mark vcd_get_track_end () and vcd_read_toc() as static.diego2010-02-224-8/+8
| | | | | | | | | | | | | | They are only used within the respective files. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30712 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30702Uoti Urpala2010-03-103-29/+30
|\|
| * Declare functions from network.c in network.h.diego2010-02-223-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30698 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move struct streaming_control from network.h to stream.h, where it is used.diego2010-02-222-22/+24
| | | | | | | | | | | | | | This will help in declaring some public functions where they really belong. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30697 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove commented-out declaration of non-existing function streaming_start.diego2010-02-221-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30696 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30694Uoti Urpala2010-03-106-138/+187
|\|
| * Declare stream_fill_buffer() and stream_seek_long() unconditionally.diego2010-02-211-2/+3
| | | | | | | | | | | | | | | | They are public functions that are unconditionally compiled, so they should not be declared conditionally. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30691 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add header for asf_mmst_streaming_start() instead of forward declaring it.diego2010-02-213-3/+28
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30690 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add header for exported DVB-related functions.diego2010-02-212-0/+38
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30688 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: Move functions around to avoid forward declarations and #ifdefs.diego2010-02-211-134/+119
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30687 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: Remove pointless empty lines at EOF.diego2010-02-205-5/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30675 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30672Uoti Urpala2010-03-105-741/+780
|\|
| * cosmetics: K&R coding style, indent with 4 spaces, no tabsdiego2010-02-201-733/+776
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30671 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Print response headers as debugging output also for HTTP seeks.reimar2010-02-201-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30670 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 10l, fix a close() that should be a closesocket()reimar2010-02-201-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30669 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Do not discard stream buffer on eof, instead reuse it to slightly improvereimar2010-02-202-4/+6
| | | | | | | | | | | | | | format autodetection with -nocache and non-seekable streams. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30668 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace misuse of stream_reset to set stream pos to 0 by more appropriate code.reimar2010-02-201-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30667 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30663Uoti Urpala2010-03-107-9/+17
|\| | | | | | | | | | | | | Conflicts: gui/cfg.c libmpcodecs/vd_dmo.c mplayer.c
| * Fix mov reference files: for video/quicktime mime do not force a demuxerreimar2010-02-201-1/+5
| | | | | | | | | | | | | | | | but do autodetection. This tries lavf first but will also try native demuxer for reference files where open fails for the lavf demuxer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30663 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make sure we do not try to use IPv6 with winsock2, we end up connectingreimar2010-02-201-0/+8
| | | | | | | | | | | | | | to random addresses, causing huge delays. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30661 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add dvd_parse_chapter_range() to stream_dvd.h instead of forward declaring it.diego2010-02-191-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30657 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add missing 'defined' for __bsdi__.komh2010-02-191-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30655 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove pointless '#if 1' preprocessor directives.diego2010-02-191-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30654 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace platform preprocessor check by HAVE_DOS_PATHS.komh2010-02-191-1/+1
| | | | | | | | | | | | | | This is both more elegant and more portable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30650 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove useless CONFIG_SETLOCALEkomh2010-02-191-4/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30649 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream: Mark functions not used outside of their files as static.diego2010-02-165-11/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30599 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30529Uoti Urpala2010-03-091-4/+5
|\|
| * Prefer libavformat over our own mov demuxer also for video/quicktimereimar2010-02-051-4/+5
| | | | | | | | | | | | | | mime-type. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30517 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30502Uoti Urpala2010-03-092-8/+12
|\| | | | | | | | | | | | | | | Conflicts: libswscale/rgb2rgb.c libswscale/rgb2rgb.h libswscale/swscale.c libvo/x11_common.c
| * Reindentreimar2010-02-031-4/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30499 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add support for FFmpeg's rtsp dummy URL-with-pseudo-demuxer scheme.reimar2010-02-031-3/+7
| | | | | | | | | | | | | | ffmpeg://rtsp://... will play a rtsp stream via FFmpeg. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30498 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix argument order for lseek, fixes cookie loading in Windows and in generalreimar2010-02-031-1/+1
| | | | | | | | | | | | | | everywhere where SEEK_SET != 0. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30496 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30475Uoti Urpala2010-03-0955-66/+995
|\|
| * Add license header to all files missing it in the stream subdirectory.diego2010-01-3054-62/+980
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30468 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream/rtp.h appears not to originate from dvbstream.diego2010-01-301-4/+15
| | | | | | | | | | | | | | In any case it is completely trivial and non-copyrightable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30465 b3059339-0415-0410-9bf9-f77b7e298cf2
* | translations: tweak cases that relied on concatenating adjacent stringsUoti Urpala2010-03-072-3/+6
| | | | | | | | | | | | | | | | Tweak some code parts that used to rely on string literals from translation macros being concatenated with other adjacent string literals. Break up the resulting string into independently translated parts, so that the existing translations for those parts can still be used.
* | Restore collapsed whitespace in output messagesUoti Urpala2010-03-073-4/+4
| | | | | | | | | | | | | | | | | | For some reason commit e306174952d42e1cd6cc5efc50ae6bb0410501bc, which replaced translation macro names with the corresponding English strings, also collapsed multiple consecutive space characters into one. Change most of these back. In a couple of cases the amount of whitespace is important for alignment, and for the rest it at least keeps the strings closer to the existing translations.
* | Merge svn changes up to r30419Uoti Urpala2010-01-254-17/+42
|\|
| * Fix ftp support to properly support large files > 2GB.reimar2010-01-241-3/+4
| | | | | | | | | | | | | | Patch by Yuriy Kaminskiy [yumkam mail ru] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30418 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Always call cache_uninit to immediately free everything cache-related if wereimar2010-01-231-3/+10
| | | | | | | | | | | | | | fail to enable the cache. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30404 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Call cache-uninit unconditionally, it should always be safe to call.reimar2010-01-231-2/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30403 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change code to allow playing a stream even if enabling the cache failedreimar2010-01-231-2/+5
| | | | | | | | | | | | | | while still handling it when the user aborts the cache fill. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30402 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make cache_init static, it is not used outside this filereimar2010-01-231-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30401 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Handle Content-Length also when Content-Type is not set.reimar2010-01-231-5/+6
| | | | | | | | | | | | | | Based on patch by Yuriy Kaminskiy [yumkam mail ru] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30399 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use atoll to parse Content-Length to support http for files > 2GB.reimar2010-01-231-1/+1
| | | | | | | | | | | | | | Patch by Yuriy Kaminskiy [yumkam mail ru]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30398 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add an exit() to silence a gcc warning and ensure forked code will neverreimar2010-01-231-0/+2
| | | | | | | | | | | | | | leave the cache-loop function. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30397 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 100l, shouldn't write to memory after freeing it.reimar2010-01-231-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30396 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Reindent.reimar2010-01-231-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30395 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Zero freed pointers.reimar2010-01-231-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30394 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Check for fork failing and make sure cache_uninit always frees the cache datareimar2010-01-231-1/+10
| | | | | | | | | | | | | | even if fork failed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30393 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30375Uoti Urpala2010-01-251-38/+79
|\|
| * Add hack to fix tvi_dshow compilation with 64-bit MinGWreimar2010-01-171-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30347 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change GUID declarations in tvi_dshow so they are not exported and thusreimar2010-01-171-38/+76
| | | | | | | | | | | | | | will not cause clashes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30342 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30301Uoti Urpala2010-01-251-1/+0
|\|
| * Add support for distinguishing between little- and big-endian SPDIF AC3reimar2010-01-111-1/+0
| | | | | | | | | | | | | | and converting between both. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30283 b3059339-0415-0410-9bf9-f77b7e298cf2
* | stream: improve EOF handling in seeksUoti Urpala2010-01-182-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Reset stream 'eof' flag when a seek succeeds, and allow seeking to a position at or past EOF (in the sense that the seek succeeds and stream_tell() then returns that position). This fixes at least some demuxer problems where an attempt to read the index from the end of an incomplete file would set the 'eof' flag and cause subsequent reads to fail, even if failure to read the index would otherwise be nonfatal and demuxing could continue after seeking back. Partially based on a patch from Laurent <laurent.aml@gmail.com>.
* | Merge svn changes up to r30236Uoti Urpala2010-01-081-30/+4
|\|
| * Support rtmp:// URLs directly instead of requiring ffmpeg://rtmp://reimar2010-01-061-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30232 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Simplify ffmpeg stream support, we (so far) do not need any special option ↵reimar2010-01-061-29/+3
| | | | | | | | | | | | parsing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30231 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30216Uoti Urpala2010-01-088-0/+14
|\|
| * Add a few missing header #includes and #defines.diego2010-01-048-0/+14
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30207 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30195Uoti Urpala2010-01-083-4/+4
|\|
| * Disambiguate HEADER_SIZE definition in stream/librtsp and stream/realrtsp.diego2010-01-043-4/+4
| | | | | | | | | | | | | | | | | | This fixes the warning: In file included from stream/realrtsp/real.c:35: stream/realrtsp/real.h:36:1: warning: "HEADER_SIZE" redefined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30194 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30173Uoti Urpala2010-01-082-0/+21
|\|
| * Several hacks to fix compilation of tvi_dshow on MinGW64.reimar2010-01-022-0/+21
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30169 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30165Uoti Urpala2010-01-081-2/+5
|\|
| * Make code slightly more readable.reimar2009-12-311-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30148 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix crash if http reply contains neither "Accept-Ranges" nor "Server" fields.reimar2009-12-311-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30147 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add a hack for broken youtube servers not returning Accept-Ranges.reimar2009-12-301-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30145 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30055Uoti Urpala2009-12-181-1/+1
|\|
| * 100l, fix check for V4L2 capture capability flag.reimar2009-12-111-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29991 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Fix printf format strings with invalid '%lf' conversionUoti Urpala2009-12-151-2/+2
| | | | | | | | | | | | | | Some code used an invalid '%lf' conversion specification for double arguments. Maybe they were written that way due to confusion with scanf where doubles are indicated by '%lf'; however it is not a valid printf format specifier. Change those cases to use '%f'.
* | Merge svn changes up to r29971Uoti Urpala2009-11-291-0/+1
|\|
| * mime type [video/x-ms-wmv] is not an ASF redirector.compn2009-11-261-0/+1
| | | | | | | | | | | | | | patch by KO Myung-Hun komh!chollian!net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29965 b3059339-0415-0410-9bf9-f77b7e298cf2
* | stream_ffmpeg: Fix reads near EOFUoti Urpala2009-11-231-1/+1
| | | | | | | | | | | | | | | | | | | | stream_ffmpeg used libavformat's url_read_complete() to read data. However that function returns failure if it did not manage to read the _full_ amount of data asked for, while the behavior we want is to return any positive amount of data there was before end of file. This caused attempts to read the last bytes in a file to fail. Fix by using url_read() instead of url_read_complete(); even if some reads before EOF return less than the full amount that should not be a problem.
* | Merge svn changes up to r29962Uoti Urpala2009-11-2312-24/+173
|\|
| * Finally rename the STREAM_SEEK define to MP_STREAM_SEEK, there are just too manyreimar2009-11-229-16/+16
| | | | | | | | | | | | | | name clashes, in particular with Windows headers (which define STREAM_SEEK as an enum type). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29962 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 10l to Reimar: Fix typo.cehoyos2009-11-181-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29931 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Deobfuscate the special hack to disable cache for live555.reimar2009-11-173-2/+6
| | | | | | | | | | | | | | | | | | Cache can not be used for it, since it does not provide any data stream, the data is provided to the demuxer "behind MPlayer's back". git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29930 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Merge malloc+memset -> callocreimar2009-11-171-4/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29929 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fall back to read-based seeking for ffmpeg:// URLs when is_streamed is setreimar2009-11-171-2/+2
| | | | | | | | | | | | | | (i.e. it is not possible to use url_fseek). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29928 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Enable the read-based forward seek fallback also when CONFIG_NETWORK isreimar2009-11-171-2/+2
| | | | | | | | | | | | | | | | | | enabled. Enabling network support should not have side-effects on code not really related to networking. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29926 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use fill_buffer if available also for STREAMTYPE_STREAMreimar2009-11-171-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29925 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add preliminary support for streaming via FFmpeg's URProtocol functions.reimar2009-11-172-0/+144
| | | | | | | | | | | | | | Basic playback tested for file and http protocols. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29923 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29912Uoti Urpala2009-11-1614-2174/+193
|\|
| * Move headers related to setting dvd speed to dvd_common.reimar2009-11-112-14/+19
| | | | | | | | | | | | | | This makes -dvd-speed work again. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29894 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Set the EOF flag when dvdnav reached the end of the requested title.reimar2009-11-111-2/+6
| | | | | | | | | | | | | | | | Otherwise it would just hang, either at the menu or trying to play the last played frame as a still frame. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29893 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move dvd_speed and dvd_set_speed to dvd_common and implement -dvd-speedreimar2009-11-104-73/+79
| | | | | | | | | | | | | | support for dvdnav. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29890 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move arrays used by both dvd and dvdnav to dvd_common.reimar2009-11-104-5/+6
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29889 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused extern declarations.reimar2009-11-101-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29888 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Share dvd_device extern declaration between dvd and dvdnav.reimar2009-11-103-2/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29887 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove an unused variable.reimar2009-11-101-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29886 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Set demuxer->teletext to NULL when closing the TV interface,reimar2009-11-101-0/+1
| | | | | | | | | | | | | | since analog teletext can not (yet) work without the TV interface. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29873 b3059339-0415-0410-9bf9-f77b7e298cf2
| * The code for the non-networking case is the same whether networkingreimar2009-11-091-5/+2
| | | | | | | | | | | | | | support was enabled or no, so avoid duplicating it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29861 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Factor out triplicated break statement.reimar2009-11-091-3/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29860 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused mp_dvdnav_aid_from_audio_num functionreimar2009-11-091-21/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29859 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fixup the dvdnav <-> sid mapping, dvdnav_spu_stream_to_lang andreimar2009-11-091-9/+13
| | | | | | | | | | | | | | | | dvdnav_get_spu_logical_stream both take the same numbering (i.e. not the ids used in the MPEG-TS). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29858 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove CONFIG_TV_TELETEXT.cehoyos2009-11-073-35/+0
| | | | | | | | | | | | | | | | 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
| * Separate teletext from tv support.cehoyos2009-11-075-17/+31
| | | | | | | | | | | | | | Path by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29848 b3059339-0415-0410-9bf9-f77b7e298cf2
| * dvdnav: print ID_SID_..._LANG, just like dvd://reimar2009-11-051-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29832 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Cosmetics: indentation, merge two consecutive ifs.reimar2009-11-051-6/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29831 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make dvdnav also print info about audio streams with unknown language, just ↵reimar2009-11-051-1/+1
| | | | | | | | | | | | like dvd:// git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29830 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make the dvdnav stream language information output more similar to the dvd one.reimar2009-11-051-10/+6
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29829 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change the subtitle numbers in the dvdnav subtitle language info to matchreimar2009-11-051-1/+1
| | | | | | | | | | | | | | the numbers used by MPlayer's OSD and -sid option. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29828 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace two more occurences of tvi_vbi with dec_teletext.cehoyos2009-10-311-1/+1
| | | | | | | | | | | | | | Patch by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29808 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Support ISDB-Tb tunning in Brazilcehoyos2009-10-301-3/+7
| | | | | | | | | | | | | | Patch by Sérgio Fortier, sergiofortier A yahoo com br git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29803 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some pathscehoyos2009-10-293-3/+3
| | | | | | | | | | | | | | | | | | 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
| * Move teletext specific code from stream into libmpcodecs.cehoyos2009-10-297-1960/+4
| | | | | | | | | | | | | | Patch by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29801 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix teletext character set auto-detection.cehoyos2009-10-241-1/+1
| | | | | | | | | | | | | | Patch by Francesco Lavra, francescolavra interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29796 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: Remove some pointless parentheses from return calls.diego2009-10-083-8/+8
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29759 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29644Uoti Urpala2009-09-045-18/+26
|\|
| * Fix possible crashes with invalid SDPs that result in stream descriptionsreimar2009-09-022-1/+4
| | | | | | | | | | | | | | not being initialized. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29626 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix several more rtsp-related memleaks.reimar2009-09-023-1/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29625 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix asmrp_dispose to also free the buffer.reimar2009-09-021-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29624 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use calloc to ensure rmff_new_mdpr returns fully initialized data.reimar2009-09-021-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29623 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move variable declaration to where it is used.reimar2009-09-021-2/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29622 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make sure we do not strdup(NULL), avoids a crash with non-real streams.reimar2009-09-021-1/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29621 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix several memleaks in real_setup_and_get_headerreimar2009-09-021-1/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29620 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change real_setup_and_get_header to use goto a single exit path to simplifyreimar2009-09-021-11/+7
| | | | | | | | | | | | | | proper freeing of allocated data. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29619 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29532Uoti Urpala2009-08-182-10/+30
|\|
| * Fix file information. Patch by Francesco Lavra, francescolavra interfree itcehoyos2009-08-151-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29521 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add missing major contributors to copyright statement.cehoyos2009-08-151-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29520 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix another typo. Patch by Francesco Lavra, francescolavra interfree itcehoyos2009-08-021-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29470 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add standard GPL license header. Patch by Francesco Lavra, francescolavra ↵cehoyos2009-08-021-0/+22
| | | | | | | | | | | | interfree it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29468 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix more typos. Patch by Francesco Lavra, francescolavra interfree itcehoyos2009-08-021-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29467 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused include's. Patch by Francesco Lavra, francescolavra interfree itcehoyos2009-08-021-4/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29466 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix typos. Patch by Francesco Lavra, francescolavra interfree itcehoyos2009-08-021-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29465 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29455Uoti Urpala2009-07-292-1/+5
|\|
| * stream/realrtsp/real.c: Fix another integer overflowuau2009-07-281-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29455 b3059339-0415-0410-9bf9-f77b7e298cf2
| * stream/realrtsp/real.c: Fix integer overflowuau2009-07-271-0/+2
| | | | | | | | | | | | | | Pointed-out-by: tixxDZ <tixxdz at gmail dot com> - DZCORE Labs, Algeria git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29447 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace WORDS_BIGENDIAN by HAVE_BIGENDIAN in all internal code.diego2009-07-261-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29443 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Replace libavutil internal header #includes with MPlayer copiesUoti Urpala2009-07-267-7/+7
| | | | | | | | | | | | Change #include lines for libavutil/intreadwrite.h, libavutil/bswap.h and libavutil/x86_cpu.h to use the MPlayer file under ffmpeg_files/ instead.
* | Remove the internal GUIAnton Khirnov2009-07-071-4/+0
| | | | | | | | | | | | | | | | | | The GUI is badly designed and too closely coupled to the internal details of other code. The GUI code is in bad shape and unmaintained for years. There is no indication that anyone would maintain it in the future either. Even if someone did volunteer to implement a better integrated GUI having the current code in the tree probably wouldn't help much. So get rid of it.
* | Merge svn changes up to r29412Uoti Urpala2009-07-073-12/+6
|\|
| * Replace incorrect use of strncpy by av_strlcpy.reimar2009-06-261-1/+2
| | | | | | | | | | | | | | Only a real issue if inet_ntoa can actually return a string of more than 255 bytes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29393 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Files should be opened in binary mode on OS/2.diego2009-06-031-3/+3
| | | | | | | | | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29346 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Using nl_langinfo in the asf mmst implementation makes no sense sincereimar2009-05-311-8/+1
| | | | | | | | | | | | | | | | MPlayer does not use setlocale. Just default to UTF-8 as input charset until there is a better solution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29333 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-1380-966/+966
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesUoti Urpala2009-07-0781-973/+966
| |
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-0726-421/+434
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-0726-421/+421
| | | | | | | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* | Merge svn changes up to r29277Uoti Urpala2009-05-082-5/+16
|\|
| * Reemit the ID_AID_x_LANG for the track. This allows the identification of thediego2009-04-111-3/+10
| | | | | | | | | | | | | | | | audio track by language code (en or es) rather than by ID (128 or 129). patch by Kevin DeKorte, kdekorte gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29170 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make tvi_v4l2 print -1 as "Current input" if the ioctl to read it failed.reimar2009-04-101-0/+1
| | | | | | | | | | | | | | Previously it printed (number of inputs + 1) which is needlessly confusing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29161 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add a -indentify message that indicates if the current DVDNAV title isreimar2009-04-091-2/+5
| | | | | | | | | | | | | | | | a menu or a video. Patch by Kevin DeKorte [kdekorte gmail com], approved by Nico. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29156 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29134Uoti Urpala2009-04-021-1/+0
|\|
| * Remove unused variable along with the related warning.diego2009-04-011-1/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29122 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29117Uoti Urpala2009-04-015-6/+22
|\|
| * 100l, revert r29082, I missed that the vts comparison should be ↵reimar2009-03-281-1/+5
| | | | | | | | | | | | case-insensitive. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29084 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Reindentreimar2009-03-281-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29083 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Simplify extracting title number from ifo namereimar2009-03-281-5/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29082 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Simplify detection of .ifo extension.reimar2009-03-271-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29078 b3059339-0415-0410-9bf9-f77b7e298cf2
| * change close to closesocket, unifies close streaming codecompn2009-03-261-1/+1
| | | | | | | | | | | | | | patch by Francesco Cosoleto , cosoleto gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29066 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add support for mmsh:// as alias for mmshttp://reimar2009-03-261-2/+3
| | | | | | | | | | | | | | Patch by Francesco Cosoleto [cosoleto gmail com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29064 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add TVI_CONTROL_VID_SET_WIDTH_HEIGHT to set width and height together for v4l2,reimar2009-03-163-0/+15
| | | | | | | | | | | | | | otherwise some drivers will always stay stuck in the lowest resolution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28975 b3059339-0415-0410-9bf9-f77b7e298cf2
| * 100l fix calculation of dropped frames, number of frames is time * fps, not ↵reimar2009-03-151-1/+1
| | | | | | | | | | | | time / fps. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28962 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28951Uoti Urpala2009-03-142-2/+3
|\|
| * Ensure the string we're trying to compare is actually not NULL.ben2009-03-091-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28920 b3059339-0415-0410-9bf9-f77b7e298cf2
| * The first valid index is total count - 1 (usually 0)ben2009-03-091-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28919 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28755Uoti Urpala2009-02-282-0/+3
|\|
| * Use memset to make sure all parts of struct sockaddr_in are always initialized.reimar2009-02-252-0/+3
| | | | | | | | | | | | | | Problem reported by [kmkaplan+mplayer-dev-eng (at) kim kim-minh com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28732 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28712Uoti Urpala2009-02-231-1/+8
|\|
| * Accept DVB API 5, patch by Steven Brudenell, steven.brudenell gmail com.diego2009-02-221-1/+8
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28702 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28641Uoti Urpala2009-02-183-3/+3
|\| | | | | | | | | | | | | | | Convert vo_x11_border (used in vo_gl/gl2 though the vo_gl_border macro) to use a wrapper macro in old-style VOs which do not provide a VO object argument. Before this function had an explicit global_vo argument in vo_gl/gl2. New vo_vdpau uses it too so use the same mechanism as most other functions.
| * Replace double semicolon by single semicolon.diego2009-02-163-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28611 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28461Uoti Urpala2009-02-0419-64/+56
|\|
| * Restructure network tests: Always check for both inet_aton and inet_pton.diego2009-02-013-25/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28439 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Convert HAVE_WINSOCK2_H into a 0/1 definition.diego2009-02-0119-40/+40
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28437 b3059339-0415-0410-9bf9-f77b7e298cf2
| * HAVE_ATON --> HAVE_INET_ATON to match FFmpeg and give it a 0/1 value.diego2009-02-013-6/+6
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28435 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Convert HAVE_CLOSESOCKET and HAVE_SOCKLEN_T into 0/1 definitions.diego2009-02-011-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28434 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28366Uoti Urpala2009-01-261-1/+1
|\| | | | | | | | | | | | | | | | | Contains more changes needed to sync build system with latest FFmpeg. Conflicts: Makefile configure mplayer.c
| * Fix a NULL-check that used && instead of || and thus could not avoid crashes.reimar2009-01-251-1/+1
| | | | | | | | | | | | | | Patch by Luis Felipe Strano Moraes (luis strano gmail com). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28354 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28310Uoti Urpala2009-01-155-17/+12
|\| | | | | | | | | | | | | | | The libdvdread4 and libdvdnav directories, which are externals in the svn repository, are at least for now not included in any form. I added configure checks to automatically disable internal libdvdread and libdvdnav if the corresponding directories are not present; if they're added manually then things work the same as in svn.
| * Switch internal dvdread to libdvdread SVN external.reimar2009-01-083-15/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28280 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add missing 'void' keyword to parameterless function declarations.diego2009-01-051-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28267 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix DVD seek_to_chapter: the title number must be converted to a per-VTSreimar2009-01-011-0/+9
| | | | | | | | | | | | | | title number first. Also add a few out-of-bounds checks just in case. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28226 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Work around a dvdread bug where DVDReadBlocks would return values < 0 on ↵reimar2008-12-311-1/+2
| | | | | | | | | | | | | | | | | | | | read error, causing hangs e.g. when seeking to the very last chapter (which would read beyond the size of the DVD). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28216 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28204Uoti Urpala2008-12-271-1/+1
|\|
| * Avoid u_ BSD type names.diego2008-12-271-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28197 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28149Uoti Urpala2008-12-141-15/+25
|\|
| * Replace informal GPL notes by standard GPL header.diego2008-12-131-15/+25
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28140 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28087Uoti Urpala2008-12-046-15/+15
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_ivtv.c libao2/ao_v4l2.c libmpcodecs/dec_video.h libvo/aspect.h libvo/sub.c libvo/sub.h libvo/vo_directx.c libvo/vo_macosx.m libvo/vo_quartz.c mp_core.h mplayer.c mplayer.h osdep/getch2.h osdep/timer.h
| * Get rid of pointless 'extern' keywords.diego2008-12-036-15/+15
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28065Uoti Urpala2008-12-021-4/+0
|\|
| * Move PTHREAD_CACHE define logic to configure.reimar2008-11-281-4/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28048 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27949Uoti Urpala2008-11-171-12/+32
|\| | | | | | | | | | | | | | | | | Conflicts: common.mak libvo/vo_xv.c libvo/x11_common.c libvo/x11_common.h stream/cache2.c
| * 100l, stream->cache_pid can not be used directly in pthread_create,reimar2008-11-151-1/+5
| | | | | | | | | | | | | | it has the wrong type. Luckily we currently do not need the value anyway. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27930 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use pthreads for the cache on Cygwin, since _beginthread is not availablereimar2008-11-151-11/+27
| | | | | | | | | | | | | | | | and the previous CreateThread method would probably leak memory here, too. Also pthreads seems to be the official Cygwin threading API. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27928 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Include cache2.h in cache2.c, fixes an implicit declaration warning for ↵reimar2008-11-141-0/+1
| | | | | | | | | | | | cache_do_control git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27910 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27899Uoti Urpala2008-11-065-6/+9
|\|
| * set to -1 fds that were closed; handle the sec_fd only if CONFIG_DVB_HEAD ↵nicodvb2008-11-052-3/+3
| | | | | | | | | | | | isn't defined; patch by Reimar git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27897 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Intialize unused fd variables to -1 (which is actually invalid) insteadreimar2008-11-041-1/+1
| | | | | | | | | | | | | | of 0 (which is stdin and can cause weird side-effects). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27893 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix condition broken in r27401 which incorrectly caused stdin to be closed ↵reimar2008-11-041-1/+1
| | | | | | | | | | | | after playing DVB. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27892 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Forgotten reindentreimar2008-11-021-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27882 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add a noicyx:// protocol to allow easier testing for misconfigured servers.reimar2008-11-022-1/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27881 b3059339-0415-0410-9bf9-f77b7e298cf2
| * vfw.h needs a windows.h include before on MinGW64.reimar2008-11-021-0/+1
| | | | | | | | | | | | | | Since vfw.h on MinGW32 includes windows.h automatically it should not make a difference there. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27880 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid a memleak if allocation of field_name fails, fixes bug #1319.reimar2008-10-311-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27868 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to 27824Uoti Urpala2008-10-2512-91/+50
|\| | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h libmpcodecs/dec_video.c libmpcodecs/vd.c libvo/x11_common.h mplayer.c stream/cache2.c
| * Conditionally declare a conditionally used variable, fixes the warning:diego2008-10-241-1/+4
| | | | | | | | | | | | | | stream/dvb_tune.c:99: warning: unused variable 'sec_dev' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27820 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Determine default CD/DVD device in configure instead of using an #ifdef jungle.diego2008-10-211-26/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27809 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace typeof by __typeof__, the former is a non-portable GNU extension.diego2008-10-201-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27807 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Avoid CreateThread and especially TerminateThread since they cause a memleak.reimar2008-10-191-21/+18
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27804 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove useless casts.reimar2008-10-191-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27803 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Revert declaring ThreadProc as void, it breaks the WINAPI.diego2008-10-161-2/+6
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27790 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move DEFAULT_CDROM_DEVICE/DEFAULT_DVD_DEVICE to stream.h where it belongs.diego2008-10-161-0/+27
| | | | | | | | | | | | | | config.h should only contain option definitions, no logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27787 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename stream/netstream.h to stream/stream_netstream.h; netstream.h to make itdiego2008-10-162-1/+1
| | | | | | | | | | | | | | clearer that netstream.h belongs to stream_netstream.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27779 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.diego2008-10-134-21/+21
| | | | | | | | | | | | | | This avoids a pointless indirection that only obscures what is really done. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Declare ThreadProc as void, it does not return anything, fixes the warning:diego2008-10-131-6/+2
| | | | | | | | | | | | | | stream/cache2.c:364: warning: control reaches end of non-void function git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27759 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove unused function, fixes the warning:diego2008-10-131-46/+0
| | | | | | | | | | | | | | stream/tvi_dshow.c:1311: warning: 'reconnect_pins' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27758 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Unconditionally #include osdep/shem.h, fixes the warnings on Cygwin:diego2008-10-131-1/+1
| | | | | | | | | | | | | | | | stream/cache2.c:244: warning: implicit declaration of function `shmem_alloc' stream/cache2.c:265: warning: implicit declaration of function `shmem_free' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27757 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move socklen_t typedef from config.h to stream/network.h.diego2008-10-122-0/+4
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27744 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27682Uoti Urpala2008-10-021-5/+8
|\| | | | | | | | | | | | | | | | | Addition of the "outdir" suboption to vo_png in svn was reverted before merging. Conflicts: command.c mplayer.c
| * Add debug message about loaded frequency tables.voroshil2008-09-241-1/+2
| | | | | | | | | | | | | | | | | | Replace printed code of input type with user-frendly "broadcast"/"cable" strings. patch from Laurent laurent dot aml at gmail dot com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27662 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Make output messages of frequency selection code more useful byvoroshil2008-09-241-2/+4
| | | | | | | | | | | | | | | | | | | | providing additional information like requested frequency and found nearest fequency/channel. patch from Laurent laurent dot aml at gmail dot com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27661 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix overflow in frequency conversion code inside tvi_dshow.voroshil2008-09-241-2/+2
| | | | | | | | | | | | | | patch from Laurent laurent dot aml at gmail dot com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27660 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27649Uoti Urpala2008-09-201-1/+1
|\| | | | | | | | | | | | | Conflicts: Makefile configure libvo/x11_common.c
| * With -identify, ID_DVD_VOLUME_ID is not shown on some systems.diego2008-09-161-1/+1
| | | | | | | | | | | | | | | | Using DVDISOVolumeInfo instead of DVDUDFVolumeInfo fixes this. patch by Mathieu SCHROETER, mathieu.schroeter gamesover ch git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27631 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27514Uoti Urpala2008-09-0331-91/+89
|\|
| * Move '#define closesocket close' preprocessor directive to a common placediego2008-09-0114-23/+17
| | | | | | | | | | | | | | and put it under the proper '#ifndef HAVE_CLOSESOCKET' condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27505 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Revert moving closesocket definition and network headers to network.h.diego2008-08-3114-15/+115
| | | | | | | | | | | | | | This caused lots of trouble on MinGW, we need a different solution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27504 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename internal libdvdread fork from dvdread to libdvdreadrathann2008-08-303-12/+12
| | | | | | | | | | | | | | | | to avoid clashing with external libdvdread. (Sync with libdvdread r1122) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27498 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Print DVD volume ID with -identify.reimar2008-08-301-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27497 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move duplicated '#define closesocket close' into network.h along withdiego2008-08-2914-115/+15
| | | | | | | | | | | | | | network-related #include #ifdeffery. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27496 b3059339-0415-0410-9bf9-f77b7e298cf2
| * consistency cosmetics: Avoid using .. in #include paths.diego2008-08-296-12/+12
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27495 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename HAVE_WINSOCK preprocessor condition to HAVE_WINSOCK_H.diego2008-08-2920-45/+46
| | | | | | | | | | | | | | | | | | This is what it is called in FFmpeg and more consistent with other names for similar conditionals. This fixes a potential compilation failure on MinGW, as described in Bugzilla #1262. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27493 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use '#include <poll.h>' instead of '#include <sys/poll.h>'.diego2008-08-143-3/+3
| | | | | | | | | | | | | | It is the standard location as defined by the Open Group. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27463 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Make various functions staticUoti Urpala2008-08-122-4/+4
| |
* | Include corresponding .h in some .c filesUoti Urpala2008-08-121-0/+1
| |
* | stream.h: Add 2 prototypes instead of declaring them in cache2.cUoti Urpala2008-08-122-5/+2
| | | | | | | | | | | | | | Declare stream_fill_buffer() and stream_seek_long() always (before they were only declared if cache was disabled and those were used instead of cached versions). Remove the now redundant declarations in cache2.c.
* | Merge svn changes up to r27441Uoti Urpala2008-08-0816-114/+114
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h command.c configure input/input.c libmpcodecs/dec_video.c libmpcodecs/vd.c libmpdemux/stheader.h libvo/sub.c libvo/video_out.c libvo/vo_xv.c libvo/vosub_vidix.c libvo/x11_common.c libvo/x11_common.h mp_core.h mplayer.c stream/stream.h
| * Give a CONFIG_ prefix to preprocessor directives that lacked one anddiego2008-08-072-8/+8
| | | | | | | | | | | | | | change arbitrary prefixes to CONFIG_. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27429 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename font-related preprocessor directives.diego2008-08-071-7/+7
| | | | | | | | | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27425 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename a bunch of miscellaneous preprocessor directives.diego2008-08-073-13/+13
| | | | | | | | | | | | | | Switch them from a HAVE_ to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27423 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Introduce CONFIG_ALSA preprocessor directive for ALSA 0.9 and 1.x.diego2008-08-065-17/+17
| | | | | | | | | | | | | | Use it in all the places that checked for either ALSA 0.9 or 1.x. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27422 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename some audio-output-related preprocessor directives.diego2008-08-055-17/+17
| | | | | | | | | | | | | | Switch them from a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27419 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Change a bunch of video/audio-output-specific preprocessor directives fromdiego2008-08-0310-69/+69
| | | | | | | | | | | | | | a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27399Uoti Urpala2008-08-025-16/+16
|\| | | | | | | | | | | | | | | | | | | Conflicts: libmpcodecs/vd.c libmpcodecs/ve_raw.c libvo/video_out.c libvo/x11_common.c mplayer.c
| * Rename some preprocessor directives from CONFIG_* to HAVE_* where appropriate;diego2008-08-014-15/+15
| | | | | | | | | | | | | | CONFIG_ prefix for configurable options, HAVE_ for system-dependent stuff. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27391 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename two GUI-related preprocessor directives:diego2008-07-301-1/+1
| | | | | | | | | | | | | | HAVE_NEW_GUI --> CONFIG_GUI, HAVE_GTK2_GUI --> CONFIG_GTK2 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27375 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27374Uoti Urpala2008-07-3015-55/+56
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h cfg-mplayer.h command.c configure libmpcodecs/dec_video.c libmpcodecs/vd.c libmpcodecs/vf_vo.c libmpdemux/demuxer.h libmpdemux/stheader.h mp_core.h mplayer.c stream/stream_radio.c
| * Start unifying names of internal preprocessor directives.diego2008-07-3014-54/+54
| | | | | | | | | | | | | | | | Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27373 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Do not include sys/socket.h when using winsock2, it is pointlessreimar2008-07-261-1/+2
| | | | | | | | | | | | and breaks compilation under MinGW. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27352 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27332Uoti Urpala2008-07-214-5/+7
|\|
| * Our ALSA code needs alloca, so check for it in configure and include alloca.hreimar2008-07-172-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27313 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Replace S_IREAD|S_IWRITE by POSIX-compatible S_IRUSR|S_IWUSR (not exactly ↵reimar2008-07-151-1/+1
| | | | | | | | | | | | the same, but should not matter). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27289 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Remove -std=gnu99/gnu89/default dialect linux define, as it violates themichael2008-07-151-4/+4
| | | | | | | | | | | | | | C standard. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27282 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27281Uoti Urpala2008-07-152-2/+2
|\|
| * in dvd streams the title part ranges from 1 to 99nicodvb2008-07-122-2/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27267 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27242Uoti Urpala2008-07-095-1/+15
|\| | | | | | | | | | | | | Conflicts: Makefile configure
| * Add missing #include <sys/socket.h>, fixes the warnings:diego2008-07-081-0/+1
| | | | | | | | | | | | | | | | | | | | stream/librtsp/rtsp.c: In function 'write_stream': stream/librtsp/rtsp.c:68: warning: implicit declaration of function 'send' stream/librtsp/rtsp.c: In function 'read_stream': stream/librtsp/rtsp.c:95: warning: implicit declaration of function 'recv' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27234 b3059339-0415-0410-9bf9-f77b7e298cf2
| * avoid unnecessary strdup(); patch by Aurelnicodvb2008-07-061-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27226 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Surround stream cache specific code by an appropriate #ifdef; fixes linkingdiego2008-07-051-0/+2
| | | | | | | | | | | | | | | | when stream cache is disabled. noticed by Andrea Palmatè, andrea amigasoft net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27210 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add some more -identify information for CDDB.diego2008-07-051-0/+9
| | | | | | | | | | | | | | patch by Mathieu Schroeter, mathieu.schroeter gamesover ch git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27207 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add disc ID to -identify output.diego2008-07-051-0/+2
| | | | | | | | | | | | | | patch by Mathieu Schroeter, mathieu.schroeter gamesover ch git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27206 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27202Uoti Urpala2008-07-052-18/+25
|\|
| * Rename stream_livedotcom.c to stream_live555.c, the name is used everywhere.diego2008-07-041-0/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27199 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: in ifo_stream_oped() aligned the prototype to the stylenicodvb2008-07-041-9/+8
| | | | | | | | | | | | | | | | | | of the rest of the file and renamed dvd_priv to spriv (it's a stream_priv_s*, while dvd_priv is used for other purposes in the rest of the file) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27198 b3059339-0415-0410-9bf9-f77b7e298cf2
| * in ifo_stream_open() propagate the device based on the dirname of ↵nicodvb2008-07-041-0/+1
| | | | | | | | | | | | stream->url; patch by Mathieu SCHROETER mathieu.schroeter gamesover ch git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27197 b3059339-0415-0410-9bf9-f77b7e298cf2
| * dvd_device must be handled exclusively by the option parser; it can't be ↵nicodvb2008-07-041-2/+0
| | | | | | | | | | | | changed at will in ifo_stream_open() git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27196 b3059339-0415-0410-9bf9-f77b7e298cf2
| * added support for the device part in the url; patch bynicodvb2008-07-041-8/+17
| | | | | | | | | | | | | | Mathieu SCHROETER mathieu.schroeter gamesover ch git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27195 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27184Uoti Urpala2008-07-015-106/+122
|\|
| * Try to get frame rate information through VIDIOC_G_PARM ifvoroshil2008-06-301-0/+12
| | | | | | | | | | | | | | | | capture device driver (such as uvcvideo USB video driver) does not provide VIDIOC_G_STD ioctl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27171 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix division by zero in tvi_v4l2 which occures when capture devicevoroshil2008-06-301-8/+18
| | | | | | | | | | | | | | driver (such as uvcvideo USB video driver) does not provide VIDIOC_G_STD ioctl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27170 b3059339-0415-0410-9bf9-f77b7e298cf2
| * removed struct dvdnav_event_t that is 1) unused; 2) has an improper name. ↵nicodvb2008-06-291-6/+0
| | | | | | | | | | | | You can't turn your back for a second... git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27157 b3059339-0415-0410-9bf9-f77b7e298cf2
| * mingw uses Windows sockets.vayne2008-06-281-1/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27141 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix the issue instead of revertinglu_zero2008-06-253-58/+56
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27136 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Move rtsp_close away by simplification - avoids symbol clash with libnemesilu_zero2008-06-253-33/+33
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27135 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27123Uoti Urpala2008-06-231-27/+28
|\| | | | | | | | | | | | | Conflicts: libmenu/menu_filesel.c libmenu/menu_pt.c
| * Reorder some functions to avoid implicit declaration warnings.diego2008-06-191-27/+28
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27099 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27092Uoti Urpala2008-06-174-6/+34
|\| | | | | | | | | | | | | | | Conflicts: libmpdemux/demuxer.c libvo/vo_xv.c mencoder.c
| * Add missing #includes to fix 'make checkheaders'.diego2008-06-162-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27075 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Ability for specifying TV standard individually for each TV channel.voroshil2008-06-142-6/+32
| | | | | | | | | | | | | | | | Slightly modified patch by Ildar devel at pop3 dot ru git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27057 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27025Uoti Urpala2008-06-072-36/+118
|\| | | | | | | | | | | | | | | | | Conflicts: command.c libvo/vosub_vidix.c libvo/vosub_vidix.h mplayer.c
| * Factorizes dvdnav aid retrieval code.ben2008-06-071-30/+27
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27022 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add routine that provides audio ID corresponding to logical numberben2008-06-072-0/+33
| | | | | | | | | | | | | | | | in dvdnav stream. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27021 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Rename some functions as they are mplayer related and notben2008-06-072-15/+15
| | | | | | | | | | | | | | | | from libdvdnav public API. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27018 b3059339-0415-0410-9bf9-f77b7e298cf2
| * rename for consistencyben2008-06-071-5/+5
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27017 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add routine to determine if SPU has changed in dvdnav stream.ben2008-06-072-0/+25
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27016 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add routine to determine if audio has changed in dvdnav stream.ben2008-06-072-0/+25
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27015 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Save DVDNAV palette info.ben2008-06-072-0/+2
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27005 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r26979Uoti Urpala2008-06-0419-209/+312
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the conflicts are trivial. Conflicts: Makefile cfg-mplayer.h input/input.c libmenu/vf_menu.c libmpcodecs/dec_video.c libmpcodecs/vf_expand.c libmpcodecs/vf_vo.c libmpdemux/demux_mkv.c libmpdemux/demuxer.c libmpdemux/demuxer.h libvo/vo_directfb2.c libvo/vo_gl.c libvo/vo_winvidix.c libvo/vo_xv.c libvo/vo_xvidix.c libvo/vo_xvmc.c libvo/x11_common.c mplayer.c osdep/timer-linux.c stream/cache2.c
| * 100l, fix wrong order of cases in cache_do_controlreimar2008-06-011-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26956 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Fix compilation with internal dvdnavrtogni2008-05-311-0/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26939 b3059339-0415-0410-9bf9-f77b7e298cf2
| * adapted to the dvdread->libdvdread transition in dvdnav's repositorynicodvb2008-05-313-4/+12
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26938 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Handle NULL control function in cache_execute_control, fixes crash with http ↵reimar2008-05-301-0/+7
| | | | | | | | | | | | urls. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26929 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Emulate STREAM_CTRL_GET_TIME_LENGTH if cache is used.reimar2008-05-261-2/+13
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26879 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add basic support for stream controls with cache enabled.reimar2008-05-244-7/+83
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26865 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: Remove useless parentheses from return statements.diego2008-05-1612-198/+198
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26788 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r26783Uoti Urpala2008-05-1518-233/+263
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile common.mak configure libmpcodecs/vd_ffmpeg.c libmpdemux/demux_mkv.c libvo/vo_xv.c mplayer.c
| * Add missing stream.h #include, fixes the warning:diego2008-05-151-0/+1
| | | | | | | | | | | | | | stream/tcp.c:197: warning: implicit declaration of function 'stream_check_interrupt' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26783 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Use standard license headers with standard formatting.diego2008-05-1417-233/+262
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26769 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r26680Uoti Urpala2008-05-072-0/+3
|\| | | | | | | | | | | | | | | Conflicts: Makefile configure osdep/timer-darwin.c
| * Add missing header #includes to fix 'make checkheaders'.diego2008-05-032-0/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26663 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Create a context for input.c stateUoti Urpala2008-04-302-4/+11
| | | | | | | | | | | | | | | | | | Start moving static variables to a context struct. Only autorepeat state is moved to the struct in this commit. mp_input_check_interrupt now requires the context variable. Change stream functions to pass it. It's still stored in a static variable in stream/.
* | Merge svn changes up to r26587Uoti Urpala2008-04-291-1/+1
|\| | | | | | | | | | | | | | | Conflicts: Makefile configure osdep/timer-darwin.c
| * Use consistent #include paths without "../".diego2008-04-281-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26576 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r26540Uoti Urpala2008-04-261-73/+0
|\| | | | | | | | | | | Conflicts: Makefile
| * Merge stream/Makefile into top-level Makefile.diego2008-04-241-72/+0
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26515 b3059339-0415-0410-9bf9-f77b7e298cf2
| * cosmetics: alphabetical orderdiego2008-04-241-2/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26513 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove _s/_st suffix from some struct namesUoti Urpala2008-04-256-29/+29
| | | | | | | | | | Since the names are always used after the keyword "struct" having a suffix as in "struct demuxer_st" is almost completely pointless.
* | Move audio_id and video_id to options structUoti Urpala2008-04-233-10/+14
| |
* | Add option pointer to stream struct (at least temporarily)Uoti Urpala2008-04-233-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The stream code does not access many option variables directly, but it does access some such as audio_id and network_bandwidth (and does that without including proper headers for them). Add option pointer to the stream struct to allow access to those variables. Remove the unused (always NULL) and clumsy-looking char** options parameter in the open_stream call and replace it with the option pointer. The parameter is currently only set in the main open_stream() call in MPlayer.c and not in any other locations that can open a stream. In the long term it might be better to pass a more limited set of values somehow, but this should do for now.
* | Mark some functions staticUoti Urpala2008-04-232-5/+5
|/ | | | | | These functions aren't used outside their file and have no prototype in any header. Based on a forgotten patch from 2006 by Stefan Huehner, (stefan huehner org).
* in preparation for multi-frontend patch replaced file-static device names ↵nicodvb2008-04-131-17/+28
| | | | | | with sprintf() calls in 2 functions git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26433 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed useless parameter :type from -dvbin (the frontend type is reported ↵nicodvb2008-04-121-6/+3
| | | | | | by the card) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26423 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed defunct options :vid and :aid from -dvbin (they were useless from ↵nicodvb2008-04-121-10/+5
| | | | | | the start) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26422 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove the need for code using stream to export an mp_input_check_interrupt()albeu2008-04-094-4/+18
| | | | | | | function. It also removes the compile-time dependency on input. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26358 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make stream independent of libmpdemux, the asf demuxer and streamingalbeu2008-04-091-10/+1
| | | | | | | code share a function and a few definitions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26357 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix possible integer overflow in malloc by using calloc instead.reimar2008-03-291-1/+2
| | | | | | | Should fix CVE-2008-0073 as far as MPlayer is affected by this problem. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26299 b3059339-0415-0410-9bf9-f77b7e298cf2
* mingw uses windows sockets.vayne2008-03-111-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26223 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing header #includes to fix 'make checkheaders'.diego2008-03-101-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26218 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing header #includes to fix 'make checkheaders'.diego2008-03-1014-0/+39
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26216 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless #include.diego2008-03-101-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26215 b3059339-0415-0410-9bf9-f77b7e298cf2
* search channels.conf in mplayer's instdir if all other searches fail; patch ↵nicodvb2008-03-031-0/+6
| | | | | | by foxcore gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26155 b3059339-0415-0410-9bf9-f77b7e298cf2
* cache support for OS/2diego2008-02-281-17/+34
| | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26109 b3059339-0415-0410-9bf9-f77b7e298cf2
* FFmpeg now uses different (unified) #include paths.diego2008-02-251-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26101 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid a pointless special-case for opening a filereimar2008-02-241-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26083 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add MPLAYER_ prefix to multiple inclusion guards.diego2008-02-2234-106/+104
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add multiple inclusion guard.diego2008-02-211-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26045 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing multiple inclusion guards.diego2008-02-214-0/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26044 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove pointless #ifdefs around extern declarations.diego2008-02-201-26/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26039 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for DOS-style file:///x:/path paths.diego2008-02-201-0/+6
| | | | | | | patch by KO Myung-Hun, komh chollian net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26037 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fill stream->end_pos if possible, fixing lavf demuxers that need to seek.albeu2008-02-191-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26031 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support icyx://.reimar2008-02-151-1/+1
| | | | | | | Patch by Sander Plas [sander oele net]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26004 b3059339-0415-0410-9bf9-f77b7e298cf2
* Always display Icy-Metadata if available, whether we recognize an ICY-Serverreimar2008-02-151-1/+2
| | | | | | | or not. I can not think of a reason why this should hurt. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26003 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move printing of Icy-Metadata into an extra functionreimar2008-02-151-14/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26002 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless codereimar2008-02-151-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26001 b3059339-0415-0410-9bf9-f77b7e298cf2
* Detect IceCast also by Icy-MetaInt header part in http_streaming_start(),reimar2008-02-151-1/+2
| | | | | | | as in fixup_open() git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26000 b3059339-0415-0410-9bf9-f77b7e298cf2
* typo fix: inited --> initializeddiego2008-02-142-12/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25994 b3059339-0415-0410-9bf9-f77b7e298cf2
* -chapter is now handled uniformly calling demuxer_seek_chapter() insteadnicodvb2008-02-112-29/+2
| | | | | | | of letting individual demuxers and stream readers do their nasty job git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25987 b3059339-0415-0410-9bf9-f77b7e298cf2
* #include just libavutil/common.h, not all of libavutil/intreadwrite.h.diego2008-02-111-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25980 b3059339-0415-0410-9bf9-f77b7e298cf2
* Stream IDs must be written as hex numbers. Fixes rtogni2008-01-291-2/+2
| | | | | | | | | http://wm.streampower.be/ceu/archive/CEU_COUNCIL_DELIBIRATIONS_PUBLIC_DEBATE/ceulive_1443.wmv Patch by Peter Collingbourne pcc03 doc ic ac uk git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25928 b3059339-0415-0410-9bf9-f77b7e298cf2
* vcd_read must read exactly VCD_SECTOR_DATA bytes.reimar2008-01-281-1/+1
| | | | | | | | If NetBSD can not handle this setting, the code must be rewritten to use a temporary buffer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25901 b3059339-0415-0410-9bf9-f77b7e298cf2
* Consistently use uppercase filename as multiple inclusion guard.diego2008-01-285-15/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25897 b3059339-0415-0410-9bf9-f77b7e298cf2
* factorize 2 testsben2008-01-261-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25860 b3059339-0415-0410-9bf9-f77b7e298cf2
* add a new state flag to dvdnav in order to notify ifben2008-01-262-0/+21
| | | | | | | | | something has changed in the current stream (being title, chapter, audio layer or SPU one) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25858 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove useless castsben2008-01-261-10/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25857 b3059339-0415-0410-9bf9-f77b7e298cf2
* simplify by a one-linerben2008-01-261-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25856 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove the spu_set field, replaced by a flagben2008-01-261-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25855 b3059339-0415-0410-9bf9-f77b7e298cf2
* this end brace was not correctly indentedben2008-01-261-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25854 b3059339-0415-0410-9bf9-f77b7e298cf2
* automatically set spu button highlight when nav cell has changedben2008-01-261-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25853 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for dvdnav still frames playback.ben2008-01-262-26/+166
| | | | | | | | | | | Based on various patches from Otvos Attila and MPlayer'ized by me. N.B. Always use -vc ffmpeg12 with dvdnav:// git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25852 b3059339-0415-0410-9bf9-f77b7e298cf2
* array was defined for 6 elements while 7 were declaredben2008-01-241-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25848 b3059339-0415-0410-9bf9-f77b7e298cf2
* type expected by dvdnav_get_title_string() is constben2008-01-241-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25847 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove some redundant declarationsben2008-01-241-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25846 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add new command to switch between dvdnav titlesben2008-01-242-0/+10
| | | | | | | | Based on parts of dvdnav monster patches from Otvos Attila git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25845 b3059339-0415-0410-9bf9-f77b7e298cf2
* Prevent possible buffer overflow on album_title[]rtogni2008-01-201-2/+5
| | | | | | | Based on a patch by Adam Bozanich abozanich musecurity com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25824 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clear tmp between ip6 check and string escape to prevent reuse of the rtogni2008-01-201-0/+1
| | | | | | | | | | buffer, in order to prevent a possible buffer overflow on malformed urls. Based on a patch by Adam Bozanich abozanich musecurity com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25823 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation failue:ulion2008-01-201-0/+1
| | | | | | | | | | stream_cddb.c: In function 'cddb_read_cache': stream_cddb.c:341: error: 'UINT_MAX' undeclared (first use in this function) stream_cddb.c:341: error: (Each undeclared identifier is reported only once stream_cddb.c:341: error: for each function it appears in.) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25820 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reindentreimar2008-01-191-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25808 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify and keep terminating end-of-linereimar2008-01-191-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25807 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove a broken and useless hack to avoid a memcpyreimar2008-01-191-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25806 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cached file must be 0-terminated since we use string processing functions on itreimar2008-01-191-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25805 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure we do not write the terminating 0 out of boundsreimar2008-01-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25804 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify/cleanup of real_calc_response_and_checksum()rtogni2008-01-131-8/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25750 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't oversize realchallenge buffersrtogni2008-01-131-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25749 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify cue-parsingreimar2008-01-131-13/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25732 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of quite useless inum variablereimar2008-01-131-3/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25731 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_WB*reimar2008-01-131-10/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25729 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some useless () and {}reimar2008-01-131-16/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25728 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplifyreimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25727 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_WB16 instead of ugly memcpy hacksreimar2008-01-131-10/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25726 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_RB* instead of custom variants.reimar2008-01-131-19/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25725 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use sizeof instead of size variables/definesreimar2008-01-131-16/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25724 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make some pnm data constreimar2008-01-131-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25723 b3059339-0415-0410-9bf9-f77b7e298cf2
* dvb_demuxdev etc. are only used in dvb_tune.c so make them staticreimar2008-01-131-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25722 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make several arrays constreimar2008-01-131-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25721 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some unused extern variablesreimar2008-01-131-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25720 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_opts should be constreimar2008-01-1313-13/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25719 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_info_t opts and protocols point to constant data as well.reimar2008-01-131-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25718 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make all tvi_info_t constreimar2008-01-136-10/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25717 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make some tvi_functions_t pointers const that I forgot to change beforereimar2008-01-131-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25716 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless ifdefsreimar2008-01-131-8/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25715 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add type to extern declarationreimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25714 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make dvd_audio_stream_types and dvd_audio_stream_channels constreimar2008-01-131-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25713 b3059339-0415-0410-9bf9-f77b7e298cf2
* tvi_functions_t should be constreimar2008-01-132-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25712 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add forgotten const for pal_ireland.reimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25711 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary <signal.h> includesuau2008-01-092-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25654 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix illegal identifiers, names starting with __ are reserved for the system.diego2008-01-081-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25648 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix illegal identifiers: Names starting with __ or _ and uppercase are reserveddiego2008-01-061-4/+4
| | | | | | | for the system, names starting with _ are reserved at file level. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25635 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented _ANGLE STREAM_CTRLs, patch by oattila chello hu nicodvb2008-01-051-0/+27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25602 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented _ANGLE STREAM_CTRLs, patch by oattila chello hu nicodvb2008-01-051-0/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25601 b3059339-0415-0410-9bf9-f77b7e298cf2
* NEW STREAM_CTRLs: STREAM_CTRL_GET_NUM_ANGLES STREAM_CTRL_GET_ANGLE ↵nicodvb2008-01-051-0/+3
| | | | | | STREAM_CTRL_SET_ANGLE git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25600 b3059339-0415-0410-9bf9-f77b7e298cf2
* fixed bug when playing multi-angle titles: the address field in the agli datanicodvb2008-01-051-1/+2
| | | | | | | | of the current angle must be != 0x7fffffff to be skippable; patch by oattila chello hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25597 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add multiple inclusion guards to all header files that lack them.diego2008-01-014-0/+21
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25581 b3059339-0415-0410-9bf9-f77b7e298cf2
* consistency cosmeticsdiego2008-01-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25575 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explanatory comments to #endif preprocessor directives.diego2008-01-011-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25568 b3059339-0415-0410-9bf9-f77b7e298cf2
* include dvdnav.h from its installation directory rather than appendingnicodvb2008-01-011-1/+1
| | | | | | | | -Idvdnav to the compilation of the whole mplayer (dvdnav-config was just cleaned) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25567 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed inclusion of unneeded header (forgotten in previous commit)nicodvb2008-01-011-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25565 b3059339-0415-0410-9bf9-f77b7e298cf2
* private structures belong to the C file using them, not to header files ↵nicodvb2008-01-012-11/+11
| | | | | | included somewhere else git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25564 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explanatory comments to the #endif part of multiple inclusion guards.diego2007-12-3114-17/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify a little bitreimar2007-12-211-6/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25487 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove a check that is never in any way usefulreimar2007-12-211-5/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25486 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid some le2me_ASF_* stuff operating directly on buffer, shouldreimar2007-12-211-5/+3
| | | | | | | simplify some future changes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25484 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove another useless castreimar2007-12-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25482 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l, buffer bound checks work better when done _before_ access.reimar2007-12-211-3/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25481 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reduce some extreme parsing ugliness (mostly cosmetic)reimar2007-12-211-10/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25480 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless alloc castsreimar2007-12-211-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25479 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reduce code duplication: add a asf_read_wrapper function that never does ↵reimar2007-12-211-34/+23
| | | | | | partial reads git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25478 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix stream_cache to use sector_size set in stream_t.ulion2007-12-201-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25473 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use tv_sec instead of tv_usec to set 1 second timeout, e.g. NetBSDreimar2007-12-201-2/+2
| | | | | | | | does not like the current way (bug #858). Patch by Sergey Svishchev [svs ropnet ru]. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25469 b3059339-0415-0410-9bf9-f77b7e298cf2
* Protocol name should be case insensitive.ulion2007-12-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25457 b3059339-0415-0410-9bf9-f77b7e298cf2
* Caching toc header in vcd private structure for later use.ulion2007-12-172-12/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25439 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add cdda stream control for chapter commmands.ulion2007-12-171-0/+48
| | | | | | | Now we support seek cdda/cddb tracks by seek_chapter command. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25438 b3059339-0415-0410-9bf9-f77b7e298cf2
* Should not change stream->pos in fill_buffer function.ulion2007-12-161-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25424 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support cddb on darwin.ulion2007-12-161-1/+51
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25421 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l, in dvb_free_config() channels' names must be free individuallynicodvb2007-12-151-3/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25417 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetic: indent after r25415ben2007-12-151-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25416 b3059339-0415-0410-9bf9-f77b7e298cf2
* do not override *file_format if already set by asf_streaming_start()ben2007-12-151-0/+1
| | | | | | | | | | | | | ASX files containing a playlist were probably not playable at all. Fixes playback of the following: http://www.impek.com/go/oldcartoontv/wm http://www.impek.tv/go/soul/wm http://www.impek.com/go/tropical2/wm http://www.impek.com/go/mizik/wm git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25415 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make the end_sector accessable (it should be).ulion2007-12-151-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25410 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed the obscene priv->stream entry. Someone must have injected vodka in ↵nicodvb2007-12-152-5/+3
| | | | | | my milk when I wrote it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25408 b3059339-0415-0410-9bf9-f77b7e298cf2
* get rid of the file-static dvb_config and free the config at close() . ↵nicodvb2007-12-152-10/+23
| | | | | | Patch by Andrew Calkin and me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25407 b3059339-0415-0410-9bf9-f77b7e298cf2
* Only read disc info once and save it for later using.ulion2007-12-151-17/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25406 b3059339-0415-0410-9bf9-f77b7e298cf2
* dvb cleanup: call dvb_(set|step)_channel() without dereferencing ↵nicodvb2007-12-152-7/+8
| | | | | | stream->priv (1000l to me) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25405 b3059339-0415-0410-9bf9-f77b7e298cf2
* The buffer used for pread need be aligned, but currently it got an offset 23ulion2007-12-151-1/+1
| | | | | | | | | | | to the structure head. This will cause the pread always got random data on some machines (such as my iMac G5 PPC with 10.5 os) so can not play vcd. I also tried use DKIOCCDREAD ioctl call, but the result is same -- buffer need be aligned. It could be a bug of os x or its dev lib. Now fix this problem by move the buffer to a good aligned position in structure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25404 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get end position of last track by adding its starting address with track size.ulion2007-12-151-2/+17
| | | | | | | On some darwin system, we can not get the lead out track info. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25403 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace printf with mp_msg.ulion2007-12-151-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25402 b3059339-0415-0410-9bf9-f77b7e298cf2
* Only print one track info when exactly seeking to the beginning of a track.ulion2007-12-141-1/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25393 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix stream cdda seeks to CD's end and hangs forever bug.ulion2007-12-141-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25390 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix memleaks; patch by andrew calkin from gmail comnicodvb2007-12-121-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25383 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace SYS_DARWIN by __APPLE__ and __DARWIN__ where appropriate.diego2007-12-112-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25370 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed stupid checksnicodvb2007-12-081-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25324 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l ... the header was used there toolu_zero2007-12-041-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25296 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make libnemesi use specific struct and DEMUXER_TYPElu_zero2007-12-041-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25294 b3059339-0415-0410-9bf9-f77b7e298cf2
* mime_type_table is const as wellreimar2007-12-022-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25274 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a few forgotten static/const attributes in tvi_vbi.creimar2007-12-021-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25273 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_opts arrays should be constreimar2007-12-0213-13/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25270 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make m_option_t arrays referenced by cfg-common.h constreimar2007-12-022-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25269 b3059339-0415-0410-9bf9-f77b7e298cf2
* Preserve unsv:// protocol specifier over http redirects.reimar2007-12-021-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25266 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add appropriate const specifiers to some custom parse functions.reimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25260 b3059339-0415-0410-9bf9-f77b7e298cf2
* Mark all stream_info_t as constreimar2007-12-0225-53/+53
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25239 b3059339-0415-0410-9bf9-f77b7e298cf2
* When IFO file is opened (detected by extension), set dvd-device to IFO file'svoroshil2007-12-022-0/+45
| | | | | | | | | | | | | | | | | | directory and start dvd:// stream instead of file://. If VTS_<N>_*.IFO is opened, open stream as dvd://<N> As Nico Sabbi said: There is no no guarantie that title N is in titleset N, but there are at least good chances. The main purpose of this patch is ability to load DVDs, stored on HDD, using OSD menu. Modified patch from Benjamin Zores ben at geexbox dot org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25238 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make auto_open_streams array itself constreimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25237 b3059339-0415-0410-9bf9-f77b7e298cf2
* auto_open_streams should have const type, fix also the places where it is usedreimar2007-12-011-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25235 b3059339-0415-0410-9bf9-f77b7e298cf2
* at startup show audio and subtitle streams available in the chosen title ↵nicodvb2007-12-011-0/+52
| | | | | | with all their properties git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25224 b3059339-0415-0410-9bf9-f77b7e298cf2
* this variable was nothing but a useless memleakben2007-11-301-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25215 b3059339-0415-0410-9bf9-f77b7e298cf2
* this local variable can be staticben2007-11-301-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25214 b3059339-0415-0410-9bf9-f77b7e298cf2
* -identify also shows the duration(s) of the title(s)nicodvb2007-11-291-2/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25205 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: moved identification code to a separate functionnicodvb2007-11-291-8/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25204 b3059339-0415-0410-9bf9-f77b7e298cf2
* when no title is chosen -identify all titles present in the dvdnicodvb2007-11-291-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25196 b3059339-0415-0410-9bf9-f77b7e298cf2
* with -identify show the title being describednicodvb2007-11-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25195 b3059339-0415-0410-9bf9-f77b7e298cf2
* -identify chapters of chosen titlenicodvb2007-11-281-0/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25193 b3059339-0415-0410-9bf9-f77b7e298cf2
* Correct VCD track no. calculation on Windows.zuxy2007-11-281-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25188 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid gcc warning:zuxy2007-11-281-1/+1
| | | | | | | | vcd_read_win32.h:61: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'DWORD' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25187 b3059339-0415-0410-9bf9-f77b7e298cf2
* Return correct length in ID_VCD_TRACK_n_MSFzuxy2007-11-281-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25186 b3059339-0415-0410-9bf9-f77b7e298cf2
* Enable -rtsp-port for nemesilu_zero2007-11-271-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25184 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove stray varlu_zero2007-11-271-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25183 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing '\n' in tv scanner results output.voroshil2007-11-261-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25166 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support stream redirection from http to mms, fix bug #927.ulion2007-11-263-5/+36
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25163 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert r25089 (Ignore video formats which are supported by devicevoroshil2007-11-241-14/+3
| | | | | | | | | | | | | | but not supported by dshow driver). It prevents code from r25091 (probing undeclared formats) functioning properly: those code is never called if all declared by device formats are unsupported by MPlayer (even if undeclared one is supported). After this revert PVR-150 card should work as expected. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25155 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move requested format at top and shift all oters downvoroshil2007-11-241-8/+11
| | | | | | | | | This method is better with recent negotiation code: requested formats will be checked first. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25154 b3059339-0415-0410-9bf9-f77b7e298cf2
* Сreate empty format arrays in case of error in init_chain_common.voroshil2007-11-241-6/+27
| | | | | | | | | Fixes segfault for cards without audio capture pin in main capture filter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25153 b3059339-0415-0410-9bf9-f77b7e298cf2
* pgc->subp_control and pgc->audio_control are no more bitfields,nicodvb2007-11-231-20/+0
| | | | | | | | | but plain uint32_t and uint16_t respectively; replaced access to bitfield members with bitmask operations (and removed some ugly macro) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25151 b3059339-0415-0410-9bf9-f77b7e298cf2
* don't include anymore the dvdread headers from the dvdnav directorynicodvb2007-11-221-5/+0
| | | | | | | (the right ones are included in the #else). Patch by Rathann git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25140 b3059339-0415-0410-9bf9-f77b7e298cf2
* Compilation fix (typo)voroshil2007-11-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25133 b3059339-0415-0410-9bf9-f77b7e298cf2
* Sizes of arpmt and arStreamCaps must be equal.voroshil2007-11-211-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25124 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move code related to chain initialization and similarvoroshil2007-11-201-80/+78
| | | | | | | | for different chains to separate routine. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25122 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix mplayer crash caused by r25116voroshil2007-11-201-0/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25121 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove no more needed checkvoroshil2007-11-201-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25118 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix totally wrong (due to mess of brackets) structures size check.voroshil2007-11-201-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25117 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace several parameters for get_available_formats_streamvoroshil2007-11-201-60/+24
| | | | | | | and get_available_formats_pin with one chain structure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25116 b3059339-0415-0410-9bf9-f77b7e298cf2
* New routine for reconnecting two pins with new media typevoroshil2007-11-191-23/+68
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25115 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move pointer to SampleGrabber filter into chain structure.voroshil2007-11-191-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25114 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move common chain uninit code into separate routine.voroshil2007-11-191-52/+38
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25113 b3059339-0415-0410-9bf9-f77b7e298cf2
* pass chain structure instead of several variables to build_sub_graphvoroshil2007-11-191-18/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25112 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix missed changevoroshil2007-11-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25111 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add capture filter's pointer to vbi chain structure too.voroshil2007-11-191-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25110 b3059339-0415-0410-9bf9-f77b7e298cf2
* Code unification: get rid of local variable arpmtVBIvoroshil2007-11-191-4/+11
| | | | | | | | and use chain structure's arpmt member. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25109 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add major media type to chain structurevoroshil2007-11-191-6/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25108 b3059339-0415-0410-9bf9-f77b7e298cf2
* One step of code cleanup: move all variables, relatedvoroshil2007-11-191-204/+221
| | | | | | | | | to audio/video/vbi chains of filters into separate structure (will simplify some parts of code in future) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25107 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l: Fix long standing copy-paste error:voroshil2007-11-191-1/+1
| | | | | | | TUN_SET_NORM should set norm value not get it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25105 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add all passed to VID_SET_FORMAT formats to the end ofvoroshil2007-11-181-2/+27
| | | | | | | | | | | | | | | | available format list (but report call as failed, to continue checking formats). This gives small chance to build graph even if device does not report about particular format as supported. This makes mplayer be able to work with PVR-150 card (card's driver does not report about yuy2 format, but accepts connection and works with it). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25096 b3059339-0415-0410-9bf9-f77b7e298cf2
* Ensure that when VID_GET_FORMAT ioctl is called,voroshil2007-11-181-0/+5
| | | | | | | | | | video chain in graph is ready built. Otherwise driver can return one format while graph builder will negotiate another. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25095 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) Indentation fix of previous commit.voroshil2007-11-181-11/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25094 b3059339-0415-0410-9bf9-f77b7e298cf2
* New media format negotiation code:voroshil2007-11-181-2/+14
| | | | | | | | | | | | | | loop through all available formats trying to establish connection between pins. Negotiation stops either when all formats are rejected (error reported in this case) or when connection is established (which can happen only when current media format is accepted by both of the pins). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25093 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move setting media format code voroshil2007-11-181-7/+6
| | | | | | | closer to connection establishment routine. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25092 b3059339-0415-0410-9bf9-f77b7e298cf2
* Pass all available formats to chain building routine andvoroshil2007-11-181-18/+30
| | | | | | | | | | | | | | | | establish connection with first of available formats. This will make further format negotiation patch slightly simpler. To avoid pins connection error due to unsuported format at top of the list, put requested video format to the top of list. This will also useful with upcoming patch - negotiation will be started from requested format. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25091 b3059339-0415-0410-9bf9-f77b7e298cf2
* Ignore video formats which are supported by devicevoroshil2007-11-181-3/+14
| | | | | | | | but not supported by dshow driver. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25089 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix crash when pin connection fails.voroshil2007-11-181-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25088 b3059339-0415-0410-9bf9-f77b7e298cf2
* Prevent chains from building more than once.voroshil2007-11-181-0/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25087 b3059339-0415-0410-9bf9-f77b7e298cf2
* Handle "out of memory" error.voroshil2007-11-181-0/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25086 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move chains building code into separate routines.voroshil2007-11-181-18/+71
| | | | | | | | | This makes code more readable and will allow building particular chain before start(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25085 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) Lookup table alignment.voroshil2007-11-171-12/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25082 b3059339-0415-0410-9bf9-f77b7e298cf2
* Service routine for constructing AM_MEDIA_TYPE structure from voroshil2007-11-171-0/+47
| | | | | | | | given fourcc with help of lookup table. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25081 b3059339-0415-0410-9bf9-f77b7e298cf2
* Disable terminating directshow chains with NullRenderer filter,voroshil2007-11-171-0/+7
| | | | | | | | bacause this causes jerky video. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25080 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix bogus bits per pixel values in lookup table.voroshil2007-11-171-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25079 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cleanup sg_io_hdr initialization a bitreimar2007-11-171-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25078 b3059339-0415-0410-9bf9-f77b7e298cf2
* We do not have any use for the sense data, so we don't need a buffer for it.reimar2007-11-171-4/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25077 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) Indentation fixvoroshil2007-11-171-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25076 b3059339-0415-0410-9bf9-f77b7e298cf2
* Some more cosmeticsreimar2007-11-171-5/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25075 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move the zeroing directly before the other initialization codereimar2007-11-171-3/+3
| | | | | | | for the array/struct git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25074 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move everything that sets buffer values together.reimar2007-11-171-2/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25073 b3059339-0415-0410-9bf9-f77b7e298cf2
* Another place that can use AV_WB32reimar2007-11-171-4/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25072 b3059339-0415-0410-9bf9-f77b7e298cf2
* Some cosmetics in dvd_set_speedreimar2007-11-171-4/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25071 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move the DVD speed factor -> KB/s conversion into the casereimar2007-11-171-4/+3
| | | | | | | branch where it is actually used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25070 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a missing close() to dvd_set_speed functionreimar2007-11-171-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25069 b3059339-0415-0410-9bf9-f77b7e298cf2
* Open device file only right before we need it, so we do notreimar2007-11-171-5/+5
| | | | | | | have to add close to all the abort code-paths git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25068 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not print Ok message when setting speed limit failedreimar2007-11-171-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25067 b3059339-0415-0410-9bf9-f77b7e298cf2
* AV_WB16(..., 1000) more obviously represents one second that assigningreimar2007-11-171-2/+3
| | | | | | | 0x03 and 0xe8 (0x3e8 = 1000). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25066 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_WB32 instead of manual bit-fiddling when setting DVD speedreimar2007-11-171-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25065 b3059339-0415-0410-9bf9-f77b7e298cf2
* GPCMD_SET_STREAMING command is 12 bytes large, not 16reimar2007-11-171-1/+1
| | | | | | | Patch by Sebastian Kemper (sebastian_ml gmx net) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25064 b3059339-0415-0410-9bf9-f77b7e298cf2
* Ignore stream id when checking rdt packet flagsrtogni2007-11-171-1/+1
| | | | | | | Fixes bugzilla #930 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25063 b3059339-0415-0410-9bf9-f77b7e298cf2
* report why the dvd couldn't be opened. Patch by Jan Knutar jknutar+nic+finicodvb2007-11-162-4/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25059 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure that mplayer will receive actual media typevoroshil2007-11-161-0/+13
| | | | | | | instead of requested value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25057 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix FPS from bitrate calculation (was 8 times larger than real value).voroshil2007-11-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25056 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed forgotten and out of date commentnicodvb2007-11-141-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25053 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unneeded checks on MP_DVDNAV and DVDNAV_FORMAT_AC3 (we need and ↵nicodvb2007-11-141-4/+0
| | | | | | assume our fork) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25052 b3059339-0415-0410-9bf9-f77b7e298cf2
* Not all cards supports changing country code.voroshil2007-11-141-1/+0
| | | | | | | | This patch makes failed call to put_CountryCode non-fatal. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25047 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing call to audio_in_uninit in v4l2 tv driver.voroshil2007-11-131-0/+2
| | | | | | | | | | Without it, tv does not start on the second run when using mplayer in slave or idle mode. Patch by Stanislaw Jesmanowicz stan at jesmanowicz dot com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25033 b3059339-0415-0410-9bf9-f77b7e298cf2
* at the end of open() warn users that seeking won't work correctly if the ↵nicodvb2007-11-101-0/+2
| | | | | | cache is enabled git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25014 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix possible null-pointer-dereference in stream_fill_buffer().cehoyos2007-11-081-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24991 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix memory leak.voroshil2007-11-051-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24972 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix segmentation fault after audio initialization failure in tv driver.voroshil2007-11-051-2/+5
| | | | | | | | Error was caused by double call to driver's uninit() routine. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24971 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused variables and parametersnicodvb2007-10-302-8/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24903 b3059339-0415-0410-9bf9-f77b7e298cf2
* Comment out unused variable, fixes the warning:diego2007-10-301-1/+1
| | | | | | | dvb_tune.c:43: warning: 'dvb_secdev' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24889 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused functions, fixes the warnings:diego2007-10-302-16/+0
| | | | | | | | pnm.c:853: warning: 'pnm_peek_header' defined but not used pnm.c:859: warning: 'pnm_close' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24888 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make functions static if they aren't referenced externally.zuxy2007-10-271-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24869 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove assert. Not only are they no help at all and proper checks shouldreimar2007-10-271-5/+0
| | | | | | | be added if desired, also assert.h is not included so compilation may fail. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24859 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't wait for filling entire audio ringbuffer at each call to grab_audio_frame.voroshil2007-10-251-1/+1
| | | | | | | | | Fixes 2 minutes delay before starting playback and audio clicks in sound (at least for my SAA7134 based card while capturing radio through saa7134-alsa module). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24849 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing call to audio_in_start_capture.voroshil2007-10-251-0/+1
| | | | | | | | | Fixes capturing sound from ALSA devices (repeated xrun errors, buffer underruns and son on). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24848 b3059339-0415-0410-9bf9-f77b7e298cf2
* add missing include (errno.h). fix compilation on openbsdivo2007-10-241-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24847 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify handling SET_NORM for V4l1: replace several if-else-if and switchvoroshil2007-10-201-67/+34
| | | | | | | | statements with one lookup table; git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24817 b3059339-0415-0410-9bf9-f77b7e298cf2
* czech/slovak character set fixes:voroshil2007-10-201-2/+2
| | | | | | | | | | | | plain latin characters instead of native were wrongly used in several places of charset table. patch from Oldrich Jedlicka oldium dot pro at seznam dot cz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24816 b3059339-0415-0410-9bf9-f77b7e298cf2
* After receiving EINTR 'read' syscall should be restarted.voroshil2007-10-162-0/+4
| | | | | | | | | | Fixes receiving teletext on some systems. Modified patch from Oldrich Jedlicka oldium dot pro at aenam dot cz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24791 b3059339-0415-0410-9bf9-f77b7e298cf2
* Disable channel scanner when no tuner is present.voroshil2007-10-151-0/+8
| | | | | | | | | | TV channel scanner is useless without tuner and causes mplayer crash due to uninitialized chanlist_s variable (e.g when dummy driver and tvscan are used together). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24790 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix mplayer segfault when v4l driver initialization (at setting normvoroshil2007-10-141-1/+3
| | | | | | | | stage) failed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24787 b3059339-0415-0410-9bf9-f77b7e298cf2
* #ifdef's in tv.c and tv.h becomes more and more hard to maintain.voroshil2007-10-142-26/+0
| | | | | | | | I've decided to remove all of them and control options only through cfg-common.h git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24786 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary curly braces.voroshil2007-10-141-4/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24782 b3059339-0415-0410-9bf9-f77b7e298cf2
* 8 bytes buffer is not enough for at least SECAM-DK.voroshil2007-10-141-1/+1
| | | | | | | | Increase it to 20. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24781 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace duplicated code with call to routinevoroshil2007-10-141-7/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24780 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l: routine sets norm from parameter, but prints value of tv norm optionvoroshil2007-10-141-1/+1
| | | | | | | | (which can be not equal to parameter). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24779 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) indentation fix of my previous commit and small readabilityvoroshil2007-10-141-22/+25
| | | | | | | improvement. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24778 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove driver-dependent #ifdef from norm_from_string routine.voroshil2007-10-141-22/+14
| | | | | | | | | | It will use TVI_CONTROL_SPC_GET_NORMID if supported by driver and fallback to hardcoded norms otherwise. This will not change current behaviour because hardcoded norms were used with drivers which do not support above ioctl. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24777 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) remove trailing whitespacevoroshil2007-10-141-37/+37
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24776 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l fix compilation with v4l2iive2007-10-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24775 b3059339-0415-0410-9bf9-f77b7e298cf2
* DirectShow based tv:// driver for win32voroshil2007-10-136-9/+4062
| | | | | | | | | | | Teletext is also supported (but 625 system parameters are hardcoded). pthreads is required for teletext. Code is still experimental. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24772 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed useless inclusion of error.hnicodvb2007-10-131-1/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24767 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure forked code does not try to display a GTK message box (and thus ↵reimar2007-10-071-0/+4
| | | | | | crashes) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24717 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: misc typo fixesdiego2007-09-251-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24615 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation with enabled radio capture and disabled OSS audio.voroshil2007-09-241-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24603 b3059339-0415-0410-9bf9-f77b7e298cf2
* libnemesi support, yet another rtsp/rtp library...lu_zero2007-09-192-6/+88
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24584 b3059339-0415-0410-9bf9-f77b7e298cf2
* (Re)move idiotic checks, ret can't be < 0 or > 0 if the loop conditionreimar2007-09-191-3/+2
| | | | | | | is that it is == 0! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24579 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a few typosreimar2007-09-192-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24578 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement setting gain control for video devices (usually webcams)voroshil2007-09-184-1/+42
| | | | | | | in v4l2 tv:// driver. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24573 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused members from dvdnav_priv_tnicodvb2007-09-151-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24513 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removed dead code related to stills.nicodvb2007-09-151-8/+0
| | | | | | | patch by Attila Ötvös (oattila chellu hu) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24512 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix missing reset/initialization (with tv parameters) ofvoroshil2007-09-131-0/+2
| | | | | | | | vbi subsystem after tv initialization. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24450 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing #include to fix compilation.diego2007-09-121-0/+1
| | | | | | | patch by Bernd Ernesti, mplayer-dev-eng lists.veego de git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24431 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implementation of tv:// driver autodetection.voroshil2007-09-102-9/+19
| | | | | | | | | | | | If user did not specify driver directly, all available drivers will be probed (in order: v4l2,v4l1,bsdbt848,dummy). In most cases first probed driver will be successfully autodetected and used. Autodetection will be disabled if user specified driver directly (in command line or config). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24423 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix for:voroshil2007-09-081-1/+1
| | | | | | | | tvi_v4l2.c: In function 'start': tvi_v4l2.c:1453: warning: comparison between signed and unsigned git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24366 b3059339-0415-0410-9bf9-f77b7e298cf2
* More accurate calculating of teletextvoroshil2007-09-081-1/+3
| | | | | | | | page update intervals git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24365 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement boxes for subtitle teletext pages.voroshil2007-09-082-8/+26
| | | | | | | | | | Text is shown in opaque boxes inside transparent teletext page. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24364 b3059339-0415-0410-9bf9-f77b7e298cf2
* Decrease teletext page rendering frequency from 1/frame to about 4/sec.voroshil2007-09-082-1/+26
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24362 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix for:voroshil2007-09-031-0/+4
| | | | | | | tvi_vbi.c:1392: warning: 'decode_raw_line_sine' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24336 b3059339-0415-0410-9bf9-f77b7e298cf2
* Increase number of skipped buffers to 5 to avoid mixing teletext pages fromvoroshil2007-09-021-2/+6
| | | | | | | | different channels during channel switch. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24325 b3059339-0415-0410-9bf9-f77b7e298cf2
* a mouse selection may require at least a video codec reinitnicodvb2007-09-011-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24324 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_ASPECT_RATIOnicodvb2007-09-011-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24323 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure that no pages will left in cache duringvoroshil2007-09-011-1/+9
| | | | | | | | channel switch (immediately stop decoding of vbi buffer when clear_cache is called). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24321 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_ASPECT_RATIOnicodvb2007-09-011-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24318 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduced STREAM_CTRL_GET_ASPECT_RATIO to report the aspect ratio read from ↵nicodvb2007-09-011-0/+1
| | | | | | the stream layer (if supported) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24317 b3059339-0415-0410-9bf9-f77b7e298cf2
* Drop out control chars from page header in time position.voroshil2007-09-011-3/+7
| | | | | | | | | Expand time line if necessary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24316 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix missed -1 -> 0x3f7f changes for subpage number.voroshil2007-09-011-2/+2
| | | | | | | | Patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24314 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix displaying start page when it has subpages.voroshil2007-09-011-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24313 b3059339-0415-0410-9bf9-f77b7e298cf2
* Proper support for flashing chars in teletext pages.voroshil2007-09-012-1/+5
| | | | | | | | Patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24312 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support for selecting language via packet 28.voroshil2007-08-313-21/+207
| | | | | | | | | | Also allows to select default teletext language. It will be used if language is not specified by network provider via packet 28. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24310 b3059339-0415-0410-9bf9-f77b7e298cf2
* Small code simplification as suggested by Reimar:voroshil2007-08-291-18/+10
| | | | | | | | | | declare variables used only inside loop in those loop. Hope this will make code a bit easy to understand. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24300 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify code by using FFSWAPvoroshil2007-08-291-4/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24299 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) replace tabs with spacesvoroshil2007-08-291-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24298 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) fix indentation of previous commitvoroshil2007-08-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24297 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement Hold/Release graphics (showing control chars asvoroshil2007-08-291-0/+13
| | | | | | | | graphics instead of spaces). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24296 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement Flash/Steady (swapping foreground/background colors)voroshil2007-08-291-3/+19
| | | | | | | | and Conceal (filling following chars with spaces) control characters. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24295 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make charset constants naming consistantvoroshil2007-08-291-4/+4
| | | | | | | | (renamed according to specification). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24291 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: typo fix UNSUPORTED --> UNSUPPORTEDdiego2007-08-2822-53/+53
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24277 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation by adding forgotten comma.iive2007-08-281-1/+1
| | | | | | | Noticed by Evrim Furuncu on irc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24276 b3059339-0415-0410-9bf9-f77b7e298cf2
* Conversion tables for Serbian/Croatian, Ukrainian and Greek charsets.voroshil2007-08-281-1/+49
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24275 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move channels option parsing code into separate routine.voroshil2007-08-281-67/+72
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24266 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement X/27/0 packet decoding.voroshil2007-08-282-1/+70
| | | | | | | | | It contains information about navigation links. Modified patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24264 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clean up the way get_path is handled: Compile get_path.c to an object to linkdiego2007-08-281-2/+1
| | | | | | | | against instead of directly #including the C file and replace the many extern declarations by a proper header file. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24262 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement 8/30 format 1 teletext packet decodingvoroshil2007-08-282-0/+85
| | | | | | | | | | It contains network id, network name, current date and time. patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24252 b3059339-0415-0410-9bf9-f77b7e298cf2
* in stream_control() remove redefinition of d in a case block, previously ↵nicodvb2007-08-271-1/+0
| | | | | | assigned in the same function git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24249 b3059339-0415-0410-9bf9-f77b7e298cf2
* in open_s() unified failure code in fail:nicodvb2007-08-271-20/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24248 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) remove unnecessary ';'voroshil2007-08-261-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24217 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace perror() with mp_msg()voroshil2007-08-261-31/+32
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24213 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implement TVI_CONTROL_TUN_GET_SIGNAL in *BSD BT848 driver.voroshil2007-08-261-0/+11
| | | | | | | | This will enable TV channels scanning feature under *BSD. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24212 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l: Move #endif upper to reflect changes in r24054.voroshil2007-08-261-1/+1
| | | | | | | | | | This fixes wrong tvscan suboptions initialization under *BSD. patch from Bernd Ernesti mplayer-dev-eng at lists dot veego dot de git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24211 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix typovoroshil2007-08-261-1/+1
| | | | | | | | Patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24210 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add teletext specification referencevoroshil2007-08-261-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24206 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove ugly Russian language support hack.voroshil2007-08-261-11/+1
| | | | | | | | | Currently support for only Latin-1 languages is left. Proper solution for another languages will be added later. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24205 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for Latin National Option Sub-Setsvoroshil2007-08-261-2/+46
| | | | | | | | Modified Otvos Attila's patch oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24204 b3059339-0415-0410-9bf9-f77b7e298cf2
* Enable decoding of packet X/24, it is usual teletext linevoroshil2007-08-261-2/+2
| | | | | | | | | | | and contains labels for navigation links. 10l: fix comments for constants. patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24203 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l: "&" should be done after ">>"voroshil2007-08-251-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24189 b3059339-0415-0410-9bf9-f77b7e298cf2
* Language bits in teletext page header arevoroshil2007-08-251-1/+1
| | | | | | | | control bits C12-C14 (bits 2-4 of d[7]), not C11-C13 (bits 1-3). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24187 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove redundant variable declarations.diego2007-08-251-4/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24165 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removed uninitialized variable.cehoyos2007-08-231-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24129 b3059339-0415-0410-9bf9-f77b7e298cf2
* Automatic TV channels scanning ability for MPlayer.voroshil2007-08-236-1/+145
| | | | | | | Code is based on patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24125 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix blue color for yv12 and i420 image formats in "automute" screenvoroshil2007-08-231-5/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24124 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix [soc:eoc] stubs.voroshil2007-08-221-6/+10
| | | | | | | | Slightly modified patch from Otvos Attila oattila at chello dot hu git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24119 b3059339-0415-0410-9bf9-f77b7e298cf2
* Set DVD speed earlier to avoid drive spinup during openreimar2007-08-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24114 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a bug in stream_read_qword_le due to sign extension from int to uint64_t.reimar2007-08-191-8/+2
| | | | | | | Patch by Sean Veers [cf3cf3 gmail com] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24099 b3059339-0415-0410-9bf9-f77b7e298cf2
* Sync libdvdread with version 0.9.5 (functional changes).diego2007-08-151-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24067 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation on BSD.diego2007-08-131-1/+1
| | | | | | | patch by Bernd Ernesti, mplayer-dev-eng lists.veego de git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24054 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused variables.diego2007-08-131-3/+0
| | | | | | | patch by Bernd Ernesti, mplayer-dev-eng lists.veego de git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24053 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix UDP select timeout.diego2007-08-121-2/+2
| | | | | | | patch by Tim Wojtulewicz, timwoj ieee org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24046 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix warning: too many arguments for formatcehoyos2007-08-081-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24039 b3059339-0415-0410-9bf9-f77b7e298cf2
* Define teletext_control() in tvi_v4l.c and tvi_v4l2.c.cehoyos2007-08-081-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24037 b3059339-0415-0410-9bf9-f77b7e298cf2
* Moved dvdtimetomsec to stream_dvd_common.c.cehoyos2007-08-044-23/+27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24013 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: removed commented code and small reindentationnicodvb2007-08-041-4/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24011 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused variablesnicodvb2007-08-041-6/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24010 b3059339-0415-0410-9bf9-f77b7e298cf2
* Added missing newline.cehoyos2007-08-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23999 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove GNUism (case range)ivo2007-07-301-11/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23948 b3059339-0415-0410-9bf9-f77b7e298cf2
* Teletext support for V4Lv1voroshil2007-07-301-0/+174
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23946 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l: wrong pointer was initialized (causes crash during startup).voroshil2007-07-302-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23945 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix hopefully final 150 sector offset VCD bug. Caused no noticeable problems ↵reimar2007-07-301-1/+2
| | | | | | | | | on Linux because it is the only case where M:S:F is used in the read call. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23941 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify sun SCSI command generationreimar2007-07-301-26/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23940 b3059339-0415-0410-9bf9-f77b7e298cf2
* big 10L of r9888 located: passed fd instead of pointer to sun_vcd_readreimar2007-07-301-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23939 b3059339-0415-0410-9bf9-f77b7e298cf2
* Subtraction should be done after & operation.voroshil2007-07-301-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23928 b3059339-0415-0410-9bf9-f77b7e298cf2
* Drop out overlooked debug linevoroshil2007-07-301-2/+1
| | | | | | | | Fix hex to char conversion git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23927 b3059339-0415-0410-9bf9-f77b7e298cf2
* More doxygen commentsreimar2007-07-291-0/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23922 b3059339-0415-0410-9bf9-f77b7e298cf2
* Teletext supportvoroshil2007-07-291-0/+179
| | | | | | | | Part 3/5: grabbing raw VBI data git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23921 b3059339-0415-0410-9bf9-f77b7e298cf2
* Teletext support.voroshil2007-07-294-0/+102
| | | | | | | Part 2/5: options/slaves/configure/definitions/etc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23920 b3059339-0415-0410-9bf9-f77b7e298cf2
* Teletext support.voroshil2007-07-291-0/+1365
| | | | | | | | Part 1/5: core stuff git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23919 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify and fix missing offset for Darwin vcd_get/set_msf functionsreimar2007-07-291-8/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23918 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make VCD work on little-endian macsreimar2007-07-291-3/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23916 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make vcd_get_track_end actually return the end, not the start on Darwinreimar2007-07-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23915 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make the vcd seek and get track end functions actually have an effectreimar2007-07-291-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23914 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix wrong return type in darwin VCD codereimar2007-07-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23911 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replacing global variables in radio:// withvoroshil2007-07-292-74/+78
| | | | | | | | context-sensitive structure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23910 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-292-84/+0
| | | | | | | | | Step 8 (last): removing old globals from tv.c, tv.h, fixing remaining references in cfg-common.h and mplayer.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23909 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-291-33/+33
| | | | | | | | Step 7: replacing old globals with new structure in stream_pvr.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23908 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-291-61/+61
| | | | | | | | Step 6: removing references to old globals from tv.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23907 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-291-30/+30
| | | | | | | | Step 5: removing references to old globals from tvi_v4l2.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23906 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-291-49/+49
| | | | | | | | Step 4: removing references to old globals from tvi_v4l.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23905 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-291-1/+1
| | | | | | | | Step 3: removing references to old globals from tvi_bsdbt848.c git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23904 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-296-28/+36
| | | | | | | Step 2: fixing tv subdrivers initialization. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23903 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing global variables from tv://voroshil2007-07-292-19/+102
| | | | | | | | Step 1: introducing new structure, fixing tv:// stream git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23902 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removing forward declarations of routines used only in tv.cvoroshil2007-07-292-8/+2
| | | | | | | | | Marking above routines as static Removing unfaithful comment git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23901 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics.voroshil2007-07-291-10/+10
| | | | | | | | 10l: forget to move up second routine git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23900 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: move two routines upvoroshil2007-07-291-34/+34
| | | | | | | to avoid requirement of forward declarations. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23899 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: misc typo fixesdiego2007-07-281-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23893 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove completely pointless extra return statementsreimar2007-07-271-9/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23883 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix MSF -> sector conversion being 150 sectors ofreimar2007-07-271-1/+2
| | | | | | | (pregap or whatever it is called) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23882 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify track length calculationreimar2007-07-271-18/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23881 b3059339-0415-0410-9bf9-f77b7e298cf2
* Some more *BSD vcd_read simplificationreimar2007-07-271-41/+31
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23880 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix several 100lreimar2007-07-271-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23879 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factor out some common codereimar2007-07-271-28/+36
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23878 b3059339-0415-0410-9bf9-f77b7e298cf2
* Somewhat unified *BSD vcd readingreimar2007-07-273-196/+90
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23877 b3059339-0415-0410-9bf9-f77b7e298cf2
* READ_TOC for making *BSD code more similarreimar2007-07-272-6/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23876 b3059339-0415-0410-9bf9-f77b7e298cf2
* One ifdef lessreimar2007-07-271-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23874 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify NetBSD vcd_read codereimar2007-07-271-21/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23873 b3059339-0415-0410-9bf9-f77b7e298cf2
* vcd_inc_msf function also for freebsd vcd_readreimar2007-07-271-9/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23872 b3059339-0415-0410-9bf9-f77b7e298cf2
* More VCD cosmeticsreimar2007-07-271-16/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23871 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l, return is missing a valuereimar2007-07-261-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23870 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics to reduce diff between Free- and netBSD vcd stuffreimar2007-07-262-61/+74
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23869 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l, fix vcd netbsd compilationreimar2007-07-261-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23868 b3059339-0415-0410-9bf9-f77b7e298cf2
* TOCADDR macro as first step to common *BSD vcd reading codereimar2007-07-262-45/+50
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23867 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary #ifdef around the whole file.diego2007-07-091-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23756 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary #ifdef around the whole file.diego2007-07-091-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23755 b3059339-0415-0410-9bf9-f77b7e298cf2
* ISO8859-1 --> UTF-8diego2007-07-091-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23754 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary flip for RGB in v4l1.voroshil2007-07-081-22/+1
| | | | | | | | Patch was provided and tested by Trent Piepho xyzzy at speakeasy dot org. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23744 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid code duplication and ugly config.h hack by using av_strlcat/av_strlcpyreimar2007-07-055-14/+19
| | | | | | | instead of plain strlcat/strlcpy git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23723 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cygwin has had inttypes.h since version 1.5.diego2007-07-031-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23712 b3059339-0415-0410-9bf9-f77b7e298cf2
* The file is compiled conditional to USE_DVDREAD so the #ifdef USE_DVDREADdiego2007-07-031-13/+0
| | | | | | | in the file are senseless. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23711 b3059339-0415-0410-9bf9-f77b7e298cf2
* The header is always included conditional to USE_DVDREAD,diego2007-07-031-5/+0
| | | | | | | no need to duplicate the #ifdef. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23710 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not use leading underscores in multiple inclusion guards, they are reserved.diego2007-07-0215-41/+41
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23709 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics.voroshil2007-06-301-3/+3
| | | | | | | Reindent line, remove trailing spaces. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23698 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't override input= option value is no input id is passed in tv:// url.voroshil2007-06-301-2/+4
| | | | | | | | Remove debug fprintf git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23697 b3059339-0415-0410-9bf9-f77b7e298cf2
* wvx files (mimetype video/x-ms-wvx) are asx playlists. Fix bugzilla #750rtogni2007-06-292-2/+1
| | | | | | | | | http://www.ntt-fukushima.com/sora/mado_live/jr_aizu/gazai/jrwaka500k.wvx Patch by Sergey Svishchev | svs ropnet ru | on bugzilla git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23695 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove file that was added by mistake.voroshil2007-06-291-0/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23688 b3059339-0415-0410-9bf9-f77b7e298cf2
* Implemented tv://[<channel>][/<input_id>] url syntaxvoroshil2007-06-282-3/+34
| | | | | | | | | to allow users start watching from S-Video or Composite input without touching '-tv input=' option. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23687 b3059339-0415-0410-9bf9-f77b7e298cf2
* start= and end= parameters on realrtspurls may be optionally quoted with rtogni2007-06-241-0/+5
| | | | | | | | | ", skip the quoting if it's there. Fixes rtsp://rmv8.bbc.net.uk/bbc7/2300_tue.ra?start="30:00" from bugzilla #850 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23661 b3059339-0415-0410-9bf9-f77b7e298cf2
* get rid of useless *alloc castsreimar2007-06-241-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23649 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix dvd:// subtitle handling to always report the MPEG stream id, becausereimar2007-06-241-7/+13
| | | | | | | this is the only thing the remaining parts of MPlayer care about. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23621 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert r23530.voroshil2007-06-215-1407/+0
| | | | | | | | | r23530 breaks policy: notification was not sent to mailing list, agreements of other devs were not received. Code also should be reviewed/cleaned up/fixed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23593 b3059339-0415-0410-9bf9-f77b7e298cf2
* Teletext support for tv:// (v4l and v4l2 only)voroshil2007-06-105-0/+1407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | modified patch from Otvos Attila oattila at chello dot hu Module uses zvbi library for all low-level VBI operations (like I/O with vbi device, converting vbi pages into usefull vbi_page stuctures, rendering them into RGB32 images). All teletext related stuff (except properties, slave commands and rendering osd in text mode or RGB32 rendered teletext pages in spu mode) is implemented in tvi_vbi.c New properties: teletext_page - switching between pages teletext_mode - switch between on/off/opaque/transparent modes teletext_format - (currently read-only) allows to get format info (black/white,gray,text) teletext_half_page - trivial zooming (displaying top/bottom half of teletext page) New slave commands: teletext_add_dec - user interface for jumping to any page by editing page number interactively teletext_go_link - goes though links, specified on current page git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23530 b3059339-0415-0410-9bf9-f77b7e298cf2
* Set errno to 0 after printing it, not beforereimar2007-06-081-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23506 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compiler warnings.voroshil2007-06-083-5/+2
| | | | | | | | Remove unused tv_param_on variable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23505 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace implicit use of fast_memcpy via macro by explicit use to allowreimar2007-06-051-7/+7
| | | | | | | for future optimization. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23475 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoiding sscanf in cddb support reading more data with %s than buffer sizereimar2007-06-051-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23470 b3059339-0415-0410-9bf9-f77b7e298cf2
* mjpeg support for v4l2 tv:// drivervoroshil2007-06-012-40/+46
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23441 b3059339-0415-0410-9bf9-f77b7e298cf2
* New "automute" tv:// option.voroshil2007-05-315-0/+75
| | | | | | | | | Will switch off sound and show blue screen instead of video with noise when signal level (in 0-255 scale) is less than specified value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23440 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some unused variables, patch by timwoj ieee org.diego2007-05-282-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23399 b3059339-0415-0410-9bf9-f77b7e298cf2
* More fastmemcpy.h removalreimar2007-05-272-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23395 b3059339-0415-0410-9bf9-f77b7e298cf2
* fixed off-by-one bug during chapter-listing; fixed by Jared Breland ↵nicodvb2007-05-261-2/+2
| | | | | | (list-mplayer@legroom.net) and me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23386 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove unnecessary stubs which were not ever used.voroshil2007-05-244-26/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23380 b3059339-0415-0410-9bf9-f77b7e298cf2
* make v4l1 driver work properly.voroshil2007-05-211-43/+45
| | | | | | | | | | v4l1 API docs says that VIDIOCSWIN (picture size) and VIDIOCSPICT (pixel format) should be called before VIDIOCGMBUF ioctl call. patch by Trent Piepho xyzzy at speakeasy dot org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23372 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix OpenBSD compilation: strndup is a GNU extension.reimar2007-05-201-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23351 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix track info being read for the wrong track introduced in r20598reimar2007-05-101-3/+3
| | | | | | | Patch by kiriuja (mplayer-patches <at> en-directo net) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23287 b3059339-0415-0410-9bf9-f77b7e298cf2
* Missing -1 in the FreeBSD code to get the first CD track numberreimar2007-05-101-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23286 b3059339-0415-0410-9bf9-f77b7e298cf2
* added proper GPL headers to new stream/pvr.h fileben2007-05-081-0/+23
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23264 b3059339-0415-0410-9bf9-f77b7e298cf2
* give credits to Sven for pvr channel navigationben2007-05-081-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23263 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for PVR channel navigation (patch by Sven Gothel <sgothel at jausoft ↵ben2007-05-082-23/+824
| | | | | | dot com>) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23262 b3059339-0415-0410-9bf9-f77b7e298cf2
* deprecated comment from the time the pvr code was half V4L2 and half IVTV ↵ben2007-04-301-2/+0
| | | | | | specific git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23184 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) replace tabs with spacesvoroshil2007-04-291-970/+970
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23169 b3059339-0415-0410-9bf9-f77b7e298cf2
* typo fix.voroshil2007-04-291-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23168 b3059339-0415-0410-9bf9-f77b7e298cf2
* (cosmetics) more indentation fixes.voroshil2007-04-281-59/+55
| | | | | | | patch from Trent Piepho xyzzy at speakeasy dot org git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23167 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Fix one more stray wrongly indented line.diego2007-04-281-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23160 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove all trailing whitespace and tabs, indentation fixes.diego2007-04-281-1095/+1089
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23159 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add Makefile variable for audio input that is enabled by V4L or radio capture.diego2007-04-221-7/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23088 b3059339-0415-0410-9bf9-f77b7e298cf2
* after a DVDNAV_VTS_CHANGE event report the title being playednicodvb2007-04-221-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23061 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics. restore empty line removed in r22985.voroshil2007-04-131-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22987 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move translatable strings from tv.c to help_mp*voroshil2007-04-131-51/+44
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22985 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rework of *BSD BT848 detection for radio://voroshil2007-04-111-8/+11
| | | | | | | | to reuse recently added BT848 interface headers detection code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22966 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cleanup real_calc_response_and_checksum()rtogni2007-04-091-10/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22963 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge calc_response_string() into real_calc_response_and_checksum()rtogni2007-04-091-13/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22962 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify calc_response_string()rtogni2007-04-091-10/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22961 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10000000l learn to countrtogni2007-04-091-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22960 b3059339-0415-0410-9bf9-f77b7e298cf2
* Size of response is known, no need to calculate itrtogni2007-04-091-4/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22959 b3059339-0415-0410-9bf9-f77b7e298cf2
* The size of xor_table is known and fixed, no need to calculate itrtogni2007-04-091-8/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22958 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_CURRENT_TIME and STREAM_CTRL_SEEK_TO_TIME - ↵nicodvb2007-04-091-0/+20
| | | | | | dvdnav from mphq required git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22954 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove ugly #include from tvi_bsdbt848.cvoroshil2007-04-091-14/+12
| | | | | | | (better detection of bt848 headers) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22952 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix typo in r22772 which causes compilation error under *BSD.voroshil2007-04-081-8/+8
| | | | | | | Slightly modified patch from Bernd Ernesti. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22946 b3059339-0415-0410-9bf9-f77b7e298cf2
* Ability to specify video and audio capture device namesvoroshil2007-04-051-8/+40
| | | | | | | in *BSD BT848 tv driver. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22916 b3059339-0415-0410-9bf9-f77b7e298cf2
* Length of interleaved RTSP frames (0x24) in only 16 bit, the other byte rtogni2007-04-031-1/+2
| | | | | | | is the channel number (normally 0) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22912 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check buffer size in header dump functionsrtogni2007-03-253-22/+84
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22821 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use AV_WB* instead of swap+memcpy+swaprtogni2007-03-241-120/+46
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22801 b3059339-0415-0410-9bf9-f77b7e298cf2
* at open() discard front margin/empty sectors (fixes demuxing by ↵nicodvb2007-03-241-1/+13
| | | | | | libavformat); patch by Zuxy meng git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22793 b3059339-0415-0410-9bf9-f77b7e298cf2
* Radio driver loading rework.voroshil2007-03-211-133/+86
| | | | | | | Available interfaces are showed in verbose mode. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22772 b3059339-0415-0410-9bf9-f77b7e298cf2
* Declare eof only when stream 0 gets eofrtogni2007-03-201-1/+9
| | | | | | | Fixes premature eof on rtsp://vodreal.stanford.edu/opa/philo/061022.rm git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22768 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix for realrtsp urls with more than 2 streams:rtogni2007-03-201-3/+5
| | | | | | | | | - do setup for all the streams we subscribed to - Use all bits of stream id, not only the lsbit Fixes rtsp://vodreal.stanford.edu/opa/philo/061022.rm git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22767 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing bogus norm warning for v4l2voroshil2007-03-191-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22746 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure bogus parameter will not be ignored by user. voroshil2007-03-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22745 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support application/smil as mimetype for smil-over-realrtsprtogni2007-03-181-1/+2
| | | | | | | Fixes rtsp://www.russiantvonline.com/smils/live.smil git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22721 b3059339-0415-0410-9bf9-f77b7e298cf2
* New slave command: tv_step_freq <offset in MHz>voroshil2007-03-172-0/+16
| | | | | | | Command sets the TV frequency relative to current value git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22685 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unnecessary -I option from CFLAGS.diego2007-03-161-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22638 b3059339-0415-0410-9bf9-f77b7e298cf2
* Allow to specify frequencies in channels option.voroshil2007-03-161-0/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22637 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix live555 compilation when stream cache is disabled.diego2007-03-131-0/+2
| | | | | | | based on patch by Gianluigi Tiesi, mplayer netfarm it git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22558 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Fix indentation, reorder some lines for consistency.diego2007-03-131-30/+30
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22549 b3059339-0415-0410-9bf9-f77b7e298cf2
* Give more descriptive names to the source and library variables and splitdiego2007-03-131-29/+28
| | | | | | | between common, MPlayer-specific and MEncoder-specific parts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22546 b3059339-0415-0410-9bf9-f77b7e298cf2
* add vcd:// for win32, patch by zuxy mengcompn2007-03-121-0/+130
| | | | | | | | split up into the following commits r22523, r22524, r22526 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22526 b3059339-0415-0410-9bf9-f77b7e298cf2
* Source files should not contain non-ASCII characters.diego2007-03-121-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22525 b3059339-0415-0410-9bf9-f77b7e298cf2
* add vcd:// for win32, patch by zuxy mengcompn2007-03-121-1/+25
| | | | | | | | split up into the following commits r22523, r22524, r22526 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22524 b3059339-0415-0410-9bf9-f77b7e298cf2
* optionally reuse the socket if -reuse-socket is selected; patch by Yong Hwan ↵nicodvb2007-03-081-0/+6
| | | | | | (sio4 users sf net) simplified by me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22491 b3059339-0415-0410-9bf9-f77b7e298cf2
* truncate mencoder's output file if it exists, instead of overwriting just ↵lorenm2007-03-052-2/+2
| | | | | | part of it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22469 b3059339-0415-0410-9bf9-f77b7e298cf2
* print the disc_id without using a buffernicodvb2007-03-041-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22430 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10000l; in previous commit I allocated a buffer 1 byte too shortnicodvb2007-03-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22422 b3059339-0415-0410-9bf9-f77b7e298cf2
* replaced 1 instances of sprintf() with snprintf(); patch by njkain gmail com.nicodvb2007-03-031-2/+3
| | | | | | | | This patch is intended to render code easier to audit against buffer oveflows git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22421 b3059339-0415-0410-9bf9-f77b7e298cf2
* replaced 2 instances of sprintf() with snprintf() and one instancenicodvb2007-03-031-4/+3
| | | | | | | | | of strncpy() followed by string termination with strlcpy(); patch by njkain gmail com. This patch is intended to render code easier to audit against buffer oveflows git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22420 b3059339-0415-0410-9bf9-f77b7e298cf2
* tv driver loading rework. As a side effect "-tv driver=help" option isvoroshil2007-03-017-41/+75
| | | | | | | implemented. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22399 b3059339-0415-0410-9bf9-f77b7e298cf2
* winsocks expects an int in milliseconds instead of struct timeval to setivo2007-03-011-4/+12
| | | | | | | | | | the timeout of a socket patch by Zuxy Meng, zuxy dot meng ... gmailcom git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22397 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace MIN with FFMINreimar2007-03-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22396 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use libavutil AV_RB/AV_WB macros instead of defining out own variants.reimar2007-03-012-163/+148
| | | | | | | Probably fixes http://bugzilla.mplayerhq.hu/show_bug.cgi?id=767 as a side-effect git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22394 b3059339-0415-0410-9bf9-f77b7e298cf2
* cleaned stream_seek() : simplified the alignment to STREAM_BUFFER_SIZE or ↵nicodvb2007-02-281-20/+4
| | | | | | s->sector_size git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22380 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add support for smil playlist served over realrtsprtogni2007-02-183-3/+17
| | | | | | | (audio and video playback only, not full smil support) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22260 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify code by using separate variables for large common expressions.reimar2007-02-151-22/+26
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22222 b3059339-0415-0410-9bf9-f77b7e298cf2
* More strncat() misuses.rtogni2007-02-111-5/+5
| | | | | | | Reported by Sascha Sommer git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22207 b3059339-0415-0410-9bf9-f77b7e298cf2
* strncat() misuses, may have been exploitable.rtogni2007-02-111-3/+3
| | | | | | | Reported by Sascha Sommer. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22206 b3059339-0415-0410-9bf9-f77b7e298cf2
* More boundary checks for fixed-length arrays. Some of them may have been rtogni2007-02-111-4/+12
| | | | | | | exploitable. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22203 b3059339-0415-0410-9bf9-f77b7e298cf2
* Quick hack mostly for documentation purposes to make -aid work with mms://reimar2007-02-081-0/+10
| | | | | | | Sample: mms://212.191.227.121/308gwY8TZqvHUpsq4dbZnsijbiCi9j3KsguBrfbm2FiDMlBadHuF0g0%2b1%2bUKG84F2Sl6DVTxHNtNuMxa%2f55j0imtiKswx8ev7cEYxvNuAlSBioF3nYmzTAM71xKiTHjM6%2fqejrQgFg7srIdntNoIw%2fyw%3d%3d/1 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22177 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix a few gcc warnings, approved by Diego and Reimar.rathann2007-02-053-4/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22160 b3059339-0415-0410-9bf9-f77b7e298cf2
* Use defined() syntax instead without ().reimar2007-02-041-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22132 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add timeout to tcp connections, avoid hanging forever.rtogni2007-02-041-0/+7
| | | | | | | Based on patch for bugzilla #673 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22131 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix base64_encode() max output length checking.uau2007-01-281-4/+3
| | | | | | | Made HTTP auth fail if sum of username+password lengths was below 3. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22049 b3059339-0415-0410-9bf9-f77b7e298cf2
* Accept rdt packets with "is-reliable" flag setrtogni2007-01-281-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22041 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix FSF address and otherwise broken license headers.diego2007-01-223-9/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21995 b3059339-0415-0410-9bf9-f77b7e298cf2
* at open() assign *file_format=DEMUXER_TYPE_MPEG_PS to avoid useless demuxer ↵nicodvb2007-01-162-0/+5
| | | | | | probing git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21944 b3059339-0415-0410-9bf9-f77b7e298cf2
* GNU/kFreeBSD support, closes Bugzilla #704.diego2007-01-103-6/+6
| | | | | | | patch by Petr Salinger, Petr.Salinger seznam cz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21866 b3059339-0415-0410-9bf9-f77b7e298cf2
* Don't drop last rdt packet on eofrtogni2007-01-093-2/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21860 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed static declaration before non-instantiated struct; patch by cehoyos ↵nicodvb2007-01-091-1/+1
| | | | | | ag or at git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21859 b3059339-0415-0410-9bf9-f77b7e298cf2
* Two crash issues fixed:voroshil2007-01-081-1/+9
| | | | | | | | | 1. Freeing of unallocated memory when tv driver fails to initialize itself. 2. Call to tv driver's tv_uninit more than once. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21855 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure we do not crash when eof is reset, e.g. due to an attempt to seek.reimar2007-01-071-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21854 b3059339-0415-0410-9bf9-f77b7e298cf2
* in dvb_get_config() open the frontend in READ_ONLY mode for probing ↵nicodvb2007-01-071-1/+1
| | | | | | (worksaround some buggy driver) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21852 b3059339-0415-0410-9bf9-f77b7e298cf2
* reindentednicodvb2007-01-061-16/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21843 b3059339-0415-0410-9bf9-f77b7e298cf2
* init to 0 feparams before tuningnicodvb2007-01-061-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21842 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed useless reporting codenicodvb2007-01-061-55/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21834 b3059339-0415-0410-9bf9-f77b7e298cf2
* moved actual tuning code from check_status() to tune_it()nicodvb2007-01-061-18/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21833 b3059339-0415-0410-9bf9-f77b7e298cf2
* don't add pid 0 if it's already present in the listnicodvb2007-01-061-6/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21832 b3059339-0415-0410-9bf9-f77b7e298cf2
* More free() that were forgotten in r21806 memleak fixrtogni2007-01-011-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21808 b3059339-0415-0410-9bf9-f77b7e298cf2
* Memleak fix (implement sdpplin_free() and use it)rtogni2007-01-012-1/+28
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21806 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix invalid memory access if identifier is unknownrtogni2007-01-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21805 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix potential buffer overflow in asm rules matching codertogni2006-12-313-3/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21799 b3059339-0415-0410-9bf9-f77b7e298cf2
* reindentationnicodvb2006-12-301-13/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21793 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix double free of *http_hdr at server error.iive2006-12-301-2/+2
| | | | | | | | | | | In http.c::http_streaming_start() *http_hdr is allocated then assigned to stream->streaming_ctrl->data if server returns error *http_hdr is freed before function returns. However the copy in ->data remains and is later freed (again) by network.c::streaming_ctrl_free(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21792 b3059339-0415-0410-9bf9-f77b7e298cf2
* replace call to UDFFindFile() (that is not part of the public API) with ↵nicodvb2006-12-231-6/+6
| | | | | | | | | | DVDOpenFile() patch by Klaus Muller (mk.2001 web de) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21747 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix compilation on the most delicious variant of unix (mingw) that lacks ↵nicodvb2006-12-211-2/+7
| | | | | | S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21721 b3059339-0415-0410-9bf9-f77b7e298cf2
* reindented after yesterday's commitnicodvb2006-12-201-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21704 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for writing over smb sharesnicodvb2006-12-191-6/+23
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21690 b3059339-0415-0410-9bf9-f77b7e298cf2
* in WRITE mode open the output file with mode 0666; umask will filter itnicodvb2006-12-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21689 b3059339-0415-0410-9bf9-f77b7e298cf2
* support functions for writing to streamsnicodvb2006-12-181-0/+28
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21675 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_SIZEnicodvb2006-12-181-0/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21674 b3059339-0415-0410-9bf9-f77b7e298cf2
* new STREAM_CTRL_GET_SIZE to get size of output streamnicodvb2006-12-181-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21673 b3059339-0415-0410-9bf9-f77b7e298cf2
* in STREAM_WRITE mode open the stream with O_RDWR|O_CREAT, S_IRUSR|S_IWUSR ↵nicodvb2006-12-181-3/+6
| | | | | | and disable seek_forward for pipes git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21672 b3059339-0415-0410-9bf9-f77b7e298cf2
* added member and definitions for output streamsnicodvb2006-12-181-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21671 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for limiting dvd speed; patch by Tobias Diedrich (ranma tdiedrich se)nicodvb2006-12-171-0/+87
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21652 b3059339-0415-0410-9bf9-f77b7e298cf2
* simplified aid management in dvdnav_lang_from_aid(); patch by Joakim Pattenicodvb2006-12-151-7/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21629 b3059339-0415-0410-9bf9-f77b7e298cf2
* Force lavf on flv streams. Closes bugzilla #354rtogni2006-12-151-0/+4
| | | | | | | | Fixes http://portal.vpod.tv/jmbillaut/11439/stream/cdn Patch based on a suggestion by compn git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21628 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented dvdnav_lang_from_aid() to retrieve audio languagenicodvb2006-12-142-0/+31
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21619 b3059339-0415-0410-9bf9-f77b7e298cf2
* added dvdnav_aid_from_lang() to support -alangnicodvb2006-12-142-0/+45
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21616 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missing buf.memory = V4L2_MEMORY_MMAP; initializations.reimar2006-12-121-0/+3
| | | | | | | Patch by Laurent Pinchart {laurent pinchart <at> skynet be} git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21603 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure closesocket is called.reimar2006-12-101-0/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21583 b3059339-0415-0410-9bf9-f77b7e298cf2
* STREAM_UNSUPPORTED is -1, so use the former for return value in all places.reimar2006-12-101-4/+2
| | | | | | | Thanks to Nicolas Baradakis (nbk sitadelle com) for noticing. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21582 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure stream->fd is set correct (esp. to -1 on error when fd is closed)reimar2006-12-101-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21581 b3059339-0415-0410-9bf9-f77b7e298cf2
* added function to return the language of the specified subtitle id. Patch bynicodvb2006-12-102-0/+22
| | | | | | | | o o O tvos Attila git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21576 b3059339-0415-0410-9bf9-f77b7e298cf2
* ID_SUBTITLE_ID should show the -sid number, not the vobsub id also for dvd subs.reimar2006-12-101-1/+1
| | | | | | | Patch by Lehel Bernadt [lehel pmc-services hu] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21570 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix misplaced http_freereimar2006-12-091-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21558 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix potential endless loop in http_streaming_start duereimar2006-12-091-0/+1
| | | | | | | to not resetting redirect. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21557 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix lots and lots of potential memory/fd leaks in http_streaming_startreimar2006-12-091-19/+28
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21556 b3059339-0415-0410-9bf9-f77b7e298cf2
* export spu palette; part of a patch by Otvos Attilanicodvb2006-12-092-0/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21554 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid memory and fd leaks in asf streaming open code.reimar2006-12-091-15/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21553 b3059339-0415-0410-9bf9-f77b7e298cf2
* Forgotten closesocket on error, patch byreimar2006-12-091-1/+4
| | | | | | | Nicolas Baradakis <nbk sitadelle com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21552 b3059339-0415-0410-9bf9-f77b7e298cf2
* Close fd on error.reimar2006-12-091-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21551 b3059339-0415-0410-9bf9-f77b7e298cf2
* Hack around libavutil/bswap.h compilation problems due to always_inline ↵reimar2006-12-073-3/+3
| | | | | | undefined. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21523 b3059339-0415-0410-9bf9-f77b7e298cf2
* Simplify NEXT_LINE macro and put most of it in a separate function.reimar2006-12-061-16/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21520 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove useless and incorrect const-removing castreimar2006-12-061-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21519 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not define _GNU_SOURCE, it is not necessary and causes a warning if it isreimar2006-12-061-2/+0
| | | | | | | already defined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21518 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make sure invalid protocols are rejected instead of treatedreimar2006-12-051-1/+2
| | | | | | | just like file:// git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21509 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add full support for en-/disabling cddb supportreimar2006-12-041-3/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21495 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove headers included twiceaurel2006-12-031-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21481 b3059339-0415-0410-9bf9-f77b7e298cf2
* use strchr() instead of index()aurel2006-12-031-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21480 b3059339-0415-0410-9bf9-f77b7e298cf2
* doxygenized dvdnav_sid_from_lang() and dvdnav_number_of_subs()nicodvb2006-12-021-0/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21440 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move system headers before libavutil headers to work around build issues ondiego2006-12-021-3/+3
| | | | | | | Mac OS X, redefining always_inline causes problems. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21434 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove bswap.h, use libavutil/bswap.h instead.diego2006-11-293-3/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21388 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetical reformattingnicodvb2006-11-271-13/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21349 b3059339-0415-0410-9bf9-f77b7e298cf2
* feed the content of NAV_PACKET to the demuxernicodvb2006-11-271-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21348 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a config.mak variable for CDDB.diego2006-11-271-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21342 b3059339-0415-0410-9bf9-f77b7e298cf2
* FFmpeg-style dependency declarationdiego2006-11-271-96/+51
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21325 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Merge SRCS together, alphabetical order, whitespace.diego2006-11-271-32/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21320 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics:indentationdiego2006-11-271-37/+37
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21318 b3059339-0415-0410-9bf9-f77b7e298cf2
* Untangle dependencies that are handled by configure.diego2006-11-271-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21317 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove unused LIBAV_INC variable.diego2006-11-271-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21316 b3059339-0415-0410-9bf9-f77b7e298cf2
* Merge common parts of all Makefiles into one file included by all.diego2006-11-261-28/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21275 b3059339-0415-0410-9bf9-f77b7e298cf2
* match exactly card number N specified, rather than the N-th actually usablenicodvb2006-11-261-3/+12
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21257 b3059339-0415-0410-9bf9-f77b7e298cf2
* keep nav highlight event in dvdnav priv structureben2006-11-252-12/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21235 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove superfluous comment.diego2006-11-251-3/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21222 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for comma-separated language codes in -slangnicodvb2006-11-251-1/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21220 b3059339-0415-0410-9bf9-f77b7e298cf2
* spurious () like in ({code;}) probably is not valid C, icc 9, definitelyreimar2006-11-251-2/+2
| | | | | | | | will not compile it, and whatever it is supposed to be good for it does not seem to be needed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21218 b3059339-0415-0410-9bf9-f77b7e298cf2
* better nav highlight handlingben2006-11-252-4/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21216 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed unused members and variablesnicodvb2006-11-252-19/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21215 b3059339-0415-0410-9bf9-f77b7e298cf2
* COSMETICS: consistently reformatted after ben's messnicodvb2006-11-251-6/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21214 b3059339-0415-0410-9bf9-f77b7e298cf2
* added code to identify subs language and count; needed for forthcoming ↵nicodvb2006-11-252-0/+30
| | | | | | support for -slang git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21213 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for dvdnav menu buttons overlay as simple alpha boxes (rework from ↵ben2006-11-251-0/+48
| | | | | | Otvos Attila's series of patches) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21209 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmeticsreimar2006-11-211-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21142 b3059339-0415-0410-9bf9-f77b7e298cf2
* Also support absolute url redirection, e.g. http://www.youtube.com/v/buKaqRG2SFAreimar2006-11-211-1/+6
| | | | | | | (video does not play anyway though). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21141 b3059339-0415-0410-9bf9-f77b7e298cf2
* Unify dep/depend targets.diego2006-11-201-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21096 b3059339-0415-0410-9bf9-f77b7e298cf2
* new slave command: radio_step_freqvoroshil2006-11-192-0/+22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21058 b3059339-0415-0410-9bf9-f77b7e298cf2
* riformatted after previous commitnicodvb2006-11-191-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21050 b3059339-0415-0410-9bf9-f77b7e298cf2
* if in the list of pids appears at least one 8192 (while TS) remove all other ↵nicodvb2006-11-191-1/+18
| | | | | | | | | pid filters and don't add pid 0, either git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21049 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add *BSD BT848 radio supportvoroshil2006-11-182-1/+156
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21001 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename libdvdread to dvdread. We really only include only the dvdreaddiego2006-11-181-4/+4
| | | | | | | | subdirectory of libdvdread. This will also allow getting rid of some local modifications. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20997 b3059339-0415-0410-9bf9-f77b7e298cf2
* add public wrapper for get_frequencyvoroshil2006-11-172-0/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20984 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change verbosity level from MSGL_V to MSGL_INFO for "Current frequency is"voroshil2006-11-171-1/+1
| | | | | | | | message in stream_radio. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20983 b3059339-0415-0410-9bf9-f77b7e298cf2
* consistency fix: STREAM_CTRL_GET_TIME_LENGTH and ↵nicodvb2006-11-122-4/+3
| | | | | | STREAM_CTRL_GET_CURRENT_TIME now return time in (double) seconds git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20867 b3059339-0415-0410-9bf9-f77b7e298cf2
* make fail STREAM_CTRLs related to seeking/fetching time/chapter when the ↵nicodvb2006-11-111-2/+9
| | | | | | cache is enabled: they can't work atm git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20856 b3059339-0415-0410-9bf9-f77b7e298cf2
* idenfify now shows the timings of chapters of the chosen pgcnicodvb2006-11-101-0/+26
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20828 b3059339-0415-0410-9bf9-f77b7e298cf2
* one more deuglificationnicodvb2006-11-091-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20826 b3059339-0415-0410-9bf9-f77b7e298cf2
* COSMETICS: renamed dvdnav_priv to privnicodvb2006-11-091-56/+56
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20825 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add missed 'break'.voroshil2006-11-091-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20822 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move non driver-specific block to non-driver specific procedure, to avoidvoroshil2006-11-091-17/+15
| | | | | | | | | unnecceduplicating code. Avoid calling set_volume on no-initialized radio device in close_s. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20812 b3059339-0415-0410-9bf9-f77b7e298cf2
* changed ugly sizeof(*type_ptr) width sizeof(type)nicodvb2006-11-081-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20804 b3059339-0415-0410-9bf9-f77b7e298cf2
* COSMETICS: reformatted this ugly mess in a consistent mannernicodvb2006-11-081-70/+71
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20802 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support URL redirections that do not specify full URL.reimar2006-11-083-2/+21
| | | | | | | Fixes crash with mplayer -playlist http://www.radioseven.se/radioseven.pls. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20800 b3059339-0415-0410-9bf9-f77b7e298cf2
* Adding ability to check allowed frequency range.voroshil2006-11-081-2/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20774 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for -dvdanglenicodvb2006-11-081-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20770 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_CURRENT_TIME and STREAM_CTRL_SEEK_TO_TIME ↵nicodvb2006-11-072-0/+111
| | | | | | (precise seeking) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20762 b3059339-0415-0410-9bf9-f77b7e298cf2
* added definitions of STREAM_CTRL_GET_CURRENT_TIME STREAM_CTRL_SEEK_TO_TIMEnicodvb2006-11-071-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20760 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace enneccesery O_RDWR with O_RDONLYvoroshil2006-11-071-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20754 b3059339-0415-0410-9bf9-f77b7e298cf2
* Restoring volume level of radio card on exit.voroshil2006-11-071-0/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20753 b3059339-0415-0410-9bf9-f77b7e298cf2
* printf->mp_msgrtogni2006-11-051-13/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20727 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix compilation: forgotten mp_msg.h includereimar2006-11-051-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20717 b3059339-0415-0410-9bf9-f77b7e298cf2
* printf ->mp_msgrtogni2006-11-051-8/+8
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20715 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not use abort()rtogni2006-11-051-7/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20713 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: reformatted with only tabsnicodvb2006-11-041-8/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20677 b3059339-0415-0410-9bf9-f77b7e298cf2
* use calloc() instead of malloc()nicodvb2006-11-041-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20676 b3059339-0415-0410-9bf9-f77b7e298cf2
* nonsense removal: compare old and new frequency in order to skip tuningnicodvb2006-11-042-43/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20675 b3059339-0415-0410-9bf9-f77b7e298cf2
* changed email addresshenry2006-11-042-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20662 b3059339-0415-0410-9bf9-f77b7e298cf2
* Streamline and simplify internal vs external libdvdread handling.diego2006-11-034-9/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20651 b3059339-0415-0410-9bf9-f77b7e298cf2
* libmpdvdkit2 --> libdvdread, it just contains libdvdread now.diego2006-11-031-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20631 b3059339-0415-0410-9bf9-f77b7e298cf2
* More code shufflingreimar2006-11-011-26/+13
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20603 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: move WIN32 read_toc code to allow for summarizing more commonreimar2006-11-011-22/+24
| | | | | | | code of the other variants. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20602 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid code duplication for "last" toc entry.reimar2006-11-011-28/+7
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20599 b3059339-0415-0410-9bf9-f77b7e298cf2
* simplify/unify read_tocreimar2006-11-011-28/+28
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20598 b3059339-0415-0410-9bf9-f77b7e298cf2
* Factor out common code in stream_cddb read_toc function.reimar2006-11-011-35/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20597 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove useless codereimar2006-11-011-2/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20595 b3059339-0415-0410-9bf9-f77b7e298cf2
* printf -> mp_msgrtogni2006-10-301-7/+10
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20546 b3059339-0415-0410-9bf9-f77b7e298cf2
* Realrtsp authenticationrtogni2006-10-305-6/+58
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20543 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for -chapter option (same semanthics as for dvd://)nicodvb2006-10-231-0/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20425 b3059339-0415-0410-9bf9-f77b7e298cf2
* simplified code to handle titleset transition (removed useless assignment)nicodvb2006-10-231-2/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20423 b3059339-0415-0410-9bf9-f77b7e298cf2
* spell fixnicodvb2006-10-231-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20422 b3059339-0415-0410-9bf9-f77b7e298cf2
* don't play any other title other than N when N is specified (with dvdnav://N)nicodvb2006-10-232-0/+9
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20421 b3059339-0415-0410-9bf9-f77b7e298cf2
* bails out if cdparanoia can't read cd (avoid lockup)ben2006-10-131-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20201 b3059339-0415-0410-9bf9-f77b7e298cf2
* slight overall verbosity reductiondiego2006-10-122-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20191 b3059339-0415-0410-9bf9-f77b7e298cf2
* gcc 2.95 fixods152006-10-111-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20164 b3059339-0415-0410-9bf9-f77b7e298cf2
* added OSD audio switching visualizationptt2006-10-112-0/+14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20162 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change occurrences of "(int)*(void **)arg" to "*(int *)arg".uau2006-10-101-17/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20151 b3059339-0415-0410-9bf9-f77b7e298cf2
* Forgotten http_free on send error.reimar2006-10-081-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20106 b3059339-0415-0410-9bf9-f77b7e298cf2
* Print current DVD title as ID_DVD_CURRENT_TITLE.corey2006-10-061-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20092 b3059339-0415-0410-9bf9-f77b7e298cf2
* warn the user to disable the cache when playing dvdnav streamsnicodvb2006-10-041-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20032 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed ivtv driver dependancy in favor of native V4L2 MPEG API (requires ↵ben2006-09-271-242/+264
| | | | | | Linux 2.6.18 and above) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19998 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetic renames because pvr support will soon be less ivtv driver dependantben2006-09-251-11/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19982 b3059339-0415-0410-9bf9-f77b7e298cf2
* made file-static new_dvdnav_stream() and dvdnav_stream_read()nicodvb2006-09-201-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19920 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed definitions of no more used or file-static functionsnicodvb2006-09-201-12/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19919 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduced new MP_CMD_DVDNAV_MOUSECLICK command (bound to mouse0);nicodvb2006-09-192-0/+13
| | | | | | | | | | it's used to activate the button corresponding to the last mouse position. This is a workaround against possibly buggy implementation of upper_lower/upper_button_select() and friends; will be removed when possible git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19918 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed dead codenicodvb2006-09-191-117/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19915 b3059339-0415-0410-9bf9-f77b7e298cf2
* Іnitial button value is -1. Only (button>0) is a correct button selection.jonas2006-09-191-1/+1
| | | | | | | | Initialized "dvdnav_status_t status" explicitly for clarity. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19914 b3059339-0415-0410-9bf9-f77b7e298cf2
* permit seeking to 0: there's no reason to prevent itnicodvb2006-09-181-6/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19901 b3059339-0415-0410-9bf9-f77b7e298cf2
* in the previous commit I forgot to set s->end_pos=0nicodvb2006-09-181-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19900 b3059339-0415-0410-9bf9-f77b7e298cf2
* at titleset change call update_title_len() to reset stream->end_posnicodvb2006-09-181-0/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19899 b3059339-0415-0410-9bf9-f77b7e298cf2
* don't seek until dvdnav_get_position() returns something meaningfulnicodvb2006-09-181-1/+8
| | | | | | | (len > 0), or dvdnav may crash or complain. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19898 b3059339-0415-0410-9bf9-f77b7e298cf2
* Restore original copyright notice as found in xine and xine-mms where thisdiego2006-09-181-7/+27
| | | | | | | code originated. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19888 b3059339-0415-0410-9bf9-f77b7e298cf2
* report mouse coordinates after movement to dvdnav; this permits to enable ↵nicodvb2006-09-162-0/+15
| | | | | | button selection using the mouse; patch by Jonas Jermann and me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19857 b3059339-0415-0410-9bf9-f77b7e298cf2
* at start, when not playing a specific titleset, try to call the Title menu ↵nicodvb2006-09-151-1/+3
| | | | | | (as is common practice among players) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19848 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change demuxer for "application/octet-stream" http streams fromeugeni2006-09-151-1/+1
| | | | | | | ASF to UNKNOWN (autodetect). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19847 b3059339-0415-0410-9bf9-f77b7e298cf2
* in mp_dvdnav_handle_input() update current button only if the status of the ↵nicodvb2006-09-151-1/+2
| | | | | | previous operation succeeded; patch by Jonas Jermann git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19846 b3059339-0415-0410-9bf9-f77b7e298cf2
* dvdnav_stream_reset() should be called on dvdnav_priv->dvdnav not on ↵nicodvb2006-09-151-1/+1
| | | | | | dvdnav_priv; patch by Jonas Jermann git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19845 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed code that propagated the slave command dvdnav_event that hasn't been ↵nicodvb2006-09-151-12/+0
| | | | | | handled for years; patch by Jonas Jermann git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19844 b3059339-0415-0410-9bf9-f77b7e298cf2
* when cmd == MP_CMD_DVDNAV_SELECT set reset=1 only if ↵nicodvb2006-09-151-1/+1
| | | | | | dvdnav_button_activate() succeeds, to avoid unneeded resets in main() git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19842 b3059339-0415-0410-9bf9-f77b7e298cf2
* * remove extern definitions of functions in .c filesattila2006-09-122-2/+7
| | | | | | | | | | | | | | | | | * create new .h files where necessary todo: * go trough other files than mplayer.c * vf_menu_pause_update() * mp_input_register_options() * import_playtree_playlist_into_gui() * import_initial_playtree_into_gui() For more infos see http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2006-September/045683.html ( 20060902133225.2cc82aec.attila@kinali.ch on -dev-eng ) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19814 b3059339-0415-0410-9bf9-f77b7e298cf2
* ability to pass channel name (not only number) to radio_set_channelvoroshil2006-09-111-1/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19799 b3059339-0415-0410-9bf9-f77b7e298cf2
* at start, reset dvdnav at the beginning of the stream after the first read ↵nicodvb2006-09-101-0/+1
| | | | | | (that is done to workaround a bug in dvdnav from cvs) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19787 b3059339-0415-0410-9bf9-f77b7e298cf2
* try to start from the root menu skipping all intros when playing ↵nicodvb2006-09-101-1/+3
| | | | | | dvdnav://-1; it's not guaranteed to work git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19786 b3059339-0415-0410-9bf9-f77b7e298cf2
* permit to select previous dvdnav menu, in the order chapter->title->rootnicodvb2006-09-101-0/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19783 b3059339-0415-0410-9bf9-f77b7e298cf2
* in mp_dvdnav_handle_input() assign the currently selected button, shown in ↵nicodvb2006-09-092-2/+4
| | | | | | the OSD by main() git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19780 b3059339-0415-0410-9bf9-f77b7e298cf2
* added mp_dvdnav_handle_input to handle user's input (revived from the ↵nicodvb2006-09-092-0/+41
| | | | | | repository with few changes) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19774 b3059339-0415-0410-9bf9-f77b7e298cf2
* if no track number specified play the whole disc, or the menus can't be ↵nicodvb2006-09-091-1/+4
| | | | | | shown at start git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19770 b3059339-0415-0410-9bf9-f77b7e298cf2
* detect dvdnav before mpdvdkit and dvdread; if dvdnav is set mplayer will use ↵nicodvb2006-09-091-0/+5
| | | | | | the version of dvdread embedded in dvdnav git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19769 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add #include <limits.h>, fixes build on Solaris 8.diego2006-09-071-0/+1
| | | | | | | patch by Robin KAY komadori [{at}] gekkou [{dot}] co [{dot}] uk git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19726 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove stray and superflous #ifdef checks.diego2006-09-011-5/+0
| | | | | | | patch by Vladimir Voroshilov, voroshil [at] gmail [dot] com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19624 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix build on some old 2.6 kernels, patch by Gernot Hillierben2006-09-011-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19623 b3059339-0415-0410-9bf9-f77b7e298cf2
* The FSF changed postal address.diego2006-09-012-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19620 b3059339-0415-0410-9bf9-f77b7e298cf2
* Check for requirements at configure-time, not at run-time.diego2006-08-311-5/+1
| | | | | | | patch by Vladimir Voroshilov, voroshil <at> gmail <dot> com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19614 b3059339-0415-0410-9bf9-f77b7e298cf2
* Do not cast calloc/malloc resultsreimar2006-08-311-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19612 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid a potential strdup(NULL)rtogni2006-08-301-5/+1
| | | | | | | Fix sig11 with rtsp://wms.stream.aol.com/aol/us/moviefone/movies/2006/jesuscamp_027214/prestigethe_trlr_01_460.wmv git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19601 b3059339-0415-0410-9bf9-f77b7e298cf2
* complete range of frequencies for Ireland; patch by gmccullagh gmail comnicodvb2006-08-291-10/+38
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19596 b3059339-0415-0410-9bf9-f77b7e298cf2
* Radio support, patch by Vladimir Voroshilov (voroshil gmail com)reimar2006-08-285-0/+1155
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19574 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove XMMS_CFLAGS from CFLAGS, the variable is never set.diego2006-08-271-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19558 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix mingw compilationreimar2006-08-261-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19550 b3059339-0415-0410-9bf9-f77b7e298cf2
* Cosmetics: recommit patch changing return values to definesreimar2006-08-261-11/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19549 b3059339-0415-0410-9bf9-f77b7e298cf2
* Recreate tcp.c as partial copy from network.creimar2006-08-261-0/+242
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19548 b3059339-0415-0410-9bf9-f77b7e298cf2
* remove to allow readding as copy from network.creimar2006-08-261-291/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19547 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_NUM_CHAPTERSnicodvb2006-08-211-0/+11
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19483 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_NUM_CHAPTERSnicodvb2006-08-211-0/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19482 b3059339-0415-0410-9bf9-f77b7e298cf2
* added STREAM_CTRL_GET_NUM_CHAPTERS to get total number of chapters from the ↵nicodvb2006-08-211-0/+1
| | | | | | stream reader git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19481 b3059339-0415-0410-9bf9-f77b7e298cf2
* missing header for struct timevalrfelker2006-08-202-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19470 b3059339-0415-0410-9bf9-f77b7e298cf2
* Avoid crash if initialization failed.reimar2006-08-201-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19466 b3059339-0415-0410-9bf9-f77b7e298cf2
* Handle 303 (See Other) redirect, part of a patch by Benjamin Zores (ben at ↵reimar2006-08-201-0/+2
| | | | | | geexbox org) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19465 b3059339-0415-0410-9bf9-f77b7e298cf2
* corrected _very_ misleading commentnicodvb2006-08-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19460 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented STREAM_CTRL_GET_TIME_LENGTH (duration of the pgc playing)nicodvb2006-08-192-0/+15
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19459 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed #if-0 code that dereferenced dvdnav_t's internal members, violating ↵nicodvb2006-08-191-11/+0
| | | | | | the opaque interface (current dvdnav doesn't even install dvdnav_internal.h system-wide for very good reasons) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19458 b3059339-0415-0410-9bf9-f77b7e298cf2
* 10l: misplaced brace in a switchnicodvb2006-08-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19457 b3059339-0415-0410-9bf9-f77b7e298cf2
* Print DVD audio channel and subtitle track information in non-verbose mode,diego2006-08-191-9/+9
| | | | | | | some more consistency for MSGL. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19454 b3059339-0415-0410-9bf9-f77b7e298cf2
* implemented seeking to chapternicodvb2006-08-191-0/+29
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19449 b3059339-0415-0410-9bf9-f77b7e298cf2
* sanity check: since chapter is 0-based it can't exceed nr_of_ptts-1nicodvb2006-08-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19448 b3059339-0415-0410-9bf9-f77b7e298cf2
* support for seeking to chapter and getting current playing chapternicodvb2006-08-181-1/+38
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19446 b3059339-0415-0410-9bf9-f77b7e298cf2
* new stream_ctrl to get currently playing chapter (needed for stream-driven ↵nicodvb2006-08-181-0/+1
| | | | | | relative chapter seeking) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19443 b3059339-0415-0410-9bf9-f77b7e298cf2
* new STREAM_CTRL_SEEK_TO_CHAPTER (will be used by streams dvd[nav], maybe [s]vcdnicodvb2006-08-181-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19440 b3059339-0415-0410-9bf9-f77b7e298cf2
* Explicitly include libmpcodecs/img_format.h and libvo/fastmemcpy.h.diego2006-08-186-6/+6
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19437 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move all internal -I parameters to the front of CFLAGS to avoid using externaldiego2006-08-171-1/+1
| | | | | | | | header files that happen to have the same name as internal ones. based on a patch by Vladislav Naumov, vladislav.naumov **at** gmail **dot** com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19426 b3059339-0415-0410-9bf9-f77b7e298cf2
* isolated tcp socket code from network.c to a dedicated fileben2006-08-0512-209/+331
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19341 b3059339-0415-0410-9bf9-f77b7e298cf2
* missing ifndef/define/endif couple in udp headerben2006-08-051-0/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19338 b3059339-0415-0410-9bf9-f77b7e298cf2
* kill a warning in getsockopt()ben2006-08-051-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19337 b3059339-0415-0410-9bf9-f77b7e298cf2
* kill a warning in getsockopt()ben2006-08-051-1/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19336 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed some useless includesben2006-08-041-7/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19326 b3059339-0415-0410-9bf9-f77b7e298cf2
* moved some definitions from rtp.h to rtp.c as they're not exported or used ↵ben2006-08-042-18/+18
| | | | | | anywhere else git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19325 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed udp socket creation code from rtp stack to a new dedicated udp ↵ben2006-08-047-115/+216
| | | | | | helper file git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19324 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix compilation of librtspben2006-08-041-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19322 b3059339-0415-0410-9bf9-f77b7e298cf2
* few cosmectic changes to remove duplicationben2006-08-041-6/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19321 b3059339-0415-0410-9bf9-f77b7e298cf2
* split rtp stack, udp input layer and rtp input layer from rtp.cben2006-08-046-84/+229
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19319 b3059339-0415-0410-9bf9-f77b7e298cf2
* proper inclusion of demuxer.h (including libmpdemux in Makefile only was to ↵ben2006-08-0416-19/+17
| | | | | | make previous split easier) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19318 b3059339-0415-0410-9bf9-f77b7e298cf2
* moved pnm.h to stream/ (where it belongs)ben2006-08-041-0/+43
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19317 b3059339-0415-0410-9bf9-f77b7e298cf2
* renamed dvdnav_stream to stream_dvdnav for consistencyben2006-08-033-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19308 b3059339-0415-0410-9bf9-f77b7e298cf2
* added dedicated file for mf:// inputben2006-08-035-5/+51
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19307 b3059339-0415-0410-9bf9-f77b7e298cf2
* mf.[hc] belong to libmpdemuxben2006-08-033-174/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19306 b3059339-0415-0410-9bf9-f77b7e298cf2
* renamed cue_read.c to stream_cue.c for consistencyben2006-08-032-3/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19304 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed useless cue_read.h fileben2006-08-032-8/+0
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19303 b3059339-0415-0410-9bf9-f77b7e298cf2
* renamed dvbin.c to stream_dvb.c for consistencyben2006-08-032-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19302 b3059339-0415-0410-9bf9-f77b7e298cf2
* conversion from stream_null to stream_tv was missing stream typeben2006-08-032-0/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19301 b3059339-0415-0410-9bf9-f77b7e298cf2
* correctly report audio inputben2006-08-031-10/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19300 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move conditional compilation of cdinfo.c to the build system.diego2006-08-022-7/+2
| | | | | | | patch by Emanuele Giaquinta, emanuele . giaquinta #at# gmail . com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19293 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed deprecated test.c file from libmpdemuxben2006-07-311-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19282 b3059339-0415-0410-9bf9-f77b7e298cf2
* add an explicit tv stream input instead of the previous hack in stream_nullben2006-07-314-16/+56
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19279 b3059339-0415-0410-9bf9-f77b7e298cf2
* renamed cddX stream interface to stream_cddX for consistencyben2006-07-313-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19278 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduce new 'stream' directory for all stream layer related components and ↵ben2006-07-3185-0/+32320
split them from libmpdemux git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2