Commit graph

2259 commits

Author SHA1 Message Date
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
Matthew Waters
64fc86844d glmemory: add debug line for freeing textures 2014-09-21 21:42:41 +10:00
Matthew Waters
5b8d7a443e glupload: provide the output buffer that is rendered into
Allows callers to properly reference count the buffers used for
rendering.

Fixes a redraw race in glimagesink where the previous buffer
(the one used for redraw operations) is freed as soon as the next
buffer is uploaded.

1. glimagesink uploads in _prepare() to texture n
1.1 glupload holds buffer n
2. glimagesink _render()s texture n
3. glimagesink uploads texture n+1
3.1 glupload free previous buffer which deletes texture n
3.2 glupload holds buffer n+1
4. glwindow resize/expose
5. glimagesink redraws with texture n

The race is that the buffer n (the one used for redrawing) is freed as soon as
the buffer n+1 arrives.  There could be any amount of time and number of
redraws between this event and when buffer n+1 is actually rendered and thus
replaces buffer n as the redraw source.

https://bugzilla.gnome.org/show_bug.cgi?id=736740
2014-09-21 21:36:49 +10:00
Matthew Waters
e7bd332887 glcontext: add API to retreive the thread that context is active in 2014-09-21 21:30:58 +10:00
Aurélien Zanelli
c9a196d54d vc1parser: take care of endianness when parsing sequence-layer
sequence-layer is serialized in little-endian byte order except for
STRUCT_C which is serialized in big-endian byte order.

But since STRUCT_A and STRUCT_B fields are defined as unsigned int msb
first, we have to pass them as big-endian to their parsing function. So
we basically use temporary buffers to convert them in big-endian.

See SMPTE 421M Annex J and L.

https://bugzilla.gnome.org/show_bug.cgi?id=736871
2014-09-18 13:36:07 +03:00
Ognyan Tonchev
5dc2843c86 glfilter: do not leak pool in error cases
https://bugzilla.gnome.org/show_bug.cgi?id=736732
2014-09-16 12:51:25 +03:00
Vasilis Liaskovitis
3c3b78508f GstGLWindow: Introduce navigation thread
This thread dispatches navigation events. It is needed to avoid deadlocks
between window backend threads that emit navigation events (e.g. X11/GMainLoop
thread) and consumers of navigation events such as glimagesink, see
https://bugzilla.gnome.org/show_bug.cgi?id=733661

GstGlWindow_x11 thread is changed to invoke the navigation thread for navigation
dispatching, instead of emiting the event itself. Othe backends beside X11 do
not dispatch navigation events yet, but should use this thread when dispatching
these events in the future.

The navigation thread is currently part of GstGLWindow and not implemented in
separate subclasses / backends. This will be needed in the future.

gst_gl_window_x11_get_surface_dimensions is also changed to use a cached value
of the window's width, height. These values are now retrieved in the X11
thread, function gst_gl_window_x11_handle_event. This change is needed because
otherwise the XGetWindowAttributes gets called from the navigation thread,
leading to xlib aborting due to multithreaded access (if XInitThreads is not
called before, as is the case for gst-launch)
2014-09-09 21:47:02 +10:00
Wang Xin-yu (王昕宇)
9047a01f5f gl: Add GSTGLAPI macro to the debug callback function
Fixes the Windows build.

https://bugzilla.gnome.org/show_bug.cgi?id=735565
2014-08-28 10:00:54 +03:00
Jan Schmidt
c93017a074 egl: Wrap KHR_create_context flags in an ifdef
EGL_CONTEXT_FLAGS_KHR and EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR
don't exist in the Android NDK. Wrap their usage in an #ifdef
EGL_KHR_create_context to fix the build there.
2014-08-26 12:41:35 +10:00
Matthew Waters
83a32dbddb egl: fallback to a non-debug context if a debug one fails
The text for EGL_KHR_create_context added the possiblity for ES
contexts to ask for a debug context however that has not been
fully realized by all implementations.  Fallback to a non-debug
context when the implementation errors.
2014-08-22 16:51:29 +10:00
Lubosz Sarnecki
5ae3d68590 gstopengl: add introspection support
https://bugzilla.gnome.org/show_bug.cgi?id=734482
2014-08-21 18:41:38 +10:00
Lubosz Sarnecki
d2cac06eeb glshader: expose opengl handle in getter
https://bugzilla.gnome.org/show_bug.cgi?id=734482
2014-08-21 17:38:36 +10:00
Wang Xin-yu (王昕宇)
4c65eca7be gl: check null before unref GstGLDisplay 2014-08-21 14:59:45 +10:00
Matthew Waters
14bd147a2d gl: add prototype definition for KHR_debug 2014-08-21 10:03:07 +10:00
Matthew Waters
95a4585d4c glcontext: implement the debug callback
For both GL_KHR_debug and ARB_debug_output.  This allows us to
receive errors and other hints from the GL instead of querying after
every GL operation.
2014-08-20 23:26:26 +10:00
Matthew Waters
14a3484b14 gl: add prototypes for KHR_debug/ARB_debug_output 2014-08-20 23:26:26 +10:00
Matthew Waters
cb4fd36e7e gl: don't take an extra ref on the display on set_context
gst_context_get_gl_display() returns a ref.  Don't take another in
gst_object_replace().
2014-08-19 20:14:22 +10:00
Sreerenj Balachandran
e93551d5b0 codecparser: h264: Use proper bit_reader api while parsing buffering_period SEI
https://bugzilla.gnome.org/show_bug.cgi?id=734970
2014-08-18 11:45:54 +01:00
Tim-Philipp Müller
21e6989848 glbufferpool: fix allocator leak in some cases
Spotted by Sebastian Rasmussen.

