Commit graph

18158 commits

Author SHA1 Message Date
Tim-Philipp Müller
337bff3c82 tests: compositor: add unit test for proper segment.base handling
As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example.
2015-02-05 15:48:41 +00:00
Tim-Philipp Müller
689f627412 tests: audiomixer: add unit test for proper segment.base handling
As adjusted by gst_pad_set_offset(), or when doing segment seeks
or looping for example. See previous audiomixer commit.
2015-02-05 15:23:04 +00:00
Sebastian Dröge
ce7444411e audiomixer: Remove weird and wrong segment handling
There's no reason why audiomixer should override the segment
base of upstream with whatever value it got from a SEEK event,
or even worse... with 0 if there was no SEEK event yet. This
broke synchronization if upstream provided a segment base other
than 0, e.g. when using pad offsets.
Also that this code did things conditional on the element's state
should've been a big warning already that something is just wrong.
If this breaks anything else now, let's fix it properly :)

Also don't do fancy segment position trickery when receiving a
segment event. It's just not correct.
2015-02-05 16:02:54 +01:00
Sebastian Dröge
83e5fe2f70 openslesringbuffer: Only pre-roll a single buffer
There is no reason to pre-roll more buffers here as we have our own ringbuffer
with more segments around it, and we can immediately provide more buffers to
OpenSL ES when it requests that from the callback.

Pre-rolling a single buffer before starting is necessary though, as otherwise
we will only output silence.

Lowers latency a bit, depending on latency-time and buffer-time settings.
2015-02-05 12:28:22 +01:00
Sebastian Dröge
141fb455e8 openslesringbuffer: Allocate at most 4 internal buffers
4 is the "typical" number of buffers defined by Android's OpenSL ES
implementation, and its code is optimized for this. Also because we
have our own ringbuffer around this, we will always have enough
buffering on our side already.

Allows for more efficient processing.
2015-02-05 12:28:13 +01:00
Sebastian Dröge
616cb1bdc6 openslessink/src: Lower default buffer time to 200ms like alsasink 2015-02-05 12:21:55 +01:00
Matthew Waters
9ecb530eaa glfilter: ensure that the input upload/colorconvert are always available 2015-02-05 16:46:32 +11:00
Matthew Waters
4f15cc8d3c glimagesink: log the converted caps 2015-02-05 11:07:19 +11:00
Matthew Waters
5432308012 glupload: restrict EGL and UploadMeta to RGBA
other formats are highly untested.
2015-02-05 11:07:19 +11:00
Matthew Waters
8c91da6f75 glcolorconvert: don't intersect with the input caps
that limits our formats to whatever is in the input caps
2015-02-05 11:07:19 +11:00
Luis de Bethencourt
2cd9d30340 gl: fix memory leak
In gst_gl_filter_fixate_caps () it can goto done without freeing the memory of
the tmp GstStructure. This makes it go out of scope and leak.

CID #1265765
2015-02-04 14:10:13 +00:00
Luis de Bethencourt
3656e0248a motioncells: initialize class variables
Some variables are not initialized in the constructor. It is highly unlikely
they are used before being set, but it is safer to initialize them.

CID #1197704
2015-02-04 11:52:26 +00:00
Nicolas Dufresne
5aa292b588 ksvideosrc: Fix missing brace warning
There is more but it's from ks.h GUID initializer, which is shipped
this way with mingw.
2015-02-03 18:16:51 -05:00
Nicolas Dufresne
bd5e9a5442 ksvideosrc: Fix buffer handling
The pseudo buffer pool code was using gst_buffer_is_writable()
alone to try and figure-out if cached buffer could be reused.
It needs to check for memory writability too. Also check map
result and fix map flags.

https://bugzilla.gnome.org/show_bug.cgi?id=734264
2015-02-03 18:16:50 -05:00
Thiago Santos
e9c1d64895 mpegtsmux: avoid leaking force keyunit event when going to NULL
Do not set to NULL before unreffing the event or it will leak
2015-02-03 17:05:06 -03:00
Anton Gritsay
77bafb4dbc mpegtsmux: parse force key unit events with the correct function
Otherwise it won't be parsed and bogus values would be used.

