Commit graph

1953 commits

Author SHA1 Message Date
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
Sebastian Dröge
68c067e3c9 vtenc: Fix locking
The object lock only protects the session, as we modify
the session from other threads when the bitrate property
is changed. Don't hold it much longer than for session
related things.

And we need to release the video decoder stream lock before
enqueueing a frames. It might wait for our callback to dequeue
a frame from another thread, which will then take the stream
lock too and deadlock.
2014-10-21 16:22:06 +02:00
Sebastian Dröge
ad649138aa vtenc: Use kVTProfileLevel_H264_Baseline_AutoLevel only on iOS
It is not required on OSX apparently and was only added in 10.9.6 there.
Calculating the correct level from the configuration is not trivial, so let's
just not set a level at all here.
2014-10-19 14:57:43 +02:00
Sebastian Dröge
b57f255f26 vtenc: VTCompressionSessionPrepareToEncodeFrames only exists since 10.9.6
Check with configure for it instead of using one of the availability macros
as those wouldn't work as expected with minor versions.
2014-10-19 14:51:40 +02:00
Sebastian Dröge
e79355078e vtenc: Remove unused #define 2014-10-19 14:32:31 +02:00
Sebastian Dröge
3cead041f6 vtdec: Set reorder length to 0 if we can't calculate it
Instead of leaving it at whatever value it had before.
2014-10-14 09:19:59 +02: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
Sebastian Dröge
66a4572c12 androidmedia: Fix calculation of the frame size for COLOR_FormatYUV420Planar
https://bugzilla.gnome.org/show_bug.cgi?id=734156
2014-10-02 10:26:43 +03:00
Anuj Jaiswal
593f7d520e androidmedia: break statements unnecessary
Code flow never arrives to the break statements due to the goto's. So the
breaks are unecessary. Second part to commit a3958ae65b

https://bugzilla.gnome.org/show_bug.cgi?id=736940
2014-09-24 12:17:41 +01:00
Anuj Jaiswal
a3958ae65b androidmedia: break statement unnecessary
Code flow never arrives to the break statements due to the goto's. So the
breaks are unecessary.

https://bugzilla.gnome.org/show_bug.cgi?id=736942
2014-09-24 12:12:16 +01:00
Joshua M. Doe
27eb6555d1 dshowsrcwrapper: avoid error when set_caps called twice
If set_caps is called in a running state, return immediately if the caps
haven't changed. If the pins are already connected, disconnect them.

https://bugzilla.gnome.org/show_bug.cgi?id=736926
2014-09-24 10:02:39 +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
Sebastian Dröge
3c1ccb64eb vtenc: Fix encoder to work on iOS
iOS has special stride requirements that we don't know yet, so copy
input buffers into buffers allocated by iOS for now.

