Commit graph

317 commits

Author SHA1 Message Date
Reynaldo H. Verdejo Pinochet
d9e0e43ca7 dvb/parsechannels: rename v5/zap parsers for congruency
Add function prototypes while at it.
2016-06-24 18:20:56 -07:00
Reynaldo H. Verdejo Pinochet
cf86ec5874 dvb/parsechannels: fix modulation names
Some names were incorrect. Authoritative source for
the dvbv5 format taken from v4l-utils' lib/libdvbv5/dvb-v5.c

Aditionally, add the missing setter mapping for the
modulation param.

This change makes ATSC work.

https://bugzilla.gnome.org/show_bug.cgi?id=764957
2016-06-24 18:20:56 -07:00
Thiago Santos
dc93c448ca dvbbasebin: also accept DVBv5 channels.conf format
Confirmed working with ISDB-T & ATSC conf files.

https://bugzilla.gnome.org/show_bug.cgi?id=764957
2016-06-24 18:20:56 -07:00
Reynaldo H. Verdejo Pinochet
f6eeb314d3 dvbsrc: fix ISDB-T property descriptions
Drop some stale trailing whitespace while at it.
2016-06-24 18:20:56 -07:00
Reynaldo H. Verdejo Pinochet
fe193feb42 dvbsrc: fix misplaced space on doc block 2016-06-24 18:20:56 -07:00
Reynaldo H. Verdejo Pinochet
eb0a785841 dvbsrc: do not rely on temp var for fail detection
Use errno instead as local var might be overwritten
before the check.
2016-06-17 15:58:09 -07:00
Reynaldo H. Verdejo Pinochet
1824703c81 dvbsrc: rework set_pids()
- Reflow to avoid unneeded nesting
- Free aux pids array earlier
- Adjust debug output to deliver more meaningful information
2016-06-17 15:58:09 -07:00
Reynaldo H. Verdejo Pinochet
13efbf35d9 dvbsrc: drop pointless debug msg 2016-06-17 15:58:09 -07:00
Reynaldo H. Verdejo Pinochet
ea7c0981ec dvbsrc: unify exit paths on _start() 2016-06-09 14:45:59 -07:00
Reynaldo H. Verdejo Pinochet
33893c5242 dvbsrc: use proper acronym for PID (Packet Identifier)
Drop formatting tab from message while at it.
2016-06-09 14:45:59 -07:00
Reynaldo H. Verdejo Pinochet
c66f5080aa dvbsrc: set common PES filter params once and reuse
Avoid setting the same harcoded values over and over again.
2016-06-09 14:45:59 -07:00
Reynaldo H. Verdejo Pinochet
bac5c4c5d2 dvbsrc: improve description of PIDs property 2016-06-03 16:28:47 -07:00
Reynaldo H. Verdejo Pinochet
9e442d5cc0 dvbsrc: remove comment on self-explanatory code 2016-06-01 13:52:48 -07:00
Reynaldo H. Verdejo Pinochet
46de31d0f8 dvbsrc: avoid out-bound write on PID filter array
There's no need for an end-of-list marker in the filter
PIDs array if full, as the absolute maximum number of
elements (MAX_FILTERS) is known.