https://bugzilla.gnome.org/show_bug.cgi?id=696032
2015-02-03 17:05:00 -03:00
Thiago Santos
b18a09dbec tsdemux: remove update segment logic
This is not needed in 1.x series anymore
2015-02-03 13:50:42 -03:00
Aurélien Zanelli
d0a50be26d tsdemux: don't mark streams as needing a new segment on flush
The flush is called on discont and we shouldn't output a new segment
each time a discont happens. So this commit remove the mark for a new
segment when flushing streams by propagating the 'hard' flag passed
on the flusing from the base class.

https://bugzilla.gnome.org/show_bug.cgi?id=743363
2015-02-03 13:50:42 -03:00
Sebastian Dröge
d4d02c6f9d corevideotexturecache: Add some assertions instead of just dereferencing NULL 2015-02-03 17:32:24 +01:00
Sebastian Dröge
b51254395a corevideotexturecache: Don't unconditionally use the CoreMedia meta on iOS
We might instead have a CoreVideo meta.
2015-02-03 17:32:24 +01:00
Tim-Philipp Müller
97bb963e95 Undo accidental common module rewind
in commit 7d463576
2015-02-03 14:55:32 +00:00
Sebastian Dröge
dac3e4ca06 vtdec: Don't dereference NULL frames when draining/flushing 2015-02-03 15:38:40 +01:00
Matthew Waters
c1ad8d776a gl: remove the egl caps from the src pads
we don't actually support producing EGLImage buffers anywhere.
2015-02-03 15:30:08 +11:00
Matthew Waters
e7a10a2d44 glcolorconvert: put GstGLSyncMeta on output buffers
allows thread safely using the provided output buffer in a separate
thread
2015-02-03 14:32:55 +11:00
Matthew Waters
73c2ab70fc glupload: only try the glmemory upload for sysmem/glmemory caps features
Allows selecting/testing the upload path with explicit caps features.
2015-02-03 14:32:55 +11:00
Matthew Waters
46ecf99a8a glmemory: add missing initilisation of tex_target when copying
fixes:

glcolorscale ! video/x-raw\(meta:GstVideoGLTextureUploadMeta\) !
glimagesink
2015-02-03 14:32:55 +11:00
Matthew Waters
b947c9805a glupload: allow NULL buffer for accept vfunc 2015-02-03 14:32:55 +11:00
Matthew Waters
917dcfdfee glupload: remove unsed convert field in private struct 2015-02-03 14:32:55 +11:00
Matthew Waters
c06715bde6 glupload/download/convert: provide transform_caps functions
Allows finer grain decisions about formats and features at each
stage of the pipeline.
Also provide propose_allocation for glupload besed on the supported
methods.
2015-02-03 14:32:55 +11:00
Alessandro Decina
7d46357627 gstglwindow_cocoa: fix slow render rate
In gst_gl_window_cocoa_draw we used to just call setNeedsDisplay:YES. That was
creating an implicit CA transaction which was getting committed at the next
runloop iteration. Since we don't know how often the main runloop is running,
and when we run it implicitly (from gst_gl_window_cocoa_nsapp_iteration) we only
do so every 200ms, use an explicit CA transaction instead and commit it
immediately. CA transactions nest and debounce automatically so this will never
result in extra work.
2015-02-03 11:19:35 +11:00
Matthew Waters
ddcc580505 gstglcaopengllayer: use the correct rectangle type for iOS and OS X 2015-02-02 23:43:54 +11:00
Matthew Waters
ed7d7418c2 glcolorconvert: use the correct caps feature for supported caps
glcolorconvert currently only supports converting between GLMemory
targets.
2015-02-02 21:07:48 +11:00
Matthew Waters
abb55f2453 glsyncmeta: don't use the gst debug object variants
We are not a GObject or any inferable GstMiniObject supported by
the gst debug system.  Also fixes a segfault.
2015-02-02 20:51:31 +11:00
Matthew Waters
438b83c9fc gl: update unit test for glmemory api change 2015-01-30 18:51:17 +11:00
Matthew Waters
c827d1f804 glimagesink: clobber the alpha channel by default
this can be disabled with the ignore-alpha property
2015-01-30 15:54:05 +11:00
Alessandro Decina
b1aae5cb70 Revert "libgstgl: gstglcaopengllayer: set the layer as opaque"
This reverts commit 6f152d381c.

