Commit graph

18849 commits

Author SHA1 Message Date
Matthew Waters
2704fdaa59 gl/wayland: add GstGLDisplayWayland
Simple implementation split from GstGLWindowWayland

Can now have multiple glimagesink elements all displaying output
linked via GL or otherwise (barring GL platform limitations).

The intel driver is racy and can crash setting up the two glimagesink contexts.

e.g.
videotestsrc ! tee name=t ! queue ! glupload ! glimagesinkelement
  t. ! queue ! gleffects_blur ! glimagesinkelement

videotestsrc ! glupload ! glfiltercube ! tee name=t ! queue ! glimagesinkelement
  t. ! queue ! gleffects_blur ! glimagesinkelement
2015-05-25 17:39:14 +10:00
Matthew Waters
9dcefacb3d gltransformation: fix DrawElements call for element array buffers
https://bugzilla.gnome.org/show_bug.cgi?id=749734
2015-05-25 17:39:08 +10:00
Matthew Waters
dec8139e65 gl/calayer: provide the exact GL api version for the wrapped context
Otherwise we could end up being mistaken for the diference between a
gl3 and a gl2 context resulting in a failure getting the list of
extensions from the wrapped context due to the difference between
glGetString and glGetStringi for the GL_EXTENSIONS token.

https://bugzilla.gnome.org/show_bug.cgi?id=749728
2015-05-23 01:26:05 +10:00
Jimmy Ohn
be90a12916 dashdemux: remove unnecessary semicolon
https://bugzilla.gnome.org/show_bug.cgi?id=749691
2015-05-22 09:40:35 +01:00
Xavier Claessens
1a98face84 gl: win32: do not call SetParent in release_parent_win_id()
When called from gst_gl_window_win32_close(), internal window
could not exist, and if it does it's going to be destroyed just
after that anyway. Also it causes window_proc() to be called
and crash because it gets a NULL context.

When called from gst_gl_window_win32_set_window_handle() we are
going to set another parent anyway, and it's probably better to
reparent directly instead of passing by a NULL parent which could
cause the internal window to popup briefly.

https://bugzilla.gnome.org/show_bug.cgi?id=749601
2015-05-21 16:58:11 -04:00
Xavier Claessens
ae77afeb74 gl: win32: remove unused code
https://bugzilla.gnome.org/show_bug.cgi?id=749601
2015-05-21 16:58:11 -04:00
Xavier Claessens
247697ce62 gl: win32: fix crash when finalizing GstGLContext
gst_gl_context_finalize() is calling gst_gl_window_win32_quit()
which was posting a message. But then window_proc takes window's
context and get a NULL.

Now that we've got a GMainLoop we can do like other backends and
simply call g_main_loop_quit().

This also remove duplicated code to release the parent window and
potential crash there because parent_proc could be NULL if we never
created the internal window. That could happen for example if setting
state to READY then setting a window_handle, and go back to NULL state.

https://bugzilla.gnome.org/show_bug.cgi?id=749601
2015-05-21 14:33:53 -04:00
Xavier Claessens
e1a827822e gl: win32: Fix leaked GstGLContext
https://bugzilla.gnome.org/show_bug.cgi?id=749601
2015-05-21 14:33:53 -04:00
Xavier Claessens
0acc18c60f gl: win32: set the parent window when creating internal window
When _set_window_handle() was called in READY state, it wasn't
set to the internal window created later.

https://bugzilla.gnome.org/show_bug.cgi?id=749601
2015-05-21 14:33:52 -04:00
Xavier Claessens
e24bc348bd gl: win32: use a GMainContext to dispatch win32 messages
gst_gl_window_win32_send_message_async() could be called before the
internal window is created so we cannot use PostMessage there.

x11 and wayland backends both create a custom GSource for this,
so there is no reason to not do that for win32.

https://bugzilla.gnome.org/show_bug.cgi?id=749601
2015-05-21 14:33:52 -04:00
Jan Schmidt
c9372ae33f glupload: Don't leak all memory uploaded via raw uploads.
Remove an extra ref missed when switching over to not
reusing output textures
2015-05-22 00:28:25 +10:00
Sebastian Dröge
3230e51993 compositor/glvideomixer: Don't calculate PAR/DAR with unset GstVideoInfos
Otherwise we divide by zero.
2015-05-21 16:24:48 +03:00
Sebastian Dröge
41c11e3979 compositor: Fix double assignment 2015-05-21 16:19:08 +03:00
Matthew Waters
e9f0d0fb51 glcontext: require a shader version to initialize.
It's very near pointless to try our GL implementation without shaders.