https://bugzilla.gnome.org/show_bug.cgi?id=734523
2014-08-13 18:05:40 +03:00
Matthew Waters
44e84025d7 aggregator: fix up doc comment for set_src_caps
It does not occur 'later' anymore

https://bugzilla.gnome.org/show_bug.cgi?id=732662
2014-08-11 23:38:40 +10:00
Matthew Waters
7c016752d7 videoaggregator: push the caps event as soon as we receive it
Along with the required mandatory dependent events.

Some elements need to perform an allocation query inside
::negotiated_caps().  Without the caps event being sent prior,
downstream elements will be unable to answer and will return
an error.

https://bugzilla.gnome.org/show_bug.cgi?id=732662
2014-08-11 23:36:27 +10:00
Sebastian Rasmussen
ee09d332bd videoaggregator: Unref allowed caps after usage
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=734522
2014-08-10 11:55:09 +01:00
Vasilis Liaskovitis
4dacc4ba55 GstGLWindow, GstGLImagesink, x11: Scale navigation events on resized windows
If window is resized, GstStructure pointer values have to be rescaled to
original geometry. A get_surface_dimensions GLWindow class method is added for
this purpose and used in the navigation send_event function.

https://bugzilla.gnome.org/show_bug.cgi?id=703486
2014-08-07 13:55:02 +10:00
Wang Xin-yu (王昕宇)
ba822e1dd0 glupload: don't determine if frame needs upload by pointer compare
https://bugzilla.gnome.org/show_bug.cgi?id=734269
2014-08-06 14:47:52 +10:00
Aurélien Zanelli
41df512eb9 codecparsers_h264: initialize some fields of pic_timing structure
Otherwise pic timing structure can have invalid cpb_removal_delay,
dpb_output_delay or pic_struct_present_flag which are blindly retrieved
in h264parse.

https://bugzilla.gnome.org/show_bug.cgi?id=734124
2014-08-01 17:06:29 +02:00
Matthew Waters
8f045ab18c gl/docs: remove superflous 'the' 2014-08-01 17:51:08 +10:00
Matthew Waters
707cb58004 gl: document GST_GL_* environment variables
https://bugzilla.gnome.org/show_bug.cgi?id=733245
2014-08-01 16:43:47 +10:00
Matthew Waters
750c70f8f5 glcontext: add a destroy function
that just calls the subclass
2014-07-31 18:46:33 +10:00
Matthew Waters
46db28ac2c gl/x11: silence runtime warning
g_main_loop_quit: assertion 'loop != NULL' failed
2014-07-31 18:36:58 +10:00
Matthew Waters
acb38a2a79 glmemory: use the plane offsets to compute the size of the data pointer
Certain elements expect that there be a certain number of lines
that they can write into.  e.g. for odd heights, I420, YV12, NV12,
NV21 (and others) Y lines are expected to have exactly twice the
number of U/UV lines.

https://bugzilla.gnome.org/show_bug.cgi?id=733717
2014-07-31 15:19:54 +10:00
Matthew Waters
89636392fa glmemory: use GstVideoInfo everywhere
Simplifies a lot of the calling code

https://bugzilla.gnome.org/show_bug.cgi?id=733717
2014-07-31 15:19:54 +10:00
Matthew Waters
dc5b0c8c8d glmemory: reenable the texture_rg support for !eagl
The GST_GL_HAVE_PLATFORM_EAGL is always defined we need to compare
against the value instead.
2014-07-29 11:47:55 +10:00
Vasilis Liaskovitis
05f908bf45 glwindow/11: Emit signals for mouse and key navigation events
https://bugzilla.gnome.org/show_bug.cgi?id=703486
2014-07-24 12:24:34 +02:00
Sebastian Dröge
eab38c5b21 glwindow: Constify string parameters to the send_*_event() functions 2014-07-24 12:23:03 +02:00
Vasilis Liaskovitis
41632d486b GstGLWindow : Add mouse-event and key-event signals for navigation
https://bugzilla.gnome.org/show_bug.cgi?id=703486
2014-07-24 12:48:44 +10:00
Wang Xin-yu (王昕宇)
1adb0a77d6 gl: fix multi gl object leaks
1. fix FBO leaks in decide_allocation
2. fix texture leaks in decide_allocation and reset
3. fix texture leaks in FBO incomplete error path
2014-07-24 11:46:56 +10:00
Fabrice Bellet
2f28fcb862 parser: mpeg4: fix vlc table used for sprite trajectory
The vlc table members cbits, cword and values were assigned in the wrong
order, causing the mpeg4 parser to fail when handling sprite
trajectories.