CID #1362441
2016-06-01 13:23:53 -07:00
Reynaldo H. Verdejo Pinochet
1d8673af62 dvbsrc: add sample ATSC launch line 2016-05-29 23:31:05 -07:00
Reynaldo H. Verdejo Pinochet
e35bc2c2b4 dvbsrc: use single marker at end of filtering PID list
Avoids at least ~100 unneeded assignment operations at runtime
2016-05-26 16:18:56 -07:00
Reynaldo H. Verdejo Pinochet
faadd0f12a dvbsrc: simplify reporting of set polarity 2016-05-26 16:18:56 -07:00
Reynaldo H. Verdejo Pinochet
6a4fa2de75 dvbsrc: fix bandwidth-hz property description
Bandwidth Hz is no longer a DVBT-only property
2016-05-26 16:18:56 -07:00
Reynaldo H. Verdejo Pinochet
31a52b6c7c dvbsrc: fix usage of PES & DVR acronyms everywhere
Additionally, improve message on gst_poll_new() failure
2016-05-26 16:18:14 -07:00
Reynaldo H. Verdejo Pinochet
5a47f4a8bc dvbsrc: group DVB-T2 substream-id check with its corresponding set_prop() 2016-05-20 14:08:03 -07:00
Reynaldo H. Verdejo Pinochet
25543d70a7 dvbsrc: add DVB-S2 sub-stream ID check
Disable if invalid (> 255) instead of blindy setting this
property regardless of its actual value.
2016-05-20 13:57:45 -07:00
Reynaldo H. Verdejo Pinochet
e41b1c510a dvbsrc: clarify consequence of passing a wrong ID to the substream filter 2016-05-20 13:47:06 -07:00
Reynaldo H. Verdejo Pinochet
1d9adb14dc dvbsrc: move ISDB-T bandwidth check to _is_valid_bandwidth()
Allows test to be used for delivery system auto-detection.

Additionally, add 0 (auto) as valid value.
2016-05-17 15:06:49 -07:00
Reynaldo H. Verdejo Pinochet
ae060943a8 dvbsrc: add '0' as a valid value for bandwidth
Underlying API considers this the BANDWIDTH_HZ equivalent
to the old BANDWIDTH_AUTO for BANDWIDTH.
2016-05-17 14:40:11 -07:00
Reynaldo H. Verdejo Pinochet
dde02e2d63 dvbsrc: factor out and reuse DVB-T/T2 bandwidth checks
Use new utility function as an additional check for delivery
system auto-detection.
2016-05-17 14:40:01 -07:00
Reynaldo H. Verdejo Pinochet
8e9e3f58c9 dvb/parsechannels: recognize additional bandwidths at zap parsing
Previously ignored 1.712, 5 and 10 MHz values are also valid
2016-05-17 13:08:19 -07:00
Reynaldo H. Verdejo Pinochet
10b020095b dvbsrc: special case detection when DVB-T and T2 seem valid
There is no way to tell one over the other when parameters
seem valid for DVB-T and DVB-T2 and the adapter supports
both. Reason to go with the former here is that, from
experience, most DVB-T2 channels out there seem to use
parameters that are not valid for DVB-T, like QAM_256

https://bugzilla.gnome.org/show_bug.cgi?id=765731
2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
378fdad176 dvbsrc: add transmission mode check for DTMB 2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
b84b682275 dvb/parsechannels: use proper fe_spectral_inversion enum identifiers 2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
39c50e7b85 dvbsrc: explicitly disable stream filter for invalid ids 2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
e32a058fcf dvb/parsechannels: do not assume DVB-T from zap file alone
DVB-T/T2 have the same number of fields so we were
wrongly assuming DVB-T for DVB-T2 broadcasts. Not
setting the delivery system here allows for dvbsrc
to make an informed guess based on the channel
parameters.
2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
8fcdf14846 dvbsrc: consider transmission mode for delsys autodetection 2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
f0d7a8cb89 dvbsrc: factor out transmission mode check against delsys 2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
15e21fee71 dvbsrc: improve delivery system autodetection 2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
793c1a2423 dvbsrc: add modulation checks for DVB-T and T2 2016-05-15 17:12:28 -07:00
Reynaldo H. Verdejo Pinochet
4f0e42b8e4 dvbsrc: improve debug output from _open_frontend()
* Clarify message on delsys info gathering
* Combine redundant INFO/DEBUG pair
2016-05-11 16:10:27 -07:00
Reynaldo H. Verdejo Pinochet
16643e2db7 dvbsrc: fix invalid dereference of delsys data
Use GPOINTER_TO_INT to read GINT_TO_POINTER stored
data.
2016-05-11 16:10:16 -07:00
Reynaldo H. Verdejo Pinochet
d0e553a6d3 dvbsrc: abort at open frontend failure 2016-05-09 15:23:32 -07:00
Reynaldo H. Verdejo Pinochet
5b1191cb4c dvbsrc: smarten-up delsys autodetection logic
When there's no explicit delivery system information
for a channel in the channel configuration file and
the user hasn't selected one via setting the delsys
property, we *guessed* it by selecting the last
supported delsys reported by the driver. This change
provides the basis for smarter delsys auto detection
and implements a rule for DVB-T2. Rules for other
delivery systems can be added in _guess_delsys() in
a similar way.

