Commit graph

2226 commits

Author SHA1 Message Date
Julien Isorce
7d0de0577a gl: do not raise a critical msg if the backend does not handle window events
Fix "assertion 'window_class->handle_events != NULL' failed"
if not using a X11 window.
2014-11-12 00:07:06 +00:00
Matthew Waters
36ade75f4a gl: remove the width/height fields from the caps to support frame resizing
It was previously only occuring with sysmem caps features

https://bugzilla.gnome.org/show_bug.cgi?id=739334
2014-11-11 14:23:55 +11:00
Aurélien Zanelli
6511a7282b h264parser: fix GstH264ParserResult documentation typo
https://bugzilla.gnome.org/show_bug.cgi?id=739906
2014-11-10 23:37:37 +00:00
Sebastian Dröge
da0369c66c gstglconfig: Put gstglconfig.h into $(libdir)/gstreamer-1.0/include
It's architecture dependent and should not be placed into the include
directory as the assumption is that all those headers are architecture
independent.

https://bugzilla.gnome.org/show_bug.cgi?id=739767
2014-11-07 12:00:29 +01:00
Matthew Waters
775ba4ff0b glutils: only attempt getting the app context when we don't already have a display
avoids querying/messaging the world on each frame
2014-11-06 18:47:34 +11:00
Matthew Waters
1800ffb34a glcontext: fail context creation if glGetString returns NULL 2014-11-06 18:46:48 +11:00
Lubosz Sarnecki
6702811e14 glimagesink: implement gst_video_overlay_handle_events
https://bugzilla.gnome.org/show_bug.cgi?id=736035
2014-11-06 16:04:11 +11:00
Olivier Crête
484f0a0cd3 insertbin: Add doc for the ignored user-data in action signals 2014-11-03 20:45:03 -05:00
Julien Isorce
0a207c95dc gl/cocoa: use NSAutoreleasePool to free resize data
Otherwise when resizing the window you will also get messages like:
class NSConcreteMapTable autoreleased with no pool in place - just leaking
class NSConcreteValue autoreleased with no pool in place - just leaking
class NSConcreteValue autoreleased with no pool in place - just leaking
class __NSCFDictionary autoreleased with no pool in place - just leaking
2014-11-03 23:24:33 +00:00
Julien Isorce
4307449449 gl/cocoa: include gl3.h to have GL_CONTEXT_PROFILE_MASK 2014-11-03 23:08:09 +00:00
Julien Isorce
2b487ef62b gl/cocoa: make sure to turn on frame rectangle changes notifications
Default value of property postsFrameChangedNotifications is YES
but it is worth to explicitly enable it.
2014-11-03 23:07:34 +00:00
Julien Isorce
a259391c10 gl/cocoa: fix uncaught exception 'unrecognized selector sent to instance'
Need to set the ':' as the reshape method now takes one parameter.
For the story, the GstGLNSView was previously inheriting from
NSOpenGLView which has a reshape function without any parameter.
Now the GstGLNSView inherits from NSView and we re-use the reshape
function manually.
2014-11-03 23:02:17 +00:00
Julien Isorce
11661ceca9 gl/cocoa: fix compiler warning
Use the reshape function after being defined. The other way
would have been to declare the reshape function in the header.

gstglwindow_cocoa.m: In function '-[GstGLNSView drawRect:]':
gstglwindow_cocoa.m:555: warning: 'GstGLNSView' may not respond to '-reshape'
gstglwindow_cocoa.m:555: warning: (Messages without a matching method signature
gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
gstglwindow_cocoa.m:555: warning: '...' as arguments.)
2014-11-03 22:59:41 +00:00
Sebastian Dröge
9f09b6ff0b videoaggregator: Swap source/destination parameters of gst_video_converter_frame() 2014-11-03 16:13:23 +01:00
Tim-Philipp Müller
ebcee78fab gl: fix Since marker for gst_gl_window_run_navigation() 2014-11-03 00:17:41 +00:00
Luis de Bethencourt
658f403a26 glshader: Fix memory leak
Memory is only freed in the TRUE clause of the if conditional. Free in the else
clause as well.
Also, consolidate g_malloc + sprintf into a g_strdup_printf().

