summaryrefslogtreecommitdiffstats
path: root/stream/stream_vcd.c
Commit message (Collapse)AuthorAgeFilesLines
* stream: mp_msg conversionswm42013-12-211-8/+8
| | | | We also drop some slave mode stuff from stream_vcd.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Move options/config related files from mpvcore/ to options/wm42013-12-171-1/+1
| | | | | | | | | 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.
* Replace mp_tmsg, mp_dbg -> mp_msg, remove mp_gtext(), remove set_osd_tmsgwm42013-12-161-5/+3
| | | | | | | | | 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.
* Use O_CLOEXEC when creating FDswm42013-11-301-1/+3
| | | | | | | | | | | | | | 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.
* mplayer: attempt to make playback resume work with DVD/BDwm42013-09-221-2/+0
| | | | | | | | | | | | | | | | 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.
* stream: fix url_options field, make protocols field not fixed lengthwm42013-08-261-3/+3
| | | | | | | | | | | | | | | | | | | | 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.
* stream: don't require streams to set s->pos in seek callbackwm42013-08-221-2/+1
| | | | Instead, set s->pos depending on the success of the seek callback.
* core: move contents to mpvcore (2/2)Stefano Pigozzi2013-08-061-2/+2
| | | | Followup commit. Fixes all the files references.
* stream: redo URL parsing, replace m_struct usage with m_configwm42013-08-021-42/+14
| | | | | | | | | | | | | 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-301-3/+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_vcd.c: fix compilation on win32Diogo Franco (Kovensky)2013-07-221-3/+6
| | | | | The mp_vcd_priv_t struct doesn't have a file descriptor but a file handle on win32.
* Merge branch 'remove_old_demuxers'wm42013-07-141-46/+8
|\ | | | | | | | | | | | | | | The merged branch doesn't actually just remove old demuxers, but also includes a branch of cleanups and some refactoring. Conflicts: stream/stream.c
| * stream: remove useless author/comment fieldswm42013-07-121-3/+2
| | | | | | | | | | | | | | | | | | 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 fd memberwm42013-07-121-38/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: don't require streams to set a typewm42013-07-121-1/+0
| | | | | | | | | | Set the type only for streams that have special treatment in other parts of the code.
| * Cleanup some include statementswm42013-07-121-2/+0
| |
| * core: change open_stream and demux_open signaturewm42013-07-121-2/+3
| | | | | | | | | | | | | | | | | | | | | | 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.
| * Remove old demuxerswm42013-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | stream_vcd: use intptr_t cast for _open_osfhandle in accordance to MSDNJonathan Yong2013-07-131-1/+1
|/
* stream: move VCD specific stuff to stream_vcdwm42013-06-091-0/+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-091-0/+2
| | | | | | | | 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, demux: replace off_t with int64_twm42012-11-201-1/+1
| | | | | | On reasonable systems, these types were the same anyway. Even on unreasonable systems (seriously, which?), this may reduce potential breakage.
* Rename directories, move files (step 2 of 2)wm42012-11-121-4/+4
| | | | | | | | | | | | 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.)
* stream: add new stream control command STREAM_CTRL_GET_NUM_TITLESmplayer-svn2012-08-031-0/+1
| | | | | | | | | 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
* build: remove OS/2 supportUoti Urpala2012-04-061-17/+0
|
* 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().
* Merge svn changes up to r31033Uoti Urpala2010-04-261-1/+1
|\
| * Try to fix VCD compilation on non-Linux systems.reimar2010-04-051-1/+1
| | | | | | | | 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
* | Delete things related to old translation systemUoti Urpala2010-03-101-1/+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 r30848Uoti Urpala2010-03-101-0/+17
|\|
| * Add a VCD support for OS/2komh2010-03-031-0/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30819 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30798Uoti Urpala2010-03-101-1/+1
|\|
| * Remove useless cast.reimar2010-02-281-1/+1
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30794 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r30475Uoti Urpala2010-03-091-0/+17
|\|
| * Add license header to all files missing it in the stream subdirectory.diego2010-01-301-0/+17
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30468 b3059339-0415-0410-9bf9-f77b7e298cf2
| * whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-3/+3
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | translations: tweak cases that relied on concatenating adjacent stringsUoti Urpala2010-03-071-2/+4
| | | | | | | | | | | | | | | | 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.
* | Remove trailing whitespace from most filesUoti Urpala2009-07-071-3/+3
| |
* | Translation system changes part 2: replace macros by stringsAmar Takhar2009-07-071-3/+3
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsAmar Takhar2009-07-071-3/+3
|/ | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
* Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__.diego2008-10-131-6/+6
| | | | | | | 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
* stream_opts should be constreimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25719 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace SYS_DARWIN by __APPLE__ and __DARWIN__ where appropriate.diego2007-12-111-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25370 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_opts arrays should be constreimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25270 b3059339-0415-0410-9bf9-f77b7e298cf2
* Mark all stream_info_t as constreimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25239 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: typo fix UNSUPORTED --> UNSUPPORTEDdiego2007-08-281-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24277 b3059339-0415-0410-9bf9-f77b7e298cf2
* Somewhat unified *BSD vcd readingreimar2007-07-271-4/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23877 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
* 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
* at open() assign *file_format=DEMUXER_TYPE_MPEG_PS to avoid useless demuxer ↵nicodvb2007-01-161-0/+3
| | | | | | probing git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21944 b3059339-0415-0410-9bf9-f77b7e298cf2
* GNU/kFreeBSD support, closes Bugzilla #704.diego2007-01-101-3/+3
| | | | | | | patch by Petr Salinger, Petr.Salinger seznam cz git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21866 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduce new 'stream' directory for all stream layer related components and ↵ben2006-07-311-0/+152
split them from libmpdemux git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2