Later we should check the stride and probably provide a buffer pool for these
buffers so upstream can directly write in there.
2014-09-19 14:47:05 +03:00
Sebastian Dröge
bee1477f08 applemedia: We need to map the coremedia buffers in non-readonly mode
Our buffers claim to be writable so other elements expect to be able
to write there without losing their changes.
2014-09-19 14:47:04 +03:00
Sebastian Dröge
9380f6282d vtenc: Let the encoder automatically choose a h264 level
We should negotiate these things via caps...
2014-09-18 17:49:46 +03:00
Sebastian Dröge
31476a3c46 vtenc: Use 0 instead of G_MAXDOUBLE as the max keyframe interval
0 means no limit, which was meant here with G_MAXDOUBLE probably.
2014-09-18 13:45:33 +03:00
Sebastian Dröge
8c1e84ff71 vtenc: Expected duration is supposed to be the duration of the stream, not a frame
Just don't set it for now, it isn't really needed.
2014-09-18 13:42:24 +03:00
Sebastian Dröge
61c40523df vtenc: Properly handle keyframes
Especially set the SYNC_POINT flag on keyframes.
2014-09-18 13:11:05 +03:00
Jerome Laheurte
4f60ecdd98 dshowsrcwrapper: Port to 1.0
https://bugzilla.gnome.org/show_bug.cgi?id=732283
2014-09-18 12:36:34 +03:00
Sebastian Dröge
de9b0be86d vtdec: Fix compilation 2014-09-18 10:30:04 +03:00
Sebastian Dröge
e653068bc2 vtdec: Handle 0/1 framerates correctly by not calculating their frame duration 2014-09-18 09:47:06 +03:00
Sebastian Dröge
916155da2b atdec: Fix some compiler warnings with newer clang 2014-09-17 17:37:12 +03:00
Sebastian Dröge
ddea2e4498 vtenc: Prepare encoder after setup
This will allow encoding to happen faster on the first frame.
2014-09-17 17:10:58 +03:00
Sebastian Dröge
c6f17d6013 vtenc: Only drain the encoder in ::finish(), not on every frame
Otherwise quality and bitrate will be bad.
2014-09-17 17:08:57 +03:00
Sebastian Dröge
0390398e39 vtenc: Error out if encoding returned an error
Otherwise we will just continue consuming frames until all memory is filled
up and the app crashes.
2014-09-17 15:39:26 +03:00
Sebastian Dröge
e3bc32fb58 vtenc: Check for errors from VTCompressionSessionCompleteFrames() 2014-09-17 14:56:05 +03:00
Sebastian Dröge
b93e0f5f99 vtenc: Properly scale timestamps for the API and set invalid values 2014-09-17 14:55:24 +03:00
Sebastian Dröge
e4563ce6cf vtdec: Properly scale timestamps for the API and set invalid values 2014-09-17 14:54:39 +03:00
Sebastian Dröge
d789246077 applemedia: Remove old code that is of no use anymore 2014-09-17 13:19:04 +03:00
Sebastian Dröge
82aae4df74 applemedia: Do weak linking with the VideoToolbox framework
It does not exist on older OSX and iOS but we still want to
be able to use it when it's available.
2014-09-17 10:38:20 +03:00
Sebastian Dröge
7fa9bbc3b0 vtenc: Port to GstVideoEncoder base class 2014-09-16 17:04:31 +03:00
Sebastian Dröge
4e1f8285c2 vtenc: Use correct instance struct size 2014-09-16 16:13:16 +03:00
Sebastian Dröge
3a52f6b757 vtdec: Fix compiler warnings
values of type 'OSStatus' should not be used as format arguments; add an explicit cast to 'int' instead [-Wformat]
2014-09-16 15:48:11 +03:00
Sebastian Dröge
f2eedb9cee vtenc: Port to the real VideoToolbox API instead of using our dlopen() wrapper
It's a public framework since a long time.
2014-09-16 15:47:29 +03:00
Ognyan Tonchev
dc421b308b vdpdecoder: do not leak pool
https://bugzilla.gnome.org/show_bug.cgi?id=736733
2014-09-16 12:51:06 +03:00
Sebastian Dröge
0f0a50c119 vtdec: No need to set kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder on iOS 2014-09-15 15:42:41 +03:00
Sebastian Dröge
c82fa4f845 applemedia: Don't include VideoToolbox on iOS < 8.0
It's private API and does not work without a jailbroken device.
2014-09-15 15:12:31 +03:00
Sebastian Dröge
0b34cde46e vtdec: Fix compilation on iOS 8.0 2014-09-13 20:49:16 +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
Tim-Philipp Müller
7b8bd35d18 Fix up one-element lists in template caps 2014-09-10 17:24:39 +01:00
Tim-Philipp Müller
ffe59820d8 avfvideosrc: fix bogus BGRA caps
Remove 0.10-style endianness/*_mask/bpp/depth fields.
2014-09-10 16:38:52 +01: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
Sebastian Dröge
f5e73d2808 amcaudiodec: Remove hack for Google MP3 decoder
The first buffer does not contain more garbage than any other MP3 decoder
outputs and we don't really know how much we have to drop or not.

After this change the output has the same duration as with mad.
2014-09-01 17:44:04 +03: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
Sebastian Dröge
8f25220b9c androidmedia: Make sure to unblock any thread waiting on the drain condition variable when errors happen 2014-08-14 15:27:21 +03:00
Sebastian Dröge
ca62186797 androidmedia: Fix draining logic to let the base class handle EOS events
https://bugzilla.gnome.org//show_bug.cgi?id=734775
2014-08-14 15:27:21 +03: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
Sebastian Rasmussen
078958bd6b pvrvideosink: Avoid leaking bufferpool configuration
gst_buffer_pool_get_config() returns a copy to the bufferpool's
configuration, which must be passed to gst_structure_free() after
use if not given away to gst_buffer_pool_set_config().

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734537
2014-08-10 12:19:50 +01:00
Sebastian Rasmussen
6d151843ef directsoundsrc: Avoid leaking copy of caps object
gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
so creating a copy using gst_caps_copy() results in a reference leak.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734536
2014-08-10 12:16:08 +01:00
Sebastian Rasmussen
b323fba934 vtenc: Avoid leaking caps object and its copy
gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
so creating a copy using gst_caps_copy() results in a reference leak. Also
the caps are pushed as an event downstream, but this doesn't consume the
caps so it must still be unreferenced.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734534
2014-08-10 12:13:48 +01:00
Sebastian Rasmussen
c1d5aa3da5 amcvideoenc: Avoid leaking copy of caps object
gst_pad_get_pad_template_caps() returns a reference which is unreferenced,
so creating a copy using gst_caps_copy() results in a reference leak.
Also remove the incorrect comment to avoid confusion in the future.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734533
2014-08-10 12:11:10 +01: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
Sebastian Dröge
a680867761 decklinksink: Initialize pixel format to bmdFormat8BitYUV
https://bugzilla.gnome.org/show_bug.cgi?id=725871
2014-08-01 18:02:10 +02:00
Sebastian Dröge
fd793e9498 decklinksink: Catch errors during data flow and error out properly
Otherwise we will just deadlock the thread if e.g. scheduling a video
frame fails for whatever reason.
2014-08-01 16:59:42 +02:00
Sebastian Dröge
a8f94fe1e1 decklink: 59.94fps is 60000/1001, not 30000/1001
And also change 30/1 to 60/1 for one 60fps mode.
2014-08-01 12:39:47 +02: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
Sebastian Dröge
8d5217141a openslesringbuffer: Provide the size of our array to GetDestinationOutputDeviceIDs
Otherwise it does not and just fails. It needs to know the size of the
array to not write too much to it.
2014-07-17 00:18:41 +02:00
Sebastian Dröge
fe42739a3e openslessink: Silence some error debug output to log output
These are not really errors, just unsupported features we don't
necessarily need.
2014-07-17 00:18:41 +02:00
Sebastian Dröge
4ec87d9690 d3dvideosink: Open Direct3D devices in a threadsafe way
Otherwise we'll get crashes when using the device from multiple
threads, e.g. when using multiple sinks at once.

https://bugzilla.gnome.org/show_bug.cgi?id=707523
2014-07-15 13:30:16 +02:00
Sebastian Dröge
2b63783c94 atdec: Change rank to MARGINAL until it can properly handle multichannel audio
https://bugzilla.gnome.org/show_bug.cgi?id=727757
2014-07-11 09:43:44 +02:00
Sebastian Dröge
c134930dbe d3dvideosink: Always lock the D3D surfaces in write mode
Locking them in readonly mode can give different stride to mapping
in write mode, which then causes rendering to be broken.

Happened on all (many?) NVIDIA GPUs.

Thanks to voskater15@gmail.com for hinting at the problem.

https://bugzilla.gnome.org/show_bug.cgi?id=712809
2014-07-03 19:10:26 +02:00
Sebastian Dröge
73c40a3132 d3dhelpers: Swap UV planes properly for YV12 as compared to I420
If we only do it in one place colors will look funny.
2014-07-03 19:06:26 +02:00
Sebastian Dröge
74c2e64d5d amc: Properly integrate COLOR_QCOM_FormatYVU420SemiPlanar32m again
https://bugzilla.gnome.org/show_bug.cgi?id=732683
2014-07-03 17:53:33 +02:00
Sebastian Dröge
93bce7aeb7 amcaudiodec: audio/mpeg is always MPEG 1 layer 3
Configuring e.g. layer 2 on such a decoder usually fails unless
it additionally also accepts audio/mpeg-L2.
2014-07-03 15:07:23 +02:00
Alessandro Decina
0258ec0273 applemedia: enable vtdec and vtenc only on >= 10.8 where VideoToolbox is public
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=723670
2014-07-02 12:56:06 +02:00
Thiago Santos
92dbcf2bf9 vtdec: avoid segfault when output isn't configured
This can help when the callback is called during/after videodecoder
base class shut down

https://bugzilla.gnome.org/show_bug.cgi?id=728435
2014-07-02 06:19:58 -03:00
Thiago Santos
f75f860ff3 vtdec: ignore the dropped flag if buffer was received
Apparently there is some issue with VT that makes it mark the dropped
flag even though the buffer was decoded.

https://bugzilla.gnome.org/show_bug.cgi?id=728435
2014-07-02 05:48:32 -03:00
Sebastian Dröge
25974ac0a9 d3dvideosink: Don't leak all surfaces
This was broken when disabling the buffer pool exporting.

Also disable buffer pool a bit more efficient...
2014-07-02 10:33:15 +02:00
Sebastian Dröge
28d250ec3f d3dvideosink: PostMessage() takes integers as last parameters, not pointers 2014-07-02 10:33:15 +02:00
Sebastian Dröge
677608bfb7 d3dvideosink: Remove unused variable 2014-07-02 10:33:15 +02:00
Matthieu Bouron
e1601406a5 vtenc: fix memory leak
The pixel buffer release callback is called if the void *
dataPtr given to the CVPixelBufferCreateWithPlanarBytes
is not NULL.

According to the documentation dataPtr is supposed to be a
"plane description block" but no specific type is given.

https://bugzilla.gnome.org/show_bug.cgi?id=711847
2014-06-30 13:09:28 +02:00
Sebastian Dröge
01fd3a1396 uvch264src: Free property strings when disposing the instance 2014-06-29 21:01:39 +02:00
Sebastian Dröge
b02cbcfa42 uvch264src: Fix compiler warning when compiling with G_DISABLE_ASSERT 2014-06-29 20:13:10 +02: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
Reynaldo H. Verdejo Pinochet
3d22f686b6 dvbsrc: add copyright/license stub to header 2014-06-25 01:05:45 -04:00
Reynaldo H. Verdejo Pinochet
643a19b0dc dvbsrc: documentation fixes 2014-06-25 01:05:40 -04:00