Additionally: Store list of adapter-supported
delivery systems instead of querying the driver each
time this information is needed.

Related to:

https://bugzilla.gnome.org/show_bug.cgi?id=765731
2016-05-06 16:15:36 -07:00
Reynaldo H. Verdejo Pinochet
571568a09c dvbsrc: remove remaining polling logic from _tune_fe()
No need to do any polling here.
2016-05-06 16:15:36 -07:00
Reynaldo H. Verdejo Pinochet
8c03f448c3 dvbsrc: avoid possible race on _output_frontend_stats()
Make sure we send out our info message before we give up ownership
of the structure.
2016-04-29 23:39:06 -07:00
Reynaldo H. Verdejo Pinochet
05ebd33887 dvbsrc: var rename in _output_frontend_params()
Now it matches the rest of its status peers. Underscore
was a leftover from previous times.
2016-04-29 16:01:23 -07:00
Reynaldo H. Verdejo Pinochet
530d56fac3 dvbsrc: always output known frontend status params
The only mandatory frontend information for our use case
is its status. Make sure we output what we know instead
of choking at the first error getting SNR, BER or any of
the other informational parameters.
2016-04-29 16:01:23 -07:00
Reynaldo H. Verdejo Pinochet
098934d3ae dvbsrc: refactor signal locking loop
Get rid of preliminar frontend status check.
2016-04-29 16:01:23 -07:00
Reynaldo H. Verdejo Pinochet
b5663e4f53 dvbsrc: drop unneeded polling step on _tune_fe()
Additional waiting was not needed. Specially considering
it came after a successful READ_STATUS ioctl and was
followed by an EINTR-resilent retry.
2016-04-29 16:01:23 -07:00
Reynaldo H. Verdejo Pinochet
40b2f41ca6 dvbsrc: add test for invalid DVB-T2 bandwidth 2016-04-20 15:42:25 -07:00
Reynaldo H. Verdejo Pinochet
549785a432 dvbsrc: warn on wrong DVB-T2 stream ID value
Stream ID, used for DVB-T2/S2 and ISDB-S can
not exceed 255 for the former. Change makes this
explicit.
2016-04-20 15:42:17 -07:00
Reynaldo H. Verdejo Pinochet
7597f4dd7a dvbsrc: show invalid delsys/mod combination if found 2016-04-15 13:38:36 -07:00
Reynaldo H. Verdejo Pinochet
31041c3ae9 dvbsrc: add modulation check for ATSC 2016-04-15 11:29:48 -07:00
Reynaldo H. Verdejo Pinochet
34d888220c dvbsrc: do not autodetect delsys twice
The process is dealt with the first time the adapter is
opened, there is no need to do this again.
2016-04-15 10:16:47 -07:00
Reynaldo H. Verdejo Pinochet
768b0c2696 dvbsrc: avoid redundant delsys querying
There is no need to query the frontend for the list
of supported delivery systems if we are selecting
one from the list of autodetected ones.
2016-04-12 15:08:29 -07:00
Reynaldo H. Verdejo Pinochet
0826e78266 dvb/parsechannels: add information to file not found error
Adds useful failure info (like filename) comming from
g_file_get_contents() as done for every other error in
this block.
2016-04-12 15:06:26 -07:00
Thiago Santos
c77e9c8cda dvbbasebin: unref pat table after usage
Remember to unref the GPtrArray of the PAT table after
use
2016-03-24 11:29:35 -03:00
Thiago Santos
1f3852c667 dvbbasebin: plug some leaks
Plug various leaks in dvbbasebin.
2016-03-24 11:29:35 -03:00
Thiago Santos
46473ac287 dvbsrc: print time in same format
Makes it easier to compare
2016-03-24 11:06:47 -03:00
Vineeth TM
8cdfb13658 bad: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763081
2016-03-24 14:56:51 +02:00
Tim-Philipp Müller
0770fa4ed5 dvbsrc: drop unnecessary use of _stdint.h 2016-01-30 17:35:33 +00:00
Vineeth TM
7c42ba97d7 plugins-bad: Fix example pipelines
rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