CID #1212171

https://bugzilla.gnome.org/show_bug.cgi?id=739368
2014-11-01 15:42:21 +00:00
Luis de Bethencourt
50f2a803f6 glcolorconvert: fix comments that confuse gtk-doc
GTK-Doc uses a special syntax for code documentation. A multiline comment that
starts with an additional '*' marks a documentation block that will be processed
by the GTK-Doc tools. So GTK-Doc is confused if a comment block starts with that
additional '*' but isn't meant to be processed. Removing this additional '*'.

https://bugzilla.gnome.org/show_bug.cgi?id=739444
2014-10-31 11:20:29 +00:00
Matthew Waters
f36d6daf51 gl: sprinkle some Since markers 2014-10-31 21:29:25 +11:00
Luis de Bethencourt
f76d1a2514 mpegts: remove storage of never used values
Both _parse_atsc_mgt() and  _parse_atsc_vct () change the value of the variable
data just before returning. The new value is never used since data is a pointer
declared at the beginning of the function and going out of scope just after the
new value is stored.

https://bugzilla.gnome.org/show_bug.cgi?id=739404
2014-10-30 23:19:59 +00:00
Luis de Bethencourt
0df9279026 videoaggregator: remove storage of never used values
These two values are stored just before the function returns and they go out of
scope.
2014-10-30 14:52:13 +00:00
Matthew Waters
c1f3cc9f1c gl/examples: update for other-context property removal 2014-10-30 18:58:50 +11:00
Matthew Waters
567185a277 glcontext: add more functionality to wrapped contexts
Implements get_current_context() and get_proc_address() for wrapped
contexts.
2014-10-30 18:58:50 +11:00
Matthew Waters
d2cbc7cc16 glshader: advertise the default vertex and fragment shaders on desktop GL 2014-10-30 18:58:49 +11:00
Gwenole Beauchesne
65fc58da4d codecparsers: h264: recognize SVC NAL units.
Identify SVC NAL units and tag them as such. This is necessary for
gst_h264_parser_parse_slice_hdr() to fail gracefully, if the user
did not perform the check himself.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 15:00:56 +01:00
Gwenole Beauchesne
b50c3e2127 codecparsers: h264: fix number of list0 {,non-}anchor refs.
Fix copy-paste error in gst_h264_sps_mvc_copy() where num_anchor_refs_l0
and num_non_anchor_refs_l0 were incorrectly initialized from list1.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 15:00:56 +01:00
Tim-Philipp Müller
3e62612259 codecparsers: sprinkle some gtk-doc Since: markers for new API 2014-10-29 13:15:51 +00:00
Jan Schmidt
86b948587e codecparsers: Initialise nalu extension type to NONE
Always set a default NALU extension type, and override it
when we find a supported extension, to avoid having it unset/random
for unsupported NALU extensions
2014-10-29 23:23:02 +11:00
Jan Schmidt
cc71119539 h264parser: Fix frame packing SEI parsing 2014-10-29 23:21:47 +11:00
Sreerenj Balachandran
3776e78ae6 codecparsers: h264: add support for Frame Packing Arrangement SEI message.
This parses the frame_packing_arragement() payload in SEI message.
This information can be used by decoders to appropriately rearrange the
samples which belong to Stereoscopic and Multiview High profiles.

https://bugzilla.gnome.org/show_bug.cgi?id=685215

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 23:09:41 +11:00
Sreerenj Balachandran
51f003e469 codecparsers: h264: add support for Stereo Video Information SEI message.
Add the necessary payload parsing support for stereo_video_info.

https://bugzilla.gnome.org/show_bug.cgi?id=685215

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2014-10-29 23:09:41 +11:00
Gwenole Beauchesne
8911a80662 codecparsers: h264: parse seq_parameter_set_mvc_extension().
https://bugzilla.gnome.org/show_bug.cgi?id=685215

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 23:09:41 +11:00
Gwenole Beauchesne
c1deab84e6 codecparsers: h264: parse MVC syntax elements.
https://bugzilla.gnome.org/show_bug.cgi?id=685215

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-10-29 23:09:41 +11:00
Luis de Bethencourt
916b954315 codecparsers: remove ignored increment of return
'return val++;' returns the value before it is incremented because the post
increment happens after the statement. Removing the unused increment.