https://bugzilla.gnome.org/show_bug.cgi?id=733322
2014-07-21 09:37:51 +02:00
Mathieu Duponchelle
d11af7cd6b aggregator: Reset flow_return *after* stopping the srcpad task.
Otherwise it might be set in an already running aggregate function.
2014-07-16 17:52:35 +02:00
Thibault Saunier
619237c0d0 aggregator: Flush sinkpads when stopping
All values are meaningless in that case, so we should make sure that
we clean everything
2014-07-16 17:52:35 +02:00
Thibault Saunier
d9385687fb aggregator: Do not forget to reset the flow return when stoping
Setting it to FLUSHING when the element is not started, and to OK
when it starts.
2014-07-16 17:52:30 +02:00
Thibault Saunier
9233c6ac69 aggregator: Handle event seqnum 2014-07-16 17:05:25 +02:00
Sebastian Dröge
acb1d5afc3 gl: Link to all required libraries but not more 2014-07-11 12:06:48 +02:00
Sebastian Dröge
f6f1c0ac34 video: Properly include headers in Makefile.am
and don't set noinst_HEADERS twice.
2014-07-11 12:01:12 +02:00
Sebastian Dröge
92d00d0233 gl: Move GstGLMixer to the plugin for now
It depends on GstAggregator and we don't want to install headers
for that yet.

https://bugzilla.gnome.org/show_bug.cgi?id=732207
2014-07-11 09:41:05 +02:00
Sebastian Dröge
f701aa29b9 libs: Don't install headers and pc files for libgstwayland/badvideo/badbase
These will disappear after 1.4.0 and it would be rather annoying if
people started depending on them.

https://bugzilla.gnome.org/show_bug.cgi?id=732207
2014-07-11 09:33:57 +02:00
Edward Hervey
9e73b487c4 mpegts: Add parsing for CA descriptor (0x05)
https://bugzilla.gnome.org/show_bug.cgi?id=732986
2014-07-11 08:32:06 +02:00
Sebastian Rasmussen
fba6ebaae2 mpegts: No need to check for NULL before calling g_free()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732789
2014-07-09 12:04:17 +02:00
Sebastian Rasmussen
66c38b50f3 mpegts: Don't confuse slice allocator with regular one
Previously selector_bytes and private_data_bytes were sometimes allocated and
free using the normal allocator and sometimes using the slice allocator.
Additionally prefer g_strdup() to g_memdup() for strings.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732789
2014-07-09 12:04:17 +02:00
Edward Hervey
7626b494cb mpegts: Fix dvb linkage leaks
CID #1224130
2014-07-09 07:50:13 +02:00
Stefan Ringel
43dd0ec62a mpegts: use getter for egde linkage descriptor type
https://bugzilla.gnome.org/show_bug.cgi?id=730914
2014-07-09 07:41:33 +02:00
Stefan Ringel
41f1c8c32e mpegts: fix annotation
https://bugzilla.gnome.org/show_bug.cgi?id=730914
2014-07-09 07:41:32 +02:00
Edward Hervey
90b27a3c8b mpegts: Add padding to public structures
Allows use to add API in the future without breaking ABI. We broke the API/ABI
once between 1.2 and 1.4, let's try to avoid this in the future even if this
is an unstable library.

https://bugzilla.gnome.org/show_bug.cgi?id=730914
2014-07-09 07:39:37 +02:00
Thiago Santos
1d233b7516 mpegts: atsc: fix leak of short name 2014-07-08 15:43:32 -03:00
Thiago Santos
2874bff392 mpegts: fix leak of language code 2014-07-08 14:56:38 -03:00
Thibault Saunier
e4b07ee51d videoaggregator: Fix some more the locking logic in update_src_caps
We need the GST_OBJECT_LOCK only to iterate the sinkpads, nothing else.

https://bugzilla.gnome.org/show_bug.cgi?id=732750
2014-07-06 23:36:10 +02:00
Tim-Philipp Müller
341dc8aecf videoaggregator: fix broken locking in update_src_caps function
We would unlock an already-unlocked mutex that we never re-locked.