https://bugzilla.gnome.org/show_bug.cgi?id=749284
2015-05-21 15:07:38 +10:00
Jan Schmidt
cdff13e07b Fix flags order in GL examples for uninstalled build 2015-05-21 13:42:35 +10:00
Jan Schmidt
e7381ed17a wasapi: Fix flags order for uninstalled build 2015-05-21 13:42:29 +10:00
Matthew Waters
d1419afef1 compositor/glvideomixer: fix up par handling
We were using the wrong formula

https://bugzilla.gnome.org/show_bug.cgi?id=749634
2015-05-21 01:04:38 +10:00
Edward Hervey
69c09c38cf h264parse: Consider SEI NALU as "HEADER" packets
Like SPS/PPS they do contain information which will be needed to
decode the following data (as per definition of the flag)

Also ensures that the series of SPS/PPS/SEI NALU before a keyframe
can be considered as one contiguous header
2015-05-20 15:41:11 +02:00
Edward Hervey
43621624c8 mpegtsmux: Carry over GST_BUFFER_FLAG_HEADER
In the same way we do it for the DELTA_UNIT flag

This allows downstream elements to know whether a given mpeg-ts
packet contains a corresponding HEADER elementary unit
2015-05-20 15:41:11 +02:00
Thijs Vermeir
8d728abd8c x265enc: Only copy VPS/SPS/PPS NAL units in header buffer
Previously the VPS unit was detected and all next packets where copied
into the header buffer assuming only SPS and PPS would follow.  This is
not always true, also other types of NAL units follow the VPS unit and
where copied to the header buffer. Now the VPS/SPS/PPS are explicitely
detected and copied in the header buffer.
2015-05-20 13:16:01 +02:00
Thijs Vermeir
db766de135 x265enc: Fix tune parameter mismatch
There was a mismatch between the tune parameter in x265 and the enum
used in this element. The value in the enum is the x265 tune
parameter + 1.
2015-05-20 11:32:52 +02:00
Sebastian Dröge
8bacecfb08 amcaudiodec: Add an output adapter for chunking the output into codec frames
Otherwise the base class will be confused.
See https://bugzilla.gnome.org/show_bug.cgi?id=685730
2015-05-19 19:12:41 +03:00
Xavier Claessens
7ca9f52ccb gl: fix crash on windows with intel driver
https://bugzilla.gnome.org/show_bug.cgi?id=749430
2015-05-20 00:56:44 +10:00
Matthew Waters
8157574d0f caopengllayersink: static const the indices array
the contents will never change anyway.
2015-05-20 00:56:44 +10:00
Matthew Waters
057130b93d caopengllayersink: correctly use the sync meta across multiple contexts
1. Set the sync point after the (possible) upload has occured
2. Wait in the correct GL context (the draw context)

Note: We don't add the GL sync meta to the input buffer as it's not
writable and a copy would be expensive.

Similar to the change with the same name for glimagesink
2015-05-20 00:36:48 +10:00
Matthew Waters
49c4d0850d caopengllayersink: update for GL3 element array buffer usage
fixes blank output
2015-05-20 00:36:48 +10:00
Matthew Waters
6a2d12bf47 glimagesink: correctly use the sync meta across multiple contexts
1. Set the sync point after the (possible) upload has occured
2. Wait in the correct GL context (the draw context)

Note: We don't add the GL sync meta to the input buffer as it's not
writable and a copy would be expensive.
2015-05-20 00:36:48 +10:00
Matthew Waters
2e58daf196 gl/calayer: provide a current wrapped GstGLContext for callbacks
So that the draw and resize callbacks can get the current GstGLContext.
2015-05-20 00:36:48 +10:00
Matthew Waters
81e46e8b75 glsyncmeta: ensure that the Fence is going to be executed
Otherwise it could stay client side without being submitted to the GL
server resulting in another context waiting on a Fence that will never
become signalled causing a deadlock.
2015-05-20 00:36:48 +10:00
Matthew Waters
2747eb1232 glupload: don't reuse output textures for raw data upload
Causes stale textures to be used further down the chain.
2015-05-20 00:36:48 +10:00
Matthew Waters
2352545bee glframebuffer: don't clear the framebuffer
Breaks attempting to blend with the destination buffer and should be done
explicitly by the callback anyway.
2015-05-19 11:11:02 +10:00
Matthew Waters
ddc4f1ffbd glbasefilter: track gl_start/stop correctly
Don't start multiple times without calling gl_stop.
2015-05-19 11:09:54 +10:00
Stefan Sauer
4116d11327 Revert "doc: Workaround gtkdoc issue"
This reverts commit ff6c736fe0.