https://bugzilla.gnome.org/show_bug.cgi?id=739345
2014-10-29 10:37:38 +00:00
Tim-Philipp Müller
95c211dc49 Add some missing G_END_DECLS 2014-10-28 21:42:31 +00:00
Matthew Waters
5e2e6f3326 glfilter: get the config from the correct pool 2014-10-28 18:27:11 +11:00
Matthew Waters
28105a6e7d glfilter: avoid uninitialized variable size when chaining multiple glfilters
https://bugzilla.gnome.org/show_bug.cgi?id=739277
2014-10-28 18:01:27 +11:00
Matthew Waters
0289fbe2cd glfilter: gst-indent file 2014-10-28 18:01:01 +11:00
Matthew Waters
81ceca1aea glcontext: add api for retreiving the current context and api
that is current in the calling thread.
2014-10-28 17:33:20 +11:00
Matthew Waters
ce14777919 glprototypes: add vertex attribute array definitions 2014-10-28 17:33:20 +11:00
Matthew Waters
e40d70c69a gl: propogate other-context using GstContext 2014-10-23 23:58:33 +11:00
Sebastian Dröge
af6e2228b2 gl/cocoa: Fix compiler warning
gstglwindow_cocoa.m: In function '-[GstGLNSView drawRect:]':
gstglwindow_cocoa.m:555: warning: 'GstGLNSView' may not respond to '-reshape'
gstglwindow_cocoa.m:555: warning: (Messages without a matching method signature
gstglwindow_cocoa.m:555: warning: will be assumed to return 'id' and accept
gstglwindow_cocoa.m:555: warning: '...' as arguments.)
2014-10-21 16:22:06 +02:00
Vineeth T M
aec1f2a001 audiomixer: critical error for blocksize, timeout min/max values
Audiomixer blocksize, cant be 0, hence adjusting the minimum value to 1
timeout value of aggregator is defined with MAX of MAXINT64,
but it cannot cross G_MAXLONG * GST_SECOND - 1
Hence changed the max value of the same

https://bugzilla.gnome.org/show_bug.cgi?id=738845
2014-10-21 10:58:48 +02:00
Matthew Waters
75413ae9aa videoaggregator: fixate the parts of the caps we don't know how to deal with
fixes glvideomixer with video/x-raw,width=foo i.e. no format field.
2014-10-21 02:53:02 +11:00
Matthew Waters
2e49c99db3 glbufferpool: add the GstVideoGLTextureUploadMeta buffer pool option 2014-10-21 02:00:09 +11:00
Matthew Waters
f0caf04ad6 videoaggregator: operate on caps rather than video info
Otherwise the CapsFeatures will be lost along with the possibility
of multiple output types and formats.

https://bugzilla.gnome.org/show_bug.cgi?id=738129
2014-10-21 01:14:36 +11:00
Wang Xin-yu (王昕宇)
5eb538f9e2 glcolorconvert: support RGB16/BGR16 video format upload
https://bugzilla.gnome.org/show_bug.cgi?id=738842
2014-10-20 12:55:39 +02:00
Aurélien Zanelli
de327bf45b vc1parser: fix level values for simple/main profile
In simple profile, level set to 0 or 2 indicate low and medium level
respectively. In main profile, level set to 0, 2 or 4 indicate low,
medium and high level respectively.

Level values are defined in Annex J.1.2 of the SMPTE 421M.

https://bugzilla.gnome.org/show_bug.cgi?id=738230
2014-10-20 12:40:54 +02:00
Brion Vibber
88b19bcf99 gl/cocoa: Fix for building on Mac OS X 10.10
Using NSApp directly seems to confuse something, as the compiler
was expecting an id<NSFileManagerDelegate>. Switched to using
[NSApplication sharedApplication], and specified the delegate
protocol on the window class as well.