https://bugzilla.gnome.org/show_bug.cgi?id=732750
2014-07-06 22:16:48 +01:00
Tim-Philipp Müller
551122c19a aggregator: fix locking
We would unlock a mutex we never locked on SEGMENT
events.
2014-07-06 22:09:53 +01:00
Julien Isorce
6e51790a11 glcocoa: initalize NSApp asap when using gst-launch
See https://bugzilla.gnome.org/show_bug.cgi?id=732661
2014-07-03 10:39:44 +01:00
Vincent Penquerc'h
2a7c05592d videoaggregator: reset QoS on segment event
https://bugzilla.gnome.org/show_bug.cgi?id=732540
2014-07-01 16:35:42 +01:00
Gwenole Beauchesne
a61b7728b4 codecparsers: h264: clarifications and documentation fixes.
Fix documentation for GstH264NalUnit. The @ref_idc part was totally
unbalanced. Also add a note about @offset and @size fields to remind
that this is relative to the start of the NAL unit, thus including
the header bytes.
2014-07-01 16:26:48 +02:00
Gwenole Beauchesne
22b68b60ec codecparsers: h264: fix identification of EOSEQ and EOS NALs.
An end_of_seq() [EOSEQ] or end_of_stream() [EOS] NAL unit is really
one byte long because this shall include the NalHeaderBytes (1) too.
The NALU.offset starts from the first byte of the header.

This is the proper fix to commit d37f842. In practice, this fixes
parsing of FRExt1_Panasonic_D and FRExt2_Panasonic_C, that include
additional frames after an EOSEQ.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-07-01 16:26:48 +02:00
Edward Hervey
8c53dfcfb6 mpegts: Expose GstMpegtsDescriptor free function
Nothing earth shattering, but avoids people having to use g_boxed_free()
2014-07-01 10:03:49 +02:00
Sebastian Dröge
4cbddec9fe eagl: Disable usage of R and RG textures on iOS
They don't work currently and just render zeroes, while the
fallback code path with LUM and LUM_ALPHA textures still works.

https://bugzilla.gnome.org/show_bug.cgi?id=732390
2014-06-30 19:16:13 +02:00
Thibault Saunier
71c81a5176 aggregator: Avoid destroying sources we do not own
+ Unref the maincontext in a new dispose function
+ Make sure to remove all sources on dispose

https://bugzilla.gnome.org/show_bug.cgi?id=732445
2014-06-30 14:24:49 +02:00
Sebastian Dröge
426f9e6097 mpegts: Fix memory leaks in the test and the library
Currently uses g_boxed_free() in the unit test, this needs to
be fixed properly when cleaning up the API.

https://bugzilla.gnome.org/show_bug.cgi?id=730914
2014-06-29 21:34:50 +02:00
Sebastian Dröge
ace64ca3e5 badvideo: Update dist generated ORC files 2014-06-28 17:03:19 +02:00
Sebastian Dröge
286a80ab18 badvideo: Rename videoconvert functions to prevent conflicts with static linking
https://bugzilla.gnome.org/show_bug.cgi?id=728443
2014-06-28 17:03:19 +02:00
Thiago Santos
bdda4bb689 aggregator: always store or unref the buffer on the _chain function
Otherwise it leaks, and it is very common to go to flushing when the
pipeline is stopping, leaking a buffer.
2014-06-28 09:44:22 -03:00
Thiago Santos
b0652ee88f aggregator: always unref the buffer on _finish function
Otherwise the user doesn't know if it was unref'd or not
2014-06-28 09:44:22 -03:00
Thiago Santos
5ce02fa5f9 aggregator: add dispose/finalize functions
Add functions to be able to cleanup the mutex/cond and pending buffers
on the aggregator and on its pad
2014-06-28 09:44:22 -03:00
Thiago Santos
e6244874ab mpegts: atsc: avoid calling g_convert with 0-sized input
Avoids an assertion. The cached string will be assigned an empty string
as its value when size is 0.
2014-06-27 12:50:27 -03:00
Gwenole Beauchesne
9bd186a960 codecparsers: h264: fix memory leak in GstH264PPS.
The gst_h264_parse_pps() function dynamically allocates the slice
group ids map array, so that needs to be cleared before parsing a
new PPS NAL unit again, or when it is no longer needed.

Likewise, a clean copy to the internal NAL parser state needs to be
performed so that to avoid a double-free corruption.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-27 14:00:10 +02:00
Gwenole Beauchesne
b458a1e255 codecparsers: h264: fix typo in GstH264VUIParams description. 2014-06-26 17:22:26 +02:00
Aurélien Zanelli
67df207280 codecparsers: h264: add support for Recovery Point SEI message.
The recovery point SEI message helps a decoder in determining if the
decoding process would produce acceptable pictures for display after
the decoder initiates random access or after the encoder indicates
a broken link in the coded video sequence.

This is not used in the h264parse element, but it could help debugging.