This is fixed by the gtk-doc 1.23 release.

<para> cannot contain <refsect2>:
http://www.docbook.org/tdg/en/html/para.html
http://www.docbook.org/tdg/en/html/refsect2.html
2015-05-18 20:16:32 +02:00
Jimmy Ohn
4ca3a22b6b hlsdemux: Simplify logic in process_manifest
Simplify logic in process_manifest and remove a TODO item.

https://bugzilla.gnome.org/show_bug.cgi?id=749328
2015-05-18 10:52:35 +03:00
Vineeth T M
6b43d7f770 cvsmooth: rename properties
The properties are named as param1 to param4, which makes very little sense
hence renamed the properties according to what it is doing.

https://bugzilla.gnome.org/show_bug.cgi?id=749523
2015-05-18 10:50:23 +03:00
Vineeth T M
1fa8e75f44 cvsmooth: Wrong assignment of prop leads to crash
when setting param2 property, it is wrongly being assigned to param1.
This leads to wrong behavior and a crash when param2 is set as 0.

https://bugzilla.gnome.org/show_bug.cgi?id=749523
2015-05-18 10:48:49 +03:00
Vineeth T M
8df641016e pyramidsegment: wrong value of level property
The property level has a minimum value of 0. But when we set the level as 0,
it gets an assertion error. The function icvPyrSegmentation8uC3R returns false
if level is set as 0, since the minimum level cant be 0 and thus results in error.
Hence changing the minimum value to 1.

https://bugzilla.gnome.org/show_bug.cgi?id=749525
2015-05-18 10:47:45 +03:00
Nicolas Dufresne
ff6c736fe0 doc: Workaround gtkdoc issue
With gtkdoc 1.22, the XML generator fails when a itemizedlist is
followed by a refsect2. Workaround the issue by wrapping the
refsect2 into para.
2015-05-16 23:38:14 -04:00
Vincent Penquerc'h
1dd94be326 tsdemux: fix buffer timestamp not being in stream time
Timestamps should start at the segment start, rather than 0, so
we need to not subtract the first timestamp. This makes the sink
correctly account for running time when switching PMTs where a
stream starts not quite at zero, causing timing offsets that can
become noticeable and causing dropped frames after a few times.
2015-05-15 14:50:35 +01:00
Vincent Penquerc'h
4a219df304 tsdemux: accumulate previous segment base time 2015-05-15 14:49:04 +01:00
Vincent Penquerc'h
29fd6332a4 tsdemux: fix refcounting when applying a new PMT
A new program object is created to replace an existing one
in the programs hash table, so its refcount needs to match.

With the default of 0 refcount on creation, the next PAT
change will cause that refcount to be both incremented and
decremented (assuming the new PAT references that stream too),
which will cause the program to be destroyed.

https://bugzilla.gnome.org/show_bug.cgi?id=748412
2015-05-15 14:45:49 +01:00
Jose Antonio Santos Cadenas
d625770a18 dtls: Fix memory leak
Keys were not correctly released when it was get as a property
nor when a second key was received

https://bugzilla.gnome.org/show_bug.cgi?id=749380
2015-05-15 15:47:39 +03:00
Matthew Waters
c6abd1632f glimagesink: free the vertex buffer when done
fixes a memory leak
2015-05-14 21:21:01 +10:00
Matthew Waters
1e9c30223e glcontext/cocoa: implement GL3 core context selection 2015-05-14 20:35:18 +10:00
Matthew Waters
904cdf3f58 tests/gl: fix typo 2015-05-14 18:35:35 +10:00
Matthew Waters
0870e8785e gl: remove useless gl{En,Dis}able (GL_TEXTURE_*) calls
We are using shaders everywhere and so they are not needed
2015-05-14 16:42:09 +10:00
Matthew Waters
1f89d1dce2 glimagesink: cleanup properties
remove unused "display-name"
ensure defaults between the bin/element are the same
2015-05-14 15:10:59 +10:00
Matthew Waters
a852146624 gleffects: only try the GL2 shader init path if we have a GL2 context 2015-05-14 14:58:07 +10:00
Matthew Waters
e1b077d6af glshader: attempt to detect the gles2 inside opengl3 case
This is necessary to use gles2 shaders in a GL 3 core context on
OS X which fails without a proper #version being set on the shaders.
2015-05-14 14:58:07 +10:00
Matthew Waters
3d0bc93edc glshader: remove references to gl3 specific shaders
We rely specifically on gles2 shaders being supported by the GL
implementation with GL3 core profile.
2015-05-14 14:58:07 +10:00