https://bugzilla.gnome.org/show_bug.cgi?id=738740
2014-10-19 20:01:55 +02:00
Matthew Waters
4b019ba268 glfilter: add uploaded_buffer field 2014-10-14 16:54:01 +02:00
Matthew Waters
b9db635f48 aggregator: add latency query handling 2014-10-09 23:52:11 +11:00
Matthew Waters
8a3993913f videoaggregator: support unresponsive pads
Render unresponsive pads with the last video frame received.
2014-10-09 23:52:11 +11:00
Matthew Waters
a41bc98b6e aggregator: add a timeout property determining buffer wait time
Determines the amount of time that a pad will wait for a buffer before
being marked unresponsive.

Network sources may fail to produce buffers for an extended period of time,
currently causing the pipeline to stall possibly indefinitely, waiting for
these buffers to appear.

Subclasses should render unresponsive pads with either silence (audio), the
last (video) frame or what makes the most sense in the given context.
2014-10-09 23:52:11 +11:00
Matthew Waters
c23cd9c3be videoaggregator: remove the use of the queued buffer on sink pads
That data is now held by the aggregator class
2014-10-09 23:52:11 +11:00
Sebastian Dröge
014cbbbb33 gl/cocoa: Add support for HiDPI displays
Without this our GL surface would be upscaled after rendering
by Cocoa, which would reduce image quality.
2014-10-09 10:56:06 +03:00
Matthew Waters
ccdd88eb5a glcolorconvert: output why we cannot convert a buffer 2014-10-09 12:29:57 +11:00
Matthew Waters
9108c52a22 glcolorconvert: fix planar YUV download
- sample the u and v planes properly
- output the correctly scaled u and v planes for different chroma block sizes
2014-10-09 12:29:57 +11:00
Felix Schwarz
a2b82ba541 mpegts: fix typos in comments
https://bugzilla.gnome.org/show_bug.cgi?id=738072
2014-10-07 13:11:13 +01:00
Matthew Waters
9dc1f9be36 glcolorconvert: fix UYVY download green screen 2014-10-07 23:04:30 +11:00
Matthew Waters
2fb0b28f74 glcolrconvert: fix YUY2 download
- The shader was outputing the wrong values compared with raw
  videotestsrc.
- deal with the texture edge properly.
- properly sample the 2x1 rectangle for the u and v values
- don't double sample the y value
2014-10-07 22:55:32 +11:00
Jan Alexander Steffens (heftig)
dce92c75b1 aggregator: Replace GMainContext with GAsyncQueue (v2)
The previous implementation kept accumulating GSources,
slowing down the iteration and leaking memory.

Instead of trying to fix the main context flushing, replace
it with a GAsyncQueue which is simple to flush and has
less overhead.

https://bugzilla.gnome.org/show_bug.cgi?id=736782
2014-10-06 18:57:28 +02:00
Thibault Saunier
7091b0418d videoaggregator: Do not wrongly set the aggregator.segment
The aggregator.segment is not to be initialized by the subclasses but
by the aggregator itself. Moreover, initializing it on start would make
us loose the information coming from the initial seek.
2014-10-06 18:57:28 +02:00
Thibault Saunier
b812bd454d videoaggregator: Make sure not to unref a NULL pointer 2014-10-06 18:57:28 +02:00
Mathieu Duponchelle
1d94b3f66a aggregator: Set seqnum only when segments are received. 2014-10-06 18:57:28 +02:00
Thibault Saunier
982b9dc3ea aggregator: Add a streaming lock so to secure flush start action
Without a lock that is taken in FLUSH_START we had a rare race where we
end up aggregating a buffer that was before the whole FLUSH_START/STOP
dance. That could lead to very wrong behaviour in subclasses.
2014-10-06 18:57:28 +02:00
Thibault Saunier
65d20d1028 aggregator: Query seeking when a seek failed to see if it was expected
And do not worry if seeking failed on a stream that is not seekable
2014-10-06 18:57:28 +02:00
Mathieu Duponchelle
59b15e6659 aggregator: set future seqnum before propagating the seek event.
So the seqnum is properly set for the following events.
2014-10-06 18:57:28 +02:00
Thibault Saunier
d82dddc3e5 aggregator: Store segment when seeked in READY for later use 2014-10-06 18:57:28 +02:00
Sebastian Dröge
58e186fe2b videoaggregator: Unmap and free GstVideoFrames as needed after conversion and errors 2014-10-06 10:11:47 +03:00
Sebastian Dröge
b3cd526347 aggregator: Unref the taglist in GstAggregator::stop() 2014-10-06 10:11:23 +03:00
Reynaldo H. Verdejo Pinochet
8059cf6567 mpegts: fix typo in GstMpegtsExtendedEventDescriptor doc 2014-10-03 23:27:03 -03:00
Thibault Saunier
3637296ee9 videoaggregator: Do not to release VIDEO_AGGREGATOR_LOCK while setting format info
We should be able to always keep the VIDEO_AGGREGATOR_LOCK while
negotiating caps, this patch introduce that change.