The layer shouldn't be always opaque, it should be made a property.
2015-01-30 12:32:17 +11:00
Alessandro Decina
6f152d381c libgstgl: gstglcaopengllayer: set the layer as opaque 2015-01-30 12:22:25 +11:00
Sebastian Dröge
c2492b3a6b glcolorconvert: Add FIXME comment about possibility of non-Apple YCbCr422 rectangular textures 2015-01-29 16:30:34 +01:00
Sebastian Dröge
4b6a968203 glcolorconvert: Only use GL_TEXTURE_RECTANGLE with OpenGL
It's not defined for GLES.
2015-01-29 16:26:26 +01:00
Alessandro Decina
f577b52e5d applemedia: rework GL texture sharing
Use YUV instead of RGB textures, then convert using the new apple specific
shader in GstGLColorConvert. Also use GLMemory directly instead of using the
GL upload meta, avoiding an extra texture copy we used to have before.
2015-01-30 00:34:08 +11:00
Alessandro Decina
77d48abfab applemedia: vtdec: fix CMBlockBufferRef leak
Fix huge leak that went unnoticed for too long. Oops.
2015-01-30 00:34:08 +11:00
Alessandro Decina
3655e8b8bc libgstgl: run a custom shader to convert YUV to RGB on mac and ios
When GL_APPLE_ycbcr_422 is available, run a custom shader to convert
GL_TEXTURE_RECTANGLE textures from YUV to RGB.

See https://www.opengl.org/registry/specs/APPLE/ycbcr_422.txt
2015-01-30 00:34:08 +11:00
Alessandro Decina
8734abb1ce applemedia: don't call CVPixelBufferLockBaseAddress when doing texture sharing
When doing texture sharing we don't need to call CVPixelBufferLockBaseAddress to
map the buffer in CPU. This cuts about 10% relative cpu time from a vtdec !
glimagesink pipeline.
2015-01-30 00:34:08 +11:00
Alessandro Decina
5f547c5600 gl: initial support for texture targets other than GL_TEXTURE_2D
Make GstGLMemory hold the texture target (tex_target) the texture it represents
(tex_id) is bound to. Modify gst_gl_memory_wrapped_texture and
gst_gl_download_perform_with_data to take the texture target as an argument.

This change is needed to support wrapping textures created outside libgstgl,
which might be bound to a target other than GL_TEXTURE_2D. For example on OSX
textures coming from VideoToolbox have target GL_TEXTURE_RECTANGLE.

With this change we still keep (and sometimes imply) GL_TEXTURE_2D as the
target of textures created with libgstgl.

API: modify GstGLMemory
API: modify gst_gl_memory_wrapped_texture
API: gst_gl_download_perform_with_data
2015-01-30 00:34:08 +11:00
Alessandro Decina
12e8bb4a66 gstglcolorconvert: micro optimization
Don't call glClear && glClearColor at each draw since we're going to draw the
whole viewport anyway. Gets rid of a glFlush triggered by glClear on OSX.
2015-01-30 00:34:08 +11:00
Alessandro Decina
e91989136a applemedia: corevideobuffer: make mapping the CVPixelBuffer in CPU optional
Mapping is not necessary and impacts performance when doing texture sharing with
downstream
2015-01-30 00:34:08 +11:00
Alessandro Decina
c7284a6390 gstglcolorconvert: relax caps features check
Require caps to have the GST_CAPS_FEATURE_MEMORY_GL_MEMORY feature but allow
them to have more features.
2015-01-30 00:34:08 +11:00
Vincent Penquerc'h
5c44bceeb3 opusenc: change audio property to audio-type
This is now an enum with values generic (default) and voice.

https://bugzilla.gnome.org/show_bug.cgi?id=740891
2015-01-29 13:23:57 +00:00
Matthew Waters
1e6011bcdf gl/win32: fixup compilation 2015-01-29 23:46:57 +11:00
Luis de Bethencourt
26692836f2 audiovisualizer: remove double-setting of render function
No need to set the audiovisualizer->render function twice. Once is enough.
2015-01-29 11:55:13 +00:00