summaryrefslogtreecommitdiffstats
path: root/stream
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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.
* build: remove OS/2 supportUoti Urpala2012-04-064-340/+1
|
* 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.
* 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.
* 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_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.mplaye