That also implies that we do not need the SETCAPS_LOCK anymore because
now VIDEO_AGGREGATOR_LOCK guarantees that setcaps is not called from
several threads and the gst_aggregator_set_caps method is now
protected.

https://bugzilla.gnome.org/show_bug.cgi?id=735042
2014-10-03 13:18:05 +02:00
Thibault Saunier
1b4547ff93 aggregator: Take lock to ensure set_caps is not called concurently
Avoiding to be in an inconsistent state where we do not have
actual negotiate caps set as srccaps and leading to point where we
try to unref ->srccaps when they have already been set to NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=735042
2014-10-03 13:18:05 +02:00
Sebastian Dröge
03a5bc82db videoaggregator: Also copy over the chroma siting and colorimetry when deciding on a conversion 2014-10-01 17:22:59 +03:00
Sebastian Dröge
f2af838837 videoaggregator: Revert the last commit and handle resolutions differences properly
This is about converting the format, not about converting any widths and
heights. Subclasses are expected to handler different resolutions themselves,
like the videomixers already do properly.
2014-10-01 17:18:05 +03:00
Sebastian Dröge
154eb9b508 videoaggregator: GstVideoConverter currently can't rescale and will assert
Leads to ugly assertions instead of properly erroring out:
CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed
2014-10-01 17:11:16 +03:00
Sebastian Dröge
c4cc2dfabf gl/cocoa: Always update our viewport if Cocoa tells us something has changed
The visible rect and bounds might be the same as before, but Cocoa
might've changed our viewport without us nothing. This happens if
you hide the view and show it again.
2014-10-01 16:04:36 +03:00
Sebastian Dröge
061d55f535 gl/cocoa: Handle NSView::renewGState() properly
Don't update the screen until we redraw, this prevents flickering during
scrolling, clipping, resizing, etc
2014-10-01 11:55:51 +03:00
Matthew Waters
dc4b4832d4 glcolorconvert: convert xRGB into ARGB properly
The alpha channel might not be the last component so check which one
it is in and clobber that one instead.
2014-09-30 14:46:14 +10:00
Matthew Waters
7b0a30343a glmemory: unset the opposite corresponding transfer flags when mapped with write
fixes consistency with consecutive gst_memory_map()'s with
flags & GST_MAP_WRITE
2014-09-30 01:49:05 +10:00
Sebastian Dröge
d4ed76e4da gl/cocoa: Update viewport according to the current clipping
We have to update the GL viewport if the NSView is only partially
visible. Otherwise the content of the frame will be visibly offset.
2014-09-29 14:34:42 +03:00
Sebastian Dröge
8d92b6a364 gl/cocoa: Improve the NSApplication initialization
This is only for non-Cocoa apps but previously caused a 2 second
waiting during startup for Cocoa apps. This is unacceptable.