https://bugzilla.gnome.org/show_bug.cgi?id=723380
2014-06-26 17:22:26 +02:00
Gwenole Beauchesne
0440cabf49 codecparsers: h264: add nal_reader_skip_long() helper.
Add nal_reader_skip_long() helper function to allow an arbitrary number
of bits to be skipped. The former nal_reader_skip() function is too
limited to the actual cache size.

Use this new function to simplify gst_h264_parser_parse_sei_message()
default case, that skips unsupported payloads.

v2: made args consistent from header to source file.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-26 17:22:26 +02:00
Matthew Waters
2e83aca728 videoaggregator: fix a refcount error when keeping the buffer
We take a ref on the pad's buffer at the beginning so we need to
unref when we are done in all cases.
2014-06-27 00:14:03 +10:00
Gwenole Beauchesne
c46b63d44e codecparsers: vp8: move up built-in range decoder private data.
Use the first _gst_reserved[] slot to hold the built-in range decoder
private data. The first slot was formerly the buffer size, which was
then promoted to semi-public namespace when it got integrated as git
commit 2940ac6.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-26 16:04:54 +02:00
Matthew Waters
c39105524a glcolorconvert: free pixel swizzling information 2014-06-26 11:25:37 +10:00
Matthew Waters
a03dbd11e4 glmixer: remove redundant/unused lock
Use the GstObject lock instead
2014-06-26 11:15:56 +10:00
Matthew Waters
de05daec80 glmixer: remove redundant creation and free of GPtrArrays
Also plugs a memory leak
2014-06-26 11:12:49 +10:00
Matthew Waters
f686c890e4 glmixer: plug a memory leak for the caps
gst_query_set_caps_result() takes a ref on the caps
2014-06-26 10:54:38 +10:00
Matthew Waters
a9215f78b5 aggregator: plug a memory leak of the srccaps 2014-06-26 10:53:16 +10:00
Matthew Waters
596353854f glmixer: intersect with the filtercaps if available 2014-06-26 10:31:41 +10:00
Matthew Waters
8ef71b5db7 gl: update gles2 compatability header 2014-06-26 10:31:41 +10: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
Edward Hervey
cddabd751c mpegtssection: Free data in error cases
Data is marked as "transfer full", if we have an error we need to
free it.
2014-06-25 14:15:37 +02:00
Matthew Waters
720405b561 glfilter: pass through the allocation query when in passthrough mode
Otherwise two GL elements on either side will fail to use the same
GL context.
2014-06-25 22:05:37 +10:00
Matthew Waters
a2bd2ce83b glfilter: prefer passthrough for non-sysmem caps 2014-06-25 21:50:40 +10:00
Julien Isorce
f63c91ab71 glfilter: handle NULL decide_query which means passthrough
See https://bugzilla.gnome.org/show_bug.cgi?id=732178
2014-06-25 06:56:33 +01:00
Julien Isorce
045aa4ee7e glfilter: prepend intersection to src caps
Prefer to stay in the same memory space if possible.
Also it let a chance to do passthrough.