https://bugzilla.gnome.org/show_bug.cgi?id=759432
2015-12-15 10:30:49 +00:00
Reynaldo H. Verdejo Pinochet
86ec812429 Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-18 16:05:42 -08:00
Luis de Bethencourt
508451005d dvbsrc: use GST_STIME_ARGS for GstClockTimeDiff
No need to use G_GINT64_FORMAT for potentially negative values of
GstClockTimeDiff. Since 1.6 these can be handled with GST_STIME_ARGS.
Plus it creates more readable values in the logs.

https://bugzilla.gnome.org/show_bug.cgi?id=757480
2015-11-03 15:05:43 +00:00
Reynaldo H. Verdejo Pinochet
0ac769194f dvb: simplify ZAP file format parser
Simplify state handing, drop unneeded local vars, etc.
2015-10-09 17:53:52 -07:00
Sebastian Dröge
80e02cbdf9 Constify some static arrays everywhere 2015-01-21 10:18:50 +01:00
Reynaldo H. Verdejo Pinochet
21b544863a dvbsrc: drop explicit comparisons against 0 for true/false 2014-11-16 20:32:56 -03:00
Tim-Philipp Müller
3e1d763018 dvbbasebin: fix possible crash by passing 64 bits for 64-bit queue property
https://bugzilla.gnome.org/show_bug.cgi?id=740191
2014-11-15 21:59:48 +00:00
Tim-Philipp Müller
f216b7bb11 Sprinkle some G_PARAM_DEPRECATED and #ifndef GST_REMOVE_DEPRECATED 2014-11-02 17:19:34 +00:00
Tim-Philipp Müller
6505e84f7c dvbsrc: reflow switch case statement a bit
Make it clear there's no 'break' missing at the end
of the case SYS_DVBT, and pacify coverity (CID 1249689).
2014-10-27 12:43:53 +00:00
Reynaldo H. Verdejo Pinochet
e9cb4c58ab dvbsrc: correctly capitalize DiSEqC 2014-10-24 21:42:58 -03:00
Reynaldo H. Verdejo Pinochet
2879abd4f9 dvbsrc: rework _output_frontend_stats()
Retry stat reporting ioctls on EINTR
2014-10-24 20:24:36 -03:00
Reynaldo H. Verdejo Pinochet
34216b8332 dvbsrc: add checks on allowed DVB-T bandwidths 2014-10-24 20:24:36 -03:00
Reynaldo H. Verdejo Pinochet
c1d48d4acd dvbsrc: add fixme note on DTV_LNA setting
Rephrase another comment while at it
2014-10-24 20:24:30 -03:00
Reynaldo H. Verdejo Pinochet
ed7e763b9d dvbsrc: add missing logic for additional bandwidths
New 1.712, 5 and 10 MHz bandwidths were been ignored
at set/get prop.
2014-10-24 18:57:40 -03:00
Reynaldo H. Verdejo Pinochet
f426aee5db dvb: make interleaving a prop and proxy on dvbbasebin
DTV_INTERLEAVING is currently used only for DTBM. This is
congruent with the v4l dvb API where the different interleaving
modes where added for v5.7
2014-10-12 21:37:24 -03:00
Reynaldo H. Verdejo Pinochet
a3f8899e8b dvbsrc: add transmission mode checks for DVB-T/T2
These and every sanity check leading to a warning
(we have a few in place) should come handy when
debuging failed tunning scenarios.
2014-10-12 21:37:24 -03:00
Reynaldo H. Verdejo Pinochet
97df6ee85d dvbsrc: docs, drop v5 API change history comments < .5
We only support from minor 5 and up now. Also add a
note about the recently added preliminar DTMB support.
2014-10-12 21:37:24 -03:00
Reynaldo H. Verdejo Pinochet
e26eecd182 dvbsrc: add missing DVB-T2 bandwidth types
DVB-T2 supports 5, 10 and 1.712 MHz