Instead we now check a bit more extensive if something actually
runs on the GLib default main context, and if not don't even
bother waiting for something to happen from there.
2014-09-29 10:57:18 +03:00
Sebastian Dröge
0cd19cbda3 gl/cocoa: NSView::drawRect() should call into reshape too
We a) need to render again because part of the window was
obscured and b) might need to reshape because of clipping
changes.
2014-09-29 10:57:18 +03:00
Sebastian Dröge
66cb4166d3 gl/cocoa: Call UI related API from the application main thread 2014-09-29 10:57:18 +03:00
Sebastian Dröge
2173d34462 gl/cocoa: Switch to a plain NSView subclass instead of NSOpenGLView
We don't and can't use NSOpenGLView as it's supposed to be used and
it gets into our way by being to clever in various situations.
2014-09-29 10:57:18 +03:00
Edward Hervey
e064d280ea glcontext: Initialize variable
Avoids the following warning:

gstglcontext.c:647:58: error: 'prev' may be used uninitialized in
 this function [-Werror=maybe-uninitialized]
2014-09-29 08:54:29 +02:00
Josep Torra
5b79423416 video: fix build in gst-uninstalled setup
Include the base video lib appropriately and resort all of them as
thaytan suggested.
2014-09-28 18:03:09 +02:00
Matthew Waters
fc2471eb54 glcontext: fixup error in sharegroup comment 2014-09-29 00:32:05 +10:00
Matthew Waters
3b9893192c glcontext: detect the sharegroup case where the context are in different chains
In the end they will lead to the same root context in the tree so check that
for equality.
2014-09-29 00:24:28 +10:00
Matthew Waters
81c38c1d2b glfilter: silence a warning with empty input caps
discovered with the doublecube example

gst_caps_get_features: assertion 'index < GST_CAPS_LEN (caps)' failed
2014-09-28 21:18:32 +10:00
Matthew Waters
2043def155 videoaggregator: don't create converters when the subclass doesn't want them
fixes a critical with glvideomixer after
35bd1969f9

CRITICAL **: gst_video_converter_new: assertion 'in_info->width == out_info->width' failed
2014-09-28 16:58:42 +10:00
Sebastian Dröge
c9283c95f6 gl/cocoa: Switch from our custom main loop to a GMainLoop
Simplifies code a lot and makes it more similar to the other backends.
2014-09-25 16:13:19 +03:00
Sebastian Dröge
bc52e41641 gl/cocoa: Clear the current GL context when it should happen 2014-09-25 16:12:24 +03:00
Wim Taymans
35bd1969f9 video: use video lib conversion code instead of copy 2014-09-24 16:55:49 +02:00
Matthew Waters
c44352b11f gl: download whenever we have sysmem capsfeatures
Otherwise we could pass on a RGBA formatted buffer and downstream would
misinterpret that as some other video format.

Fixes pipelines of the form

    gleffects ! tee ! xvimagesink
2014-09-24 13:16:30 +10:00
Matthew Waters
82a3a34475 glupload: fallback to upload if contexts cannot share GL resources
Fixes pipelines of the form

    gleffects ! tee ! glimagesink

as tee does not pass on the allocation query.
2014-09-23 12:02:18 +10:00
Matthew Waters
d99b517b53 glcontext: add gst_gl_context_can_share
Which determines whether two GstGLContext's can share sharable
OpenGL resources.
2014-09-23 12:01:04 +10:00
Sebastian Dröge
8d457a4d18 gl: Let gst_gl_context_get_thread() return a new reference to the GThread
Otherwise it might go away in the meantime and the caller has some random pointer.
2014-09-22 10:09:24 +03:00
Anuj Jaiswal
d153b01280 gl: consecutive return, break statement
Signed-off-by: Anuj Jaiswal <anuj.jaiswal@samsung.com>

https://bugzilla.gnome.org/show_bug.cgi?id=736939
2014-09-22 16:17:15 +10:00
Matthew Waters
7216b360b7 gl/debug: desktop GL does not have the KHR suffixes 2014-09-22 12:21:22 +10:00
Tim-Philipp Müller
10997063a1 gl: add since markers for new API 2014-09-21 13:32:29 +01:00