See https://bugzilla.gnome.org/show_bug.cgi?id=732178
2014-06-25 06:56:25 +01:00
Edward Hervey
42b3d6ec8a mpegts: More doc fixes
Still not done :(
2014-06-24 16:06:01 +02:00
Edward Hervey
0607756e24 mpegts: more annotation fixes 2014-06-24 16:06:01 +02:00
Stefan Ringel
7c884374eb mpegts: change to GType and from gchar[] to gchar*
https://bugzilla.gnome.org/show_bug.cgi?id=730914
2014-06-24 16:06:01 +02:00
Matthew Waters
1d16cd50a3 gl: add a scary note about initializing thread support for the winsys
We cannot do it as the winsys may crash if we initialize too late.

Example, GLX contexts with Intel drivers:
Intel requires the X Display to be the same in order to share GL
resources across GL contexts.  These GL contexts are generally
accessed from different threads.  Without winsys support it is
nearly impossible to guarentee that concurrent access will not
occur.  This concurrent access could result in crashes or abortion
by the winsys (xcb).

https://bugzilla.gnome.org/show_bug.cgi?id=731525
2014-06-24 23:41:00 +10:00
Edward Hervey
123f642d5e mpegts: Fix descriptor_from_dvb_service
Various leaks/overwrites issues
2014-06-24 14:51:32 +02:00
Edward Hervey
aaee4dc23b all: Don't declare variables in 'for' loops 2014-06-24 14:51:32 +02:00
Sebastian Dröge
104816e906 badbase: Use the correct LDFLAGS for creating libraries
Otherwise we won't e.g. create .dlls on Windows
2014-06-24 11:27:15 +02:00
Matthew Waters
8f716555ba videoaggregator: don't clobber already heap allocated video frame
CID # 1223440
2014-06-23 22:40:23 +10:00
Matthew Waters
5d1efa193f videoaggregator: fix up the parent chaining for dispose and finalize 2014-06-23 22:36:23 +10:00
Matthew Waters
078c789ffa gluploadmeta: reenable GLMemory upload path 2014-06-23 21:43:10 +10:00
Sebastian Dröge
6d3d06c91f Release 1.3.3 2014-06-22 19:22:28 +02:00
Sebastian Dröge
f5356dc697 video: Link with $(LIBM) for rint() and others 2014-06-22 18:52:54 +02:00
Matthew Waters
d52ef19d7f gl: move gles2 compat header to glprototypes 2014-06-22 09:48:22 +10:00
Matthew Waters
838fd776cf glbufferpool: provide a consistent API regardless of platform 2014-06-22 09:48:22 +10:00
Matthew Waters
1970659fa1 gl: mark library as API unstable 2014-06-22 09:48:22 +10:00
Thibault Saunier
4ed2a66f1e libs:uridownloader: Properly declare APIs as UNSTABLE 2014-06-21 17:02:50 +02:00
Thibault Saunier
bc5e230040 libs:video: Properly declare APIs as UNSTABLE 2014-06-21 17:02:50 +02:00
Thibault Saunier
816b12d100 libs:base: Properly declare APIs as UNSTABLE 2014-06-21 17:02:50 +02:00
Thibault Saunier
f9ff8cd7c8 libs:video: Add -I$(top_srcdir)/gst-libs to fix distcheck 2014-06-21 15:40:58 +02:00
Thibault Saunier
8250845b47 libs:base: Fix includedir 2014-06-21 15:26:14 +02:00
Thibault Saunier
6409641130 aggregator: Fix requested pad name 2014-06-21 14:14:26 +02:00
Thibault Saunier
1bfee113c4 libs: videoaggregato: Do not import videoconvert.h in gstvideoaggregatorpad.h
+ Add a Private structure to the GstVideoAggregatorPad
+ Add some padding
2014-06-20 22:14:25 +02:00
Thibault Saunier
32d64d1863 Final fix compilation 2014-06-20 21:28:12 +02:00
Thibault Saunier
b4799dd17b libs:video:Fix compilation 2014-06-20 20:35:45 +02:00
Thibault Saunier
4ce8b409cc gl: Port glmixer to the GstVideoAggregator baseclass
https://bugzilla.gnome.org/show_bug.cgi?id=731921
2014-06-20 19:53:33 +02:00
Mathieu Duponchelle
7cf66e7c07 videoaggregator: Create a new GstVideoAggregator baseclass
This base class has been added to a newly created libgstbadvideo library

Co-Authored by: Thibault Saunier <tsaunier@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=731918
2014-06-20 19:53:33 +02:00
Thibault Saunier
55c65d079f aggregator: Add new GstAggregator base class
This base class has been added to a newly created libgstbadbase library

Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>

https://bugzilla.gnome.org/show_bug.cgi?id=731917
2014-06-20 19:53:33 +02:00
Sebastian Dröge
e3af42ae82 uridownloader: Include the debug string in the error messages we propagate from t source 2014-06-19 18:34:05 +02:00
Matthew Waters
189353619c glframebuffer: don't segfault needlessly with GLES2
gst_gl_framebuffer_use_v2 was using a function that is not available
with GLES2
2014-06-17 23:21:15 +10:00
Tim-Philipp Müller
d4745ea78c wayland: add unstable API guards to wayland library header 2014-06-17 13:15:06 +01:00
Tim-Philipp Müller
fc4aa73aca gst-libs: fix uninstalled build of new wayland lib 2014-06-17 13:11:29 +01:00
George Kiagiadakis
86930cab13 waylandsink: rename pause/resume_rendering to begin/end_geometry_change and update their documentation 2014-06-17 13:51:28 +02:00
George Kiagiadakis
39c5a9ce13 wayland: remove gst_wayland_video_set_surface_size()
Not needed anymore, since we use gst_video_overlay_set_render_rectangle()
2014-06-17 13:51:27 +02:00
George Kiagiadakis
b806313396 wayland: add public API for creating & using the display handle GstContext 2014-06-17 13:51:27 +02:00
George Kiagiadakis
c62ec6f815 waylandsink: get the external display handle using GstContext
This drops the ugly GstWaylandWindowHandle structure and is much
more elegant because we can now request the display separately
from the window handle. Therefore the window handle can be requested
in render(), i.e. when it is really needed and we can still open
the correct display for getting caps and creating the pool earlier.

This change also separates setting the wl_surface from setting its size.
Applications should do that by calling two functions in sequence:

  gst_video_overlay_set_window_handle (overlay, surface);
  gst_wayland_video_set_surface_size (overlay, w, h);
2014-06-17 13:51:27 +02:00
George Kiagiadakis
7982ed03c1 wayland/Makefile.am: link with gstvideo to avoid introspection errors 2014-06-17 13:51:26 +02:00
George Kiagiadakis
e56f305274 waylandsink: implement the GstVideoOverlay & GstWaylandVideo interfaces
This is the initial implementation, without the GstVideoOverlay.expose()
method. It only implements using an external (sub)surface and resizing
it with GstWaylandVideo.
2014-06-17 13:51:24 +02:00
George Kiagiadakis
86a3c384ae wayland: Add new gst-wayland library containing a new GstWaylandVideo interface
This interface is needed to be able to embed waylandsink into
other wayland surfaces. Due to the special nature of wayland,
GstVideoOverlay is not enough for this job.
2014-06-17 13:51:23 +02:00
Matthew Waters
7899b9af9f gldownload: plug a memory leak 2014-06-15 15:17:07 +10:00
Matthew Waters
015beb5404 glmixer: allow the subclass to choose the sink pad type
Allows custom properties to be placed on the sink pads by subclasses
2014-06-15 12:28:45 +10:00
Gwenole Beauchesne
db887f05ca codecparsers: h264: fix quantization matrix conversion routine names.
Fix routine names for zigzag/raster scan order conversion routines for
quantization matrices. This ought to use the gst_h264_quant_matrix_*()
naming convention instead of gst_h264_video_quant_matrix_*(), which
derived from the MPEG-2 function names.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-12 10:26:26 +02:00
Gwenole Beauchesne
5196f24138 codecparsers: add C++ guards for MPEG-4 and VP8 parsers.
Fix MPEG-4 and VP8 APIs to export their external symbols as pure C
symbols, i.e. un-mangled for C++.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-06-12 10:25:54 +02:00
Matthew Waters
e1e2a88358 glmixer: send the stream-start event
and the caps event after.

https://bugzilla.gnome.org/show_bug.cgi?id=730944
2014-06-12 14:58:47 +10:00
Matthew Waters
d7f8cc9a78 glfilterapp: remove the reshape/draw properties
The reshape property was never used.
Replace the draw property with a signal.

Based on patch by Mathieu Duponchelle <mathieu.duponchelle@epitech.eu>

https://bugzilla.gnome.org/show_bug.cgi?id=704507
2014-06-12 12:49:42 +10:00
Matthew Waters
9e662b8229 glmixer: lock the size of mix->frames to the number of pads
Fixes a segfault with decodebin ! glmixer where the request pads on
both sides were being requested after the state change to PAUSED.

Also fixes dynamically adding and removing pads while glmixer is
in a state >= PAUSED.
2014-06-12 12:18:23 +10:00
Matthew Waters
574b29f2c4 gl/wayland: create a dummy display instead of an EGLDisplay
Currently, GstGLWindowWaylandEGL holds the wayland display connection
If we create the EGLDisplay at the GstDisplay creation time, then
libEGL will internally open another connection to the wayland server.
These two display connections are unable to communicate resulting in
no window output/display and hangs inside libEGL.

Eventually we will move the wl_display from GstGLWindow to GstGLDisplay.
2014-06-05 18:52:11 +10:00
Matthew Waters
59088f5a90 glupload: always release the previous buffer
Fixes the case where _perform_with_buffer() is called without
intervening calls to _release_buffer() as is the case on start up
with glimagesink.

Also release the buffer when reseting the upload.

https://bugzilla.gnome.org/show_bug.cgi?id=731107
2014-06-03 14:03:21 +10:00
Sebastian Dröge
91581cf531 glcontext: Handle (unlikely) NULL return of gl->GetString (GL_VERSION) more gracefully
CID 1219858
2014-06-02 09:23:39 +02:00
Edward Hervey
a57005abbc mpegts: Remove unneeded NULL check
Allocating those structures is done in all code paths leading there

CID #1219860
CID #1219861
CID #1219862
CID #1219863
CID #1219864
2014-06-02 08:24:08 +02:00
Matthew Waters
0f4485fc66 glmemory: remove uneeded gl api ifdefs 2014-05-30 12:29:54 +10:00
Matthew Waters
1f90323a4d glwindow_x11: allow expose events to redraw our window
otherwise we will not update the window contents on low framerate
streams until the next buffer

https://bugzilla.gnome.org/show_bug.cgi?id=723529
2014-05-30 11:51:01 +10:00
Matthew Waters
4ee5967414 glcontext: fix up assertion
error: 'return' with no value, in function returning non-void
2014-05-30 10:46:25 +10:00
Matthew Waters
da35876537 glfeature: remove GST_GL_API_GLES3
instead check the gl version using gst_gl_context_check_gl_version()
2014-05-30 10:29:37 +10:00
Matthew Waters
1334884a61 glcontext: check for GLES versions 2014-05-30 10:29:37 +10:00
Matthew Waters
5273b726a6 gl/context: add check_gl_version 2014-05-30 10:29:37 +10:00
Edward Hervey
45ec777cea glcontext: Try GLX support before EGL support
If available, glx has got a better chance of being the Gl platform
we want to use compared to EGL
2014-05-29 17:12:41 +02:00
Edward Hervey
30622337ab glcontext: Try to open lib{EGL|GL|GLESv2}.so.1 before lib{EGL|GL|GLESv2}
Fixes issues with .so (without numbering) being installed for development
(such as from mesa-dev) but actual driver (with numbering) coming from
some other place (like nvidia drivers)
2014-05-29 17:12:41 +02:00
Edward Hervey
86b8388c3f atsc-section: Fix annotation 2014-05-29 14:29:16 +02:00
Edward Hervey
611edd5e96 dvb-descriptor: Fix multilingual service name parsing
the provider and service name was inverted
2014-05-29 14:29:15 +02:00
Stefan Ringel
6a622a678e example: ts-parser: add parential rating descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=730854
2014-05-29 14:29:15 +02:00
Stefan Ringel
c35dc33b7f example: ts-parser: add content descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=730854
2014-05-29 14:29:15 +02:00
Stefan Ringel
1c9bbb1e00 example: ts-parser: add component descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=730854
2014-05-29 14:29:15 +02:00
Stefan Ringel
f6fdd83b7e mpegts: bugfix mobile hand over linkage parse missmatch
https://bugzilla.gnome.org/show_bug.cgi?id=730901
2014-05-29 11:26:21 +02:00
Thiago Santos
fa1eb09520 mpegts: atsc: add missing field to ETT table
Set the subtable_extension as ett_table_id_extension
for ETT tables as it is used by it

https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:38:00 +02:00
Thiago Santos
1cab60b713 mpegts: atsc: add atsc's EIT table parsing
ATSC has its own version of the EIT table (DVB also has one).

This patch adds parsing for the ATSC EIT table and also fixed
the section identification to mark it as the ATSC one.

The implementation aws refactored to reuse some common internal
structures from ETT.

Also adds its dumping function to ts-parser example

https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:38:00 +02:00
Thiago Santos
0c6bb561e0 mpegts: atsc: add STT table parsing
Adds the system time table structure and functions for convenient parsing of
it and for getting the UTC datetime that it represents. Also adds its
information dumping to the ts-parser example

https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:37:59 +02:00
Thiago Santos
0c0379e8f0 mpegts: atsc: add encoding conversion for UTF-16 ETT strings
https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:37:59 +02:00
Thiago Santos
7ced36eccd mpegts: atsc: add ETT structures and parsing
ETT (extended text table) contains ATSC text information with descriptions
of virtual channels and events. The text can be internationalized and also
compressed.

https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:37:59 +02:00
Thiago Santos
9eed28d353 mpegts: add atsc MGT section parsing
Add a parsing function for MGT and also detect the EIT tables
for ATSC, the EIT pids are reported inside the MGT and we are still
only relying only on the table id for detecting it. In the future we
would want to also check the pid and compare with whatever the MGT
previously reported to confirm that it is indeed the EIT.

https://bugzilla.gnome.org/show_bug.cgi?id=730435
2014-05-29 10:37:59 +02:00
Thiago Santos
8f6a3c0a99 mpegts: atsc: rename TVCT to VCT as it is the same as CVCT
Make the ATSC section parse handle both TVCT and CVCT as they are
nearly the same struct (CVCT uses 2 reserved bits that are ignored
in TVCT).

This is changing the glib type and the struct name but TVCT wasn't
released in a stable package yet so there should be no problem.

Also includes some parsing fixes and changes short_name to be
directly stored as utf8 rather than utf16

https://bugzilla.gnome.org/show_bug.cgi?id=730642
2014-05-29 10:37:59 +02:00
Sebastian Dröge
f56aa3e32c glupload: Fix assertion after API changes 2014-05-29 10:37:02 +02:00
Matthew Waters
3390b2b385 gl/colorconvert: keep our private pointer
again, avoid to much trigger
2014-05-29 18:33:10 +10:00
Matthew Waters
4b5c5a7d37 gl/colorconvert: use GstObject's lock instead of our own 2014-05-29 17:29:41 +10:00
Matthew Waters
768c6de84e gl/colorconvert: remove unnecassary pointer inderection 2014-05-29 17:12:03 +10:00
Matthew Waters
07919d874c gl/upload: re add the upload meta to the private struct
try and avoid being to trigger happy
2014-05-29 16:45:37 +10:00
Matthew Waters
eff3da8871 gl/upload: small code cleanup and gst-indent 2014-05-29 16:30:14 +10:00
Matthew Waters
9eb6f536b9 gl/download: use GstObject's lock instead of out own 2014-05-29 16:30:13 +10:00
Matthew Waters
aa102d2660 gl/upload: use GstObject's lock instead of our own 2014-05-29 16:30:13 +10:00