Order of the enum values (new values after _AUTO)
has been kept congruent with the one in the v4l
API for consistency
2014-10-12 21:37:24 -03:00
Reynaldo H. Verdejo Pinochet
b0ade1a317 dvbsrc: add preliminary support for DTMB
Previously known as DMB-T/H, this is the
terrestial DTV broadcast standard currently
used by the People's Republic of China,
Hong Kong, Laos and Macau (officially),
and by Malaysia, Iraq, Jordan, Syria and
Lebanon (experimentally).
2014-10-03 23:27:04 -03:00
Reynaldo H. Verdejo Pinochet
5a2d834585 dvbsrc: add missing standard transmission modes
These apply to ISDB-T, DVB-T2 and DTMB

Order of the enum values (new rates after _AUTO)
has been kept congruent with the one in the v4l
API for consistency.
2014-10-03 23:27:04 -03:00
Reynaldo H. Verdejo Pinochet
9ed8fa25f4 dvbsrc: add missing DTMB guard intervals 2014-10-03 23:27:03 -03:00
Reynaldo H. Verdejo Pinochet
7724d406ea dvbsrc: add missing DVB-T2 guard intervals
According to the v4l-dvb API docs, these are only
used for DVB-T2 at the moment.

Order of the enum values (new rates after _AUTO)
has been kept congruent with the one in the v4l
API for consistency.
2014-10-03 23:27:03 -03:00
Reynaldo H. Verdejo Pinochet
cebba78b17 dvbsrc: add _MUTABLE_PLAYING to tuning props
The element can (re)tune while playing so basically
every property used at set_fe_params() can be set
in state <= PLAYING.
2014-10-03 23:27:03 -03:00
Reynaldo H. Verdejo Pinochet
784d2403dc dvbsrc: add missing FEC rates
Order of the enum values (new rates after _AUTO)
has been kept congruent with the one in the v4l
API for consistency.
2014-09-21 14:37:30 -03:00
Edward Hervey
562880bef9 dvbsrc: Use proper variable for delivery system
We want to check the delivery system is ISDBT (and not the modulation
which we check later in that case).

CID #1238439
2014-09-12 14:49:44 +02:00
Reynaldo H. Verdejo Pinochet
10ece74f10 dvbsrc: retry opening the frontend on EINTR 2014-09-07 17:39:51 -03:00
Reynaldo H. Verdejo Pinochet
071f93c72f dvbsrc: assorted doc & spelling fixes 2014-09-07 17:39:51 -03:00
Reynaldo H. Verdejo Pinochet
641e0e973e dvbsrc: simplify ISDB-T launch line example 2014-09-02 18:06:53 -04:00
Reynaldo H. Verdejo Pinochet
1adc34cc03 dvbsrc: delay locking till actually needed
Get rid of unneeded locking at prop setting by doing
it only when tuning the frontend at _tune_fe()
2014-09-02 17:11:40 -04:00
Reynaldo H. Verdejo Pinochet
cd73c776f2 dvbsrc: fix description for modulation prop 2014-08-29 19:38:00 -04:00
Reynaldo H. Verdejo Pinochet
17beaed35f dvbsrc: add basic checks on ISDB-T parameters
Also add a routine for checking wrong delsys/modulation
combinations right before tuning (only implemented for
ISDB-T for now).
2014-08-29 19:38:00 -04:00
Reynaldo H. Verdejo Pinochet
fd64a75926 dvbsrc: add support for additional modulation types 2014-08-29 19:38:00 -04:00
Reynaldo H. Verdejo Pinochet
a0c79bc72b dvbsrc: drop FIXME on _ISDBT_LAYER_ENABLED prop
Valid values range from 1 to 7 as stated.

