summaryrefslogtreecommitdiffstats
path: root/stream/dvbin.h
Commit message (Collapse)AuthorAgeFilesLines
* dvbin: do a big cleanup on code style and functionssfan52023-10-211-1/+1
|
* stream_dvb: avoid static function variablesfan52023-10-211-0/+1
|
* stream_dvb: use tallocsfan52023-10-211-1/+0
|
* stream/dvbin: add support for delivery system ISDB-TOliver Freyermuth2023-09-031-0/+1
| | | | | | This is similar to DVB-T, but requires slightly different treatment as there is no T/T2 differentiation. Use a new channels.conf.isdbt file as channels config file.
* options: transition options from OPT_FLAG to OPT_BOOLChristoph Heinrich2023-02-211-1/+1
| | | | | | c78482045444c488bb7948305d583a55d17cd236 introduced a bool option type as a replacement for the flag type, but didn't actually transition and remove the flag type because it would have been too much mundane work.
* stream/dvb: drop support for DVB API before 5.8sfan52023-01-121-51/+2
| | | | | There is really no reason to keep the #ifdef mess around given that version is available since December 2012 (Linux 3.7).
* stream/dvbin: remove "full-featured" API includesNicolas F2021-09-221-2/+0
| | | | | | | | | | | | In Linux kernel commit 819fbd3d8ef36c09576c2a0ffea503f5c46e9177 these two header files were moved to staging (though they've since been moved out again by Linus.) We do not actually use this, and it's in a state of maybe-removal from the kernel as of Linux 5.14. Get rid of it; mpv still builds fine without it, so it wasn't needed anyways. Fixes #9233.
* stream_dvb: Remove now replaced stream-control code for good.Oliver Freyermuth2019-10-021-1/+0
|
* stream_dvb: Allow actual zapping of channels again.Oliver Freyermuth2019-10-021-0/+1
| | | | | | | | | | | | | | | This is realized by dvbin-channel-switch-offset, which is a numeric offset on the channel initially tuned to. Since the channel list is kept in the stream alone depending on detected hardware and chosen card, and no available backchannel to the player, there's no direct property which could be switched. Using input.conf like: H cycle dvbin-channel-switch-offset up K cycle dvbin-channel-switch-offset down Q set dvbin-prog "ZDF HD" allow fast and reliable channel switching again.
* stream_dvb: Add dvb_update_config to poll config parameters.Oliver Freyermuth2019-10-021-0/+1
| | | | | | | | If any parameters have been updated, reinitiate streaming_start. Throttle checks since we poll from streaming_read. This also requires the player to re-initialize, since all video and audio streams and even the transport format may change. This is added in the next commit.
* stream_dvb: Move stream->is_on initialization to state preparation.Oliver Freyermuth2019-10-021-1/+0
| | | | | | Notably, this allows to call dvb_streaming_start more than once, simplifying e.g. channel switching. Also, get rid of unused timeout variable.
* stream_dvb: Factor out logic to determine program and card.Oliver Freyermuth2019-10-021-0/+4
| | | | | | | | This is now treated in dvb_parse_path consistently instead of logic scattered over various functions. This is a requirement to sensibly re-evaluate config after options have been changed, since we have two ways to configure the stream (decorated URI and config parameters).
* stream_dvb: Use separated out options struct.Oliver Freyermuth2019-10-021-6/+9
| | | | | This also allows the use of m_config_cache_alloc which allows to watch config updates.
* dvb: Add multiple frontends support: MAX_FRONTENDS now 8.rim2017-12-161-2/+7
|
* Add checks for HAVE_GPL to various GPL-only source fileswm42017-10-101-0/+4
| | | | | | | | 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: add support for DVB-T2ivan-832017-03-061-25/+65
| | | | | | | | | | | | | | | | | | | | | | | | 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-141-65/+25
| | | | | | | | 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-131-25/+65
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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.
* 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: global protection mutex and usage bit for global_dvb_state.Oliver Freyermuth2016-01-141-0/+1
| | | | | | | | | | | | | 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: persist state-information across channel-switches.Oliver Freyermuth2016-01-141-0/+1
| | | | | | | | | 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-141-7/+8
| | | | | | | | | 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.
* dvb: cleanup dvb_params struct, remove some unneeded fdsOliver Freyermuth2016-01-071-3/+1
| | | | | | | One was just used as an alias, the other one (sec_fd) was not used at all. Signed-off-by: wm4 <wm4@nowhere>
* 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 .
* dvb: uncrustifywm42015-01-061-54/+52
| | | | Mostly automatic, some manual changes.
* stream_dvb: Add possibility to dump a full transponder.Oliver Freyermuth2015-01-061-0/+2
| | | | | | | | | | | | 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-061-1/+1
| | | | | | | | | | | 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-061-0/+1
| | | | | | | | | | | | 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.
* dvb: Extend understanding of VDR channel config: stream_id, inversion.Oliver Freyermuth2015-01-061-0/+1
| | | | | | | 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).
* dvb: Extend dvb_channel struct, needs to know whether channel is S2.Oliver Freyermuth2015-01-061-0/+1
| | | | | | 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.
* 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_dvb: restore --dvbin-file optionwm42014-08-061-0/+1
| | | | | | | 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: remove global option variableswm42014-06-111-1/+1
|
* Kill all tabswm42014-04-131-38/+38
| | | | | | | | | | | 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: mp_msg conversionswm42013-12-211-1/+2
| | | | We also drop some slave mode stuff from stream_vcd.
* stream: redo URL parsing, replace m_struct usage with m_configwm42013-08-021-0/+4
| | | | | | | | | | | | | 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 fd memberwm42013-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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/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
* Drop support for old-style DVB code.diego2010-03-021-21/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30818 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add a few missing header #includes and #defines.diego2010-01-041-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30207 b3059339-0415-0410-9bf9-f77b7e298cf2
* 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
* Get rid of pointless 'extern' keywords.diego2008-12-031-4/+4
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* Change a bunch of video/audio-output-specific preprocessor directives fromdiego2008-08-031-1/+1
| | | | | | | a HAVE_ prefix to a CONFIG_ prefix. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27402 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add MPLAYER_ prefix to multiple inclusion guards.diego2008-02-221-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26061 b3059339-0415-0410-9bf9-f77b7e298cf2
* Add explanatory comments to the #endif part of multiple inclusion guards.diego2007-12-311-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25563 b3059339-0415-0410-9bf9-f77b7e298cf2
* removed the obscene priv->stream entry. Someone must have injected vodka in ↵nicodvb2007-12-151-1/+0
| | | | | | 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-151-0/+1
| | | | | | Patch by Andrew Calkin and me git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25407 b3059339-0415-0410-9bf9-f77b7e298cf2
* dvb cleanup: call dvb_(set|step)_channel() without dereferencing ↵nicodvb2007-12-151-2/+2
| | | | | | stream->priv (1000l to me) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25405 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
* nonsense removal: compare old and new frequency in order to skip tuningnicodvb2006-11-041-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20675 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduce new 'stream' directory for all stream layer related components and ↵ben2006-07-311-0/+118
split them from libmpdemux git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2