DTV_ISDBT_LAYER_ENABLED bitmask is built from
OR-ing 0x1 0x2 0x4. If all bits are set
(0x00000111 = 7) it means all layers should be
demodulated.
2014-08-29 19:38:00 -04:00
Reynaldo H. Verdejo Pinochet
17181bfe16 dvbbasebin: fix parsing of freqs in some ZAP files
Change avoids attempting to convert to kHz if unneeded.

There are quite some ZAP format variants out there. Among
their subtle little differences, some store transponder
frequencies in Mhz and others in kHz. The latter been the
most common variant.
2014-08-13 13:10:04 -04:00
Reynaldo H. Verdejo Pinochet
d314a3a591 dvbsrc: get rid of remaining trailing whitespace 2014-08-13 13:10:04 -04:00
Reynaldo H. Verdejo Pinochet
98cc508557 dvbsrc: wrap around known-interruptible ioctls
Also get rid of the asumption that some requests like
FE_SET_TONE or FE_SET_VOLTAGE only error out with -1
2014-08-13 13:10:04 -04:00
Reynaldo H. Verdejo Pinochet
4f10ab0671 dvbsrc: drop gst_dvbsrc_retry_ioctl for retry macro
LOOP_WHILE_EINTR macro makes it easier to handle
assorted ioctl argp types. Functionality is otherwise
equivalent.
2014-08-13 13:10:04 -04:00
Reynaldo H. Verdejo Pinochet
23fccad1fd dvbsrc: dvbbasebin: add 'tune' signal
It works the same as the 'tune' property that is used only to signal
the element that it should tune, but it is more natural to be used
as a signal rather than a property.

It is also proxied at the dvbbasebin element
2014-08-13 13:10:03 -04:00
Reynaldo H. Verdejo Pinochet
3e5c56e5fb dvbsrc: remove srcpad leftover
The element is inheriting its srcpad from basesrc
2014-08-03 19:13:36 -04:00
Reynaldo H. Verdejo Pinochet
d17203d26a dvbsrc: clarify units for freq and symbol-rate 2014-07-28 00:05:57 -04:00
Reynaldo H. Verdejo Pinochet
01e7e36217 dvbsrc: add preliminary support for ISDB-T/Tb
ISDB-T and ISDB-Tb (the Brazilian variant) are the
terrestial DTV standards used by Japan, Philippines,
Maldives, Thailand, most South American countries
and Botswana. Changeset adds the set of previously
missing (and required) ISDB-T parameters, adapter
and frontend setup logic and proxies the new
properties on dvbbasebin.

Tested to work with the live aerial broadcast by
Tv Paraíba HD in Campina Grande (Brazil).

https://bugzilla.gnome.org/show_bug.cgi?id=732875
2014-07-28 00:05:38 -04:00
Reynaldo H. Verdejo Pinochet
8391112af5 dvbsrc: make slof/lof1/lof2 settable properties
Allows proper tuning around high/low band boundaries when using
non "standard" LNBs.

Not all LNBs (Low noise block down converters) are made equal.
This is particularly true for universal LNBFs, where, even though
there are seemingly standard values for the local oscillator
frequencies, these can vary from manufacturer to manufacturer
and LNB model. Change also proxies the new LNB properties in
dvbbasebin.

https://bugzilla.gnome.org/show_bug.cgi?id=732818
2014-07-28 00:05:18 -04:00
Edward Hervey
22dfd9aef3 mpegts: Unify API : GstMpegts / gst_mpegts_ / GST_*_MPEGTS_
It was previously a mix and match of both variants, introducing just too much
confusion.

The prefix are from now on:
* GstMpegts for structures and type names (and not GstMpegTs)
* gst_mpegts_ for functions (and not gst_mpeg_ts_)
* GST_MPEGTS_ for enums/flags (and not GST_MPEG_TS_)
* GST_TYPE_MPEGTS_ for types (and not GST_TYPE_MPEG_TS_)

The rationale for chosing that is:
* the namespace is shorter/direct (it's mpegts, not mpeg_ts nor mpeg-ts)
* the namespace is one word under Gst
* it's shorter (yah)
2014-06-25 14:50:05 +02:00