Commit graph

6995 commits

Author SHA1 Message Date
Matthew Waters
54923d1909 [857/906] display: document the new GstContext api 2017-12-09 19:31:32 +00:00
Matthew Waters
d6bdcbe751 [856/906] context: document it 2017-12-09 19:31:32 +00:00
Matthew Waters
1e02438715 [855/906] upload: add support for GstVideoGLTextureUploadMeta 2017-12-09 19:31:32 +00:00
Matthew Waters
2623734d19 [854/906] use the allocation query to propogate GstGLContext
uses the GstVideoGLTextureUploadMeta api type for the query
2017-12-09 19:31:32 +00:00
Matthew Waters
84425ad43d [853/906] display: remove _{set,get}_context
A GstGLDisplay doesn't need a GstGLContext and its use
was cause a reference cycle
2017-12-09 19:31:32 +00:00
Matthew Waters
64fad7a6d2 [852/906] use GstContext for GstGLDisplay propogation
implements the hooks required in GstElement::set_context and the context query
2017-12-09 19:31:32 +00:00
Matthew Waters
f15206082a [850/906] glupload: Remove texture scaling artifacts from the TEXTURE_RECTANGLE -> TEXTURE_2D transition
fixes the funky colours in some of the yuv formats

https://bugzilla.gnome.org/show_bug.cgi?id=721155
2017-12-09 19:31:32 +00:00
Matthew Waters
689e722dfa [848/906] filter: a little code cleanup 2017-12-09 19:31:32 +00:00
Matthew Waters
ad315254e9 [847/906] mixer: unmap the video frames we map
plugs a memory leak
2017-12-09 19:31:32 +00:00
Matthew Waters
5ee09b36fa [846/906] mixer: handle 0/1 framerate better in caps 2017-12-09 19:31:32 +00:00
Matthew Waters
4b8019b12c [845/906] filter: handle capsfeatures properly 2017-12-09 19:31:32 +00:00
Matthew Waters
2cb2a3951b [844/906] mixer: give access to the pads at render time
allows us to move the video frame mapping somewhere else
2017-12-09 19:31:32 +00:00
Matthew Waters
36c62b32e5 [843/906] memory: provide copy_into_texture 2017-12-09 19:31:32 +00:00
Tim-Philipp Müller
b0999fbc03 [842/906] Fix gstglconfig.h-related 'make distcheck' issues
Fix srcdir vs. builddir issue in docs and 'files left after
disclean' issue for gstglconfig.h
2017-12-09 19:31:32 +00:00
Julien Isorce
e42b5bc985 [841/906] osx: allow x11/glx backend and set default runtime to cocoa/nsgl
https://bugzilla.gnome.org/show_bug.cgi?id=719757
2017-12-09 19:31:32 +00:00
Julien Isorce
be87f6096b [839/906] cocoa: allow to call set_window_handle before to create glcontext
So that it actually make cocoa videooverlay example work again.

Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=719758
2017-12-09 19:31:32 +00:00
Matthew Waters
efa22442a9 [838/906] gl: Use GL_TEXTURE_2D instead of GL_TEXTURE_RECTANGLE
We create our textures (in Desktop GL) with GL_TEXTURE_RECTANGLE,
vaapi attempts to bind our texture to GL_TEXTURE_2D which throws a
GL_INVALID_OPERATION error and as thus, no video.

Also, by moving exclusively to GL_TEXTURE_2D and the npot extension
we also remove a difference between the Desktop GL and GLES2 code.

https://bugzilla.gnome.org/show_bug.cgi?id=712287
2017-12-09 19:31:32 +00:00
Matthieu Bouron
32265d7e4e [837/906] cocoa: resize OpenGL view size each time the window is resized
Fixes glitches that can appear when the OpenGL view has not been resized
after a window resize.

https://bugzilla.gnome.org/show_bug.cgi?id=711672
2017-12-09 19:31:32 +00:00
Matthieu Bouron
cc0b1f3e05 [836/906] cocoa: only use GSRegisterCurrentThread with GNUStep environment 2017-12-09 19:31:32 +00:00
Julien Isorce
6a5bd364a4 [835/906] gstglwindow: remove unused fields 2017-12-09 19:31:32 +00:00
Julien Isorce
4d6de2ce1b [834/906] gstglwindow: clear mutex 2017-12-09 19:31:32 +00:00
Julien Isorce
42f1d66bc6 [833/906] gstglcontext: initialize window to NULL 2017-12-09 19:31:32 +00:00
Julien Isorce
0a2787863b [832/906] x11: ignore Expose events not initiated by gst_gl_window_draw 2017-12-09 19:31:32 +00:00
Julien Isorce
66d7d4712e [831/906] glimagesink: avoid to overload the drawer if already drawing
Especially if the application calls gst_video_overlay_expose a lot
2017-12-09 19:31:32 +00:00
Matthew Waters
7b7e7bb8d0 [829/906] mixer: error out properly on flushing 2017-12-09 19:31:32 +00:00
Matthew Waters
ac0db99c94 [828/906] context: refcount the display 2017-12-09 19:31:32 +00:00
Matthew Waters
b91eb6b557 [827/906] mixer: don't unref the query in the default case
The element/application performing the query is responsible for the
de/allocation
2017-12-09 19:31:32 +00:00
Matthew Waters
bf610e210a [826/906] upload: free our mutex 2017-12-09 19:31:32 +00:00
Julien Isorce
0da88c6516 [825/906] glwindow_x11: check if the loop exists
It happens when calling set_window_handle before to reach GST_STATE_READY.
In this case the parent is set when creating the internal window.
2017-12-09 19:31:32 +00:00
Matthew Waters
266ffc48be [824/906] android: Build fixes
https://bugzilla.gnome.org/show_bug.cgi?id=709786
2017-12-09 19:31:31 +00:00
Julien Isorce
ab5a3e310d [823/906] wayland_egl: make the wayland backend actually work on Raspberry Pi
Fix resizing and can now move the window
2017-12-09 19:31:31 +00:00
Julien Isorce
64a05da4fe [822/906] gstglcontext_egl: avoid non working EGL confs on rpi/wayland 2017-12-09 19:31:31 +00:00
Julien Isorce
6e732b0408 [821/906] tests: fix test_share on GLESv2 2017-12-09 19:31:31 +00:00
Julien Isorce
e1eb30005c [820/906] gstglwindow: if available use wayland instead dispmanx on rpi 2017-12-09 19:31:31 +00:00
Matthew Waters
56384a0db3 [819/906] make gen_texture/del_texture threadsafe
Use stack allocated instead of static variables

Conflicts:
	gst-libs/gst/gl/gstglutils.c
2017-12-09 19:31:31 +00:00
Matthew Waters
3b1ec77cf8 [818/906] window: add send_message_async vmethod
- provide a default synchronous send_message
- make context creation threadsafe again
2017-12-09 19:31:31 +00:00
Matthew Waters
2a937dd96a [817/906] make the state change test pass 2017-12-09 19:31:31 +00:00
Matthew Waters
f7c8658464 [816/906] x11: fix make check segfault 2017-12-09 19:31:31 +00:00
Matthew Waters
4bec88ea28 [815/906] fix some refcount errors 2017-12-09 19:31:31 +00:00
Matthew Waters
a44517a1e8 [814/906] mixer: timestamp buffers 2017-12-09 19:31:31 +00:00
Matthew Waters
fa02b04292 [813/906] unref the pool on shutdown 2017-12-09 19:31:31 +00:00
Matthew Waters
711ad485b2 [812/906] move the GL vtable from GstGLDisplay to GstGLContext
Conflicts:
	tests/check/libs/gstglcontext.c
2017-12-09 19:31:31 +00:00
Julien Isorce
b54293266d [810/906] gstglutils: use gl_vtable for glDeleteTextures 2017-12-09 19:31:31 +00:00
Matthew Waters
704f231343 [808/906] x11: remove dead code 2017-12-09 19:31:31 +00:00
Matthew Waters
d9cc31aca0 [807/906] context: Move some window error enums to context 2017-12-09 19:31:31 +00:00
Matthew Waters
57c32baab7 [806/906] egl: doesn't require the EGLConfig from the other context
libEGL should give us the same or similar EGLConfig from the
EGLDisplay we have.
2017-12-09 19:31:31 +00:00
Matthew Waters
0f8fc0881a [805/906] glfilter: rename external-opengl-context prop to other-context
It now requires a GstGLContext instead of a handle
2017-12-09 19:31:31 +00:00
Julien Isorce
cc38e16ef2 [804/906] rpi: call bcm_host_init in plugin_init 2017-12-09 19:31:31 +00:00
Julien Isorce
dd679dee25 [803/906] raspberrypi: add support for dispmanx
See https://bugzilla.gnome.org/show_bug.cgi?id=703342
2017-12-09 19:31:31 +00:00
Matthew Waters
48cd6ac353 [801/906] context: Reimplement GL context sharing
https://bugzilla.gnome.org/show_bug.cgi?id=704806
2017-12-09 19:31:31 +00:00
Matthew Waters
40a2c12495 [798/906] build: install needed header 2017-12-09 19:31:31 +00:00
Matthew Waters
72cc3c4815 [797/906] x11: fix build for clang 2017-12-09 19:31:31 +00:00
Matthew Waters
b8b9fced19 [796/906] move egl into its own directory 2017-12-09 19:31:31 +00:00
Matthew Waters
83ac943fc4 [795/906] android: port to GstGLContext
not tested
2017-12-09 19:31:31 +00:00
Matthew Waters
9cbb652b66 [794/906] context: add subclasses for the different platforms (egl, glx, wgl, etc)
- most code taken from the Window subclasses
- tested combinations: xEGL, GLX, Wayland+EGL, Cocoa (under GNUStep), WGL (Wine)
2017-12-09 19:31:30 +00:00
Matthew Waters
e80533dcee [793/906] add a GstGLContext object that will be the basis of OpenGL contexts
At the moment it just sits in between GstGLDisplay and GstGLWindow
performing some of the stuff that GstGLWindow used to do.
2017-12-09 19:31:30 +00:00
Matthew Waters
175f28848c [792/906] build: use our own in tree headers before system ones
allows us to develop against the tree rather than what may be installed
2017-12-09 19:31:30 +00:00
Julien Isorce
b56bf26dce [791/906] glwindow/x11: remove X11EventSource as soon as the window is deleted
gst_gl_window_x11_send_message do not use XSendEvent anymore
2017-12-09 19:31:30 +00:00
Sebastian Dröge
4e8c78a4da [789/906] egl: Create a window surface if necessary 2017-12-09 19:31:30 +00:00
Tonu Jaansoo
431ce49db3 [788/906] osx: Fix compilation 2017-12-09 19:31:30 +00:00
Tonu Jaansoo
c304635ecf [787/906] gl: The GLSL rectangle resampler does not always work with int tex coords
Use floats instead.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
396717587e [786/906] glprototypes: Add support for NV extensions for DrawBuffers and ReadBuffer 2017-12-09 19:31:30 +00:00
Sebastian Dröge
b6207a10a2 [785/906] egl: Use EGL_KHR_surfaceless_context instead of creating a useless surface if available 2017-12-09 19:31:30 +00:00
Sebastian Dröge
82eb297aba [782/906] gldownload: Use strlen() instead of sizeof(char*)
gstgldownload.c:846:22: error: argument to 'sizeof' in 'memcpy' call is the same expression as the source; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
2017-12-09 19:31:30 +00:00
Matthew Waters
e32e8f45e0 [781/906] download: propogate errors from the GL thread 2017-12-09 19:31:30 +00:00
Matthew Waters
7c4d51edf4 [780/906] up/download: check return values
So we fail properly
2017-12-09 19:31:30 +00:00
Matthew Waters
13d487741a [779/906] download: remove _thread variants of the API 2017-12-09 19:31:30 +00:00
Matthew Waters
1f19143837 [778/906] upload: remove _thread variants of the API 2017-12-09 19:31:30 +00:00
Matthew Waters
d009a216e6 [777/906] upload: overhaul and addition of new video formats
use the shaders from eglglessink (adapted for Desktop GL)
error out properly
2017-12-09 19:31:30 +00:00
Matthew Waters
0df6a5e963 [776/906] download: fix compiler warning about missing string format 2017-12-09 19:31:30 +00:00
Sebastian Dröge
e4f45140d6 [775/906] configure: Check for GLeglImageOES and others again
https://bugzilla.gnome.org/show_bug.cgi?id=704498
2017-12-09 19:31:30 +00:00
Sebastian Dröge
fe0ad33572 [774/906] win32: Fix some compiler errors/warnings 2017-12-09 19:31:30 +00:00
Mathieu Duponchelle
47b9fb1d49 [773/906] glfilters: Mark writable-only properties as readable as well
https://bugzilla.gnome.org/show_bug.cgi?id=704429
2017-12-09 19:31:30 +00:00
Sebastian Dröge
8efcecb98c [771/906] gl: Some less long/ulong/gulong usage 2017-12-09 19:31:30 +00:00
Matthew Waters
49951beac8 [766/906] utils: generate a RGBA texture in all cases 2017-12-09 19:31:30 +00:00
Matthew Waters
d492036322 [765/906] wayland: remove fullscreen 2017-12-09 19:31:30 +00:00
Matthew Waters
2c6f8de516 [764/906] filter: fix pad template caps
upload is for the sink template
download is form the src template
2017-12-09 19:31:30 +00:00
Matthew Waters
8577de136e [763/906] memory: copy properly depending on where the most recent data is 2017-12-09 19:31:30 +00:00
Sebastian Dröge
5b1dd556de [762/906] glimagesink: Fix some memory leaks and properly set up the buffer pool 2017-12-09 19:31:30 +00:00
Sebastian Dröge
4f23429abb [761/906] x11: Protect event display connection with a mutex
We use it from different threads and need to serialize the
accesses to it.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
9810469db0 [760/906] x11: Always use the same display connection from the GL thread
The other display connection might be used by async calls from elsewhere
at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=704247
2017-12-09 19:31:30 +00:00
Sebastian Dröge
bb4414ac7f [759/906] gldownload: #ifdef some GLES2 specific code to fix compilation 2017-12-09 19:31:30 +00:00
Sebastian Dröge
a41b21f4a5 [758/906] android: Don't require a window to be set
This allows the filters to be usable without a GL sink downstream.
2017-12-09 19:31:30 +00:00
Sebastian Dröge
0a6359fc59 [757/906] egl: Create an offscreen surface if no window was provided 2017-12-09 19:31:30 +00:00
Sebastian Dröge
1de089fe81 [756/906] gldownload: Reset the viewport after download RGB via GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
85a4f1042b [755/906] gldownload: Unbind framebuffer after downloading RGB with GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
f804d53a9c [754/906] gldownload: Add support for RGB reordering when using GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b3eef9dd15 [753/906] gldisplay: Sending a message is synchronous, we can allocate the memory on the stack 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b2934152ce [752/906] glwindow: Add destroy notifies for the data of the callbacks
And actually call the close callback when the window is closed.
2017-12-09 19:31:29 +00:00
Sebastian Dröge
ef68e5ade2 [751/906] gldisplay: Don't hold lock while sending a message to the GL thread
https://bugzilla.gnome.org/show_bug.cgi?id=704247
2017-12-09 19:31:29 +00:00
Sebastian Dröge
15438d5b7f [750/906] glupload: Add support for RGB reordering when using GLES2 2017-12-09 19:31:29 +00:00
Sebastian Dröge
9d4f99b8bb [749/906] glshader: Add some more debug output 2017-12-09 19:31:29 +00:00
Sebastian Dröge
b28a1e943d [748/906] glupload: GL_STENCIL_ATTACHMENT is needed for desktop GL, not GLES 2017-12-09 19:31:29 +00:00
Sebastian Dröge
6c5ce0ee99 [747/906] gl: Constify YUV conversion shaders 2017-12-09 19:31:29 +00:00
Sebastian Dröge
90450a39b7 [746/906] android: Add comment to clarify the type of a variable 2017-12-09 19:31:29 +00:00
Sebastian Dröge
d0293d9f0c [745/906] gl: Simplify and optimize YUV conversion shaders a bit 2017-12-09 19:31:29 +00:00
Sebastian Dröge
bbd9dd465c [744/906] gl: Use __GST_GL_H__ instead of __GL_H__ as a multi-include guard
GL/gl.h might use the latter already.
2017-12-09 19:31:29 +00:00
Sebastian Dröge
29874d3be6 [743/906] win32: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
bd60dd7f22 [742/906] cocoa: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
d937a7e899 [741/906] wayland: Don't leak main context and loop 2017-12-09 19:31:29 +00:00
Sebastian Dröge
09795ef023 [740/906] x11: Allow setting window handle before creating the context 2017-12-09 19:31:29 +00:00
Sebastian Dröge
764e682cd0 [739/906] x11: Don't leak main context and main loop 2017-12-09 19:31:29 +00:00
Sebastian Dröge
52b44e4c07 [738/906] gl: Include glu.h after gl.h 2017-12-09 19:31:29 +00:00
Sebastian Dröge
192b37980f [735/906] gl: Add support for Android
https://bugzilla.gnome.org/show_bug.cgi?id=703340
2017-12-09 19:31:29 +00:00
Sebastian Dröge
6a5bebebb9 [734/906] win32: Make automake happy by using noinst_HEADERS 2017-12-09 19:31:29 +00:00
Sebastian Dröge
f7998a2e98 [733/906] gl: Major header and include cleanup 2017-12-09 19:31:29 +00:00
Julien Isorce
d17a4381b1 [732/906] build: fix repeated typedefs
Write forward declarations in another way to avoid
repeated typedefs "error: redefinition of typedef".
Raised when using i686-apple-darwin11-llvm-gcc-4.2
It seems that C apple compiler does not support
C11 feature.

https://bugzilla.gnome.org/show_bug.cgi?id=703885
2017-12-09 19:31:29 +00:00
Julien Isorce
d4a8451c11 [731/906] cocoa: fix build when GNUSTEP is not defined 2017-12-09 19:31:29 +00:00
Sebastian Dröge
61dfdc19b9 [730/906] glcompat: Properly check for GLchar and other types
On Android for example these are no #defines but typedefs
2017-12-09 19:31:29 +00:00
Sebastian Dröge
341210eaa6 [729/906] gl: Include config.h everywhere 2017-12-09 19:31:29 +00:00
Sebastian Dröge
92c66f55bc [727/906] egl: Refactor EGL logic into a helper object 2017-12-09 19:31:29 +00:00
Matthew Waters
ac1a2297f5 [726/906] window: don't call a NULL destroy function 2017-12-09 19:31:29 +00:00
Matthew Waters
3c2810c3d6 [725/906] x11: use GMainContext/GMainLoop
allows us to be reentrant

https://bugzilla.gnome.org/show_bug.cgi?id=703445
2017-12-09 19:31:29 +00:00
Matthew Waters
17e4fe41d3 [724/906] wayland: make reentrant
https://bugzilla.gnome.org/show_bug.cgi?id=703445
2017-12-09 19:31:29 +00:00
Julien Isorce
bbc71ed90f [723/906] gstglwindow: close has to be called in the glthread.
Indeed 'glXMakeCurrent (window_x11->device, None, NULL);'
has to be called in the thread where the glcontext is actually
current.
Otherwise glXDestroyContext may crash.
2017-12-09 19:31:28 +00:00
Руслан Ижбулатов
9af1cee2f7 [722/906] gl: Fix build on Win32
1) Need to include GL/glext.h on W32 to provide necessary macros
2) W32 macros that pre-processor has by default are different for different
   toolchains. Borland uses __WIN32__, everyone else has _WIN32, so check both.

Side-note: glext.h is not supplied by mingw-w64 at the moment, but can be
downloaded from http://www.opengl.org/registry/

https://bugzilla.gnome.org/show_bug.cgi?id=703364
2017-12-09 19:31:28 +00:00
Sebastian Dröge
6c89d7e839 [721/906] glfilter: Use uint64 for the OpenGL context property
ulong/long properties are deprecated and should not be used anymore
for portability reasons.
2017-12-09 19:31:28 +00:00
Sebastian Dröge
685d855ded [719/906] gl: Fix compilation with GLES2 2017-12-09 19:31:28 +00:00
Matthew Waters
5b13d0ebf4 [718/906] shader: make it possible to unref in the non-GL thread 2017-12-09 19:31:28 +00:00
Matthew Waters
71c8edf9c0 [717/906] remove outdated cmake build files 2017-12-09 19:31:28 +00:00
Matthew Waters
bc5d65928f [716/906] wayland: properly choose EGL_RENDERABLE_TYPE
based on the gl api we chose
2017-12-09 19:31:28 +00:00
Matthew Waters
5ec9f248a1 [715/906] display: inherit from the right object class 2017-12-09 19:31:28 +00:00
Matthew Waters
1c84c0fb96 [714/906] Add GstGLFramebuffer to replace _display_gen_fbo and friends
This version is simply API compatible with _display_gen_fbo.
The next version will likely revamp the API
2017-12-09 19:31:28 +00:00
Matthew Waters
d7f5cac7ce [713/906] shader: make it possible to create the object in a non-GL thread 2017-12-09 19:31:28 +00:00
Matthew Waters
ef6b1ca760 [712/906] wayland: shutdown properly
We cannot use _finalize as this will be called before GstGLWindow's
_finalize.  This causes us to try and perform operations with the
wayland server when the connection has been severed.
2017-12-09 19:31:28 +00:00
Matthew Waters
380f918802 [711/906] wayland: support choosing Desktop GL as the api 2017-12-09 19:31:28 +00:00
Matthew Waters
951daee416 [710/906] window: fail if the user specifies an GL api that we cannot work with
It would've been caught later in an g_assert anyway.
2017-12-09 19:31:28 +00:00
Matthew Waters
2ae5b50fa4 [709/906] display: some more cleanups 2017-12-09 19:31:28 +00:00
Matthew Waters
6e86d0e920 [708/906] display: a cleanup and removal of old code 2017-12-09 19:31:28 +00:00
Matthew Waters
bdf5b5be0f [707/906] display: move error_message to utils 2017-12-09 19:31:28 +00:00
Matthew Waters
5bc069a5d5 [706/906] display: move activate_context into utils 2017-12-09 19:31:28 +00:00
Matthew Waters
4f117323b8 [705/906] x11: don't shutdown in _finalize
The window's loop could be still running when _finalize is called
and if we destroy the display connection it will never be closed.

Add _open and _close vfuncs to GstGLWindow so that subclasses can
start up and shutdown at the right time.
2017-12-09 19:31:28 +00:00
Matthew Waters
761bc0156a [704/906] Use gst_object_[un]ref so we can get refcounts in the log 2017-12-09 19:31:28 +00:00
Matthew Waters
9e7af77dc8 [703/906] x11: don't segfault if destroy_cb is NULL 2017-12-09 19:31:28 +00:00
Matthew Waters
5818b015d6 [702/906] x11: fix segfault if the x11 backend is instantiated but not used 2017-12-09 19:31:28 +00:00
Matthew Waters
c6988cb064 [701/906] display: move context creation into window 2017-12-09 19:31:28 +00:00
Matthew Waters
9c633e658a [700/906] display: move most of the code into utils for sorting later
This contains a hack that essentially requires one GstGLDisplay
per process.
2017-12-09 19:31:28 +00:00
Matthew Waters
38e0434d95 [699/906] display: remove list of upload and download objects
and only create an up/download object when needed.
2017-12-09 19:31:28 +00:00
Matthew Waters
81334a1af0 [698/906] move sink-specific stuff from GstGLDisplay into glimagesink 2017-12-09 19:31:28 +00:00
Matthew Waters
ad31c9f8e2 [697/906] display: allow the user to try and choose the GL api we use via env variable
GST_GL_API=opengl,opengl3,gles2,gles3
2017-12-09 19:31:28 +00:00
Matthew Waters
f5472457bf [696/906] glapi: fix memory leak from not freeing a string 2017-12-09 19:31:28 +00:00
Matthew Waters
06eb6f4965 [695/906] build: remove libtool warning about -version-info not used in convenience libraries 2017-12-09 19:31:28 +00:00
Matthew Waters
696477bbf6 [693/906] x11_glx: ask for a 3.0 GL Context
(falling back if needed)
2017-12-09 19:31:27 +00:00
Matthew Waters
957b4cf08b [692/906] window_x11: add XError trapping
some functions in GLX can fail if the implementation does not support
certain features we ask for (i.e. GL 3) bringing down the entire
application
2017-12-09 19:31:27 +00:00
Matthew Waters
d88a9c0044 [691/906] feature: make gst_gl_check_extension public
prevents duplication of code of extension string parsing in GstGLWindow's
2017-12-09 19:31:27 +00:00
Matthew Waters
df675e7335 [690/906] windowx11glx: use fbconfigs if supported 2017-12-09 19:31:27 +00:00
Matthew Waters
d71ab51c9f [688/906] display: properly shutdown if we error after context creation
The _finalize() code checks to see if the context was created before
attempting to destroy it.  We never did say that we had created the context.
2017-12-09 19:31:27 +00:00
Matthew Waters
01518880fa [685/906] filter: improve error handling 2017-12-09 19:31:27 +00:00
Matthew Waters
a9b5bfe9d7 [684/906] display: lack of format-string causing a compiler warning 2017-12-09 19:31:27 +00:00
Matthew Waters
94d1326a7f [683/906] feature: remove double free 2017-12-09 19:31:27 +00:00
Matthew Waters
1a04002052 [681/906] win32: fix gl api calls on 32-bit
win has the bright idea of having 5 different calling conventions.
we should probably use the right one so we don't crash from stack
corruption.
2017-12-09 19:31:27 +00:00
Matthew Waters
31a5beb3f3 [680/906] overlay: tentative port to new GstGLFuncs API 2017-12-09 19:31:27 +00:00
Matthew Waters
b9a10f8e15 [678/906] window_win32_wgl: implement wglGetProcAddress for extension functions 2017-12-09 19:31:27 +00:00
Matthew Waters
ed98971953 [677/906] memory: fix GSIZE printf format on win32 2017-12-09 19:31:27 +00:00
Matthew Waters
8d07dcbd5e [676/906] windwo_win32: port to new API 2017-12-09 19:31:27 +00:00
Matthew Waters
72ac429e57 [675/906] upload: provide nicer debugging 2017-12-09 19:31:27 +00:00
Matthew Waters
6e8099fa20 [674/906] feature: try and catch more GL extension functions
if we don't find the extension in core GL, try the extension version anyway
2017-12-09 19:31:27 +00:00
Matthew Waters
1198b27830 [673/906] feature: add gstreamer license 2017-12-09 19:31:27 +00:00
Matthew Waters
792f055db4 [672/906] display: constify GstGLFuncs *gl 2017-12-09 19:31:27 +00:00
Matthew Waters
267bf848de [671/906] win32: #include GL/glext.h on windows
also add some GL default variables if some GL types are not defined
2017-12-09 19:31:27 +00:00
Matthew Waters
dba83ebbd3 [670/906] display: replace glib deprecated api 2017-12-09 19:31:27 +00:00
Matthew Waters
7d4d1f50d4 [669/906] window: seperate object creation and context creation 2017-12-09 19:31:27 +00:00
Matthew Waters
63a5d9e981 [668/906] shader: fix gles2 segfault 2017-12-09 19:31:27 +00:00
Matthew Waters
0cc3150e37 [658/906] mixer: fix eos timestamp check 2017-12-09 19:31:27 +00:00
Matthew Waters
535074cc87 [655/906] download: remove erronous ReadBuffer call
- it was causing segfaults in mesa
- we didn't set the readbuffer so we shouldn't reset it
2017-12-09 19:31:27 +00:00
Matthew Waters
ccfa7d674a [652/906] bumper: port to non-GLEW + arrays 2017-12-09 19:31:27 +00:00
Matthew Waters
847e6540fb [651/906] up/download: fix some typos when removing GLEW 2017-12-09 19:31:27 +00:00
Matthew Waters
173467e48a [650/906] filter: fix _draw_texture()'s wrong vertices 2017-12-09 19:31:27 +00:00
Matthew Waters
6bee9b9c93 [647/906] remove dependecy on glew 2017-12-09 19:31:27 +00:00
Matthew Waters
17fdb480d0 [646/906] some gl header fixes/additions 2017-12-09 19:31:27 +00:00
Matthew Waters
2f2916dd50 [645/906] fix gles2 compilation 2017-12-09 19:31:27 +00:00
Matthew Waters
57e209a423 [644/906] update .gitignore for some new files 2017-12-09 19:31:27 +00:00
Matthew Waters
c692a610de [643/906] display: privatise most of the struct 2017-12-09 19:31:26 +00:00
Matthew Waters
e983f02e87 [642/906] add gstglconfig.h for apps to find out what our capabilites are
ie libgstgl can be compiled with any combination of opengl/gles2
2017-12-09 19:31:26 +00:00
Matthew Waters
8375116c4b [641/906] display: feature check for GL extension functions 2017-12-09 19:31:26 +00:00
Matthew Waters
a87b070abb [640/906] build: add missing file to built sources 2017-12-09 19:31:26 +00:00
Matthew Waters
4a886e91e4 [639/906] add get_proc_address implementations for egl and glx 2017-12-09 19:31:26 +00:00
Matthew Waters
4a024734da [638/906] window: add get_proc_address + stub for retrieving gl functions 2017-12-09 19:31:26 +00:00
Matthew Waters
87e5cd6777 [637/906] x11_egl: add prelim support for choosing opengl or gles 2017-12-09 19:31:26 +00:00
Matthew Waters
59cb56fa4d [636/906] window_x11: compact debug info 2017-12-09 19:31:26 +00:00
Matthew Waters
17e6d70dba [635/906] fixup compile errors 2017-12-09 19:31:26 +00:00
Matthew Waters
68b4ddff12 [634/906] wayland egl: deactivate context before we destroy it
avoids a segfault with dri drivers
2017-12-09 19:31:26 +00:00
Matthew Waters
db236c510f [633/906] display: fail properly in context creation in order to minimize a race condition
previously, on context creation, when we failed to get a valid context
we would still atempt to run the window mainloop as well as setting an error
on the display. This would cause the calling element to finalize the display
and therefore attempt to quit the window mainloop.  However the mainloop
may not have started running.  Thus when the window mainloop ran it would
never a get a quit message and never end.
2017-12-09 19:31:26 +00:00
Matthew Waters
12b045af81 [631/906] remove redefinition warnings in compiling tests 2017-12-09 19:31:26 +00:00
Matthew Waters
1ec4ffc824 [630/906] display: add gl api checking
i.e. check for cases where the window wants a different API than
what the library was compiled with
2017-12-09 19:31:26 +00:00
Matthew Waters
c3526080aa [629/906] window: add GError for error handling of context creation 2017-12-09 19:31:26 +00:00
Matthew Waters
6c0e32864a [627/906] shader: check for invalid objects 2017-12-09 19:31:26 +00:00
Matthew Waters
fd06db00b0 [625/906] add vtable for opengl functions
The vtable provides the ability for one to compile (but not link)
against both OpenGL and GL|ES and starts the move away from GLEW
2017-12-09 19:31:26 +00:00
Matthew Waters
344253e860 [624/906] OPENGL_ES2 => HAVE_GLES2 and add HAVE_OPENGL
use GstGLAPI to determine which code paths to execute.
perform some cleanups
2017-12-09 19:31:26 +00:00
Matthew Waters
ee992ec531 [623/906] move GL includes into a single file 2017-12-09 19:31:26 +00:00
Matthew Waters
4e46ef4a3f [622/906] add missing GL_STENCIL_ATTACHMENT for gles2 compatability 2017-12-09 19:31:26 +00:00
Matthew Waters
0be301af24 [621/906] GstGLRendererAPI => GstGLAPI and get GstGLAPI from a window 2017-12-09 19:31:26 +00:00
Matthew Waters
e1ec48b6cf [620/906] wayland_egl: attempt at resizing the video 2017-12-09 19:31:26 +00:00
Matthew Waters
62e6b36cd0 [619/906] fix typo for win32 debug variables 2017-12-09 19:31:26 +00:00
Matthew Waters
ccabf4545a [618/906] add wayland-egl window backend 2017-12-09 19:31:26 +00:00
Matthew Waters
d169907472 [617/906] fix 'set but not used' compiler warnings 2017-12-09 19:31:26 +00:00
Matthew Waters
80fdf4c30c [616/906] move window-specific code into seperate subfolders 2017-12-09 19:31:26 +00:00
Matthew Waters
cc1f734857 [615/906] preliminary support for Win32 EGL 2017-12-09 19:31:26 +00:00
Matthew Waters
d378a9d1d9 [614/906] try GLX first when using ANY | OPENGL | OPENGL3 2017-12-09 19:31:26 +00:00
Matthew Waters
fc4619f8a9 [613/906] window_cocoa: fix segfault with gst-launch-1.0 -e ... and sending SIGINT (Ctrl-C)
GNUstep has a signal handler for SIGINT which runs in the main thread.
However that thread has never been 'registered' with GNUstep so
the autorelease magic of objective-c causes a segfault from accessing
a null NSThread object somewhere deep in GNUstep.
2017-12-09 19:31:26 +00:00
Matthew Waters
517db226fe [612/906] remove GNUstep makefiles 2017-12-09 19:31:26 +00:00
Matthew Waters
b36b9f4a4a [611/906] cocoa port of determining gl platform at runtime 2017-12-09 19:31:25 +00:00
Matthew Waters
22aa2e093d [610/906] WindowX11EGL: remove get_platform call 2017-12-09 19:31:25 +00:00
Matthew Waters
d857c58015 [609/906] win32 port of determining GL platform at runtime
- add GstGLWindowWin32 and GstGLWindowWin32WGL along the same lines as the
  X11 variants
2017-12-09 19:31:25 +00:00
Matthew Waters
4d88e9977e [608/906] add GST_GL_PLATFORM_ANY for choosing any platform 2017-12-09 19:31:25 +00:00
Matthew Waters
af658df918 [607/906] remove get_platform and get_window_handle vfuncs
- rename choose_visual() to choose_format() for later incorporating
  win32 changes and new GstGLPlatform for WGL, EGL, GLX, etc.
2017-12-09 19:31:25 +00:00
Matthew Waters
538643e3c0 [606/906] determine the GL platform to use at runtime
- Make GstGLWindow subclassablerather than specified at compile time.
- Add GstGLWindowX11 for x11 windows and two subclasses, GstGLWindowX11GLX
  and GstGLWindwX11EGL for GLX and EGL repectively. (win32 and cocoa
  ports to come)
- Also cleanup GL library detection in configure.ac
2017-12-09 19:31:25 +00:00
Matthew Waters
9dd6570ca9 [605/906] shader: move to gst debugging 2017-12-09 19:31:25 +00:00
Matthew Waters
4c35d682c9 [603/906] update FSF address 2017-12-09 19:31:25 +00:00
Matthew Waters
9267372466 [601/906] fix typo causing shader compilation failure for uploading I420 2017-12-09 19:31:25 +00:00
Matthew Waters
d55bbf7f55 [600/906] docs: add docs for new objects and expand on some existing ones 2017-12-09 19:31:25 +00:00
Matthew Waters
7baddfbcbe [599/906] GL|ES2: fix typos from recent changes and make downloading RGB formats work again 2017-12-09 19:31:25 +00:00
Matthew Waters
2a8de21658 [594/906] filter: update for up/download API changes and scaling fixes 2017-12-09 19:31:25 +00:00
Matthew Waters
09b60b563c [592/906] memory: update for up/download API changes 2017-12-09 19:31:25 +00:00
Matthew Waters
776a5e536f [591/906] mixer: save the upload object instead of querying for it every frame 2017-12-09 19:31:25 +00:00
Matthew Waters
39866ea830 [590/906] up/download: fix scaling on transfer
i.e. uploading from a 10x10 video frame to a 20x20 texture into another 30x30 videoframe
2017-12-09 19:31:25 +00:00
Matthew Waters
89569276c5 [587/906] mixer: mirror the changes done for filter 2017-12-09 19:31:25 +00:00
Matthew Waters
67f5b303c8 [586/906] fix up some debug statements to get them into the right categories 2017-12-09 19:31:25 +00:00
Matthew Waters
c7f49800e3 [583/906] deinterlace: change for new API
also allow elements to call the _filter_texture vfunc if they want
2017-12-09 19:31:25 +00:00
Matthew Waters
eed7e15ed2 [581/906] filter: add seperate filter function for operating on textures instead of buffers 2017-12-09 19:31:25 +00:00
Matthew Waters
fa5d1efaa3 [580/906] bufferpool: remove obselete gl meta buffer pool options 2017-12-09 19:31:25 +00:00
Matthew Waters
9306c201f8 [579/906] download: fix YV12 format
same as I420 but plane 1+2 swapped
2017-12-09 19:31:25 +00:00
Matthew Waters
75734e663c [578/906] {up,down}load: add variants that can be called in the gl thread 2017-12-09 19:31:25 +00:00
Matthew Waters
574612f129 [576/906] remove uneeded GstGLMeta (use GstVideoMeta) 2017-12-09 19:31:25 +00:00
Matthew Waters
2de5a925c1 [575/906] filter: port to new upload/download 2017-12-09 19:31:25 +00:00
Matthew Waters
84ec07072d [574/906] memory: implement transperent upload/download for data
(not async yet)
2017-12-09 19:31:25 +00:00
Matthew Waters
3ee54d3135 [573/906] add upload and download library objects
allows multiple upload pipelines that previously wasn't possible
 (i.e. upload RGB and I420 and ... on the same GstGLDisplay)
2017-12-09 19:31:25 +00:00
Matthew Waters
3283e9e7de [571/906] mixer: fix deadlock on shutdown
didn't reiterate over the sinkpad's displays and reactivate them causing a deadlock
2017-12-09 19:31:25 +00:00
Matthew
2dff52334c [568/906] window: fix public definitions 2017-12-09 19:31:25 +00:00
Matthew
4a424d6d2c [567/906] fix OpenGL|ES2 ifdef'ed code 2017-12-09 19:31:25 +00:00
Matthew Waters
6e6ee999a9 [564/906] glmemory: remove unused typedef 2017-12-09 19:31:24 +00:00
Matthew Waters
c4332505a9 [563/906] readd support for hanging GL pipelines e.g. ... ! gleffects ! fakesink 2017-12-09 19:31:24 +00:00
Matthew Waters
a1a653c8ed [562/906] gldisplay: fix download of YUV formats 2017-12-09 19:31:24 +00:00
Matthew Waters
c0235ddafa [561/906] gldisplay: fix endianess issues on RGB download 2017-12-09 19:31:24 +00:00
Matthew Waters
23ec206053 [559/906] glmixer: pass the mixpad's display to the querying element 2017-12-09 19:31:24 +00:00
Matthew Waters
9761f2cfa1 [555/906] Make the query for a GstGLDisplay a pad peer query
Allows the query to pass through bin boundaries and makes it possible for
arbitrary gl elements to be placed in bins.
2017-12-09 19:31:24 +00:00
Matthew Waters
c7ddead74b [554/906] GstGLMemory: update for GstAllocator API changes 2017-12-09 19:31:24 +00:00
Matthew Waters
56bf6e2fb3 [544/906] fix memory leaks from not g_free()ing string returned by gst_element_get_name 2017-12-09 19:31:24 +00:00
Matthew Waters
7a79d684e2 [543/906] GstGLDisplay: fix segfault from GST_PTR_FORMAT trying to expand the object 2017-12-09 19:31:24 +00:00
Matthew Waters
83401761eb [542/906] GstGLMixer: add allocation and bufferpool methods
based off GstBaseTransform
2017-12-09 19:31:24 +00:00
Matthew Waters
3f174671ec [532/906] GstGLFilter: implement allocation vfuncs 2017-12-09 19:31:24 +00:00
Matthew Waters
e02e620055 [528/906] GstGLMeta: seperate upload/download/normal GL caps video formats
differentiate between upload, download and GL caps
2017-12-09 19:31:24 +00:00
Matthew Waters
38b6bdfa8b [527/906] GstGLDisplay: add some trace debugging 2017-12-09 19:31:24 +00:00
Matthew Waters
0d5b8bbc38 [524/906] GstGLDisplay: rework the download code
data paramaters now take GstVideoFrame
remove redundant parameters
2017-12-09 19:31:24 +00:00
Matthew Waters
be177b01b7 [522/906] GstGLDisplay: add forgotten function definition 2017-12-09 19:31:24 +00:00
Matthew Waters
fe216ac6b2 [521/906] GstGLMemory: update for GstAllocator changes 2017-12-09 19:31:24 +00:00
Matthew Waters
590cf80c31 [520/906] GstGLMixer: fix for GstChildProxy changes 2017-12-09 19:31:24 +00:00
Matthew Waters
a8b1853755 [517/906] add GstGLBufferPool
which adds GstGLMeta to buffers
2017-12-09 19:31:24 +00:00
Matthew Waters
8527e1cd66 [516/906] add skeleton GstGLMeta
the GstVideoMeta _map/unmap functions still need implementing
2017-12-09 19:31:24 +00:00
Matthew Waters
6528aba8c9 [515/906] GstGLDisplay: rework gen_texture and upload
rename functions so that other code can create textures in the GL thread
change upload functions to take a GstVideoFrame
default to GLSL for upload conversion
2017-12-09 19:31:24 +00:00
Matthew Waters
ffdc6d496e [514/906] add GstGLMemory and allocator
implement custom GstMemory for GL textures
currently map/unmap returns NULL although it might be favourable to upload/download/cache the image data
2017-12-09 19:31:24 +00:00
Matthew Waters
eb362969f1 [513/906] Remove GstGLBuffer (to be replaced by GstGLMeta) 2017-12-09 19:31:24 +00:00
Matthew Waters
25aa8a4042 [512/906] GstGLMixer: update for 1.0 based on the videomixer2 element in -good 2017-12-09 19:31:24 +00:00
Matthew Waters
3e18471e8e [509/906] GstGLDisplay: update for 1.0 2017-12-09 19:31:24 +00:00
Matthew Waters
683c001f91 [504/906] GstGLFilter: update for 1.0
-fix up function definitions
-remove _prepare_output_buffer (functionality taken over by GstBufferPool).
2017-12-09 19:31:24 +00:00
Matthew Waters
f7bc5dcf83 [503/906] Rename GST_BOILERPLATE_* to G_DEFINE_TYPE_* and move _base_init into _class_init 2017-12-09 19:31:24 +00:00
Matthew Waters
1a034ba18d [502/906] Update versioning for gstreamer 1.0
Renames GST_MAJORMINOR to GST_API_VERSION in build files
removes -lgstinterfaces from _LDADD flags
2017-12-09 19:31:24 +00:00
Raimo Järvi
563f0f2e57 [501/906] Fix building on 64 bit mingw-w64
https://bugzilla.gnome.org/show_bug.cgi?id=676428
2017-12-09 19:31:24 +00:00
Julien Isorce
20c429684e [500/906] gldisplay: do not call glCheckFramebufferStatus if 0 is bound
Indeed it may return GL_FRAMEBUFFER_UNDEFINED if there is no
default framebuffer.
It seems to be the case on MacOSX
2017-12-09 19:31:24 +00:00
Julien Isorce
67bc74ec3f [498/906] gldisplay: don't pass non-constant strings as printf format strings
Fixes 'format not a string literal and no format arguments' on darwin
2017-12-09 19:31:23 +00:00
Julien Isorce
e25b142e24 [497/906] filtershader: fix format compiler warnings 2017-12-09 19:31:23 +00:00
Julien Isorce
83b2f12c12 [495/906] glES2.0: properly use glDeleteShader 2017-12-09 19:31:23 +00:00
Julien Isorce
46eea6f943 [494/906] cmake build: use config.h from win32/common and add some guidelines 2017-12-09 19:31:23 +00:00
Julien Isorce
bd0982d057 [492/906] glwindow: properly fails if resource not found 2017-12-09 19:31:23 +00:00
Julien Isorce
badaaaec34 [491/906] glES2.0: properly fails if driver/kernel inconsistency 2017-12-09 19:31:23 +00:00
Julien Isorce
07df6a220d [490/906] gldisplay: error out instead of g_assert 2017-12-09 19:31:23 +00:00
Julien Isorce
ef87b0e70d [488/906] libvisual-gl: full compatibility with projectM-libvisual if libprojectM >= 2.0.1
Fix bug #310775
2017-12-09 19:31:23 +00:00
Julien Isorce
74526865c6 [486/906] libvisual-gl: add minimal support to libvisual plugins that uses Framebuffer objects
Fix bug #310775

gst-launch audiotestsrc ! libvisual_gl_projectM ! glimagesink is working
but for now you cannot append any other opengl filters between
libvisual_gl_projectM and glimagesink because our FBO is turned OFF.

It would require that libvisual allows to split rendering between
pass1,2,3... and final rendering. In order to unbind our FBO before
the passN, and then rebind it just before the final libvisual rendering.
2017-12-09 19:31:23 +00:00
Julien Isorce
0f54271129 [485/906] gstgldisplay: turn off texture binding and read buffer when downloading rgb is done
It fixes: (black image before)
gst-launch-0.10 audiotestsrc ! libvisual_gl_lv_gltest ! gldownload ! ximagesink
and
gst-launch-0.10  audiotestsrc ! libvisual_gl_lv_gltest ! gldownload ! glimagesink
2017-12-09 19:31:23 +00:00
Julien Isorce
96cce45c38 [483/906] glelements: do not leak parent when using gst_pad_get_parent 2017-12-09 19:31:23 +00:00
Julien Isorce
7c79cc5c41 [481/906] feature checking: error out instead of doing nothing if an OpenGL feature is not present
Fix bug #572767
2017-12-09 19:31:23 +00:00
Julien Isorce
b30da1699a [480/906] win32 builds: add glshader filter sources to vs9 and codeblocks
Also fix some warnings from msvc9 and mingw-3.4.5
2017-12-09 19:31:23 +00:00
Руслан Ижбулатов
c0ebeccb8c [479/906] gstglshadervariables: strtok_r is not multiplatform
Fix bug #664367
2017-12-09 19:31:23 +00:00
Wei Feng
aefca52574 [478/906] OpenGL ES 2.0: include glib.h to use G_BEGIN_DECLS in gstgles2.h
Fix bug #631019
2017-12-09 19:31:23 +00:00
Julien Isorce
ccaa9e883f [477/906] OpenGL ES 2.0: fix build since glfiltershader changes 2017-12-09 19:31:23 +00:00
Antoni Silvestre
4ea2bf2087 [476/906] OpenGL ES 2.0: fix build and disable some examples
Fix bug #631019
2017-12-09 19:31:23 +00:00
Luc Deschenaux
500210b354 [471/906] glshader: add dynamic fragment shader filter
Also add fragment shader parser
Fix bug #600195
2017-12-09 19:31:23 +00:00
Julien Isorce
f008fa71ab [467/906] tests: various build fixes
- cmake could not find glib
 - put gtk variables at the beginning to avoid GL conflicts
 - update examples to clutter-1.8
 - use const instead of deprecated G_CONST_RETURN
 - set max pending events to 0 to make cube example works again
2017-12-09 19:31:23 +00:00
Tim-Philipp Müller
4f09396824 [463/906] Add some more G_{BEGIN,END}_DECLS to public headers
https://bugzilla.gnome.org/show_bug.cgi?id=637260
2017-12-09 19:31:23 +00:00
Stefan Kost
df480f3530 [462/906] various: add missing G_PARAM_STATIC_STRINGS flags
Canonicalize property names as needed. Includes some gst-indent changes as well :/
2017-12-09 19:31:23 +00:00
Jan Schmidt
e013586f46 [459/906] Fix distcheck. 2017-12-09 19:31:23 +00:00
Julien Isorce
769e43a2e0 [456/906] glfilter/glmixer/gltestsrc/glupload: throw an element error if no parent bin
Fixes bug #602153
2017-12-09 19:31:23 +00:00
Julien Isorce
ade2526b8f [455/906] glimagesink: handle pixel-aspect-ratio 2017-12-09 19:31:23 +00:00
Filippo Argiolas
306526a19f [443/906] sobel: move some highly duplicated code into glfilter
Add a new convenience function in GstGLFilter that just draws an input
texture to a target texture using a simple shader with just a "tex"
uniform sampler.
Move draw_texture from glfiltersobel to glfilter. Still need to update
other plugins to this.
2017-12-09 19:31:23 +00:00
Julien Isorce
c390c30aac [432/906] GstGLDisplay: this is GL_DEPTH24_STENCIL8_EXT, not GL_DEPTH24_STENCIL8_EXT 2017-12-09 19:31:23 +00:00
Pierre Pouzol
c9dfa9c111 [431/906] GstGLDisplay: enable stencil buffer when using framebuffer objects.
Fixes Bug #612159
2017-12-09 19:31:23 +00:00
Nicholas Panayis
dfc2d42b7a [415/906] gstglwindow_win32: share opengl context in correct order
Allow to use the opengl context sharing feature if the original
context has been used already.
This is only possible on win32 with wglShareLists because on other
backends, the sharing is made when a context is created.
This new feature is only usefull when using external context
because gst-gl internally makes sure that the orginal context is not
already used when sharing it.

Fix bug #611067
2017-12-09 19:31:23 +00:00
Julien Isorce
b36b45e437 [412/906] Cocoa backend: improve support on GNUStep 2017-12-09 19:31:23 +00:00
Julien Isorce
0b6112c4a0 [411/906] gstglmixer: copy/past recent changes from gstvideomixer 2017-12-09 19:31:23 +00:00
Julien Isorce
4874b35304 [410/906] gstglmixer: inactivate shared gl context before to release ours
First, inactivate shared gl contexts known by each sink pad.
Then, destroy the gl context known by the glmixer.
Finally, re-activate shared gl contexts.
This is to satisfy the fact that no shared gl context must be current
when an opengl context is destroyed.
Moreover the application may hang or crash without those steps.
2017-12-09 19:31:23 +00:00
Julien Isorce
727191d7b6 [407/906] winCE backend: fix build 2017-12-09 19:31:22 +00:00
Julien Isorce
36a51c6e02 [406/906] glimagesink: add a client-data property
Also add it to glfilterapp.

Fixes #559131
2017-12-09 19:31:22 +00:00
Julien Isorce
32203f94ea [405/906] glfilter: add external-opengl-context property
It repairs the cluttershare and sdlshare example
2017-12-09 19:31:22 +00:00
Jan Schmidt
3672b5922f [403/906] gstglmixer: Initialise the debug category
Initialise the gstglmixer debug category before using it.
2017-12-09 19:31:22 +00:00
Julien Isorce
e70ed87aa8 [400/906] gstgldisplay: no need the I420 work around if ATI Mobility
fix #588653
2017-12-09 19:31:22 +00:00
Julien Isorce
f23b6144d5 [399/906] glmixer: fix when no more gl elements after it
For example:
videotestsrc ! glupload ! ... ! glfiter ! ... ! glmosaic ! fakesink
Usefull when using glmixer inside cluttershare or sdlshare cases.
2017-12-09 19:31:22 +00:00
Pratheesh Gangadhar
f93bb87e77 [394/906] gstgldisplay: use of GL_DEPTH_COMPONENT16 if OpenGL ES 2.0
glRenderbufferStorage does not accept GL_DEPTH_COMPONENT in
OpenGL ES 2.0.

Fix bug #593786
2017-12-09 19:31:22 +00:00
Julien Isorce
8fdf415fb7 [393/906] glmosaic: for now it's a cube mosaic
Also use GPtrArray instead of GArray in glmixer.
And add a pipeline to tests/pieplines
2017-12-09 19:31:22 +00:00
Julien Isorce
9e9b114010 [391/906] Cocoa: fix backend since recent changes
Before, the window size was given at its creation. Now, it's done at
the drawing step because it's only relevant when there is a glimagesink
element in the pipeline.
2017-12-09 19:31:22 +00:00
Julien Isorce
9741435b21 [389/906] fix codeblocks build on win32 2017-12-09 19:31:22 +00:00
Julien Isorce
525701cfca [388/906] just fix builds and indent 2017-12-09 19:31:22 +00:00
Julien Isorce
b85ffef956 [387/906] glmixer: add a glmixer base element
glmixer can be seen as a glfilter except it handles N requested
sink pads.
Each sink pad and the src pad are video/x-raw-gl.
glmixer is responsible for managing different framerates from inputs.
It uses OpenGL context sharing. It means that each input is in its
own OpenGL context shared together and shared with the OpenGL context
of the ouput gl chain.
Also add a glmosaic which is an example of implementation of glmixer.
For now glmosaic is a cube but it will be fixed in the next commits.
For now the glmixer has some weird behaviours in some configurations
but it will be improved in the next commits.
The autotools builds is temporarly broken since those changes
have been made on win32.
2017-12-09 19:31:22 +00:00
Julien Isorce
8c33ba0ba6 [385/906] rewrite the way a gstgldisplay is transmited to the gl elements
Before, a gstgldisplay was instancied by the gl src in terms of gl chain.
And then the next element got it through the first gstglbuffer.
Now, this is done though queries.
All glelements get their ref on a gstgldisplay in READY state.
This rewrite is mainly a first step to be able to share OpenGL context hold
by the gstgldisplay using more complex glelements.
For example, with a glvideomixer. The associated gstgldisplay of each gl chain
of the sink pads will share their OpenGL context.
2017-12-09 19:31:22 +00:00
Stefan Kost
2b9ff50feb [384/906] build: use <stdio.h> / "stdio.h" 2017-12-09 19:31:22 +00:00
Stefan Kost
c218748bc2 [383/906] build: include <stdio.h> when using printf & co. 2017-12-09 19:31:22 +00:00
Julien Isorce
8f6927c70a [382/906] ES2.0: remove warnings
Partially fix #593786
2017-12-09 19:31:22 +00:00
Julien Isorce
b639781471 [381/906] EGL and GLX:: set a minimum depth size 2017-12-09 19:31:22 +00:00
Julien Isorce
95dbe51fef [378/906] gldisplay: avoid to request gl thread when deleting a texture
A texture is not destroyed when when we are done with it.
This texture is just added to the texture pool in order to be
re-used. In this case no OpenGL code is executed so we do not need to
request gl thread.
2017-12-09 19:31:22 +00:00
Julien Isorce
fa41020ee4 [377/906] gldisplay: avoid to request gl thread when generating a texture
Thanks to the texture pool the gl textures are re-used.
When re-using one, no opengl code is executed so do not need
to request gl thread.
2017-12-09 19:31:22 +00:00
Stefan Kost
fa9177d037 [376/906] build: support openGLES on linux via autofoo. Partialy fixes #593786
Add a pkg-config check for opengl and if not found assume opengl-es. If user has
none of both one still get build error later on (there is no pkg-config for
opengl-es).
Add more files to EXTRA dist and build the opengles variant if selected.
Simmilar changes could be done for the winCE backend.
2017-12-09 19:31:22 +00:00
Julien Isorce
8bed6a5e85 [369/906] define missing glew macro on older versions 2017-12-09 19:31:22 +00:00
Julien Isorce
2e22bb4560 [368/906] Cocoa backend: fix crash when resizing
Default implementation of NSOpenglView::update is not safe because it
just calls update on the opengl context whereas we are not in the gl thread.
Also fix the white flickering when resizing, because now we need to call
the draw callback manually when resizing.
2017-12-09 19:31:22 +00:00
Julien Isorce
e467ea29e9 [365/906] Cocoa backend: make sure that nsapp is initialized
gst-launch-0.10 videotestsrc ! tee name=t ! queue ! glimagesink t. ! queue ! glimagesink
now works properly on MacOSX
2017-12-09 19:31:22 +00:00
Julien Isorce
8d6e91838a [364/906] make the cmake build work on MacOSX
We can now generate a Xcode project (or Unix Makfiles),
see INSTALL file
2017-12-09 19:31:22 +00:00
Julien Isorce
54ba5bccf5 [363/906] Cocoa backend: fix crash when closing
- All gstglwindow members are now modified only in the gl thread
to avoid thread concurrency
- OpenGL context is now properly clean
- fix a couple of things in implementation of xoverlay interface
2017-12-09 19:31:22 +00:00
Julien Isorce
b7162375a3 [362/906] make cocoa backend work on MacOSX
It works with both gst-launch and a cocoa app (non-embedded and embedded)
But there is still some problems:
  - sometimes crash when closing
  - flickering when resizing
  - embedded mode not perfect

I will first make the CMake build work with cocoa backend
in order to generate a XCode project.
Then it should be easier to fix those issues.
2017-12-09 19:31:22 +00:00
Jan Schmidt
8884cfefa8 [358/906] gstgldisplay: Close a small race starting the display thread
Take the display lock before signalling the create-context cond
to ensure the caller has dropped the lock and is therefore listening
for the signal.
2017-12-09 19:31:22 +00:00
Jan Schmidt
4ddbded3a8 [357/906] x11: Don't crash when the X11 display is not available.
Error out cleanly instead of crashing when the X11 display can't
be contacted.
2017-12-09 19:31:22 +00:00
Jan Schmidt
3fbe0f0a98 [352/906] fix typo
Change GST_GL_DISPLAY_PROJECTION_PERSPECIVE to
GST_GL_DISPLAY_PROJECTION_PERSPECTIVE.

Re-indent a couple of files that needed it.
2017-12-09 19:31:22 +00:00
Julien Isorce
f3fef483ec [350/906] fix window position when using xoverlay
x, y are the coordinates of the position inside
the new parent window.

Fixes #584877
2017-12-09 19:31:22 +00:00
Julien Isorce
ca1a2d33ca [349/906] can switch xoverlays while playing
Fixes bug #584877

Before this commit calling "gst_x_overlay_set_xwindow_id" more
than one time, had no effect.
It mainly affects the glimagesink implementation.
But on win32 (and CE), some stuff has to be done to
release the old parent.

And add a switchxoverlay example where the user
can click on left/right part of the main window to
switch the xoverlay.
2017-12-09 19:31:21 +00:00
LRN
389982df17 [347/906] fix miscast of a pointer in SetWindowLongPtr
GCC 4.4.0 complains error: cast from pointer to integer of different size
Fixes #584678.
2017-12-09 19:31:21 +00:00
Sebastian Dröge
3b0dacd8d6 [346/906] Fix linking by providing libtool the correct --tag parameter 2017-12-09 19:31:21 +00:00
Julien Isorce
de9f763bff [337/906] Improve cluttershare example
Use clutter_threads_API.
When just using glupload from rgb, we have to be sure that
the upload texture is not in use in our gst gl context.
2017-12-09 19:31:21 +00:00
Julien Isorce
9f8473cce0 [336/906] [x11/x11ES] fix some pointer cast warnings 2017-12-09 19:31:21 +00:00
Julien Isorce
0a649b133d [335/906] [cocoa] update since interface changed 2017-12-09 19:31:21 +00:00
Julien Isorce
f631cf4976 [334/906] [win32/winCE] fix some pointer cast warnings with mingw
And turn off deprecated Wp64 msvc compiler option.
2017-12-09 19:31:21 +00:00
Julien Isorce
d43fdd3daf [333/906] add force-aspect-ratio support 2017-12-09 19:31:21 +00:00
Julien Isorce
d1bd71e82b [331/906] indent and fix some compiler warnings 2017-12-09 19:31:21 +00:00
Julien Isorce
2eb9cb551c [330/906] Can now share textures with an external gl context
The external opengl context must be specify when creating
our OpenGL context (glx) or just after (wgl).
When calling glXCreateContext or wglShareLists, the
external opengl context must not be current.
Then our gl context can be current in the gl thread while
the external gl context is current in an other thread.
See tests/examples/clutter/cluttershare.c
2017-12-09 19:31:21 +00:00
David Schleef
09704b9e70 [329/906] Build for Cocoa on darwin, with various fixes 2017-12-09 19:31:21 +00:00
Julien
095be23366 [327/906] fix init FBO's texture attachment on ES 2.0 2017-12-09 19:31:21 +00:00
Julien
fd2028d109 [326/906] add X backend for OpenGL ES 2.0 2017-12-09 19:31:21 +00:00
Julien Isorce
ad8b227ff7 [322/906] [download YUY2/UYVY] fix a regression
The call to glLoadIdentity was removed by mistake during
OpenGL ES 2.0 integration.
2017-12-09 19:31:21 +00:00
Julien Isorce
61a8f34442 [321/906] add OpenGL ES 2.x support.
In OpenGL 2.x for Embedded System, a lot of basic scene/draw functions
have been removed. It means that everything is made using vertex and
fragment shaders.
I have also added a gstglwindow backend for winCE that uses EGL
(Native Platform Graphics Intercace) (which is a full part of
OpenGL ES specification). It remove the use of wgl/glx functions.
2017-12-09 19:31:21 +00:00
Julien Isorce
3c92a741a4 [320/906] fix position and content rect 2017-12-09 19:31:21 +00:00
Julien Isorce
8a77e2d859 [319/906] [win32 backend] fix transmition message to the parent.
The Qt mouvexoverlay example shows how to rotate the cube
by moving (+click) the mouve over a qwidget using xoverlay
interface.
2017-12-09 19:31:21 +00:00
Julien Isorce
dbdc0fb9eb [318/906] rename GNUmakefile(s) to GNUmakefile(s).gnustep 2017-12-09 19:31:21 +00:00
Julien Isorce
4ccd32c444 [317/906] implement gstglwindow for Cocoa (MacOS and GNUstep) 2017-12-09 19:31:21 +00:00
Julien Isorce
573f54433c [315/906] add GNUstep build 2017-12-09 19:31:21 +00:00
David Schleef
2e2213fbd7 [310/906] Global reindent
Indent parameters:
INDENT_PARAMETERS="--braces-on-if-line \
        --case-brace-indentation0 \
        --case-indentation2 \
        --braces-after-struct-decl-line \
        --line-length80 \
        --no-tabs \
        --cuddle-else \
        --dont-line-up-parentheses \
        --honour-newlines \
        --continuation-indentation4 \
        --tab-size8 \
        --indent-level2"
2017-12-09 19:31:21 +00:00
Sebastian Dröge
10494006b8 [309/906] Replay: Fix callbacks passed over XEvents on 64 bit architectures
Althought the XEvent's xclient.data.l array is an array of
longs they will be constrained to 32 bit by the X11 protocol.
On 64 bit architectures use two elements of the array to store
one pointer.
This fixes segfaults that happen at least for every example
on startup.
2017-12-09 19:31:21 +00:00
Julien Isorce
c83cbcd398 [306/906] fix CMake build and frozen CodeBlocks build 2017-12-09 19:31:21 +00:00
Julien Isorce
3b8429c2df [304/906] only load RGBA files.png 2017-12-09 19:31:21 +00:00
Julien Isorce
c060a8896d [301/906] depends on libpng instead of gdk_pixbuf 2017-12-09 19:31:21 +00:00
David Schleef
f0b62d760f [298/906] Revert "Fix indention"
This reverts commit 96e4ab18c2cf9876f6c031b9aba6282d0bd45a93.

You should have asked first.  And you would have been told "no",
because it causes people on development branches to do a huge
amount of extra work.
2017-12-09 19:31:21 +00:00
David Schleef
2f0e5b1dc4 [297/906] Revert "Fix callbacks passed over XEvents on 64 bit architectures"
This reverts commit 280771d09b58617b27201027de0e1194da376e72.
2017-12-09 19:31:21 +00:00
Sebastian Dröge
babd51c58f [296/906] Fix callbacks passed over XEvents on 64 bit architectures
Althought the XEvent's xclient.data.l array is an array of
longs they will be constrained to 32 bit by the X11 protocol.
On 64 bit architectures use two elements of the array to store
one pointer.
This fixes segfaults that happen at least for every example
on startup.
2017-12-09 19:31:21 +00:00
Sebastian Dröge
809c2ec04c [295/906] Fix indention 2017-12-09 19:31:21 +00:00
Sebastian Dröge
0068125ec8 [294/906] Fix format string compiler warnings by using G_GUINT64_FORMAT 2017-12-09 19:31:20 +00:00
David Schleef
71db1285d8 [291/906] Add check for GLEW_EXT_framebuffer_object 2017-12-09 19:31:20 +00:00
David Schleef
d98d188ad7 [290/906] Set GL_LIBS correctly in configure.ac
This doesn't detect the existence of libraries, which needs to
be fixed.
2017-12-09 19:31:20 +00:00
David Schleef
978ded841c [289/906] build fixes for Windows libraries 2017-12-09 19:31:20 +00:00
Julien Isorce
e184ad8a58 [288/906] add more debug ouputs about GLSL and mesa 2017-12-09 19:31:20 +00:00
julien
20298ee810 [287/906] fix a regression about glXChooseVisual which failed when using mesa, so attributes must be less restrictives. 2017-12-09 19:31:20 +00:00
Julien Isorce
76b6fcab5b [286/906] [win32] Register window class in gst_gl_window_class_init 2017-12-09 19:31:20 +00:00
Julien Isorce
6d2b8da3da [285/906] fix gl framerate in gst caps. Consider position in xoverlay. Fix inversion bettween COLS and ROWS, and move windows. 2017-12-09 19:31:20 +00:00
Julien Isorce
0867343017 [284/906] workaround about the ATI shader compiler on linux (setlocale) 2017-12-09 19:31:20 +00:00
Julien Isorce
1087da7753 [283/906] better result in cube and doublecube example. And some clean up debug and comments 2017-12-09 19:31:20 +00:00
Julien Isorce
121153fd21 [282/906] update CMake build 2017-12-09 19:31:20 +00:00
Julien Isorce
a50b222367 [281/906] Make cube example work on x11. Finish TODO task 9. 2017-12-09 19:31:20 +00:00
Julien Isorce
e1fd4232ad [280/906] Remove set_visible, because it's now automatically done when the first post redisplay comes. 2017-12-09 19:31:20 +00:00
Julien Isorce
7e3bc563e1 [279/906] finish set_xwindow_id (gst_gl_window_set_external_win_id): child is resized at the same time as the parent is. 2017-12-09 19:31:20 +00:00
Julien Isorce
1daf54222f [278/906] Implement set_xwindow_id (gst_gl_window_set_external_window_id). 2017-12-09 19:31:20 +00:00
Julien Isorce
aab706c46c [277/906] open x client connection for sender only at start up 2017-12-09 19:31:20 +00:00
Julien Isorce
312d0f588a [276/906] better deal with last pending custom cb and destroy_context_cb 2017-12-09 19:31:20 +00:00
Julien Isorce
128315ae60 [275/906] Make sure the gl ressoures are destroyed before to destroy gl window 2017-12-09 19:31:20 +00:00
Julien Isorce
b19684bbd0 [274/906] add some other debug outputs and checks 2017-12-09 19:31:20 +00:00
Julien Isorce
158f30bab1 [273/906] add some debug outputs about Visual and XVisualInfo 2017-12-09 19:31:20 +00:00
Julien Isorce
8840d306c4 [272/906] add a visible member to deal better with the first expose events 2017-12-09 19:31:20 +00:00
Julien Isorce
f878b84f90 [271/906] revert last commit because the crash comes from libselinux 2017-12-09 19:31:20 +00:00
Julien Isorce
daa5e24b41 [270/906] fix use of different Display structures which point on the same display name 2017-12-09 19:31:20 +00:00
Julien Isorce
c487389cfe [269/906] Better deal with XNextEvent and XSendEvent 2017-12-09 19:31:20 +00:00
Julien Isorce
57488b1a32 [268/906] Better deal with Atoms 2017-12-09 19:31:20 +00:00
Julien Isorce
51231595c7 [267/906] Get ride of calling sleep in gl thread X loop 2017-12-09 19:31:20 +00:00
Julien Isorce
80efa96e52 [266/906] secure close when clicking on the cross 2017-12-09 19:31:20 +00:00
Julien Isorce
3f54cd9d94 [264/906] Rewrite gstglwindow_x11.c because X API is not thread safe. 2017-12-09 19:31:20 +00:00
Julien Isorce
14d3d10e07 [263/906] discard x custom messages which are of date 2017-12-09 19:31:20 +00:00
Julien Isorce
745e20a2e1 [262/906] Works on linux but still some bugs. Fix autotools build. 2017-12-09 19:31:20 +00:00
Julien Isorce
5ec4972d3d [261/906] implement quit x message loop 2017-12-09 19:31:20 +00:00
Julien Isorce
baedf3a65b [260/906] try to make XSendEvent blocker (as win32 SendMessage is) 2017-12-09 19:31:19 +00:00
Julien Isorce
cb83e88c0c [259/906] continue x implementation (but still not tested) 2017-12-09 19:31:19 +00:00
Julien Isorce
bbc1c6b14f [258/906] setup x message loop 2017-12-09 19:31:19 +00:00
Julien Isorce
da3c0fd570 [257/906] begin gstglwindow_x11.c implementation 2017-12-09 19:31:19 +00:00
Julien Isorce
c4200fe1a0 [256/906] fix CMake an CodeBlocks builds 2017-12-09 19:31:19 +00:00
Julien Isorce
85fa075eae [255/906] fix window closure when using gst xoverlay interface 2017-12-09 19:31:19 +00:00
Julien Isorce
9169b822e7 [254/906] Better handle when the parent window is resizing, and cleanup some code 2017-12-09 19:31:19 +00:00
Julien Isorce
c7ca0d5c2f [253/906] win32: re-implement supports for gst xoverlay interface, on this branch 2017-12-09 19:31:19 +00:00
Julien Isorce
f9756b85d2 [252/906] avoid a dead lock on window closure 2017-12-09 19:31:19 +00:00
Julien Isorce
fc9479d289 [251/906] Properly clean OpenGL contexts 2017-12-09 19:31:19 +00:00
Julien Isorce
a6fdb20154 [250/906] win32: basic stuffs are working now on this branch with this new deep design (gstglwindow) 2017-12-09 19:31:19 +00:00
Julien Isorce
c4c9897f16 [249/906] begin GstGLWindow in order to totally remove gstfreeglut 2017-12-09 19:31:19 +00:00
Filippo Argiolas
32de0e6e91 [243/906] Support for missing videoformats in glupload
Add support for missing alpha channeled videoformats (RGBA, BGRA,
ARGB, ABGR) in gst_gl_display_do_upload_fill.
2017-12-09 19:31:19 +00:00
Julien Isorce
3d54d22894 [242/906] Fix crash in filters when going to NULL with no display 2017-12-09 19:31:19 +00:00
Filippo Argiolas
f18ba293cb [233/906] no need to explicit set the debug category if default one is used 2017-12-09 19:31:19 +00:00
Filippo Argiolas
6c04333f11 [230/906] explicit check g_getenv return value to be not NULL 2017-12-09 19:31:19 +00:00
Julien Isorce
ec8aa615e5 [229/906] update authors from the CVS repository 2017-12-09 19:31:19 +00:00
Filippo Argiolas
34663eccd9 [228/906] output shaders info log only if GST_GL_SHADER_DEBUG env variable is set. Should fix TODO task 18 2017-12-09 19:31:19 +00:00
Julien Isorce
cd20053491 [226/906] check on win32 that every tests/pipelines and tests/examples (generic, gtk, qt) still work 2017-12-09 19:31:19 +00:00
Julien Isorce
40cd0281a4 [225/906] fix a regression that made the gltestsrc element not working 2017-12-09 19:31:19 +00:00
Julien Isorce
a125004d82 [224/906] fix a regression about MESA YCbCr colorspace conversion 2017-12-09 19:31:19 +00:00
Julien Isorce
ff87048836 [223/906] fix a regression (sometimes a FBO is needed even if the video source is rgb) 2017-12-09 19:31:19 +00:00
Julien Isorce
69159fa0af [222/906] Finish TODO task 17 2017-12-09 19:31:19 +00:00
Julien
5759b60ba3 [221/906] fix g_int_hash -> g_direct_hash 2017-12-09 19:31:19 +00:00
Julien Isorce
bb8ba84647 [220/906] Use a better key for the pool of textures 2017-12-09 19:31:19 +00:00
Julien Isorce
cdffac5606 [219/906] Use a gst debug category for GstGLDisplay instead of g_print, gst-launch-0.10 --gst-debug=gldisplay:3 videotestsrc ! glimagesink 2017-12-09 19:31:19 +00:00
Julien
88b6f0a3cf [218/906] The CMake build now works on my Kubuntu-KDE4.1.1 2017-12-09 19:31:19 +00:00
Julien Isorce
3d6116ee45 [217/906] Add cmake build http://www.cmake.org. See CMake install instructions in the INSTALL file. (I have not correctly configured yet the CMake build for unix, BE patient) 2017-12-09 19:31:19 +00:00
Julien Isorce
0d6c956cfb [212/906] add a glbumper (bump mapping filter through GLSL) that exposes how to use both vertex and fragment shaders 2017-12-09 19:31:19 +00:00
Julien Isorce
b4c0527eff [211/906] Fix upload AYUV and YV12 (a regression in last commits) 2017-12-09 19:31:18 +00:00
julien User
97a78f8580 [210/906] get ride of a wrong color on nvidia/linux when converting yv12 to rgb through GLSL 2017-12-09 19:31:18 +00:00
julien User
5d93e53f47 [209/906] fix warnings 2017-12-09 19:31:18 +00:00
Julien Isorce
a0cd1d279f [208/906] fix upload AYUV, regression during the 2 last commits 2017-12-09 19:31:18 +00:00
Julien Isorce
ddf4cdd2df [207/906] oups, fix my mistake on last commit 2017-12-09 19:31:18 +00:00
unknown
1b8b53fb1c [206/906] Do not use frame buffer object when "input video is RGB" or when "GLSL is not available and YCbCr is available". So frame buffer object is not a plugin requirement anymore. So I decreased the OpengGL version from 1.4 to 1.2 (maybe less?) 2017-12-09 19:31:18 +00:00
Julien Isorce
35d1c73109 [205/906] use a GHash table instead of a GData for the texture pool 2017-12-09 19:31:18 +00:00
Julien Isorce
2f01ea128f [204/906] get ride of a bug on ATI related to YV12 to rgb conversion through GLSL and add an example 2017-12-09 19:31:18 +00:00
Filippo Argiolas
0adee75dce [201/906] fix a signedness warning 2017-12-09 19:31:18 +00:00
Julien Isorce
3ae1ec7c00 [200/906] get ride of a ATI bug related to GLSL colorspace conversion for I420 and YV12 to rgb 2017-12-09 19:31:18 +00:00
Filippo Argiolas
4440a3cfed [171/906] import fxtest (little gtk app to easily test effects) from cvs branch, fixed rgbtocurve. 2017-12-09 19:31:18 +00:00
Julien Isorce
91870f6d34 [157/906] move thread_do_upload_make from thread_do_upload to thread_init_upload 2017-12-09 19:31:18 +00:00
Julien Isorce
e6db0628e8 [156/906] fix a crash that could happens when using at least 2 gl context and when closing a window on linux 2017-12-09 19:31:18 +00:00
Filippo Argiolas
52a646f240 [153/906] Try to genereate textures within gstglfilterblur to see if the new thread_use_fbo works both with textures from the pool and custom ones 2017-12-09 19:31:18 +00:00
Filippo Argiolas
dbcb82d8b2 [152/906] remove an unneeded (really?) glTexImage 2017-12-09 19:31:18 +00:00
Julien Isorce
712e7626b7 [151/906] ISO C90 2017-12-09 19:31:18 +00:00
Julien Isorce
1a7a34b5c0 [150/906] glTexImage2D(w, h, NULL) is now called only one time (mem alloc) 2017-12-09 19:31:18 +00:00
Filippo Argiolas
46812f8be9 [149/906] same as previous commit 2017-12-09 19:31:18 +00:00
Filippo Argiolas
6a9d6de71f [148/906] Fix rgb issue. Current program should always be set to 0 when a new texture is attached to a fbo. 2017-12-09 19:31:18 +00:00
Julien Isorce
4629bf1bc5 [146/906] remove filteredge 2017-12-09 19:31:18 +00:00
Filippo Argiolas
ce17f1a2db [143/906] Add init and reset callbacks in GstGLFilter to run arbitrary gl code at start and stop. Useful to init and cleanup custom gl resources. 2017-12-09 19:31:18 +00:00
Filippo Argiolas
a54a462705 [142/906] Add a generic action to be able to execute arbitrary gl code within the gl thread with less pain 2017-12-09 19:31:18 +00:00
Filippo Argiolas
4eb4c0beea [141/906] some steps towards simplification. added a convenience function to gstglfilter and some comment here and there 2017-12-09 19:31:18 +00:00
Filippo Argiolas
7ea58ac050 [140/906] Fix GL_STACK_OVERFLOW 2017-12-09 19:31:18 +00:00
Julien Isorce
e0f1cfeac5 [139/906] fix warnings when compiling upload/download shaders 2017-12-09 19:31:18 +00:00
Filippo Argiolas
b384525a55 [138/906] is that videoformat pointer really needed? 2017-12-09 19:31:18 +00:00
Filippo Argiolas
14849d65ea [137/906] Don't reallocate texture memory every time in upload_* functions. 2017-12-09 19:31:18 +00:00
Filippo Argiolas
395ea4fa2a [136/906] reindent gstgldisplay with gstreamer-c-mode 2017-12-09 19:31:18 +00:00
Julien Isorce
db7490cd72 [133/906] finish todo task 4 2017-12-09 19:31:18 +00:00
Julien Isorce
d0e63e68ac [132/906] make the plugin properly shutdown when one of the check requirements failed 2017-12-09 19:31:18 +00:00
Filippo Argiolas
9b45dcae3e [131/906] fix warnings (unused vars) 2017-12-09 19:31:18 +00:00
Julien Isorce
ffbc182446 [130/906] use GstGLShader in the GLSL colorspace conversion 2017-12-09 19:31:17 +00:00
Julien Isorce
de6eb8677e [128/906] add GstGLShader stuffs in the vs8 project, fix laplacian fragment code to make it compile on ATI, and fix check function about Opengl and Glew version 2017-12-09 19:31:17 +00:00
Filippo Argiolas
c47fa4dc62 [127/906] Imported GstGLShader from cvs branch. Added a demo laplacian convolution filter to demonstrate how this can be integrated with minimum effort. 2017-12-09 19:31:17 +00:00
David Schleef
4f39df0532 [126/906] Change some guints to GLuints because of warnings on OS/X. 2017-12-09 19:31:17 +00:00
David Schleef
9f305eecb8 [125/906] Add libraries as appropriate to fix compilation 2017-12-09 19:31:17 +00:00
Julien Isorce
69abbdd760 [123/906] X Specific: better implementation of the gst_gl_set_window_id
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@584 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
a5bf134265 [122/906] better implementation of gst_gl_display_set_window_id for win32. (change the window of the current wglcontext instead of reinit everything, and so avoid some problems about opengl objects that could be init in the previous wglcontext and so no usable in the newer wglcontext, it what the case for the first texture) This newer implementation has not been made yet on linux
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@582 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
ed46d70150 [121/906] avoid use of GLSL functions when fragment_shader is not available
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@581 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
cbd66b24c8 [120/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@580 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
8b14eea6ec [119/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@579 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
f4b54bd934 [118/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@573 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
7a063dd47f [116/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@563 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
908e74de67 [115/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@556 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
a192d39638 [114/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@555 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
a903f96e15 [113/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@554 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
8807e62119 [112/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@552 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
edda6cc72d [111/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@548 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
886bd3ee7d [109/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@543 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
49e944778e [108/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@540 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:17 +00:00
Julien Isorce
18177e6c46 [107/906] fix opengl version checker
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@534 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
49970b27aa [105/906] up Sobel filter and gl/glew version checker
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@518 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
8685e547b4 [104/906] start to add a glfilteredge that proceeds edge detection using GLSL
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@517 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
e9f924910c [096/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@508 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
e74175e328 [095/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@507 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
e34a278e35 [094/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@506 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
b63a97c50c [092/906] Finish to revive the gltestsrc. Next step is to do some refactoring.
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@504 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
bca92ed962 [091/906] start to revive the gltestsrc
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@503 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
f5f2e51a31 [088/906] fix some caps negociations those pipelines works fine : gst-launch-0.10 -v videotestsrc ! video/x-raw-yuv, width=320, height=240 ! glgraphicmaker ! video/x-raw-gl, width=720 , height=576 ! glfiltercube ! glimagesink and gst-launch-0.10 -v videotestsrc ! video/x-raw-yuv, width=320, height=240 ! glgraphicmaker ! video/x-raw-gl, width=720 , height=576 ! glimagesink
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@500 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
1e2ca1dfde [087/906] glfilter can accept to have an input size different than the out put size : video/x-raw-gl, width=w1, height=w1 ! glfilter ! video/x-raw-gl, width=w2, height=w2 ! (fix every examples)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@499 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
2c12b6f41e [086/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@498 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:17 +00:00
Julien Isorce
4fb5b5bde1 [085/906] fix regressions about glvideomaker.
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@497 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
7973568f07 [084/906] add a glfilterapp which holds the client draw and reshape callbacks (some "wanted" regressions about the glvideomaker, have been done with this version. Will be fix in next commits)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@496 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
dc4119eafe [083/906] finish to implement the glfilter: example : gst-launch-0.10 videotestsrc num_buffers = 100 ! glgraphicmaker ! glfiltercube ! glimagesink
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@495 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
f580bb77f4 [082/906] glfilter can request, use and reject a FBO (step 1)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@494 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
d01ae3ed0b [081/906] start to add a glfilter
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@493 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
392ab37b94 [080/906] fix gstfreeglut linux implementation to correctly handle the gstxoverlay interface
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@486 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
89cd65d3ae [079/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@478 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
74a71c67c2 [077/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@475 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
0c83068521 [076/906] check OpenGL and Glew versions
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@474 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
890ca473e1 [075/906] indent
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@451 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
60498e3370 [074/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@446 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
a32ff29e64 [073/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@445 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
d7d5b16051 [072/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@438 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
a9686159a3 [071/906] remove all warnings
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@437 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
7ce0cbad40 [070/906] implement and fix onClose: when a user click on the cross of an internal window (there is not this issue when using the gstxoverlay interface)
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@436 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
ee488f6e6f [069/906] add gstreamer license
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@435 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
708918b3ec [066/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@430 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
f386219271 [065/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@428 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
124521e2de [063/906] up
git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@423 93df14bb-0f41-7a43-8087-d3e2a2f0e464
2017-12-09 19:31:16 +00:00
Julien Isorce
f0e8c70845 [062/906] git-svn-id: svn://svn.wobow.com/GStreamer_playground/gst-plugins-gl@421 93df14bb-0f41-7a43-8087-d3e2a2f0e464 2017-12-09 19:31:16 +00:00
David Schleef
98e2942fed [061/906] First SVN commit. This commit is a hack to make git-rebase work 2017-12-09 19:31:16 +00:00
Tim-Philipp Müller
01d6f2818c [060/906] * gst-libs/gst/gl/gstglbuffer.c: (gst_gl_buffer_format_from_video_format): Fix compiler warning if there are video format enums gstglbuffer doesn't know about yet. * gst-libs/gst/gl/gstgldisplay.c: (gst_gl_display_upload_texture_rectangle), (gst_gl_display_draw_texture): Fix printf format for 64-bit integers. 2017-12-09 19:31:16 +00:00
Tim-Philipp Müller
71e5427e06 [058/906] * gst-libs/gst/gl/Makefile.am: The library needs to link against libgstvideo-0.10. * gst/gl/Makefile.am: The plugin does not (I think) need to link against GL or libgstvideo, since our new gstreamer GL library already does that, but it does need to link against our brand-new libgstgl-0.10. 2017-12-09 19:31:16 +00:00
David Schleef
894db7a964 [056/906] * configure.ac: Readd pre-pkgconfig OpenGL detection, since pkgconfig requires Mesa from git master. * gst/gl/glimagesink.c: * gst/gl/gstopengl.c: Move debug category initialization to element. * gst-libs/gst/gl/Makefile.am: * gst-libs/gst/gl/gstglfilter.c: * gst-libs/gst/gl/gstglfilter.h: * gst/gl/gstglfilter.c: * gst/gl/gstglfilter.h: Move glfilter to library. * pkgconfig/gstreamer-plugins-gl.pc.in: Add gstreamer-base-0.10 as a requirement. * po/en.po: Update. 2017-12-09 19:31:16 +00:00
Tim-Philipp Müller
2134ce8c9c [055/906] * configure.ac: * docs/Makefile.am: * gst-libs/Makefile.am: * gst-libs/gst/gl/Makefile.am: * gst/gl/Makefile.am: * tests/Makefile.am: Fix compilation in uninstalled setup and some distcheck-y bits (not all though). 2017-12-09 19:31:16 +00:00
David Schleef
e0f6fa8e62 [054/906] Fixes to make project compile. Probably still doesn't work. * configure.ac: * gst-libs/gst/Makefile.am: * gst-libs/gst/gl/Makefile.am: * gst/Makefile.am: * gst/gl/Makefile.am: * gst/gl/gstgltestsrc.c: * po/LINGUAS: * win32/MANIFEST: 2017-12-09 19:31:16 +00:00
David Schleef
d2dd3ef923 [053/906] Add project infrastructure. Not complete, doesn't work. * .cvsignore: * AUTHORS: * COPYING: * COPYING.LIB: * INSTALL: * Makefile.am: * NEWS: * README: * RELEASE: * REQUIREMENTS: * autogen.sh: * configure.ac: * docs/.cvsignore: * docs/Makefile.am: * docs/libs/Makefile.am: * docs/plugins/Makefile.am: * docs/version.entities.in: * ext/Makefile.am: * gst-libs/Makefile.am: * gst-libs/gst/Makefile.am: * gst-libs/gst/gl/Makefile.am: * gst-plugins-gl.doap: * gst-plugins-gl.spec.in: * gst/Makefile.am: * m4/.cvsignore: * m4/Makefile.am: * pkgconfig/.cvsignore: * pkgconfig/Makefile.am: * pkgconfig/gstreamer-plugins-gl-uninstalled.pc.in: * pkgconfig/gstreamer-plugins-gl.pc.in: * sys/Makefile.am: * tests/Makefile.am: * tests/check/Makefile.am: * tests/examples/Makefile.am: * tests/icles/Makefile.am: * tools/Makefile.am: * win32/common/config.h.in: 2017-12-09 19:31:16 +00:00
David Schleef
e0fc0cebe6 [052/906] * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: * sys/glsink/gstglupload.c: Handle xoverlay exposes correctly. This means glimagesink works correctly most of the time in totem (fullscreening being an execption). Doesn't handle expose events directly to the GL window. 2017-12-09 19:31:16 +00:00
David Schleef
45d3247a68 [051/906] * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: * sys/glsink/gstopengl.c: Reenable video/x-raw-rgb and x-raw-yuv for glimagesink. Enable vblank synchronization. Remove unused code. 2017-12-09 19:31:16 +00:00
David Schleef
6fd801ba2a [049/906] * configure.ac: * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstglconvert.c: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilter.h: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: Major cleanup of code. Convert glupload to BaseTransform. Handle caps negotiation mostly correctly. Reenable in build. 2017-12-09 19:31:16 +00:00
David Schleef
2a6bf50ba7 [047/906] * sys/glsink/gltestsrc.c: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: Convert gldownload to BaseTransform. Make glfilterexample visually interesting. Add support for various formats to downloading. Fix a few places where we leak GL state to other elements (bad, but hard to prevent). 2017-12-09 19:31:15 +00:00
David Schleef
5e620c9673 [046/906] * sys/glsink/BUGS: * sys/glsink/Makefile.am: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstglconvert.c: * sys/glsink/gstgldisplay.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglfilter.h: * sys/glsink/gstglfilterexample.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Remove code that handles non-texture buffers. Add a GstGLBufferFormat type that corresponds to how to use the texture, not the original video format. Convert gstflfilter.c into a base class, add glfilterexample and glconvert elements. * sys/glsink/color_matrix.c: Minor ramblings about color conversion matrices. 2017-12-09 19:31:15 +00:00
David Schleef
c46924bb35 [045/906] * sys/glsink/Makefile.am: * sys/glsink/gltestsrc.c: * sys/glsink/gltestsrc.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstgltestsrc.c: * sys/glsink/gstgltestsrc.h: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Add gltestsrc element, a duplicate of videotestsrc that uses GL rendering to create images. More cleanup. 2017-12-09 19:31:15 +00:00
David Schleef
f19f6cc1ab [044/906] * sys/glsink/gstglbuffer.c: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: Clean up code. Fix a few leaks. 2017-12-09 19:31:15 +00:00
David Schleef
de7967f306 [043/906] * sys/glsink/Makefile.am: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldisplay.c: * sys/glsink/gstgldisplay.h: Rename glvideo.[ch] to gstgldisplay.[ch]. 2017-12-09 19:31:15 +00:00
David Schleef
7e42503811 [042/906] * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglupload.c: Rewrite a bunch of code to use textures as the intermediate instead of renderbuffers. upload, download, filtering all work. 2017-12-09 19:31:15 +00:00
David Schleef
c4a58e40e1 [041/906] * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstgldownload.c: * sys/glsink/gstglupload.c: A careful read of the documentation reveals that I can't use renderbuffers as textures. Duh. Checkpoint because I'm about to rewrite a bunch of code. 2017-12-09 19:31:15 +00:00
David Schleef
4c892cb683 [040/906] * sys/glsink/Makefile.am: * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glimagesink.c: * sys/glsink/glimagesink.h: * sys/glsink/glvideo.c: * sys/glsink/glvideo.h: * sys/glsink/gstglbuffer.c: * sys/glsink/gstglbuffer.h: * sys/glsink/gstgldownload.c: * sys/glsink/gstglfilter.c: * sys/glsink/gstglupload.c: * sys/glsink/gstopengl.c: Switch to using framebuffer_objects instead of GLXPixmaps, because that's what my driver supports. Remove GLDrawable, since GstGLDisplay now has a default drawable and context. 2017-12-09 19:31:15 +00:00
David Schleef
d41abaed50 [037/906] * sys/glsink/Makefile.am: * sys/glsink/glextensions.c: * sys/glsink/glextensions.h: * sys/glsink/glvideo.c: Add vblank synchronization. Isn't really working on my driver. :( 2017-12-09 19:31:15 +00:00
Tim-Philipp Müller
b60cc0274c appsrc: add support for pushing buffer lists
And samples that carry buffer lists.

https://bugzilla.gnome.org/show_bug.cgi?id=752363
2017-12-09 11:09:16 +00:00
Matt Staples
4b4f8d1a05 rtsp: Register GstRTSPMessage as a boxed type
Registering GstRTSPMessage as a boxed type allows it to be conveniently
used as an argument to signals, a-la GstSDPMessage, and general usage
from bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=762884
2017-12-06 10:40:55 +02:00
Havard Graff
1066690b14 audiodecoder: fix buffer leak in error code path 2017-12-05 20:10:58 +00:00
Thibault Saunier
a37f4eeff8 audio: Add missing G_BEGIN/END_DECLS 2017-12-01 10:15:56 -03:00
Thiago Santos
17e1e308a3 codec-utils: add some missing gi annotations
Missing some array and out parameters annotations

https://bugzilla.gnome.org/show_bug.cgi?id=790950
2017-11-30 01:24:14 -08:00
Julien Isorce
8af7b1f70b appsink: fix end condition of query drain handler
The while loop should end when all buffers "and" the preroll
buffer are consumed but this means to continue waiting if there
are still some pending buffers "or" preroll buffer.

The unit test was correct but racy because of this mistake.
I.e. because of the wrong "and" the while could finish too early.

cd tests/check && GST_CHECKS=test_query_drain make elements/appsink.forever

https://bugzilla.gnome.org/show_bug.cgi?id=789763
2017-11-29 15:09:04 +00:00
Tim-Philipp Müller
4bfba1dcda video: add missing GST_EXPORT 2017-11-26 18:14:39 +00:00
Sebastian Dröge
d33c407f6b rtp: Require gconstpointer instead of gpointer for gst_rt[c]p_buffer_new_copy_data() 2017-11-17 14:14:55 +02:00
Edward Hervey
4c2f91d69e discoverer: Don't remove element when switching to PLAYING
There is a race going on somewhere when we attempt to remove elements
*while* the parent container is switching to PLAYING.

In order to avoid this issue with discoverer, make sure we never
remove elements while switching to PLAYING.
2017-11-15 10:55:56 +01:00
Edward Hervey
9c4b3b1ee7 discoverer: Don't add pads/elements when cleaning up
There is no need to add more pads/elements since we are already done.
2017-11-15 10:55:55 +01:00
Edward Hervey
4636b8dd6f discoverer: Remove probe when done 2017-11-15 10:55:55 +01:00
Sebastian Dröge
b9aaa7f4f2 audiobasesink: Print signed time offset as a signed number 2017-11-08 19:24:55 +02:00
Sebastian Dröge
9bbcccc21e audiostreamalign: Add G_BEGIN_DECLS/G_END_DECLS 2017-11-08 19:24:55 +02:00
Edward Hervey
89238f9de1 discoverer: Don't switch to PLAYING if we saw an error
If we saw an error on the bus, we can't be guaranteed that element will
function properly anyway. Avoids weird state change races also
2017-11-04 19:48:13 +01:00
Edward Hervey
fcf09c18f2 Revert "discoverer: Avoid race of adding elements while stopping"
This reverts commit 9a8cb29970.

The problem is deeper down the stack
2017-11-04 19:09:19 +01:00
Edward Hervey
ae865ec1d1 rtcpbuffer: fix left shift override
Needs to be cast to the target type
2017-11-04 16:56:10 +01:00
Edward Hervey
9a8cb29970 discoverer: Avoid race of adding elements while stopping
This would result in a lot of warnings regarding elements not being
in NULL state when removed, or even leaked elements.

Instead make sure we take the lock and check whether we are processing
or not before allocating or adding anything to the pipeline
2017-11-04 16:13:06 +01:00
Edward Hervey
31d5ac15b2 video-converter: Fix undefined left shift
Cast value to target type
2017-11-04 12:18:39 +01:00
Mathieu Duponchelle
c493c564ba codecutils: improve input validation in opus header parsing
Invalid input files do not warrant assertions. Instead
output error messages and let the error bubble up.
2017-11-03 17:25:47 +01:00
Justin Kim
91179622eb sdpmessage: add_attribute accepts NULL value
The attribute can be defined without value regardless session-level
or media-level.
Although `gst_sdp_message_insert_attribute` can be used to set NULL,
it would be easier if `gst_sdp_message_add_attribute` accepts NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=789841
2017-11-03 17:56:39 +11:00
Tim-Philipp Müller
fc94627778 audioaggregator: use new gst_element_foreach_sink_pad()
Instead of gst_aggregator_iterate_sinkpads() which will
soon be removed.

https://bugzilla.gnome.org/show_bug.cgi?id=785679
2017-11-02 13:02:07 +00:00
Tim-Philipp Müller
5d3795163b audioaggregator: make class padding larger 2017-11-02 11:44:54 +00:00
Edward Hervey
24a5a03d27 vorbistag: Fix previous comment
We already NULL-ended the string, don't use the bogus cur_size
2017-11-02 10:43:02 +01:00
Edward Hervey
ee55f94ac0 riff-media: Handle strf_data being NULL
Instead of trying to get the size of a NULL buffer :)
2017-11-02 09:19:21 +01:00
Edward Hervey
62081fe583 vorbistag: Check whether tag name is valid
In the same way we check before whether the content of the tag
is UTF-8
2017-11-02 08:19:13 +01:00
Edward Hervey
7e28f6c076 discoverer: Check return values
The target pad of a ghostpad could have gone (due to shutdown taking
place for example). Check for it's existence before doing anything
with it.
2017-11-02 08:04:27 +01:00
Edward Hervey
39ba6427f1 discoverer: Uniquely name elements
Helps identifying actual queue/fakesink usage. There seems to be
a race in discoverer, this should help track it down.
2017-11-02 07:18:17 +01:00
Sebastian Dröge
9c2d5e863e rtspconnection: Allow setting a custom accept-certificate function for manually checking a TLS certificate for validity
https://bugzilla.gnome.org/show_bug.cgi?id=785024
2017-11-01 13:41:42 +02:00
Edward Hervey
8e867aefe0 vorbistag: Fix leak in error case
Don't leak the vendor_string on error cases
2017-11-01 10:53:54 +01:00
Justin Kim
33709106e9 rtcpbuffer: Add XR type
RTCP XR provides supplements information of the report blocks
from SR and RR. This patch is for downgrading warnings when
XR is detected before implementing entire block types of RFC3611.

https://bugzilla.gnome.org/show_bug.cgi?id=789743
2017-11-01 10:54:10 +02:00
Justin Kim
d100180ce3 sdpmessage: do not append NULL value for session-level attr
If an attribute is defined without value, the generated text
should be 'a=key' rather than 'a=key:'. For media-level, it
has already been done.

https://bugzilla.gnome.org/show_bug.cgi?id=789742
2017-11-01 17:09:47 +11:00
Edward Hervey
cb0b73672c Update disted orc file
For latest orc fixes
2017-10-31 11:57:23 +01:00
Guillaume Desmottes
7950a4614c videoencoder: add qos property
This new property control if the encoder base class should gather QoS
stats and if subclasses should use them by dropping late frames.

https://bugzilla.gnome.org/show_bug.cgi?id=789467
2017-10-25 14:22:15 +02:00
Ashish Kumar
346c24dc4b gst-plugins-base: gstaudiochannels: Handled buffer mapping failure
https://bugzilla.gnome.org/show_bug.cgi?id=789458
2017-10-25 13:04:28 +02:00
Matthew Waters
a240880664 Revert "videoencoder: flush encoder in transition PAUSED->READY"
This reverts commit 877664a414.
2017-10-22 01:00:10 +11:00
Matthew Waters
a81b5a95ba Revert "videodecoder: flush decoder in transition PAUSED->READY"
This reverts commit 6e9edc3031.
2017-10-22 01:00:08 +11:00
Matthew Waters
06aba17d19 Revert "audioencoder: flush encoder in transition PAUSED->READY"
This reverts commit 2dcdd13512.
2017-10-22 01:00:06 +11:00
Matthew Waters
b8369ba20d Revert "audiodecoder: flush decoder in transition PAUSED->READY"
This reverts commit e7cf4c058d.
2017-10-22 01:00:03 +11:00
Olivier Crête
c2b462837b audioaggregator: Accept buffer with no data, but duration and gap flag
These are produced from GAP events by the base class.

https://bugzilla.gnome.org/show_bug.cgi?id=784846
2017-10-21 12:06:08 +02:00
Nicola Murino
877664a414 videoencoder: flush encoder in transition PAUSED->READY
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:19 +11:00
Nicola Murino
6627dd3ae3 videoencoder: remove the lock from gst_video_encoder_flush
The lock is already taken before calling the flush method and can lead to
deadlock for some encoders that need to take the same lock from another
thread while flushing

https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:10 +11:00
Nicola Murino
6e9edc3031 videodecoder: flush decoder in transition PAUSED->READY
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:07 +11:00
Nicola Murino
2dcdd13512 audioencoder: flush encoder in transition PAUSED->READY
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:55:04 +11:00
Nicola Murino
e7cf4c058d audiodecoder: flush decoder in transition PAUSED->READY
https://bugzilla.gnome.org/show_bug.cgi?id=787311
2017-10-20 01:54:54 +11:00
Guillaume Desmottes
bcca3b926c videoencoder: implement QoS
It allows encoders to detect and drop input frames which are already
late to increase the chance of the pipeline to catch up.

The QoS logic and code is directly copied from gstvideodecoder.c.

https://bugzilla.gnome.org/show_bug.cgi?id=582166
2017-10-19 16:26:22 +02:00
Thibault Saunier
6d4e17eee8 doc: Add some missing/malformed Since markers 2017-10-16 14:17:00 +02:00
Stefan Sauer
023170e2f8 audioaggregator: improve readability in offset calculation
Don't reuse the offset variables will contain a sample offset for an
intermediate time value. Instead add a segment_pos variable of type
GstClockTime for this. Use The clock-time macros to check if we got
a valid time.
2017-10-15 10:29:20 +02:00
Stefan Sauer
bd34243177 audioaggregator: move comment to the place it is meant to be
This probably got shifted after some changes.
2017-10-14 18:20:30 +02:00
Mathieu Duponchelle
d4db88772b audioconvert: allow empty mix matrix
When an empty mix matrix is passed, audio-channel-mixer
will now generate a (potentially truncated) identity matrix,
this replicates the behaviour of audiomixmatrix in first-channels
mode.

https://bugzilla.gnome.org/show_bug.cgi?id=788833
2017-10-11 22:57:38 +02:00
Mathieu Duponchelle
545e0b003b API: gst_discoverer_info_get_live
https://bugzilla.gnome.org/show_bug.cgi?id=783722
2017-10-11 19:47:19 +02:00
Mathieu Duponchelle
2a26baf4be API: gst_discoverer_audio_info_get_channel_mask
https://bugzilla.gnome.org/show_bug.cgi?id=783722
2017-10-11 19:46:29 +02:00
Mathieu Duponchelle
8e2805cf06 audio-converter: remove unused mix_matrix private field 2017-10-11 17:00:08 +02:00
Thibault Saunier
20fae3f1e0 rtsp: Start implementing support for RTSP 2.0
Properly handle protocol version in the connection

Add the following headers types:
  * Pipelined-Request
  * Media-Properties
  * Seek-Style
  * Accept-Ranges

https://bugzilla.gnome.org/show_bug.cgi?id=781446
2017-10-05 13:16:03 -03:00
Stefan Sauer
1b84283396 audioaggregator: remove buffer!=NULL check
Acording to the logic this cannot happen (we already check this before). So
add a assert like we do above and remove the check. This make it clearer that
we check for the offset range.
Also remove a dead assignment since we reassign this a few lines below.
2017-10-05 18:12:29 +02:00
Stefan Sauer
f46d80f07d audioaggreator: update docs
Remove wrote references to collectpads. Document the units.
2017-10-05 17:57:35 +02:00
Havard Graff
43985b363d meson: remove vs_module_defs
GST_EXPORT should handle it.
2017-10-05 13:53:14 +01:00
Rico Tzschichholz
fb3455d7a1 meson: Add some missing args and dependencies in the gir generation 2017-10-05 13:51:19 +01:00
Stefan Sauer
6ecfd599a5 audioaggregator: pass blocksize to mix_buffer()
No need to recalc the value twice per run. Establishes that it is the same
value.
2017-10-05 08:57:09 +02:00
Stefan Sauer
926fed92e9 audioaggregator: rename _fill_buffer() to _queue_new_buffer()
It does not fill a buffer. Rename it and add a short comment.
2017-10-05 08:57:09 +02:00
Reynaldo H. Verdejo Pinochet
e81c334ca9 Use proper GtkDoc notation for NULL/FALSE/TRUE 2017-10-03 14:31:18 -07:00
Stefan Sauer
5fd4e71da3 audioaggregator: reduce variable scope
This is a non-functional change that makes the code more alike to the previous
check. I should be more obvious when we drop a buffer.
2017-10-02 17:01:36 +02:00
Stefan Sauer
17848d7c0c audioaggregator: update comment for aggregate
Replace collect-pads left-over. Remove first paragraph, we're not doing this.
Remove 3), 4) since this is not per pad.
2017-10-02 17:01:36 +02:00
Thibault Saunier
c610076d85 meson: Add mssing GstBase-1.0 include in the gir generation 2017-09-28 21:56:29 -03:00
Sebastian Dröge
bf68e74403 audio: Add stream align API for getting timestamp at discont and number of samples since discont
https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:24 +03:00
Sebastian Dröge
d2fd740388 audio: Add reverse playback support to GstAudioStreamAlign
https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:07 +03:00
Sebastian Dröge
ec1e20ffe5 audio: Add helper object for audio discontinuity detection and sample alignment
This is the same code that is in decklinkaudiosrc, audioringbuffer,
audiomixer and various other places. Have it once instead of copying it
everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=787560
2017-09-28 14:06:05 +03:00
Mathieu Duponchelle
4196e67ff1 [API]: GST_AUDIO_CONVERTER_OPT_MIX_MATRIX
Taken from audiomixmatrix, credits to Vivia Nikolaidou

https://bugzilla.gnome.org/show_bug.cgi?id=785471
2017-09-22 16:19:59 +02:00
Mathieu Duponchelle
877d6faeea [API]: gst_audio_channel_mixer_new_with_matrix
+ Refactor previous constructor to call on that new constructor

+ Reimplement is_passthrough to strictly check whether the matrix
  is an identity matrix, comparing channel-masks was incorrect:
  the mixer may be remixing from a list of positions to the same
  list of positions, but ordered differently, and reciprocally,
  the mixer may be remixing from a list of positions to another
  list of positions identically ordered

+ Remove unused tmp field, must have been a refactoring leftover

https://bugzilla.gnome.org/show_bug.cgi?id=785471
2017-09-22 16:19:58 +02:00
Julien Isorce
fc86194595 appsink: on drain wait for buffers to be consumed
So that an upstream element can claim all buffers to return to its buffer pool.

Added unit test 'test_query_drain'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786739
2017-09-19 14:33:36 +01:00
Julien Isorce
7b1056b946 appsink: also clear preroll buffer in _pull_sample
If someone calls gst_app_sink_try_pull_sample they are
probably no longer interested in any preroll samples.

Useful if the user has not registered a preroll appsink callback.

Also added unit test 'test_do_not_care_preroll'
  make elements/appsink.check
that fails without this patch.

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-19 09:06:44 +01:00
Stefan Sauer
ceee4db9d0 audioaggregator: fix typo in comment 2017-09-17 21:06:48 -07:00
Julien Isorce
68518acb53 appsink: unref preroll buffer upon pull
There is no reason for appsink to hang onto the preroll buffer.
If needed, the application can just keep a ref on this buffer
after calling gst_app_sink_try_pull_preroll.

Also added unit test 'test_pull_preroll'
  make elements/appsink.check

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-13 14:11:27 +01:00
Julien Isorce
c134a3c21b appsink: rename GstBuffer *preroll to preroll_buffer
priv->preroll can be confused with basesink_class->preroll

https://bugzilla.gnome.org/show_bug.cgi?id=786740
2017-09-13 14:06:43 +01:00
Nicolas Dufresne
5d6fbcb0af video-filter: Support allocation pool with pool object
This is used to indicate upstream the requirement in buffers
while no buffer pool can be provided. In this case, only
configure the pool with caps/size/min/max if we have caps,
which we only parsed when there was no allocation pool.

https://bugzilla.gnome.org/show_bug.cgi?id=730758
2017-09-06 14:20:46 -04:00
Matthew Waters
5d3d764568 video/affinetransformationmeta: use the provided doc comment for the struct 2017-08-24 19:11:29 +10:00
Mathieu Duponchelle
28943c4399 videoutilsprivate: fill more video fields.
__gst_video_element_proxy_caps is called by
__gst_video_element_proxy_getcaps with caps set to the caps
allowed downstream. As we didn't set colorimetry or
chroma-site on the resulting caps, upstream considered it
possible to use whatever values it wanted, leading to
not negotiated errors later on.

As the description for that function is:
"Takes caps and copies its video fields to tmpl_caps",
it seems legitimate to set these fields there.

https://bugzilla.gnome.org/show_bug.cgi?id=786172
2017-08-14 12:42:57 +02:00
Philippe Normand
d375a28a37 appsrc: handle duration query only if the property was set
https://bugzilla.gnome.org/show_bug.cgi?id=786200
2017-08-12 16:23:27 +01:00
Tim-Philipp Müller
7acdfa3753 pbutils: sprinkle more GST_EXPORT 2017-08-10 13:57:26 +01:00
Tim-Philipp Müller
ece4a096a1 libs: add some more missing GST_EXPORT 2017-08-10 10:27:23 +01:00
Mark Nauwelaerts
00fa39befa audioencoder: also adjust sample count upon discont to avoid ts overflow
Only adjusting the base_ts might lead to a negative ts and as such integer
overflow into a huge timestamp which then propagates into the granulepos
and so on.  Instead, resync to incoming buffer timestamp using both base_ts
and sample count rather than only base_ts.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=785948
2017-08-09 09:32:55 +02:00
Sebastian Dröge
f996b05644 xmptag: Stop parsing GPS coordinate if sscanf() fails
CID 1139610
2017-08-04 13:39:31 +03:00
Tim-Philipp Müller
6105420bfc appsrc: fix doc typos 2017-08-01 17:08:08 +01:00
Sebastian Dröge
8be5030d47 appsrc: Add out annotations to gst_app_src_get_latency() 2017-08-01 18:49:23 +03:00
Stefan Sauer
4080b844c0 audioaggregator: use local var
Instead of the self->priv-> deref use the local var we created already.
2017-07-26 09:43:52 +02:00
Sebastian Dröge
01f4d6494a videotimecode: Add GST_VIDEO_TIME_CODE_INIT macro 2017-07-25 10:03:41 +03:00
Satya Prakash Gupta
5cf883c8ed videofilter: Unmap input frame if mapping output frame failed
https://bugzilla.gnome.org/show_bug.cgi?id=785341
2017-07-24 17:05:17 +03:00
Sebastian Dröge
ae8d0cf3ac videodecoder: Make sure we have an actually writable buffer when modifying metadata
avviddec keeps references to the buffers internally for example, in
which case we need to do a shallow copy of the buffer.
2017-07-24 16:48:17 +03:00
Sebastian Dröge
79424411e7 videometa: Don't crash if adding the timecode meta to a buffer failed 2017-07-24 16:29:53 +03:00
Tim-Philipp Müller
6461ad057c fft: don't generate g-i files for bindings
The g-i stuff for this helper lib was never usable from bindings
anyway and there are problems with the latest gobject-introspection,
so we might just as well remove the g-i integration entirely for
this lib.
2017-07-19 23:08:12 +01:00
Tim-Philipp Müller
d95e62be82 audio: mark symbols explicitly for export with GST_EXPORT 2017-07-18 12:46:57 +01:00
Stefan Sauer
35a4149caf aggregator: code cleanups
Fix comment typos, some copy'n'paste in logging. Add more doc comments.
2017-07-13 22:02:17 +02:00
Heekyoung Seo
65406774ae convertframe: Fix leak in case of vcrop is disabled
https://bugzilla.gnome.org/show_bug.cgi?id=784639
2017-07-07 09:26:22 +03:00
Sebastian Dröge
24fe473a01 libs: Export boxed type copy/free functions for the remaining types 2017-06-20 10:06:17 +03:00
Arun Raghavan
398a6a2a1b navigation: Add some validation while sending key/mouse events
https://bugzilla.gnome.org/show_bug.cgi?id=783330
2017-06-06 11:12:18 +05:30
Scott D Phillips
8d1b45ded6 navigation: Add introspection annotations for some output parameters
The missing annotations prevented proper usage from introspected
bindings like python.

https://bugzilla.gnome.org/show_bug.cgi?id=783330
2017-06-06 11:03:29 +05:30
Scott D Phillips
09af0f1fbd video: update orc generated files
Includes updates from:

  103d265 Fix RGBA and ABGR pack/unpack on big endian cpu

https://bugzilla.gnome.org/show_bug.cgi?id=783328
2017-06-01 23:21:48 +01:00
Wim Taymans
103d265cf0 Fix RGBA and ABGR pack/unpack on big endian cpu
The pack and unpack functions for RGBA and ABGR only work for little
endian cpus. Add variants for big endian as well.
2017-06-01 17:47:22 +02:00
Mathieu Duponchelle
5d6b3b60cb gst-discoverer: use state changes instead of ASYNC_DONE.
And monitor no_more_pads.

With live sources such as rtsp, uridecodebin only creates its
child decodebins between PAUSED and PLAYING.

This means that the ASYNC_DONE it posts when getting NO_PREROLL
in its change_state method gets immediately propagated by the
GstBin parent class, as opposed to a situation where a
decodebin has been added to it already, and has posted ASYNC_START.

The proposed solution, instead of simply waiting for ASYNC_DONE,
and finishing prematurely in that case, waits for three conditions
to be true:

* the uridecodebin needs to have emitted no_more_pads
* its current state must be PAUSED if not live, PLAYING otherwise
* There must be no "pending subtitle pads", ie pads where we haven't
  received tags yet.

All these conditions are checked in the message handler, as we
post custom messages on it when we get subtitle tags or no_more_pads.

https://bugzilla.gnome.org/show_bug.cgi?id=783257
2017-05-31 05:10:21 +02:00
Olivier Crête
930c3cea40 audioaggregate: Don't hold object locks across calls to aggregate_one
https://bugzilla.gnome.org/show_bug.cgi?id=782878
2017-05-21 18:44:53 +02:00
Tim-Philipp Müller
18e55dcdc0 pbutils: fix stand-alone version header include
Include gst headers for GST_EXPORT.
2017-05-21 17:43:12 +01:00
Olivier Crête
55ab23cc30 audioaggregator: Use downstream allocator and params if available
https://bugzilla.gnome.org/show_bug.cgi?id=746529
2017-05-21 13:24:29 +02:00
Edward Hervey
dfa548dc5b videodecoder: Don't queue frames in TRICKMODE_KEY_UNITS
When the input is TRICKMODE_KEY_UNITS, we expect to only receive keyframes
which we want to decode/push immediately. Therefore don't queue them.

If upstream didn't send just keyframes (which is the ideal situation), two
different things can happen:
1) Either the subclass checks the segment flags and properly configures
 the decoder implementation to only decode/output keyframes,
2) Or the subclass really decodes and outputs everything, in which case
 the reverse frames will end up arriving "late" downstream (and will
 be dropped). If upstream did properly send GOP in reverse order, we
 still end up just showing keyframes (but at the overhead of decoding
 everything).

https://bugzilla.gnome.org/show_bug.cgi?id=777094
2017-05-20 17:37:27 +02:00
Olivier Crête
8a302f1815 aggregator: Remove unused GST_FLOW_NOT_HANDLED 2017-05-20 16:21:17 +02:00
Matthew Waters
57673e608e aggregator: add simple support for caps handling
Modelled off the videoaggregator caps handling as that seems the most
mature aggregtor-using implementation that has caps handling there is.

https://bugzilla.gnome.org/show_bug.cgi?id=776931
2017-05-20 16:21:17 +02:00
Olivier Crête
26819ba296 aggregator: Delay clipping to output thread
This is required because the synchronized events like caps or segments
may only be processed on the output thread.

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Olivier Crête
1e7aaf775f aggregator: Simplify clip function
The return value was ignored anyway

https://bugzilla.gnome.org/show_bug.cgi?id=781673
2017-05-20 16:21:16 +02:00
Jan Schmidt
2980e96a50 videodecoder: Output mono multiview caps if none specified
Always put multiview-caps onto the output caps, assuming
mono if we've got no other information. It's still easy for
downstream elements to override using a capssetter or event
probe if desired.

https://bugzilla.gnome.org/show_bug.cgi?id=776172
2017-05-19 18:02:36 +02:00
Sebastian Dröge
cc281e80d6 discoverer: Clean up more fields to decide if parent/child streams are equivalent
https://bugzilla.gnome.org/show_bug.cgi?id=782780
2017-05-18 13:24:19 +03:00
Sebastian Dröge
5614862de1 Revert "discoverer: Consider parent/child streams the same if they have caps with the same name"
This reverts commit 478b7a8eb4.

video/mpeg,systemstream=true / false distinguishes between container and
elementary stream.
2017-05-18 13:13:58 +03:00
Sebastian Dröge
478b7a8eb4 discoverer: Consider parent/child streams the same if they have caps with the same name
Child streams could have more accurate width/height or various other
information added. If they have the same name, they are likely to be the
same streams.

https://bugzilla.gnome.org/show_bug.cgi?id=782697
2017-05-18 11:21:55 +03:00
Sebastian Dröge
67fb3b12ee gst: Clear floating flag in constructor of all GstObject subclasses that are not owned by any parent
https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:52 +03:00
Sebastian Dröge
2a8784e218 audioclock: Sink the reference in the constructor
This is now needed as GstClock does not do that internally anymore,
because that broke bindings.

And mark the function correctly as (transfer full), which it already was
before.

https://bugzilla.gnome.org/show_bug.cgi?id=743062
2017-05-17 10:40:52 +03:00
Sebastian Dröge
7185a7ac98 allocators: Annotate constructors with (transfer floating)
GstAllocator is a GstObject and as such uses floating references.

https://bugzilla.gnome.org/show_bug.cgi?id=702960
2017-05-17 10:40:52 +03:00
Nicolas Dufresne
1ceb40cd1e audioringbuffer: Accept MPEG 1 layer 3 version 2.5
https://bugzilla.gnome.org/show_bug.cgi?id=781929
2017-05-16 15:37:16 -04:00
Tim-Philipp Müller
820c34740f video: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:23:12 +01:00
Tim-Philipp Müller
af78896a82 tag: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:23:08 +01:00
Tim-Philipp Müller
bb7e401cb3 sdp: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:23:08 +01:00
Tim-Philipp Müller
587cf82fc1 rtsp: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:45 +01:00
Tim-Philipp Müller
33ae84fd1c rtp: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:42 +01:00
Tim-Philipp Müller
a1ec342b77 riff: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:42 +01:00
Tim-Philipp Müller
1b6494a644 pbutils: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:38 +01:00
Tim-Philipp Müller
7ae9b4ac4e app: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:34 +01:00
Tim-Philipp Müller
fda887179e fft: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:30 +01:00
Tim-Philipp Müller
d7dd381f78 audio: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:22:26 +01:00
Tim-Philipp Müller
d6a12c0a8f allocators: mark symbols explicitly for export with GST_EXPORT 2017-05-16 01:11:46 +01:00
Tim-Philipp Müller
f4494dab87 rtpbasedepayload: fix class description in docs 2017-05-15 16:20:01 +01:00
Tim-Philipp Müller
60e9629860 g-i: no need to load registry in g-i scanner 2017-05-04 23:55:20 +01:00
Sebastian Dröge
a3656ba29b libs: Check if meta transform_func is NULL before using it
https://bugzilla.gnome.org/show_bug.cgi?id=782050
2017-05-02 14:31:14 +03:00
Guillaume Desmottes
a8edddb3d6 video: fix typo in GstVideoAlignment doc
https://bugzilla.gnome.org/show_bug.cgi?id=781490
2017-04-19 10:50:41 +01:00
Tim-Philipp Müller
5185cce994 audio: resampler: fix typos in docs 2017-04-13 16:40:02 +01:00
Rico Tzschichholz
07a427b403 meson: Pass --c-include accordingly to GIR builds 2017-04-13 12:23:32 +01:00
Tim-Philipp Müller
4246198fb3 No need for newlines in debug log statements 2017-04-12 09:58:49 +01:00
Claudio Saavedra
6b983a79e3 meson: install gstappsink.h
https://bugzilla.gnome.org/show_bug.cgi?id=781168
2017-04-11 11:51:36 +03:00
Sebastian Dröge
78ae1411ce Revert "tag: Fix enum nicks for backwards compatibility"
This reverts commit 595b29519a.

Bindings are not using the nicks but the actual enum names.
2017-04-10 14:34:23 +03:00
Sebastian Dröge
a69befecd3 app/tag: Fix build with srcdir!=builddir 2017-04-10 14:25:30 +03:00
Sebastian Dröge
595b29519a tag: Fix enum nicks for backwards compatibility
The enum values got the wrong name at some point, something to fix for 2.0.
2017-04-10 14:02:01 +03:00
Rico Tzschichholz
dc4e041f07 app/tag: Add missing sources/headers to the GIR build 2017-04-10 13:55:58 +03:00
Sebastian Dröge
8169cfa737 meson: Define missing variable 2017-04-09 12:54:12 +03:00
Sebastian Dröge
e74e1e80fa tag: Generate GLib enums/flags with glib-mkenums 2017-04-09 12:51:52 +03:00
Sebastian Dröge
b56dcb3e20 app: Generate GLib enums with glib-mkenums 2017-04-09 12:29:55 +03:00
Sebastian Dröge
e05127a510 encoding-profile: It's (transfer none), not (transfer-none) 2017-04-09 12:19:22 +03:00
Sebastian Dröge
8b468c3c36 audio: Generate audiobasesink/src and audiocdsrc GLib enums automatically
And ensure that GstAudioBaseSrcSlaveMethod's re-timestamp stays
re-timestamp and doesn't become retimestamp.
2017-04-09 11:49:50 +03:00
Vivia Nikolaidou
bdccc98ee2 timecode: Fix invalid drop-frame timecode right before a new second
The previous fix was only working for non-drop-frame timecodes.

https://bugzilla.gnome.org/show_bug.cgi?id=779866
2017-04-09 11:15:27 +03:00
Matthew Waters
0dcab96d88 sdp/media: caps_from_media() don't modify the input media
Performing a gst_sdp_media_get_caps_from_media() would result in
changing fields in the GstSDPMedia violating the const tag in the
function declaration.

Before there would be a line with a=rtpmap:96 VP8/90000
after, that attribute would only contain a=rtpmap:96

Fix by performing modifications on duplicated strings instead of on
the internal values.

Also add a simple test for checking that the representation doesn't
change by a gst_sdp_media_get_caps_from_media()
2017-04-03 16:49:12 +10:00
Matthew Waters
9d3622e1bd sdp: add g_return*_if_fail assertions on invalid inputs
Prevents some programming errors and invalid modifications.
2017-04-03 16:49:12 +10:00
Matthew Waters
fa243654cf sdp/message: fix segfault copying NULL in the boxed copy impl
Allows passing NULL as a value to g_object_set and as signal
parameters without crashing.
2017-04-03 16:49:12 +10:00
Vincent Penquerc'h
32ef8f54d4 video-converter: fix scaler leak
https://bugzilla.gnome.org/show_bug.cgi?id=780764
2017-03-31 16:14:50 +01:00
Arun Raghavan
a6742e81b9 convertframe: Fix async video sample conversion with non-default context
The GSource for dealing with timeouts in
gst_video_convert_sample_async() might be attached to a non-default
context, so we should not be using g_source_remove() on the returned ID.

The correct thing to do is to keep a reference to the actual GSource and
then call g_source_destroy() on it.

https://bugzilla.gnome.org/show_bug.cgi?id=780297
2017-03-20 17:23:58 +05:30
Jan Schmidt
2d3e69dca3 videodecoder: Add debug output tracking decode-after-flush
Track how long it takes to generate the first buffer after a flush
as a simple measure of how efficient the decoder is at skipping /
rushing to get to the first decode.
2017-03-18 02:03:47 +11:00
Sebastian Dröge
ce9bac465a video-format: Shift correctly when packing I420_12BE 2017-03-17 13:43:04 +02:00
Sebastian Dröge
eda8bd4de1 video-format: Order all formats in GST_VIDEO_FORMATS_ALL like in the enum
And remove duplicated entries.
2017-03-17 13:28:02 +02:00
Arun Raghavan
389a3c4461 encoding-profile: Mark format caps as transfer-none in profile creation 2017-03-17 16:01:57 +05:30
Sebastian Dröge
95ddfdee4e video-format: Add Since markers to all new formats from 1.2
https://bugzilla.gnome.org/show_bug.cgi?id=780100
2017-03-16 17:38:02 +02:00
Sebastian Dröge
77f802f8e6 video: Add I420/I422/Y444_12LE/BE and GBRA video formats
https://bugzilla.gnome.org/show_bug.cgi?id=780100
2017-03-16 17:32:27 +02:00
Emeric Grange
2fcab9e7ef video: Add GBRA_10LE/BE, GBR_12LE/BE, GBRA_12LE/BE pixel formats
With additional bugfixes from Sebastian Dröge <sebastian@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=780100
2017-03-16 16:44:12 +02:00
Thibault Saunier
099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00
Vivia Nikolaidou
a122135194 videotimecode: Fix invalid timecode right before a new second
When initializing a timecode from a GDateTime, and the remaining time
until the new second is less than half a frame (according to the given
frame rate), it would lead to the creation of an invalid timecode, e.g.
00:00:00:25 (at 25 fps) instead of 00:00:01:00. Fixed.

https://bugzilla.gnome.org/show_bug.cgi?id=779866
2017-03-10 17:47:46 +02:00
Matthew Waters
d15b0f4844 videodecoder: fix build error on i386
Use G_GUINT64_FORMAT for guint64 values.

Introduced by fcb63e77a9

Found by Alexander Larsson

gstvideodecoder.c: In function 'gst_video_decoder_have_frame':
gstvideodecoder.c:3312:51: error: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'guint64 {aka long long unsigned int}' [-Werror=format=]
2017-03-10 18:23:48 +11:00
Sebastian Dröge
9460d40054 videotimecode: Unref GDateTime in error cases 2017-03-08 15:47:52 +02:00
Jan Schmidt
052d34478f videodecoder: Fix a leak introduced in fcb63e
CID: 1402055
2017-03-06 19:14:48 +11:00
Jan Schmidt
6ac79da6a2 videodecoder: Restrict frame timestamp guessing in reverse mode
Don't guess a timestamp of the start of the segment when running
in reverse mode, as more likely it means we're discontinuous somewhere
in the middle of the segment, and we'll fix up timestamps once
the frames are decoded and reversed.
2017-03-04 00:30:37 +11:00
Jan Schmidt
fcb63e77a9 videodecoder: Store buffer information even without PTS
When a PTS is not set, we still want to store the rest of the
buffer information, or else we lose important things like the
duration or buffer flags when parsing.
2017-03-04 00:30:37 +11:00
Sebastian Dröge
daa0e18c75 videodecoder: Handle return value of gst_video_decoder_drain()
CID 1362896
2017-02-28 15:11:42 +02:00
Sebastian Dröge
0f7b9dbe75 video-converter: Give a name to the thread-pool threads
This way they can be distinguished from any other threads in the same
process.
2017-02-24 10:04:21 +02:00
Sebastian Dröge
6d20fcc9df video-converter: Only lock the thread pool mutex when running with more than 1 thread
There's no reason to lock anything if only the current thread is ever
going to do any work.
2017-02-24 10:02:28 +02:00
Sebastian Dröge
49ac382b47 video-converter: Implement multi-threaded scaling/conversion
This adds a property to select the maximum number of threads to use for
conversion and scaling. During processing, each plane is split into
an equal number of consecutive lines that are then processed by each
thread.

During tests, this gave up to 1.8x speedup with 2 threads and up to 3.2x
speedup with 4 threads when converting e.g. 1080p to 4k in v210.

https://bugzilla.gnome.org/show_bug.cgi?id=778974
2017-02-23 21:55:29 +02:00
Georg Lippitsch
d15ad75caf videotimecode: Validate for drop-frame correctness
In gst_video_time_code_is_valid, also check for invalid
ranges when using drop-frame TC. Refactor some code which
broke after the check was added.

https://bugzilla.gnome.org/show_bug.cgi?id=779010
2017-02-23 19:56:26 +02:00
Georg Lippitsch
b3df5786a9 videotimecode: Init from GDateTime
Add a function to init the time code from a GDateTime

https://bugzilla.gnome.org/show_bug.cgi?id=778702
2017-02-23 19:50:39 +02:00
Sebastian Dröge
ab854b04ba video-scaler: Fix upscaling if width & height change and we're starting not at y=0
It was taking the initial input y-offset from the output value, which
only works for y=0 (in which case both are the same). If y > 0, we would
always stay behind the requested input offset and never ever read
anything from the input.
2017-02-15 21:43:32 +02:00
Thibault Saunier
d5fbc905e3 discoverer: Ignore more parser related fields when comparing streams
The parser might do some conversion on a stream but the stream keeps
being the same, and we need to make sure GstDiscoverer detects it is the
case.

https://bugzilla.gnome.org/show_bug.cgi?id=778298
2017-02-08 15:56:34 -03:00
Jan Schmidt
5903e2dfbb audioringbuffer: Also add FLAC to debug strings.
Oops, also add FLAC to the debug strings array.

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-02-04 14:46:42 +11:00
Jan Schmidt
04c14de1d1 audioringbuffer: Prevent overflow of debug names array
Add new audio types to the list of strings used for debug
so we don't index past the end of that array.

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-02-04 14:42:33 +11:00
Sebastian Dröge
f939f05304 audio-resampler: Fix integer overflow in clamping code
https://bugzilla.gnome.org/show_bug.cgi?id=777921
2017-01-30 12:35:04 +02:00
Tim-Philipp Müller
83e84d5acf audio: add since markers to docs for new enums
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 20:04:54 +00:00
Vincent Penquerc'h
6134dab3bb audio: add FLAC to GstAudioRingBufferFormatType
https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 13:47:39 -05:00
Olivier Crete
c46607095e audioringbuffer: Also support raw AAC
Support raw AAC streams without the ADTS header

https://bugzilla.gnome.org/show_bug.cgi?id=777655
2017-01-23 13:45:50 -05:00
Sebastian Dröge
5d505d1088 riff-media: Don't divide block align by zero channels
https://bugzilla.gnome.org/show_bug.cgi?id=777525
2017-01-20 12:41:16 +02:00
Sebastian Dröge
ef55c8a6b7 riff-media: Don't recurse in for nested WAVEFORMATEX
There was already a check for that, but it failed because
subformat_guid[0] is a guint32 and that is then casted implicitely to a
guint16 when recursing... just that we checked the uncasted value.

This caused an infinite recursion and thus stack overflow.

https://bugzilla.gnome.org/show_bug.cgi?id=777265
2017-01-18 13:11:07 +02:00
Sebastian Dröge
81d3ba3fa2 riff-media: Check for valid channels/rate before using the values
Otherwise we might divide by zero or otherwise create invalid caps.

https://bugzilla.gnome.org/show_bug.cgi?id=777262
2017-01-15 18:32:34 +01:00
Sebastian Dröge
d0c1b34288 video-converter: Fix crashes in fast-paths when converting interlaced formats with different vertical subsampling
E.g. the following pipelines fail because chroma values after the last
line are read (note: 486 % 4 == 2):

gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=UYVY" ! videoconvert ! "video/x-raw,format=I420" ! fakesink
gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=I420" ! videoconvert ! "video/x-raw,format=UYVY" ! fakesink
gst-launch-1.0 videotestsrc ! "video/x-raw,interlace-mode=interleaved,width=720,height=486,format=I420" ! videoconvert ! "video/x-raw,format=AYUV" ! fakesink
2017-01-11 18:41:14 +02:00
Vivia Nikolaidou
629e8229a7 videotimecode: New GstVideoTimeCodeInterval type, ability to add to a GstVideoTimeCode
Sometimes there is a human-oriented timecode that represents an
interval between two other timecodes. It corresponds to the human
perception of "add X hours" or "add X seconds" to a specific timecode,
taking drop-frame oddities into account. This interval-representing
timecode is now a GstVideoTimeCodeInterval. Also added function to add it to
a GstVideoTimeCode.

https://bugzilla.gnome.org/show_bug.cgi?id=776447
2017-01-11 11:05:21 +11:00
Thibault Saunier
9e86b2931d pbutils: Fix annotation in gst_encoding_profile_set_preset 2017-01-10 08:57:51 -03:00
Vivia Nikolaidou
06ff74e51d videotimecode: Add GstValue functions
Add compare, serialization and deserialization functions

https://bugzilla.gnome.org/show_bug.cgi?id=772764
2017-01-09 18:56:16 +02:00
Jan Schmidt
cca3a5b194 gst_video_guess_framerate: Don't throw away all precision
When operating on framerates near 10000fps, at least keep 1
digit of precision for calculations
2017-01-09 21:25:26 +11:00
Thibault Saunier
99c35c29ea encoding-target: Properly free temporary list 2017-01-06 11:40:20 -03:00
Thibault Saunier
46b424a38b encoding-profile: Add a way to copy an encoding profile
It is often usefull to make sure that you get a full copy of a profile.
For example you want to let the user modify it in the user interface
but still keep an unchanged version for later use.

API:
  gst_encoding_profile_copy
2017-01-06 11:40:20 -03:00
Tobias Mueller
57ff3ea72f appsrc: fix compiler warning
Initialize min and max _get_property() to gets rid of these
compiler warnings:

gstappsrc.c:741:7: error: 'max' may be used uninitialized in this function
       g_value_set_int64 (value, max);
       ^
gstappsrc.c:733:7: error: 'min' may be used uninitialized in this function
       g_value_set_int64 (value, min);
       ^
Which happens because gcc doesn't know that GST_IS_APP_SRC will never
fail here.

https://bugzilla.gnome.org/show_bug.cgi?id=752052
2016-12-25 13:15:26 +00:00
Stuart Weaver
0cf08d90c0 rtsp-url: unescape special chars in user/pass part of URL
This way special characters such as '@' can be used in
usernames or passwords, e.g.

  rtsp://view:%40dm%4An@<IP-ADDR>/media/camera1

will now parse username and password into:

  User: view
  Pass: @dm:n

https://bugzilla.gnome.org/show_bug.cgi?id=758389
2016-12-25 12:08:45 +00:00
Vineeth TM
c0a18df468 discoverer: Add support to dump dot files
Dump graphs during error/warning messages and discover is done

https://bugzilla.gnome.org/show_bug.cgi?id=758259
2016-12-25 11:49:49 +00:00
Thomas Bluemel
cd101ce8f0 id3v2: fix splitting strings in ISO-8859-1 and UTF-16 formats
When parsing NUL-terminated strings, do not include the terminating
NUL byte(s).  Depending on the encoding used, either g_utf8_validate()
failed due to this, or worse the call to g_utf16_to_utf8() would
return 0 items read on an empty string, causing it to fail parsing
certain frames.

https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:52:39 +00:00
Thomas Bluemel
da6070054f id3v2: fix handling of tags with extended headers
The extended header size value does not include itself.

https://bugzilla.gnome.org/show_bug.cgi?id=770355
2016-12-25 10:35:47 +00:00
Thibault Saunier
cd4253028e encoding-profile: Initialize variables to avoid build failures
encoding-profile.c: In function ‘get_profile_format_from_possible_factory_name’:
encoding-profile.c:1532:6: error: ‘fact’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (fact)
      ^
encoding-profile.c: In function ‘profile_from_string’:
encoding-profile.c:1720:6: error: ‘res’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
   if (profile)
      ^
cc1: all warnings being treated as errors
2016-12-23 18:08:43 -03:00
Thibault Saunier
51cd2bd926 encoding-profile: Allow using factory names in serialization format
Instead of enforcing the user to know and understand caps to describe
the encoding format, let him use element factory names directly.
This also makes it possible to ensure that a specific encodore/muxer
is used instead of letting the ranking system do it.

It is now possible to describe an encoding format simply specifying:

  matroskamux:x264enc:vobisenc

Factor out functions in the parsing, cleaning up the whole thing.
Update documentation.
2016-12-23 17:40:23 -03:00
Thibault Saunier
998f28b65c encoding-profile: Also take into account preset name when comparing profiles 2016-12-23 17:40:23 -03:00
Thibault Saunier
636cd255ce encoding-profile: Handle path to serialized target when deserializing a profile
The synthax is path/to/encoding/profile.gep:profilename
2016-12-23 17:40:23 -03:00
Thibault Saunier
40088a9f5d encoding-target: Add 'file-extension' as a known category 2016-12-23 17:40:23 -03:00
Thibault Saunier
85979f996d encoding-target: Allow using name and targets from serialized file
We used to only care about the name of the files even if the name
is defined in the encoding target serialized file.

That commit also allows user to define several names for a single
target file (using a ';' between the names) which allows us to have
a target for youtube that is called 'youtube;yt' or a target for
'ogg;ogv;oga' file extension.
2016-12-23 17:40:23 -03:00
Thibault Saunier
2c9db14d03 encoding-target: Auto convert loading target name to lowercase
We *only* support lowercase encoding target names so we can just
handle user to use uper case ones converting them.
2016-12-23 17:40:23 -03:00
Thibault Saunier
bff04a1396 pbutils: Add documentation about encoding targets 2016-12-23 17:40:23 -03:00
Evan Nemerson
98064ed9bf audioringbuffer: add set_callback_full() for g-i
https://bugzilla.gnome.org/show_bug.cgi?id=678301
2016-12-22 15:34:58 +00:00
Sebastian Dröge
19ece085ac riff-media: Fix up last commit 2016-12-20 13:00:59 +02:00
Nicola Murino
a75be73471 riff: add ADPCM_G722 support
https://bugzilla.gnome.org/show_bug.cgi?id=746574
2016-12-20 12:48:32 +02:00
Tim-Philipp Müller
2cfb446eb9 tag: id3v2: turn redundant check into an assert
We checked this already earlier, so this is dead code.
Leave an assert in place for consistency with the other
branch and in case the rest of the code changes.

CID 1397350.
2016-12-18 12:29:42 +00:00
Sebastian Dröge
15123c0455 discoverer: Get caps from the element's srcpad if possible
The caps put into the stream topology by decodebin are the caps at the
moment the pads are exposed on it. This is usually before decoders
received any buffers.
In discoverer we however wait for pre-roll, which ensures that each
decoder handled buffers already. At this point, there might be more
information known about the caps already that we could make use of.

One example here is extra information stored in the SEI of H264, like
the multiview-mode. This will be known if there is a SEI before the
first keyframe, but decodebin won't put this into the topology as it
only waits for the initial caps of h264parse (which come directly after
SPS/PPS).

With this change, the multiview-mode is in the caps reported by
discoverer in many cases.
2016-12-17 22:01:10 +02:00
Thibault Saunier
d67f945177 encoding-profile: Fix documentation and port to gtk markdown
And remove some trailling whitepsaces
2016-12-16 11:27:31 -03:00
Thibault Saunier
f4ed0e1af1 base: Actually support using the default encoding target 2016-12-16 11:27:31 -03:00
Thibault Saunier
646e0499fb encoding-target: Remove useless check for local presence 2016-12-16 11:27:31 -03:00
Thibault Saunier
7f76713835 pbutils: Add safe guard too encoding profile API 2016-12-16 11:27:31 -03:00
Thibault Saunier
8bbf67c37d audio: Fix introspection annotation
In gst_audio_check_valid_channel_positions the mask
is an out parameter.

And minor conversion from a print to a GST_ERROR.
2016-12-16 11:27:31 -03:00
Thibault Saunier
1c7c51fa23 encoding-target: Handle GST_ENCODING_TARGET_PATH in list_all
And fix the compare_target function
2016-12-16 11:27:31 -03:00
Tim-Philipp Müller
e0742b8759 rtsp: add boxed types for new authentication credential API
To make the structs usable in bindings, and fix

gstrtspmessage.c:1188: Warning: GstRtsp:
gst_rtsp_message_parse_auth_credentials: return value: Invalid
non-constant return of bare structure or union; register as
boxed type or (skip)

https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-12-13 22:45:02 +00:00
Vincent Penquerc'h
6ee5922f2f audioringbuffer: do not require 4 byte multiple for encoded MPEG
Bytes per frame doesn't make sense for encoded audio.

https://bugzilla.gnome.org/show_bug.cgi?id=776038
2016-12-13 10:16:07 +00:00
Sebastian Dröge
2f62720d71 xmptag: Don't leak the namespace string if there are multiple
https://bugzilla.gnome.org/show_bug.cgi?id=775887
2016-12-09 17:36:47 +02:00
Jan Schmidt
7ff1de380f id3v2: Clarify id3v2_add_id3v2_frame_blob_to_taglist()
Pass the frame data and size explicitly to
id3v2_add_id3v2_frame_blob_to_taglist() and add a
comment that it's being deliberately / manually
passed the full ID3v2 frame including header.
2016-12-09 18:06:35 +11:00
Jan Schmidt
d178f7626a id3v2: Add missing overrun check for frame sizes
When frames claim to have a footer, ensure they
are large enough to contain one to avoid an invalid
read overrun.

Spotted by Joshua Yabut
2016-12-09 18:06:35 +11:00
Sebastian Dröge
7c1a32e28b tagdemux: Fix crash when shutting down element during getrange()
Ensure that nothing is in any of the streaming thread functions
anymore when going from PAUSED to READY. While the parent's state change
function has deactivated all pads, there is nothing preventing
downstream from activating our srcpad again and calling the getrange()
function. Although we're in READY!

https://bugzilla.gnome.org/show_bug.cgi?id=775687
2016-12-06 16:29:23 +02:00
Sebastian Dröge
71e819ae7d audio-converter: In passthrough, also don't copy if in and out block are the same
In and out array are usually different, they are stack allocated arrays.
However the blocks inside them still can be the same.

https://bugzilla.gnome.org/show_bug.cgi?id=775369
2016-11-30 10:43:50 +02:00
Sebastian Dröge
7e24acc67f discoverer: Handle NULL/ANY/EMPTY caps without crashing 2016-11-28 19:46:10 +02:00
Edward Hervey
216ee52090 video-info: Properly initialize/set extra fields
The flags and field order weren't properly initialized in the
gst_video_info_init().

Furthermore in gst_video_info_from_caps() we might set unitiliazed
values previously, this only sets them if valid.
2016-11-28 16:53:10 +01:00
Edward Hervey
e3216d1648 sdp: Fix attribute leak
We need to free the strdup'd string (to_free) in all cases
2016-11-28 16:51:43 +01:00
Edward Hervey
fb4856c839 rtsp: Don't leak authorization string 2016-11-28 16:51:23 +01:00
Petr Kulhavy
010b9547d3 audio-converter: optimize endian conversion
Optimize LE<->BE conversion by adding a dedicated fast path instead of
using the generic converter. Implement transform_ip function in order to do the
endian swap in place.

This saves buffer allocation for the intermediate format, can be done in place
and also performs the conversion in one step instead of unpack-convert-pack.

For all bit widths the naive algorithm is implemented, which provides the best
performance when compiled with -O3. ORC was considered but eventually removed
as it requires a dedicated function for in-place conversion (due to the
"restrict" parameters).

A more complex algorithm for the 24-bit conversion with unrolled loop and
32-bit processing is implemented in the #if 0 section. It performs better if
compiled with -O2. With -O3 however the naive algorithm performs better.

https://bugzilla.gnome.org/show_bug.cgi?id=773073
2016-11-28 17:24:17 +02:00
Petr Kulhavy
640c54d8f8 audio-convert: simplify the chain free process
It is not needed to store a pointer to every single chain element to free it.
Instead walk the channel list backwards and free the chain elements one by one.

Rename GstAudioConverter->chain_pack to chain_end.

https://bugzilla.gnome.org/show_bug.cgi?id=773073
2016-11-28 17:24:13 +02:00
Sebastian Dröge
4efc15dffb discoverer: Extract video information from caps manually without GstVideoInfo
The caps might not be fixated (which is required by GstVideoInfo) and we
would assert otherwise. However the caps often contain useful
information in the already-fixed parts that we can use here.
2016-11-28 10:12:49 +02:00
Sebastian Dröge
bd74b102fa discoverer: Also stop waiting for subtitles if we get EOS
We're not going to get a buffer or GAP event anymore after EOS and would
wait forever otherwise.
2016-11-28 10:04:38 +02:00
Sebastian Dröge
0846eb5b27 riff-media: Check if caps are NULL before using them for the first time, not afterwards
Otherwise we'll get a g_critical() before erroring out cleanly on
https://samples.mplayerhq.hu/A-codecs/ATRAC3/SND0.AT3
2016-11-26 13:54:41 +02:00
Miguel Paris
036bdf5d2d rtpbuffer: Fix ensure_buffers() if whole packet is in one GstMemory
When gst_rtp_buffer_add_extension_onebyte_header() is used over a
GstRtpBuffer that only contains a memory for the whole packet,
ensure_buffers function crashes at the next point:

mem = gst_memory_copy (rtp->map[i].memory, offset, rtp->size[i]);

when i==2 because the payload is not mapped.

In addition the offset is calculated subtracting in the wrong direction.

https://bugzilla.gnome.org/show_bug.cgi?id=774959
2016-11-25 13:15:24 +02:00
Sebastian Dröge
47fdb15074 video-info: Add unit test for overflow checks
And also prevent overflows caused by allowing uint width/height in
gst_video_info_set_format() but storing them as (signed!) ints.
2016-11-24 15:40:22 +02:00
Sebastian Dröge
3d7a566640 video-info: And change the overflow check to not actually overflow itself 2016-11-24 15:12:40 +02:00
Sebastian Dröge
681d97aed7 video: Handle errors in gst_video_info_set_format() / gst_video_info_align()
https://bugzilla.gnome.org/show_bug.cgi?id=774588
2016-11-24 15:06:39 +02:00
Sebastian Dröge
17cdd369e6 video-info: Sanity check the frame size to prevent overflows
https://bugzilla.gnome.org/show_bug.cgi?id=774588
2016-11-24 15:06:39 +02:00
Ulf Olsson
a4c1dfe4cd mikey: Generate the correct SRTP policy
https://bugzilla.gnome.org/show_bug.cgi?id=774911
2016-11-23 17:44:29 +01:00
Sebastian Dröge
7e4697ec98 rtspdefs: Assert on the excepted MD5 digest string length
CID 1394494.
2016-11-23 18:26:29 +02:00
Scott D Phillips
c2dd0149c9 tag: fix some warnings in mklicensestables
https://bugzilla.gnome.org/show_bug.cgi?id=774878
2016-11-23 10:20:04 +02:00
Julien Isorce
b68d9bbe43 gstfdmemory: log with GST_INFO instead of GST_ERROR on permission denied
For example mmap can fail with EACCES if the the fd has been open
with read only mode. And mapping the memory might be the only way
to check that. So no need to print out an error.

Ex: ioctl(dev, DRM_IOCTL_PRIME_HANDLE_TO_FD, flags & ~DRM_RDWR)

https://bugzilla.gnome.org/show_bug.cgi?id=765600
2016-11-21 21:22:47 +00:00
Sebastian Dröge
90b24d34b3 rtsp: Add gst_rtsp_message_parse_auth_credentials() to parse authentication credentials
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-21 09:39:21 +02:00
Sebastian Dröge
828c8604dd rtsp: Add gst_rtsp_generate_digest_auth_response() to calculate digest auth response
https://bugzilla.gnome.org/show_bug.cgi?id=774416
2016-11-21 09:39:21 +02:00
Nicolas Dufresne
a1a2a33315 dmabuf-allocator: Add missing padding in the class
This class was made subclassable, though for future growth of the code,
it's better if we have some room for add class members. Using the small
padding since this is unlikely.
2016-11-18 14:56:20 -05:00
Sebastian Dröge
b9f59fd999 rtpbasepayload: Ensure to set the RECONFIGURE flag again if reconfiguration failed
https://bugzilla.gnome.org/show_bug.cgi?id=774623
2016-11-18 12:04:27 +02:00
Vivia Nikolaidou
f578c00a14 videotimecode: Fix incorrect nsec_since_daily_jam calculation
For drop-frame timecodes, the nsec_since_daily_jam doesn't necessarily
directly correspond to this many hours/minutes/seconds/frames. We have
to get the frame count as per frames_since_daily_jam and then convert.

https://bugzilla.gnome.org/show_bug.cgi?id=774585
2016-11-17 10:04:26 +02:00
Sebastian Dröge
088aebfda9 riff: Extract bpp from the strf for vnmc
Needed for avdec_vnmc to work.
2016-11-16 20:49:11 +02:00
Scott D Phillips
e740103669 videodecoder, audiodecoder: parse format before checking in src_query_default
The logic change in these commits misordered the parsing and checking of
format in position queries:

 2b06e54 videodecoder: Don't answer BYTES queries
 1840b02 audio: Don't answer BYTES queries

https://bugzilla.gnome.org/show_bug.cgi?id=774484
2016-11-16 07:57:31 +11:00
Tim-Philipp Müller
826eec22f7 appsink: fix g-i warnings and add since markers
Rename function parameter and make sure the name in the
declaration matches the name in the implementation, to
avoid g-i warnings. Also add Since markers for gtk-doc.

gstappsink.c:1248: Warning: GstApp: gst_app_sink_set_buffer_list_support:
unknown parameter 'buffer_list' in documentation comment, should be 'drop'
2016-11-15 18:38:48 +00:00
Thibault Saunier
0c0dfbd455 discoverer: Do not try to unref the bus if it has not been set yet
It might happen if creation of the discoverer failed
2016-11-15 15:22:45 -03:00
Patricia Muscalu
f1562053fe appsink: add support for buffer lists
https://bugzilla.gnome.org/show_bug.cgi?id=752363
2016-11-16 02:06:40 +11:00
Jan Schmidt
2b06e54651 videodecoder: Don't answer BYTES queries
Refuse to answer BYTES queries ourselves. The only
time they make sense is on raw elementary streams,
in which case upstream would already have answered.

https://bugzilla.gnome.org/show_bug.cgi?id=757631
2016-11-16 00:14:47 +11:00
Jan Schmidt
1840b0233a audio: Don't answer BYTES queries
Refuse to answer BYTES queries ourselves. The only
time they make sense is on raw elementary streams,
in which case upstream would already have answered.

They especially don't make sense for encoders to answer
based on upstream values - although perhaps later
we could make it do TIME->BYTES conversion on the source
pad based on bitrate.

https://bugzilla.gnome.org/show_bug.cgi?id=757631
2016-11-16 00:14:47 +11:00
Scott D Phillips
6a4c14c39a sdp: cast away const in call to g_free
MSVC warns about the const here. It's safe to cast away.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:52:22 +02:00
Scott D Phillips
6e71583d07 Cast away const from GstMetaInfo in *_get_meta_info() functions
MSVC warns about the const in the implicit argument conversion in the
calls to g_once_init_{enter,leave}. It's OK so explicitly cast it.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-15 14:52:22 +02:00
Thibault Saunier
5bdb38995f meson: Fix build when orc is disabled
Making sure not to use the orc_dep variable in case
orc has been explicitely disabled.
2016-11-14 17:26:02 -03:00
Scott D Phillips
ff8d49a4c8 Use intermediate guint when handling GstVideoMultiviewFlags
The underlying integer type of the enum GstVideoMultiviewFlags is
implementation defined and may not have the same size as guint.

https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:51:30 +02:00
Scott D Phillips
ab3c8caeed Remove 'return' from void functions
https://bugzilla.gnome.org/show_bug.cgi?id=774293
2016-11-12 10:51:30 +02:00
Thibault Saunier
30b3055780 rtsp: Include GstSdp-1.0.gir when generating the gir
It is actually needed as we need some symbols. We do not link
to libgstsdp as the user of the lib should do it (same with
autotools build).

This reverts previous commit
2016-11-10 17:43:38 -03:00
Thibault Saunier
b42a9c0cde libs:rtsp: Remove wrong dependency on Sdp for the gir file 2016-11-10 16:40:56 -03:00
Thibault Saunier
de6f4f0c7f libs:rtsp: Remove wrong dependency on Sdp for the gir file 2016-11-10 16:37:39 -03:00
Thibault Saunier
6917cb629e meson: Generate girs
https://bugzilla.gnome.org/show_bug.cgi?id=773944
2016-11-09 18:06:19 -03:00
Petr Kulhavy
54f4d3772c audio-channels: map buffer read-write only if channels differ
gst_audio_buffer_reorder_channels() was always mapping the buffer read-write
regardless whether any reordering was needed.  If the from and to channel order
is identical return immediately without remapping the buffer.

Add a small helper function gst_audio_channel_positions_equal() which is used
in both gst_audio_reorder_channels() and gst_audio_buffer_reorder_channels().

https://bugzilla.gnome.org/show_bug.cgi?id=773833
2016-11-09 19:42:47 +02:00
Julien Isorce
3bf893e12a video: add gst_video_decoder_allocate_output_frame_with_params
It adds a third argument to pass GstBufferPoolAcquireParams
to gst_buffer_pool_acquire_buffer.

If a user subclasses GstBufferPoolAcquireParams, this allows to
pass an updated param to the underlying buffer pool at each
gst_video_decoder_allocate_output_frame_with_params call.

https://bugzilla.gnome.org/show_bug.cgi?id=773165
2016-11-04 16:18:13 +00:00
Sebastian Dröge
e73eb54908 video-info: Fix the docs to say interlace-mode, not interlaced-mode 2016-11-04 16:25:55 +02:00
Julien Isorce
f5eb366335 allocators: define GST_CAPS_FEATURE_MEMORY_DMABUF
Adds "memory:DMABuf" caps feature. Since 1.11 tag.
Useful when the the dma-buf buffer cannot be mapped to CPU for r/w requests.
Example: protected content or platform constraints.

https://bugzilla.gnome.org/show_bug.cgi?id=759358
2016-11-03 13:19:12 -04:00
Nicolas Dufresne
c37b1e8c56 dmabuf: Make the allocator sub-classable
This should allos for cleaner code when implement such allocator.

https://bugzilla.gnome.org/show_bug.cgi?id=768794
2016-11-03 13:19:12 -04:00
Nicolas Dufresne
eddb543719 audiosrc: Leave read loop if no longer running
In the case a src stops providing data (read calls returns 0). The audio
src thread will never leave. Instead, check the condition and leave the
loop.
2016-11-03 13:19:12 -04:00
Sebastian Dröge
1f9204c725 video: Update orc generated files 2016-11-02 11:04:32 +02:00
Sebastian Dröge
9041db4680 Revert "video-color: Allow converting incomplete colorimetry to a string"
This reverts commit 158eae7e7e.

It already *always* allowed to convert incomplete colorimetry to a
string.
2016-11-01 23:51:47 +02:00
Sebastian Dröge
d84879db28 rtpbasedepayload: Reject non-TIME segments
https://bugzilla.gnome.org/show_bug.cgi?id=765796
2016-11-01 21:09:13 +02:00
Sebastian Dröge
568ec0fc7b Revert "basertpdepayload: create valid segment when given non-time segment"
This reverts commit 0f609bc6c6.
2016-11-01 21:09:04 +02:00
Sebastian Dröge
158eae7e7e video-color: Allow converting incomplete colorimetry to a string
This is only a good idea for non-raw caps.

https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Sebastian Dröge
ad06b54443 videoencoder: Proxy colorimetry and chroma-site from input to output caps
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Sebastian Dröge
e6fd46601c videodecoder: Proxy field order to the output caps
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Sebastian Dröge
635d1a2a98 videoencoder: Proxy interlace-mode and field-order fields from the input to the output caps
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Sebastian Dröge
79809633de video-info: Add optional field-order caps field for interlaced-mode=interleaved
Usually this information is static for the whole stream, and various
container formats store this information inside the headers for the
whole stream.

Having it inside the caps for these cases simplifies code and makes it
possible to express these requirements more explicitly with the caps.

https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-11-01 20:40:07 +02:00
Tomasz Zajac
4d4f3c3cc4 sdp: Parse rtcp-fb media attributes
https://bugzilla.gnome.org/show_bug.cgi?id=769698
2016-11-01 19:57:06 +02:00
Tomasz Zajac
5424357ffa sdp: Add rtcp-fb media attributes based on caps
https://bugzilla.gnome.org/show_bug.cgi?id=769698
2016-11-01 19:57:02 +02:00
Nicolas Dufresne
7a40442ad5 video: Add VYUY pixel format
This format is sometimes the output of JPEG decoders. It is the same as
YUY2 and UYVY but with a different component order.

https://bugzilla.gnome.org/show_bug.cgi?id=767450
2016-11-01 19:55:20 +02:00
Marcin Kolny
89e711663f audioclock: use GstAudioClock* as first argument in GstAudioClock methods
All the GstAudioClock method declarations required object of GstClock type
as a first argument, but in fact, required GstAudioClock object (runtime
check in function body). Instead of checking type in run-time, we can
change functions declaration, to accept only GstAudioClock methods. Then,
runtime check is not necessary anymore, since always GstAudioClock object
is passed to a function.

https://bugzilla.gnome.org/show_bug.cgi?id=756628
2016-11-01 19:54:01 +02:00
Nirbheek Chauhan
20ced51df2 Fix incorrect return type in several functions
All these should return GstFlowReturn, not gboolean
2016-10-27 23:06:26 +05:30
Thibault Saunier
9842a6708d Revert "meson: Use the new pic argument on static libs"
This reverts commit e3c22605ae.

pic was added after 0.35 and will be present in 0.36 (meson documentation
was wrong).
2016-10-20 17:17:58 -03:00
Thibault Saunier
e3c22605ae meson: Use the new pic argument on static libs
We depend on 0.35 already
2016-10-20 16:07:33 -03:00
Stefan Sauer
7986a8ed3d audio: don't deref NULL
gst_buffer_copy_region() can return NULL when the buffer meta-data is invalid.

See https://bugzilla.gnome.org/show_bug.cgi?id=772200
2016-10-20 15:42:50 +02:00
Havard Graff
a32b25db6a audioencoder: Error-handling for pushing headers
https://bugzilla.gnome.org/show_bug.cgi?id=773105
2016-10-20 14:12:53 +03:00
Stian Selnes
92392a4733 videodecoder: Default caps sets format I420
Also the format must be fixed on the default raw caps. If not
gst_video_info_from_caps() will fail and
gst_video_decoder_negotiate_default_caps() return FALSE.

The test simulates the use case where a gap event is received before
the first buffer causing the decoder to fall back to the default caps.

https://bugzilla.gnome.org/show_bug.cgi?id=773103
2016-10-20 14:11:48 +03:00
Havard Graff
63c1f4aa33 audioencoder: Plug buffer-leak
https://bugzilla.gnome.org/show_bug.cgi?id=773107
2016-10-20 14:09:49 +03:00
Stefan Sauer
409534f242 audio: fix doc string again.
There was a second '*' at the start of the line. Reword + reformat to make it
obvious.
2016-10-17 09:47:54 +02:00
Nirbheek Chauhan
69abe1de13 meson: Add missing audio-enumtypes.h dep in audio-resampler static libs
Seen on the Jenkins CI:

FAILED: subprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta/audio-resampler-x86-sse41.c.o
ccache cc  '-Isubprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta' '-fdiagnostics-color=always' '-I../subprojects/gst-plugins-base/gst-libs/gst/audio' '-Isubprojects/gst-plugins-base/gst-libs/gst/audio' '-Isubprojects/gst-plugins-base/.' '-I../subprojects/gst-plugins-base/.' '-Isubprojects/gst-plugins-base/gst-libs' '-I../subprojects/gst-plugins-base/gst-libs' '-Isubprojects/gstreamer/libs' '-I../subprojects/gstreamer/libs' '-Isubprojects/gstreamer/.' '-I../subprojects/gstreamer/.' '-pipe' '-Wall' '-Winvalid-pch' '-DHAVE_CONFIG_H' '-msse4.1' '-fPIC' '-O0' '-g' '-fPIC' '-I/usr/include/glib-2.0' '-I/usr/lib/glib-2.0/include' '-pthread' '-Isubprojects/gstreamer/gst' '-MMD' '-MQ' 'subprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta/audio-resampler-x86-sse41.c.o' '-MF' 'subprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta/audio-resampler-x86-sse41.c.o.d' -o 'subprojects/gst-plugins-base/gst-libs/gst/audio/audio_resampler_sse41@sta/audio-resampler-x86-sse41.c.o' -c ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-x86-sse41.c
In file included from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler.h:24:0,
                 from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-private.h:23,
                 from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-macros.h:25,
                 from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-x86-sse41.h:23,
                 from ../subprojects/gst-plugins-base/gst-libs/gst/audio/audio-resampler-x86-sse41.c:24:
../subprojects/gst-plugins-base/gst-libs/gst/audio/audio.h:26:39: fatal error: gst/audio/audio-enumtypes.h: No such file or directory
 #include <gst/audio/audio-enumtypes.h>
                                       ^
compilation terminated.
2016-10-15 21:48:39 +05:30
Thibault Saunier
558172d418 meson: Make use of new environment object and set plugin path to builddir
Workaround source_root being the root directory of all projects
in the subproject case.
Remove now unneeded getpluginsdir and define c++ tests in the same loop.

Bump meson requirement to 0.35
2016-10-14 17:37:16 +02:00
Stefan Sauer
86d18fa9ff audio: fix typo in doc string 2016-10-14 14:21:52 +02:00
Sebastian Dröge
a7b75cb1cc video-color: Mark some function arguments as const
https://bugzilla.gnome.org/show_bug.cgi?id=771376
2016-10-03 20:08:17 +03:00
Arun Raghavan
87905cc48b meson: Enable SSE intrinsics in audio-resampler
This files need to be built with the specific C flags for the
corresponding processor optimisations.
2016-10-03 11:01:36 +05:30
Arun Raghavan
4de66632d7 meson: Enable Orc in build
Top-level meson.build code updated from gst-plugins-good.
2016-10-03 11:01:24 +05:30
Arun Raghavan
20ba0299cc audio-resampler: Add a missing header to noinst_HEADERS 2016-09-29 19:55:45 +05:30
Arun Raghavan
a1ae17ef69 audiorsample: Fix build on 32-bit x86
Turns out _mm_cvtsi128_si64() isn't available on 32-bit, so only build
SSE 4.1 optimisations on x86-64 for now.
2016-09-29 19:45:16 +05:30
Arun Raghavan
4b5f78337a audioresample: Separate out CFLAGS used for SSE* code
This makes sure that we only build files that need explicit SIMD support
with the relevant CFLAGS. This allows the rest of the code to be built
without, and specific SSE* code is only called after runtime checks for
CPU features.

https://bugzilla.gnome.org/show_bug.cgi?id=729276
2016-09-29 18:37:08 +05:30
Arun Raghavan
f4cba79063 audioresample: Fix some gobject introspection warnings 2016-09-28 19:09:26 +05:30
Wim Taymans
7a02e9676f video-scaler: take number of bits into account when copying
Copy twice the amount of pixels for 16 bits formats.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=747225
2016-09-22 16:17:33 +02:00
Nicolas Dufresne
1852e7b88a doc: Add missing map flag to gst_video_frame_map()
Add missing map flag, and also add unmap call.
2016-09-19 11:27:10 -04:00
Víctor Manuel Jáquez Leal
dcfc69ab1d videooverlaycomposition: document required map flags
Fix documentation for gst_video_overlay_composition_blend(). The video frame
needs to be mapped with GST_MAP_READWRITE flag.

https://bugzilla.gnome.org/show_bug.cgi?id=771382
2016-09-14 11:17:25 +02:00
Jonathan Matthew
7b8aa8cf7e pbutils: store missing-plugin structure in current_info->misc again
This allows gst_discoverer_info_get_misc to work again, until it
finally gets removed.

https://bugzilla.gnome.org/show_bug.cgi?id=770643
2016-09-04 16:48:40 +01:00
Jan Schmidt
47cb25a1f8 video-frame: Expand the range of caps for extended buffer flags
The video buffer flags can be applied to encoded video streams,
such as video/x-h264 marked up by a demuxer or parser.
2016-09-01 22:48:40 +10:00
Havard Graff
4b854b3440 video-frame: GST_VIDEO_BUFFER_FLAG are only valid for video/x-raw caps
https://bugzilla.gnome.org/show_bug.cgi?id=769771
2016-09-01 13:05:47 +03:00
Havard Graff
c726e0ab6d rtpbuffer: Add buffer flag RETRANSMISSION
Useful for elements to know if a buffer is a retransmitted RTP packet.

https://bugzilla.gnome.org/show_bug.cgi?id=769771
2016-09-01 13:05:47 +03:00
Thibault Saunier
bc6aae6ca7 Use the new API to post flow ERROR messages on the bus
https://bugzilla.gnome.org/show_bug.cgi?id=770158
2016-08-26 19:23:24 -03:00
Tim-Philipp Müller
45eee84140 meson: update for new files in video lib 2016-08-25 12:19:52 +01:00
Xabier Rodriguez Calvar
0341f04ce1 videodirection: interface for rotation and flip
A GstVideoOrientationMethod enumeration is also provided for the
admitted property values.

https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-08-25 10:19:13 +03:00
Nirbheek Chauhan
5c4f4ac1bd Add support for Meson as alternative/parallel build system
https://github.com/mesonbuild/meson

With contributions from:

Tim-Philipp Müller <tim@centricular.com>
Jussi Pakkanen <jpakkane@gmail.com> (original port)

Highlights of the features provided are:
* Faster builds on Linux (~40-50% faster)
* The ability to build with MSVC on Windows
* Generate Visual Studio project files
* Generate XCode project files
* Much faster builds on Windows (on-par with Linux)
* Seriously fast configure and building on embedded

... and many more. For more details see:

http://blog.nirbheek.in/2016/05/gstreamer-and-meson-new-hope.html
http://blog.nirbheek.in/2016/07/building-and-developing-gstreamer-using.html

Building with Meson should work on both Linux and Windows, but may
need a few more tweaks on other operating systems.
2016-08-20 11:09:51 +01:00
Vivia Nikolaidou
41c9f0b9dc videotimecode: Fix false positive coverity issues
They are false positive overflows, because coverity doesn't realize that
hours <= 24, minutes < 60 and seconds < 60 in all functions. Also casting the
number 60 (seconds in minute, minutes in hour) to guint64 for the
calculations, in order to avoid overflowing once we allow more than 24-hour
timecodes.

CIDs #1371459, #1371458
2016-08-19 15:57:01 +03:00
Nirbheek Chauhan
a276fd45b8 gstfft: Use stdint.h instead of _stdint.h
_stdint.h is generated by Autotools and we don't really need it.
stdint.h is now available on all supported platforms.
This really only makes a difference for MSVC, which has it starting from
Visual Studio 2015.
2016-08-19 12:12:31 +01:00
Wim Taymans
38622ee1e8 fdmemory: add flag to avoid close of the fd
Add GST_FD_MEMORY_FLAG_DONT_CLOSE to avoid closing the fd when the
memory is freed. When you can guarantee the lifetime of the fd is
longer than the memory, this can save a dup() call.
2016-08-19 09:27:01 +02:00
Vivia Nikolaidou
70149451ea videotimecode: Fix various coverity issues
Most of them are overflow related and false positives, but coverity can't know
that these can't overflow without us giving it more information. Add some
assertions for this.

One was an actual issue with flags comparison.

CIDs #1369051, #1369050, #1369049, #1369048, #1369045
2016-08-17 13:05:26 +03:00
Vivia Nikolaidou
8d8384f20a videometa: Added video time code meta
It attaches a GstVideoTimeCodeMeta (SMPTE timecode) as metadata to a buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 18:59:48 +03:00
Vivia Nikolaidou
ab35d7394e videotimecode: Added support for SMPTE time code metadata
Can be attached as GstMeta into a video frame.

https://bugzilla.gnome.org/show_bug.cgi?id=766419
2016-08-04 18:59:40 +03:00
Carlos Rafael Giani
9adaeb0a71 riff: Remove sample rate and channel count boundaries in caps
WAV is too generic to impose more-or-less arbitrary boundaries on the
sample rate and channel count caps. For example, there are 384 kHz WAV
files. Another example: it is in theory possible that somebody puts DSD
data into a WAV file, which will then have a sample rate of ~2.8 MHz.

For this reason, get rid of the rate and channel caps unless they are
fixed values. Downstream anyway usually knows the limitations better.

https://bugzilla.gnome.org/show_bug.cgi?id=761514
2016-08-02 15:25:53 +03:00
Sreerenj Balachandran
e5a67d71f7 pbutils: Add more h264 scalable profiles
Adding Scalable Constrained High (G.10.1.2.1) and
Scalable High Intra(G.10.1.3) profiles to the profile list

https://bugzilla.gnome.org/show_bug.cgi?id=769303
2016-08-02 14:25:57 +03:00
Sebastian Dröge
69f90adbaf rtpbuffer: Add some const qualifiers
gst_rtp_buffer_add_extension_onebyte_header() and
gst_rtp_buffer_add_extension_twobytes_header() can have a const argument for
the actual extension data.
2016-07-26 17:46:38 +03:00
Michael Olbrich
44da322083 audioclock: use GST_STIME_FORMAT for the correct argument
GST_STIME_ARGS is used for time_offset not for last_time.
This fixes the format string accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=768990
2016-07-20 12:28:54 +01:00
Joan Pau Beltran
c6722c06a0 appsink: add _pull_sample/preroll() variants with timeout
The _pull_sample() and _pull_preroll() functions block
until a sample is available, EOS happens or the pipeline
is shut down (returning NULL in the last two cases).

This adds _try_pull_sample() and _try_pull_preroll()
functions with a timeout argument to specify the maximum
amount of time to wait for a new sample.

To avoid code duplication, wait forever if the timeout is
GST_CLOCK_TIME_NONE and use that to implement
_pull_sample/_pull_preroll with the original behavior.

Add also corresponding action signals "try-pull-sample"
and "try-pull-preroll".

https://bugzilla.gnome.org/show_bug.cgi?id=768852
2016-07-18 16:55:16 +01:00
Tim-Philipp Müller
a80c546628 rtp: rtpbasedepayload: simplify code
Remove unnecessary helper struct for callbacks. The bclass
member of the helper struct was not used, so we can just
remove it and the GET_CLASS() call and simplify the whole
affair by passing the depayloader directly to the callback.
2016-07-15 19:51:20 +01:00
Xabier Rodriguez Calvar
9f594d1562 videoorientation: Use G_DEFINE_INTERFACE instead of a manually written get_type()
https://bugzilla.gnome.org/show_bug.cgi?id=768687
2016-07-12 09:05:32 +03:00
Sebastian Dröge
02a88077fc video: Fix some compiler warnings for out-of-range enum values
https://bugzilla.gnome.org/show_bug.cgi?id=767816
2016-07-12 00:14:13 +03:00
Seungha Yang
50f74daa2f appsrc: Remove trailing whitespace
https://bugzilla.gnome.org/show_bug.cgi?id=768510
2016-07-11 09:54:11 +03:00
Sebastian Dröge
48324cab38 encoding-profile: Remove some more fields from the caps when creating from discoverer info
parsed, framed, stream-format and alignment are only relevant for parsers and
should not matter here. We still want to be able to use an encoder that can
only output byte-stream if the input was avc.

https://bugzilla.gnome.org/show_bug.cgi?id=768566
2016-07-08 16:44:18 +03:00
Sebastian Dröge
0e7cdee6c8 missing-plugins: Remove some other fields when cleaning up caps
Caps are cleaned up for missing plugins, and for creating encoding profiles
and caps descriptions.

Fields like streamheader, parsed, framed, stream-format and alignment are not
relevant here. The last ones all because a parser will take care of them.

https://bugzilla.gnome.org/show_bug.cgi?id=768566
2016-07-08 16:41:12 +03:00
Sebastian Dröge
d31f958d17 pbutils: Mark private functions as G_GNUC_INTERNAL 2016-07-08 15:44:26 +03:00
Sergio Torres Soldado
7960bc0380 rtspconnection: Fix potential deadlock caused by blocking read forever
Reset the connection "may_cancel" property to avoid a potential deadlock
if there is no data to read and the socket stays blocked forever.

https://bugzilla.gnome.org/show_bug.cgi?id=768249
2016-07-07 19:15:18 +03:00
Wim Taymans
9144a787df video-converter: fix compilation on big-endian 2016-07-07 17:29:34 +02:00
Edward Hervey
cfc36ba586 videodecoder: More trickmode fix
We need to take into account the input segment flags to know whether
we should drain the decoder after a new keyframe in trick mode.

Otherwise we would have to wait for the next frame to be outputted (and
the segment to be activated) which ... well ... kind of beats the whole
point of this draining :)
2016-07-07 17:12:31 +02:00
Sebastian Dröge
61f59857a7 audio: Ship audio-resampler-neon.h 2016-07-07 00:27:18 +03:00
Sebastian Dröge
08f993d090 Release 1.9.1 2016-07-06 13:06:06 +03:00
Philippe Normand
6338146c06 videodecoder: Take stream lock one time only on drain
When the drain is triggered from the chain function the lock is already
taken so there is no need to take it one more time.

https://bugzilla.gnome.org/show_bug.cgi?id=767641
2016-07-05 19:38:40 +03:00
Sebastian Dröge
e18a9d9b5f videodecoder: fix criticals fixating a non existent field
https://bugzilla.gnome.org/show_bug.cgi?id=766970
2016-07-04 11:16:55 +02:00
Sebastian Dröge
e5d7064b29 audiodecoder: Protect samples_in/bytes_out and audio info with object lock
It might cause invalid calculations during the CONVERT query otherwise.
2016-07-04 11:12:55 +02:00
Sebastian Dröge
5cbd1a7bca audioencoder: Protect samples_in/bytes_out and audio info with object lock
It might cause invalid calculations during the CONVERT query otherwise.
2016-07-04 11:12:55 +02:00
Sebastian Dröge
8d8262a00c audioencoder/decoder: Move encoded audio conversion function to a common place
No need to duplicate this non-trivial function.
2016-07-04 11:12:55 +02:00
Vincent Penquerc'h
c76e8c77eb audiodecoder: fix criticals fixating a non existent field
https://bugzilla.gnome.org/show_bug.cgi?id=766970
2016-07-04 10:05:45 +01:00
Sebastian Dröge
66342c5c86 videodecoder: Use the object lock to protect bytes/time tracking
And especially don't use the stream lock for that, as otherwise non-serialized
queries (CONVERT) will cause the stream lock to be taken and easily causes the
application to deadlock.

https://bugzilla.gnome.org/show_bug.cgi?id=768361
2016-07-04 10:55:07 +02:00
Sebastian Dröge
3cabd3fe55 videoencoder: Use the object lock to protect bytes/time tracking 2016-07-04 10:52:24 +02:00
Sebastian Dröge
d8111778bd videoencoder/decoder: Move conversion utility functions to a common header and use consistently in encoder/decoder 2016-07-04 10:47:36 +02:00
Sebastian Dröge
1032f5c1b3 appsrc: If do-timestamp=TRUE, capture the time when the buffer was pushed to the source
... instead of the time when it was pushed further downstream.

https://bugzilla.gnome.org/show_bug.cgi?id=763630
2016-07-01 14:32:26 +02:00
Zaheer Abbas Merali
0f609bc6c6 basertpdepayload: create valid segment when given non-time segment
This will become an error in 1.10.

https://bugzilla.gnome.org/show_bug.cgi?id=765796
2016-07-01 14:16:46 +02:00
Tim-Philipp Müller
a2c050a4be tagdemux: fix handling of very short files in push mode
By default we'll wait for a certain amount of data before
attempting typefinding. However, if the stream is fairly
short, we might get EOS before we ever attempted any
typefinding, so at this point we should force typefinding
and output any pending data if we manage to detect the
type.

https://bugzilla.gnome.org//show_bug.cgi?id=768178
2016-06-30 18:53:07 +01:00
Tim-Philipp Müller
130e78dbd8 tagdemux: fix erroring out if we reach EOS without detecting type
In 0.10 the source pad was a dynamic pad that was only added once
the type had been detected, but in 1.x it's an always source pad,
so checking whether it's still NULL won't work to detect if the
type has been detected.

Makes tagdemux error out when we get EOS but haven't managed to
identify the format of the data after the tag.

https://bugzilla.gnome.org//show_bug.cgi?id=768178
2016-06-30 18:53:02 +01:00
Sebastian Dröge
5de9d5809b audioconvert: Handle fallback channel mask for mono correctly
It's 0 and no mask should be set for mono at all.

https://bugzilla.gnome.org/show_bug.cgi?id=757472
2016-06-29 18:14:51 +02:00
Wim Taymans
5e752f4eda video-converter: fix interlaced scaling some more
Fix problem with the line cache where it would forget the first line in
the cache in some cases.
Keep as much backlog as we have taps. This generally works better and we
could do even better by calculating the overlap in all taps.
Allocated enough lines for the line cache.
Use only half the number of taps for the interlaced lines because we
only have half the number of lines.
The pixel shift should be relative to the new output pixel size so scale
it.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=767921
2016-06-22 16:21:13 +02:00
Guillaume Desmottes
937a42247a audioaggregator: fix buffer leak
If the pad was still owning a buffer when being destroyed it was leaked.

Fix a leak with the test_flush_start_flush_stop test.

https://bugzilla.gnome.org/show_bug.cgi?id=766663
2016-06-21 10:52:47 +03:00
Michael Olbrich
72879c3639 tagdemux: preserve duration when skipping a tag at the beginning of a buffer
gst_buffer_copy_region() does not copy the duration if it doesn't start
with the first byte. We just skip the tag here, so the duration is still
valid.

https://bugzilla.gnome.org/show_bug.cgi?id=767791
2016-06-21 10:43:50 +03:00
Sebastian Dröge
26f63db498 discoverer: Only allow serializing OK discoverer infos to GVariants
They will be incomplete otherwise and we can't generate the full serialized
information, and instead will crash somewhere on the way.

https://bugzilla.gnome.org/show_bug.cgi?id=767859
2016-06-21 10:24:15 +03:00
Mikhail Fludkov
8d4f79b640 audiodecoder: fix invalid timestamps when PLC and delay
Elements inherited from GstAudioDecoder, supporting PLC and introducing
delay produce invalid timestamps. Good example is opusdec with in-band FEC
enabled. After receiving GAP event it delays the audio concealment until
the next buffer arrives. The next buffer will have DISCONT flag set which
will make GstAudioDecoder to reset it's internal state, thus forgetting
the timestamp of GAP event. As a result the concealed audio will have the
timestamp of the next buffer (with DISCONT flag) but not the timestamp
from the event.
2016-06-16 11:01:04 +01:00
Paulo Neves
5dd720e064 exiftag: Increase serialized geo precision
The serialization of double typed geographical
coordinates to DMS system supported by the exif
standards was previously truncated without need.

The previous code truncated the seconds part of
the coordinate to a fraction with denominator
equal to 1 causing a bug on the deserialization
when the test for the coordinate to be serialized
was more precise.

This patch applies a 10E6 multiplier to the numerator
equal to the denominator of the rational number.

Eg. Latitude = 89.5688643 Serialization

DMS Old code = 89/1 deg, 34/1 min, 7/1 sec
DMS New code = 89/1 deg, 34/1 min, 79114800UL/10000000UL

Deserialization

DMS Old code = 89.5686111111
DMS New code = 89.5688643

The new test tries to serialize a higher precision
coordinate.

The types of the coordinates are also guint32 instead
of gint like previously. guint32 is the type of the
fraction components in the exif.

https://bugzilla.gnome.org/show_bug.cgi?id=767537
2016-06-13 09:29:52 +03:00
Thomas Jones
d423406e0a audiovisualizer: Fix calculations for bytes<->samples conversions
Use bpf instead of channels * sizeof(gint16).

https://bugzilla.gnome.org/show_bug.cgi?id=767505
2016-06-11 11:45:51 +03:00
Thomas Jones
247ce9f39f audiovisualizer: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP()
https://bugzilla.gnome.org/show_bug.cgi?id=767506
2016-06-11 11:42:54 +03:00
Thomas Jones
721e415fd2 audiovisualizer: fix timestamp calculation for audio channels > 1
We have to use bps*channels instead of just bps, which is exactly what bpf is for.

https://bugzilla.gnome.org/show_bug.cgi?id=767507
2016-06-11 11:42:20 +03:00
Víctor Manuel Jáquez Leal
8b8708f946 videodecoder: handle buffer's flags at offset
For reverse playback it is important to handle correctly the frame sync
points, which is set when the input buffer doesn't have the DELTA_UNIT flag.

This is handled correctly when decoder is packetized, but when it is not the
frame's sync point is not copied, and the reverse playback never decodes frame
batches.

The current patch adds the buffer's flags to the Timestamp list, where the
timestamp and duration of the input buffers are hold.
2016-06-09 19:13:46 +03:00
Víctor Manuel Jáquez Leal
75906f53d1 videodecoder: squash two message logs into one
There were two consecutive log messages in gst_video_decoder_decode_frame().
Given the information they provide, it is more efficient to squash them into a
single one.
2016-06-09 19:08:08 +03:00
Víctor Manuel Jáquez Leal
779e739142 videodecoder: playback rate is in input_segment
The playback rate is hold in the input_segment member variable, not in the
output_segment, and the parse_gather list was never filled because of that.

This patch changes the comparison with input_segment.
2016-06-09 19:05:41 +03:00
Sebastian Dröge
0bd3f2352c videodecoder: Use input segment rate instead of output segment rate to decide whether the drain on keyframes
The output segment is only set up after data is output, which might be far in
the future for reverse playback. Also we are here interested in the state at
the current *input* frame (which is the keyframe), not any possible output.
2016-06-09 19:02:49 +03:00
Sebastian Dröge
0c7022d681 videodecoder: Only drain in KEY_UNITS trick mode after a keyframe in forwards playback mode
For reverse playback the same behaviour was already implemented in
flush_parse().

For reverse playback, chain_forward() is only used to gather frames and not
for decoding, and it is actually called by the draining logic, causing an
infinite recursion.
2016-06-09 18:57:49 +03:00
Edward Hervey
8bee96c4a2 videodecoder: Don't push late frames
While it's a bit tricky to discard frames *before* decoding (because
we might not be sure which data is needed or not by the decoder), we
can discard them after decoding if they are too late anyway.

Any following basetransform based element or similar would drop the frame too.
2016-06-09 17:21:45 +03:00
Edward Hervey
5bef865f9f videodecoder: Avoid recursive drain/flush calls
_chain_forward() can also be called with reverse playback. Blindly
calling drain_out() on DISCONT buffers would end up in a recursive
call.
2016-06-07 10:31:59 +02:00
Edward Hervey
183e94b2d3 videodecoder: Drain out keyframes in TRICK_MODE_KEY_UNITS
When asked to just decode keyframe, if we got a keyframe drain out
the decoder straight away.
This avoids having to wait for the next frame and reduces delay even
more.

https://bugzilla.gnome.org/show_bug.cgi?id=767232
2016-06-07 09:50:08 +02:00
Edward Hervey
eb1ebf226f videodecoder: Drain decoder on DISCONT buffers
This ensures the decoder is properly drained out when receiving a
DISCONT buffer. The optimal way of doing this would have been to
receive a GAP event before hand but it is not always possible.

Fixes big delays with some decoders (ex gst-libav) that will not
drain out data when only decoding keyframes.

https://bugzilla.gnome.org/show_bug.cgi?id=767232
2016-06-07 09:49:56 +02:00
Michael Olbrich
ac56c1c3a7 tagdemux: preserve timestamp when skipping a tag at the beginning of a buffer
gst_buffer_copy_region() does not copy the timestamp if it doesn't start
with the first byte. We just skip the tag here, so the timestamp is still
valid.

https://bugzilla.gnome.org/show_bug.cgi?id=767173
2016-06-04 12:40:24 +01:00
Stian Selnes
1335ccd228 video-color: Fix colorimetry IS_UNKNOWN
Fix issue with colorimetry default indicies not being in sync with the
actual table causing IS_UNKNOWN() to sometimes fail.

https://bugzilla.gnome.org/show_bug.cgi?id=767163
2016-06-02 17:14:50 +01:00
Edward Hervey
fb21fc3af1 videodecoder: Make sure the DISCONT flag is set on the outgoing buffer
The base class was setting the DISCONT flag before checking whether the buffer
would be in segment or not.

Fix issues with DISCONT flags not being properly propagated downstream when
decoders buffers were out of segment.

https://bugzilla.gnome.org/show_bug.cgi?id=766800
2016-06-02 10:50:58 +03:00
Joan Pau Beltran
abb88801e7 video: add IYU2 format
This existed in 0.10 and is needed by dc1394src.

IYU2 format is a YUV fully-sampled packed format similar to v308
but with different component order (U-Y-V instead of Y-U-V).

http://www.fourcc.org/yuv.php#IYU2

https://bugzilla.gnome.org/show_bug.cgi?id=763026#c5
2016-06-01 12:07:05 +01:00
Tim-Philipp Müller
d52a74f32e g-i: pass compiler env to g-ir-scanner
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:44:21 +01:00
Guillaume Desmottes
8fc42f12f0 videosink: ensure the debug category is always initialized
gst_video_sink_center_rect() can be called without a GstVideoSink
having been instantiated so we can't relly on the video sink
class_init function to init the category.

Fix a warning when running:
GST_CHECKS=test_video_center_rect GST_DEBUG=6 G_DEBUG=fatal_warnings make libs/video.check-norepeat

https://bugzilla.gnome.org/show_bug.cgi?id=766510
2016-05-18 19:44:52 +01:00
Tim-Philipp Müller
7c5ee9d3ef app: remove marshaller files from git 2016-05-16 09:20:36 +01:00
Tim-Philipp Müller
75f3c7cb85 app: use generic marshallers 2016-05-15 15:26:13 +01:00
Matthew Waters
1e3f5e0ecf video/affinetransformationmeta: define the coordinate space used
Based on the expected output from the already existing usage by androidmedia
and the opengl plugins.

https://bugzilla.gnome.org/show_bug.cgi?id=764667
2016-05-15 10:53:55 +03:00
Tim-Philipp Müller
fb2c75de68 pbutils: add description for WebVTT 2016-05-14 16:08:09 +01:00
Hyunjun Ko
825c150e9d sdp: parse sdp attributes in case that sdp message doesn't contain mikey message
https://bugzilla.gnome.org/show_bug.cgi?id=766204
2016-05-10 19:43:32 +03:00
Sebastian Dröge
dc8120f298 appsrc: Add duration property for providing a duration in TIME format
https://bugzilla.gnome.org/show_bug.cgi?id=766229
2016-05-10 16:50:32 +03:00
Sebastian Dröge
5be3c5f6b2 videodecoder/encoder: Correct GST_IS_*CODER_CLASS macros
They are currently not used, but would result in a compiler error due to wrong
variable name usage.

https://bugzilla.gnome.org/show_bug.cgi?id=766203
2016-05-10 10:01:12 +03:00
Sebastian Dröge
9e60877108 encoding-profile: Fix caps memory leak 2016-04-29 11:06:49 +03:00
Sebastian Dröge
e2bde252a6 encoding-profile: Recurse into nested container profiles and only add the final audio/video streams
If we e.g. have AVI with DV container with video/audio inside the DV
container, we can't handle this at this point with an encoding profile.
Instead of erroring out, flatten the container hierarchy.

https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Sebastian Dröge
4c2e7ae051 encoding-profile: Fail to create encoding profile from discoverer info if no streams could be added
https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Sebastian Dröge
436adc68e0 encoding-profile: Move adding of each stream to a helper function
https://bugzilla.gnome.org/show_bug.cgi?id=765708
2016-04-29 10:12:06 +03:00
Aurélien Zanelli
928bb3b6f4 exiftag: handle GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
This tag match the EXIF_TAG_FOCAL_LENGTH_IN_35_MM_FILM exif tag and is
stored on a short. Hence there is a precision loss compared to the
GstTag which is a double value.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00
Aurélien Zanelli
c5a4a83828 tag: add GST_TAG_CAPTURING_FOCAL_LENGTH_35_MM tag
It is the 35 mm equivalent focal length of the lens, mainly used in
photography. Tag value is stored in a double value to be consistent with
GST_TAG_CAPTURING_FOCAL_LENGTH.

https://bugzilla.gnome.org/show_bug.cgi?id=753930
2016-04-28 12:13:15 -03:00
Kipp Cannon
f7a31a79f4 audio: Add const to segment parameter of gst_audio_buffer_clip()
e.g., allows this to be used with the reference retrieved by
gst_event_parse_segment().

https://bugzilla.gnome.org/show_bug.cgi?id=765663
2016-04-27 12:26:07 +03:00
Sebastian Dröge
155222017a codec-utils: H265 level idc 0 is not valid
Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538
2016-04-25 16:49:20 +03:00
Sebastian Dröge
7741e56db4 codec-utils: H264 level idc 0 is not valid
Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538
2016-04-25 16:49:20 +03:00
Sebastian Dröge
fc99a61774 encoding-profile: Remove codec_data and streamheader fields from constraint caps
When converting discoverer output to an encoding profile, it makes sense to
omit these. It's very very unlikely that our encoder is going to produce bit
by bit the same codec_data or streamheader.

https://bugzilla.gnome.org/show_bug.cgi?id=765534
2016-04-25 16:07:50 +03:00
Sebastian Dröge
fd32d5812a encoding-profile: Don't put G_BEGIN_DECLS around #include statements
It should only be around our own declarations.
2016-04-25 15:06:23 +03:00
Wim Taymans
a12f51c3de video-converter: add more fastpaths for I420 -> RGB
Use the I420->BGRA and a new I420->ARGB to speed up any I420 to RGB
operation.
2016-04-22 15:30:19 +02:00
Josep Torra
1439b61694 sdp: update since markers to 1.8.1 for some new APIs
As we decided to backport some fixes we update the since markers.
2016-04-19 17:36:20 +02:00
Jan Schmidt
802eae296a Revert "audioringbuffer: start ringbuffer if needed upon commit"
This reverts commit 13ee94ef10.

Causes audio glitches at startup by starting to output segments
from the ringbuffer before it has been filled / fully prerolled.

https://bugzilla.gnome.org/show_bug.cgi?id=657076
2016-04-16 02:13:15 +10:00
Aleix Conchillo Flaqué
28cf2f02e7 sdpmessage: new gst_sdp_media_parse_keymgmt/gst_sdp_media_parse_keymgmt
We add a couple of new functions gst_sdp_media_parse_keymgmt and
gst_sdp_media_parse_keymgmt. We also implement
gst_sdp_message_attributes_to_caps and gst_sdp_media_attributes_to_caps
in terms of these new functions and also gst_mikey_message_to_caps.
2016-04-15 15:28:47 +02:00
Aleix Conchillo Flaqué
7a864c177f mikey: add new function gst_mikey_message_to_caps 2016-04-15 15:21:23 +02:00
Aleix Conchillo Flaqué
62e0e74759 mikey: allow passing srtp or srtcp to create mikey message
Current implementation requires all srtp and srtcp parameters to be
given in the caps. MIKEY uses only one algorithm for encryption and one
for authentication so we now allow passing srtp or srtcp parameters. If
both are given srtp parametres will be preferred.

https://bugzilla.gnome.org/show_bug.cgi?id=765027
2016-04-15 12:33:43 +02:00
Sebastian Dröge
a82ef8983e videometa: Initialize all fields of all metas with default values
The metas are not allocated with all fields initialized to zeroes.

https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-13 10:10:51 +03:00
Arjen Veenhuizen
c5ed98a35b videometa: Explicitly initialize GstVideoCropMeta on init
It is not allocated with all fields initialized to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=764902
2016-04-13 10:10:46 +03:00
Guillaume Desmottes
7c5dfd713c audioringbuffer: don't attempt to reorder position-less channels
As said in its doc GST_AUDIO_CHANNEL_POSITION_NONE is meant to be used
for "position-less channels, e.g. from a sound card that records 1024
channels; mutually exclusive with any other channel position".

But at the moment using such positions would raise a
'g_return_if_reached' warning as gst_audio_get_channel_reorder_map()
would reject it.

Fix this by preventing any attempt to reorder in such case as that's not
what we want anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=763799
2016-04-12 14:48:30 -04:00
Guillaume Desmottes
1c56cfa144 audio: add debug output if channels mapping does not match
https://bugzilla.gnome.org/show_bug.cgi?id=763985
2016-04-12 14:48:30 -04:00
Guillaume Desmottes
3cb08304da gst-audio: add gst_audio_channel_positions_to_string()
We currently don't log much about channel positions making debugging
harder as it should be. This is the first step in my attempt to improve
this.

https://bugzilla.gnome.org/show_bug.cgi?id=763985
2016-04-12 14:48:30 -04:00
Vivia Nikolaidou
a0cf3b4262 fdmemory, rtpbasedepayload: Ran gst-indent
https://bugzilla.gnome.org/show_bug.cgi?id=764948
2016-04-12 17:34:18 +03:00
Fabrice Bellet
bfcd0737b7 audio: Fix a race with the audioringbuffer thread
There is a small window of time where the audio ringbuffer thread
can access the parent thread variable, before it's initialized
by the parent thread. The patch replaces this variable use by
g_thread_self().

https://bugzilla.gnome.org/show_bug.cgi?id=764865
2016-04-11 21:43:13 +10:00
Víctor Manuel Jáquez Leal
37c4915109 libs: audio: split allocation query caps and pad caps
Since the allocation query caps contains memory size and the pad's caps
contains the display size, an audio encoder or decoder might need to allocate
a different buffer size than the size negotiated in the caps.

This patch splits this logic distinction for audiodecoder and audioencoder.

Thus the user, if needs a different allocation caps, should set it through
gst_audio_{encoder,decoder}_set_allocation_cap() before calling the negotiate()
vmethod. Otherwise the allocation_caps will be the same as the caps in the
src pad.

https://bugzilla.gnome.org/show_bug.cgi?id=764421
2016-04-05 11:37:15 +02:00
Víctor Manuel Jáquez Leal
b4a695cd11 libs: video: split allocation query caos and pad caps
Since the allocation query caps contains memory size and the pad's caps
contains the display size, a video encoder or decoder might need to allocate
a different frame size than the size negotiated in the caps.

This patch splits this logic distinction for videodecoder and videoencoder.

The user if needs a different allocation caps, should set the allocation_caps
in the GstVideoCodecState before calling negotiate() vmethod. Otherwise the
allocation_caps will be the same as the caps set in the src pad.

https://bugzilla.gnome.org/show_bug.cgi?id=764421
2016-04-05 11:32:50 +02:00
Víctor Manuel Jáquez Leal
052fe11949 audioencoder: fix gtk-doc comment format 2016-04-04 17:12:16 +02:00
Mikhail Fludkov
7a206336dd rtpbasedepayload: look at ssrc before sequence numbers
Doing so prevents us dropping buffers in the rare, but possible, situations,
when the stream changes SSRC and new sequence numbers does not differ
much from the last sequence number from previous SSRC. For example:
ssrc - 0xaaaa 101,102,103,104 ssrc - 0xbbbb 102, 103, 104, 105...
In the scenario above we don't want to drop the first 3 packets of
0xbbbb stream.

https://bugzilla.gnome.org/show_bug.cgi?id=764459
2016-04-03 11:49:16 +03:00
Tim-Philipp Müller
9e311960cd video: fix example code in gst_video_frame_map() docs
GST_VIDEO_FRAME_PLANE_PSTRIDE() does not exist.

https://bugzilla.gnome.org/show_bug.cgi?id=764414
2016-04-02 15:19:44 +01:00
Tim-Philipp Müller
2102fdc983 discoverer: copy over result and seekable fields when copying a discoverer info
The function gst_discoverer_info_copy doesn't copy the data members seekable
and result of the source GstDiscovererInfo.

In the case of copying a GstDiscovererInfo for later use, the seekbale will be
undefined, which in practice usually will be false, even though the seekable of
the original GstDiscovererInfo is true.

https://bugzilla.gnome.org/show_bug.cgi?id=762710
2016-04-02 10:09:46 +01:00
Nicolas Dufresne
a7809ecc8f video-format: Fix macro documentation
The parameter type was wrongly documenting that a GstVideoInfo structure
pointer was needed, while it needs a GstVideoFormatInfo structure
pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=764414
2016-03-31 13:32:32 -04:00
Tim-Philipp Müller
3ab183c758 rtp: rtcpbuffer: fix indentation
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-30 22:41:54 +01:00
Tim-Philipp Müller
5377088f1e rtp: rtpcbuffer: fix Since markers
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-30 22:41:54 +01:00
Alessandro Decina
74efde50ad audio-resampler: disable neon on arm64
Fix the build on arm64 by using HAVE_ARM_NEON instead of __ARM_NEON__.
2016-03-30 11:16:49 +11:00
Sebastian Dröge
0582d5a1bc audio-resampler: Use _mm_set_epi64x(0, x) instead of _mm_cvtsi64_si128(x) in more places 2016-03-29 12:11:48 +03:00
Scott D Phillips
079ceb894c video: add P010 format support
P010 is a YUV420 format with an interleaved U-V plane and 2-bytes per
component with the the color value stored in the 10 most significant
bits.

https://bugzilla.gnome.org/show_bug.cgi?id=761607
---
Changes since v2:
- Set bits=16 in DPTH10_10_10_HI
Changes since v1:
- Fixed x-offset calculation in uv.
- Added 6-bit shifts to FormatInfo.
2016-03-29 11:16:42 +03:00
Sebastian Dröge
38a5a3614e resampler: Use _mm_set_epi64x(0, x) instead of _mm_cvtsi64_si128(x)
The latter is only available on x86-64 for some reason.
2016-03-29 10:15:07 +03:00
Edward Hervey
de2ded9557 audio: Fix distcheck
Don't forget to dist the needed files (which don't need to be installed)
2016-03-29 08:22:29 +02:00
Wim Taymans
19f7d9ca46 audio-resampler: estimate memory usage in auto mode
Estimate the memory usage and use this to decide between full or
interpolated filter.
2016-03-28 15:37:36 +02:00
Wim Taymans
984ee8a3f6 audio-resampler: small optimizations 2016-03-28 13:25:55 +02:00
Wim Taymans
cf9059f070 audio-resampler: improve non-interleaved flags
Make it possible to have different interleaving on input and output
because we can quite trivially do that.
2016-03-28 13:25:55 +02:00
Wim Taymans
33855f0fe1 audio-resampler: unroll some more loops
Unroll some loops.
2016-03-28 13:25:55 +02:00
Wim Taymans
90a41b81dc audio-resampler: keep precision
Transpose and add before applying the cubic interpolation to avoid
overflows when using full precision.
2016-03-28 13:25:55 +02:00
Wim Taymans
cc9d8594fe audio-resampler: small cleanups 2016-03-28 13:25:55 +02:00
Wim Taymans
e209c0d565 audio-resampler: optimize no resampling
Switch to the faster nearest resample method when are doing no rate
conversion.
2016-03-28 13:25:54 +02:00
Wim Taymans
f692d5e459 audio-resampler: add VARIABLE_RATE flag
Add a VARIABLE rate flag that selects an interpolating filter.
Move some function setup code in the _new function.
2016-03-28 13:25:54 +02:00
Wim Taymans
7bb149dcc1 audio-resampler: more neon optimizations 2016-03-28 13:25:54 +02:00
Wim Taymans
6dd5e5259f audio-resampler: avoid overflow in cubic interpolation
Shift out an extra bit to have some more headroom when doing cubic
interpolation.
2016-03-28 13:25:54 +02:00
Wim Taymans
61460fdfad audio-resampler: overread only 8 taps
We only need 8 taps of zeroes as headroom for the SIMD optimized
functions.
2016-03-28 13:25:54 +02:00
Wim Taymans
4772ebbddf audio-converter: use helper to check intermediate format 2016-03-28 13:25:54 +02:00
Wim Taymans
00e5a8bab8 audio-resampler: fix phase 2016-03-28 13:25:54 +02:00
Wim Taymans
9182ea17b5 audio-resampler: fix neon assembler 2016-03-28 13:25:53 +02:00
Wim Taymans
027165621b audio-resampler: avoid some format conversion
Store the filter in the desired sample format so that we can simply do a
linear or cubic interpolation to get the new filter instead of having to
go through gdouble and then convert.
2016-03-28 13:25:53 +02:00
Wim Taymans
2c33c2134c audio-resampler: fix neon linear float interpolation 2016-03-28 13:25:53 +02:00
Wim Taymans
d969a7a9d8 audio-resampler: reorder filter coefficients for more speed
Reorder the filter coefficients to make it easier to use SIMD for
interpolation.
Fix orc flags a little.
Add specialized nearest resampling function.
2016-03-28 13:25:53 +02:00
Wim Taymans
107f53ea0a audio-resampler: remove stereo optimizations
The stereo optimizations don't give enough benefit.
Rename none to full to make it clear that we use a full filter instead
of an interpolated one
2016-03-28 13:25:53 +02:00
Wim Taymans
b820074a49 audio-resample: remove neon double stubs
NEON does not have double types.
2016-03-28 13:25:53 +02:00
Wim Taymans
6f9237dfb5 audio-resampler: add more neon optimizations 2016-03-28 13:25:53 +02:00
Wim Taymans
307f360cca audio-resampler: add more neon optimizations 2016-03-28 13:25:53 +02:00
Wim Taymans
d5abdd83c9 audio-resampler: add neon optimizations
Unroll some more loops in the fallback code that seems to work fine
for ARM.
Add some simple ARM optimizations taken from speex.
2016-03-28 13:25:53 +02:00
Wim Taymans
25d81ffb55 audio-resampler: give better hints about the precision
Give better hints to the compiler about the precision we expect from
the multiplications.
2016-03-28 13:25:53 +02:00
Wim Taymans
ea497b509f audio-resample: small optimizations
Remove some inline functions that are called in the slow path.
Unroll C fallback functions a little.
2016-03-28 13:25:52 +02:00
Wim Taymans
167a415717 audio-resampler: Use n_phases when calculating taps offset
Tweak linear interpolation oversampling.
Clear filter cache on rate changes when using a full filter.
2016-03-28 13:25:52 +02:00
Wim Taymans
524ea147cc audio-resampler: improve filter construction
Remove some unused variables from the inner product functions.
Make filter coefficients by interpolating if required.
Rename some fields.
Try hard to not recalculate filters when just chaging the rate.
Add more proprties to audioresample.
2016-03-28 13:25:52 +02:00
Wim Taymans
0f3ff9177f audio-resampler: avoid overflow in fraction calculation 2016-03-28 13:25:52 +02:00
Wim Taymans
651ae201bc audio-resampler: increase precision 2016-03-28 13:25:52 +02:00
Wim Taymans
4cb52f1831 audio-resampler: add more optimizations 2016-03-28 13:25:52 +02:00
Wim Taymans
bdf194a09a audio-resample: fix taps conversion
We do taps conversion in place so make sure we don't overwrite the
input with temporary data.
Optimize some more gint16 functions.
2016-03-28 13:25:52 +02:00
Wim Taymans
f6e0481ab5 audio-resampler: Improve taps memory layout
Rearrange the oversampled taps in memory to make it easier to use
SIMD instructions on them. this simplifies some sse code.
Add some more optimizations
2016-03-28 13:25:52 +02:00
Wim Taymans
e9fc039bb1 audio-resampler: add cubic interpolation 2016-03-28 13:25:52 +02:00
Wim Taymans
58dcd0587d audio-resampler: add more functions
Use some macros to generate more functions
2016-03-28 13:25:51 +02:00
Wim Taymans
e02af5c534 audio-resampler: add linear interpolation method
Make more functions into macros.
Add linear interpolation of filter coefficients.
2016-03-28 13:25:51 +02:00
Wim Taymans
05d238def9 audio-resampler: add max-phase-error config 2016-03-28 13:25:51 +02:00
Wim Taymans
13e5b986cd audio-resampler: improve tap calculation
Return the taps from make_taps, this makes it possible to not actually
have to cache the taps when we want to.
Fix overflow in phase calculation.
2016-03-28 13:25:51 +02:00
Wim Taymans
6397db74cd audio-resampler: fix guint -> gint 2016-03-28 13:25:51 +02:00
Wim Taymans
45574ba4f4 audio-resampler: improve phase error
Accept a phase error of maximum 10%, which turns out to be inaudible.
2016-03-28 13:25:51 +02:00
Wim Taymans
b0b3350717 audio-resampler: improve phase calculation
Also calculate the GCD with the current phase so that we can accurately
represent the current phase with the new resample rates.
2016-03-28 13:25:51 +02:00
Wim Taymans
bbdb447b2b audio-resampler: fix history after buffer resize
When we resize the temp buffer, move the history in its new place.
2016-03-28 13:25:51 +02:00
Wim Taymans
ed747492ef audio-resampler: add reset function
Add a function to reset the audio-resampler.
Use new function in audio-converter
Use the new functions in gstaudioresample and fixup drain functions.
2016-03-28 13:25:51 +02:00
Wim Taymans
ea469ad9a8 audio-resampler: Small fixes
Fix the phase.
Reset the new sample buffer with 0.
Move samples around when we change the filter size.
2016-03-28 13:25:51 +02:00
Wim Taymans
a489f9ddb3 audio-resampler: Rework make_taps
Make it return a pointer to the generated taps. That way we can later
decide to actually cache it or not.
2016-03-28 13:25:51 +02:00
Wim Taymans
05eb109c0d audio-resampler: handle filter length changes
Update the buffer with history samples when the filter length changes
because of an update of the parameters or sample rates.
2016-03-28 13:25:51 +02:00
Wim Taymans
8dfb3ffb99 audio-resampler: fix samples_avail
We only know the taps after we calculate them.
2016-03-28 13:25:51 +02:00
Wim Taymans
c8fc9d88a7 audio-resampler: work on dynamically changing the samplerate
Calculate the new phase for the new sample rate.
Fix some docs.
2016-03-28 13:25:51 +02:00
Wim Taymans
4e48867097 audio-resampler: small cleanups 2016-03-28 13:25:51 +02:00
Wim Taymans
85c77659b9 audio-resampler: add fallback to mono function
Remove stereo implementations. Implement fall back to mono functions
when the stereo function is missing.
2016-03-28 13:25:50 +02:00
Wim Taymans
2555317a71 audio-resampler: add float stereo SSE function 2016-03-28 13:25:50 +02:00
Wim Taymans
e74c207433 audio-resampler: Fix compilation of intrinsics
Only compile intrinsics when we are building for the selected
architecture.
Add sse4.1 optimized int32 resampler code.
2016-03-28 13:25:50 +02:00
Wim Taymans
98bd349b88 audioconvert: only resample on supported formats 2016-03-28 13:25:50 +02:00
Wim Taymans
d348fbb9b9 audio-converter: make some optimized functions
Make an optimized function that just calls the resampler when possible.
Optimize the resampler transform_size function a little.
2016-03-28 13:25:50 +02:00
Wim Taymans
23531bdc93 audio-resampler: remove mirror function
We don't need to mirror the input, just assume 0 samples.
Always move the processed samples to the start of the buffer.
Add some G_LIKELY
2016-03-28 13:25:50 +02:00
Wim Taymans
6f685410b1 audio-resampler: also enable sse when sse2 is available 2016-03-28 13:25:50 +02:00
Wim Taymans
71871c5048 audio-resampler: optimizations
Improve int16 resampling by using pmaddwd
Use intrinsics to scale and pack int16 samples
Align the coefficients so that we can use aligned loads
Add padding to taps and samples so that we don't have to use partial
loads for the remainder of the loops.
Remove copy_n, we can reuse the plain copy function with some new
parameters.
Align and pad the sample array.
2016-03-28 13:25:50 +02:00
Wim Taymans
f55a67ca7c audio-resampler: make pluggable optimized functions
Add support for x86 specialized functions and select them at runtime.
2016-03-28 13:25:50 +02:00
Wim Taymans
819c4c26c7 audio-resampler: combine functions 2016-03-28 13:25:50 +02:00
Wim Taymans
de37491662 audio-converter: simplify API
Remove the consumed/produced output fields from the resampler and
converter. Let the caler specify the right number of input/output
samples so we can be more optimal.
Use just one function to update the converter configuration.
Simplify some things internally.
Make it possible to use writable input as temp space in audioconvert.
2016-03-28 13:25:50 +02:00
Wim Taymans
1d9a793545 audio-converter: more work on resampling
- Fix the resampler in the audio converter
- fix memory leaks
2016-03-28 13:13:59 +02:00
Wim Taymans
75d668e152 audio-converter: add resampler
Add a resampler to the processing chain when needed.
port the audio resampler to the new audioconverter library
2016-03-28 13:13:59 +02:00
Tim-Philipp Müller
f4fb623aba audiodecoder: avoid unnecessary gst_pad_has_current_caps() checks
No need to do this for each input buffer, we have the input caps
stored somewhere already.

https://bugzilla.gnome.org/show_bug.cgi?id=763337
2016-03-24 14:49:12 +02:00
Jimmy Ohn
65f721b326 codec-utils: Add utilities for AAC and the AACHead header
Add utilities about the channels and sample rate for AAC.

https://bugzilla.gnome.org/show_bug.cgi?id=749110
2016-03-24 14:27:21 +02:00
Vineeth TM
44b70ca3a1 base: use new gst_element_class_add_static_pad_template()
https://bugzilla.gnome.org/show_bug.cgi?id=763075
2016-03-24 14:25:41 +02:00
Stian Selnes
93196092d1 rtcpbuffer: Add API for APP packets
https://bugzilla.gnome.org/show_bug.cgi?id=761944
2016-03-24 14:24:11 +02:00
Haakon Sporsheim
d8e9a711a0 rtcpbuffer: Add profile-specific extension API.
https://bugzilla.gnome.org/show_bug.cgi?id=761950
2016-03-24 14:22:54 +02:00
Víctor Manuel Jáquez Leal
327d617d39 install-plugins: update documentation
Use gst-inspect-1.0 instead of gst-inspect-0.10

https://bugzilla.gnome.org/show_bug.cgi?id=763316
2016-03-24 10:29:27 +02:00
Wim Taymans
c0ef1ea553 audio-channel-mixer: improve non-interleaved flags
Make separate flags for non-interleaved input and output because the
channel mixer should be able to convert between the two layouts in the
future.
2016-03-04 17:17:33 +01:00
Tim-Philipp Müller
b424712644 video: update disted orc backup file
https://bugzilla.gnome.org/show_bug.cgi?id=761851
2016-02-27 00:13:03 +00:00
Göran Jönsson
babcf4d30c video-converter: add direct UYVY to GRAY8 conversion function
https://bugzilla.gnome.org/show_bug.cgi?id=761851
2016-02-26 23:56:51 +00:00
Lim Siew Hoon
5ae5f9055f pbutils: docs: Remove the empty lines in between <refsect2> and </refsect2>
They are converted into <para></para> by gtk-doc...

https://bugzilla.gnome.org/show_bug.cgi?id=762674
2016-02-26 14:46:44 +02:00
Sebastian Dröge
87f380867b audiovisualizer: Let GstAudioVisualizerShader enum GType be autogenerated by glib-mkenums
That happens automatically already anyway.
2016-02-25 20:40:02 +02:00
Tim-Philipp Müller
c64dae3e1d video: flesh out docs for gst_video_frame_map() 2016-02-25 17:46:31 +00:00
Luis de Bethencourt
e23b12b1c9 visual: correct type name
Base class type name should not reference libvisual since not all child
elements use this. This was an oversight when merging audiovisualizers into
a common base class.
2016-02-25 10:51:50 +00:00
Wim Taymans
221e661f07 audio-quantize: fix feedback dither
Make sure we allocated enough extra space in the error buffer to
store the feedback error.
2016-02-24 14:57:31 +01:00
Wim Taymans
3e8cf31a96 audio-converter: perform dithering on the current format
Use the current (intermediate) format to decide how to set up dithering
instead of the input format.
2016-02-24 14:57:31 +01:00
Sebastian Dröge
2c29f09da8 rtpbasepayload: Handle gst_pad_get_current_caps() returning NULL gracefully 2016-02-23 18:23:45 +02:00
Adam Miartus
2bab28f494 tag: id3v2: read conductor tag
ID3v2 features the TPE3 info frame, which contains information
about the conductor.

https://bugzilla.gnome.org/show_bug.cgi?id=762451
2016-02-22 21:16:54 +00:00
Tim-Philipp Müller
a62c7bd54c Fix use of undeclared core debug category symbols
libgstreamer currently exports some debug category
symbols GST_CAT_*, but those are not declared in any
public headers.

Some plugins and libgstvideo just use GST_DEBUG_CATEGORY_EXTERN()
to declare and use those, but that's just not right at
all, and it won't work on Windows with MSVC. Instead look
up the categories via the API.
2016-02-20 11:31:43 +00:00
Tim-Philipp Müller
ddfe7a2808 win32: remove outdated build cruft
This hasn't been touched for generations, doesn't work,
and is just causing confusion. We also don't want to
maintain these files manually.
2016-02-20 10:05:17 +00:00
Havard Graff
1cb19d1146 rtp: build audio library before rtp
Because audio-enumtypes.h needs to be available for
gstrtpbaseaudiopayload.c

https://bugzilla.gnome.org/show_bug.cgi?id=761949
2016-02-16 17:42:44 +02:00
Stian Selnes
85f297d648 videoencoder: Fix leak when pre_push does not return OK
https://bugzilla.gnome.org/show_bug.cgi?id=761951
2016-02-13 10:09:45 -03:00
Wim Taymans
5cef3f31ad audio-converter: make a copy if we can't write in unpack
If we don't have writable memory, make sure to make a copy of the input
samples into a temporary (writable) buffer, even if we are dealing with
a native intermediate format that we don't need to call the unpack
function for.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=761655
2016-02-10 12:51:23 +01:00
HoonHee Lee
dfa2f49523 audio/videodecoder: Minor cleanup of last commit
https://bugzilla.gnome.org/show_bug.cgi?id=761218
2016-01-28 13:21:49 +01:00
HoonHee Lee
15df3c812b audio/videodecoder: use gst_pad_peer_query_caps to make output caps
gst_pad_get_allowed_caps() will return NULL if the srcpad has no peer.
In that case, use gst_pad_peer_query_caps() with template caps as filter
to have negotiated output caps properly before forwarding GAP event.

https://bugzilla.gnome.org/show_bug.cgi?id=761218
2016-01-28 11:34:22 +01:00
Aurélien Zanelli
43db5e5ebd video-format: fix GstVideoFormatInfo documentation warnings
Add missing ':' to tile_ws and tile_hs fields documentation to avoid
bad render of these two fields, mark reserved bytes as private to hide
field and avoid gtkdoc warning and add parameters description to
documented macro to avoid gtkdoc warnings.

https://bugzilla.gnome.org/show_bug.cgi?id=761132
2016-01-26 14:48:19 -05:00
Wim Taymans
03566e5002 audio-converter: add reset function 2016-01-26 17:19:34 +01:00
Wim Taymans
2d971df593 audio-converter: handle NULL input
Allow NULL as input to mean silence samples.
2016-01-26 17:19:34 +01:00
Wim Taymans
6050509b65 audio-converter: improve _update_config
Allow NULL config to keep the existing parameters.
Fix the docs.
2016-01-26 17:19:34 +01:00
Wim Taymans
0f757bc23c audio-converter: audio-converter: make some optimized functions
Make optimized functions for generic and passthrough conversion.
2016-01-26 17:19:34 +01:00
Wim Taymans
cde091ae81 audio-quantize: add _reset function
Add a reset function that clears any history.
2016-01-26 16:45:44 +01:00
Sebastian Dröge
a7b86878fb audio: Move audioaggregator base class to a library
It's useful enough already to be used in other elements for audio aggregation,
let's give people the opportunity to use it and give it some API testing.

https://bugzilla.gnome.org/show_bug.cgi?id=760733
2016-01-22 12:39:48 +02:00
Wim Taymans
3674742957 audio-converter: ensure correct alignment of samples
Make sure that the data we allocate for our temporary buffers is
properly aligned.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=760938
2016-01-21 16:27:50 +01:00
Wim Taymans
c99caa6b37 video-color: add Adobe RGB primaries and transfer function 2016-01-21 10:45:40 +01:00
Wim Taymans
773e2476e6 video-info: enfore RGB matrix for RGB formats
In gst_video_info_to_caps(), make sure we end up with an RGB matrix for
RGB formats and warn when the GstVideoInfo colorimetry is wrong.
In gst_video_info_from_caps(), fix the GstVideoInfo with an RGB matrix
for RGB formats and warn about inconsistent caps.

See https://bugzilla.gnome.org/show_bug.cgi?id=759624
2016-01-20 10:19:34 +01:00
Wim Taymans
83fe1c7705 video-converter: ignore matrix for RGB formats
For RGB formats, the matrix in the colorimetry (conversion from YUV to
RGB) is irrelevant and we should ignore it and assume the identity
transform for everything we do.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=759624
2016-01-20 10:02:20 +01:00
Thibault Saunier
1bf18f6f44 videoencoder: Deprecate GST_VIDEO_ENCODER_FLOW_DROPPED
It was never actually supported or used

https://bugzilla.gnome.org/show_bug.cgi?id=760666
2016-01-20 09:51:09 +02:00
Thibault Saunier
7d35a07f1a Revert "videoencoder: Release video frame when ->handle return ERROR or DROPPED"
This reverts commit 63517d0ed3.

It was wrong ref counting wise and we decided to deprecated DROPPED
return value

https://bugzilla.gnome.org/show_bug.cgi?id=760666
2016-01-20 09:50:17 +02:00
Arun Raghavan
91084f49c0 appsrc: Minor documentation cleanup 2016-01-19 12:56:20 +05:30
Evan Callaway
a1f789770d Add WAIT_ON_EOS flag to gstappsink.
If set, an appsink that receives an EOS will wait until all of its buffers have been processed before continuing.

https://bugzilla.gnome.org/show_bug.cgi?id=756187
2016-01-18 13:23:55 +02:00
Sebastian Dröge
761142e15a audioencoder: Add note to the documentation about various settings being reset before set_format()
It's quite unexpected behaviour that various subclass settings are just
reset before set_format(). Unfortunately changing this now has the risk
of breaking existing code but we should reconsider this for 2.0.
2016-01-16 11:05:13 +01:00
Thibault Saunier
63517d0ed3 videoencoder: Release video frame when ->handle return ERROR or DROPPED
https://bugzilla.gnome.org/show_bug.cgi?id=760666
2016-01-16 08:53:35 +01:00
Wim Taymans
1b412a523d audio-channel-mixer: round before truncating
Round the result before truncating for int channel mixing.
2016-01-12 15:56:36 +01:00
Wim Taymans
ef3844cf6f audio-converter: Avoid conversion when possible
When the input and output formats are the same and in a possible
intermediate format, avoid unpack and pack.
Never do passthrough channel mixing.
Only do dithering and noise shaping in S32 format
2016-01-12 15:27:16 +01:00
Wim Taymans
4d47d43a13 audio-channel-mixer: add more formats
Add support for float and int16 mixing
Remove in-place processing, this simplifies things as we won't be using it.
Don't do clipping for float audio formats
2016-01-12 11:43:20 +01:00
Wim Taymans
8a8b12189e audio-converter: improve processing loop
Process as many samples as we can from the input and return the number
of processed samples from the chain. This simplifies some code.
Fix the IN_WRITABLE handling, don't overwrite the flags.
2016-01-12 11:37:17 +01:00
Wim Taymans
85afad72ec audio-converter: small API tweaks
Pass flags in _converter_new() so that we can configure ourselves
differently depending on some options.
SOURCE_WRITABLE -> IN_WRITABLE because the array is called 'in'
2016-01-08 17:34:50 +01:00
Wim Taymans
7f49b946cc audio-converter: prepare API for rate changes
Use the update function to update the sample rates along with the config
once we implement resampling.
2016-01-08 17:28:31 +01:00
Wim Taymans
980163457e audio-convert: simplify API
Simplify the API, we don't need the consumed and produced output
arguments. The caller needs to use the _get_in_frames/get_out_frames API
to check how much input is needed and how much output will be produced.
2016-01-08 17:19:58 +01:00
Sebastian Dröge
0da2709d0c audio/video: Use G_GNUC_INTERNAL for internal functions 2016-01-08 17:50:50 +02:00
Wim Taymans
40f4c5e352 audio: GstAudioChannelMix -> GstAudioChannelMixer
Rename the GstAudioChannelMix object to GstAudioChannelMixer because it
looks better and to avoid a conflict with a library in -bad.
2016-01-08 16:41:17 +01:00
Aurélien Zanelli
c119715e25 videopool: store videoinfo after choosing the biggest buffer size
Otherwise, pool could be negotiated with a size which will be different
from the one used in allocation which is the GstVideoInfo.

https://bugzilla.gnome.org/show_bug.cgi?id=760222
2016-01-06 11:29:42 -05:00
Tim-Philipp Müller
7ffd9ce291 docs: remove dummy function declarations with G_INLINE_FUNCTION for gtk-doc
gtk-doc can handle static inline functions just fine these days,
there's no need for this stuff any more.
2016-01-03 17:21:18 +00:00
Sebastian Dröge
4d1726fddd riff: Add missing closing parenthesis to GST_RIFF_WAVE_FORMAT_ANTEX_ADPCME
Apparently this #define is unused.
2016-01-03 10:33:53 +02:00
Stefan Sauer
f4ae53144e riff-ids: remove trailing whitespace 2016-01-02 23:29:43 +01:00
Stefan Sauer
adb24a54ca riff-ids: fix two swapped ids
For these fourcc ids the name and value is swapped. This was causing a warning
when registering the avi ids.
2016-01-02 23:29:43 +01:00
Sebastian Dröge
81cfb23945 sdp: Also reorder SUBDIRS to try even harder to build the RTP library first 2015-12-31 20:43:28 +02:00
Sebastian Dröge
bbd82057ab sdp: The SDP library depends on the RTP library now and is not independent anymore
Fix up the build dependencies.
2015-12-31 20:41:38 +02:00
Hyunjun Ko
682b523652 sdp: add helper fuctions from/to sdp from/to caps
<gstsdpmessage.h>
GstCaps*       gst_sdp_media_get_caps_from_media   (const GstSDPMedia *media, gint pt);
GstSDPResult   gst_sdp_media_set_media_from_caps   (const GstCaps* caps, GstSDPMedia *media);
gchar *        gst_sdp_make_keymgmt                (const gchar *uri, const gchar *base64);
GstSDPResult   gst_sdp_message_attributes_to_caps  (GstSDPMessage *msg, GstCaps *caps);
GstSDPResult   gst_sdp_media_attributes_to_caps    (GstSDPMedia *media, GstCaps *caps);

<gstmikey.h>
GstMIKEYMessage * gst_mikey_message_new_from_caps  (GstCaps *caps);
gchar *           gst_mikey_message_base64_encode  (GstMIKEYMessage* msg);

https://bugzilla.gnome.org/show_bug.cgi?id=745880
2015-12-31 17:11:57 +02:00
Sebastian Dröge
43655580e7 encoding-profile: Check for FALSE'ness directly, not by comparing with FALSE 2015-12-29 17:56:21 +02:00
Sebastian Dröge
f31240a765 encoding-profile: Don't use preset_name string after free
When we run the loop for another time and do not have a preset name, we would
try to print the preset name of a previous iteration that is already freed.

Also move some other variables into the block where they are actually used
to prevent similar mistakes in the future.

CID 1346536
2015-12-29 17:55:23 +02:00
Stefan Sauer
7bbfa39ada audioconvert: fix passthrough operation
We did not take the sample size into account. Rearrange the tests to have more
conversion test and an extra test case for passthrough operations.

Fixes #759890
2015-12-29 14:40:32 +01:00
Reynaldo H. Verdejo Pinochet
e61f5b2138 videoblend: special case 1x1 src dims on increment computation
Fix crash with 1x1 overlay pixmap

https://bugzilla.gnome.org/show_bug.cgi?id=757290
2015-12-28 14:16:41 -08:00
Stefan Sauer
0bd3f818bb audio-converter: code cleanup
Rename samples to num_samples, since we also have samples in chain, but that is
the data pointer. Always use gzize for num_samples. Make the log output a bit
more homogenous.
2015-12-27 19:25:20 +01:00
Sebastian Dröge
3459bd6854 audio: Fix some documentation warnings
Remove/rename function parameters and skip some functions that can't
be used by bindings as they are now.
2015-12-26 09:43:56 +01:00
Sebastian Dröge
3ba59f0b62 videoaffinetransformmeta: Add (transfer none) annotation for return value 2015-12-26 09:43:51 +01:00
Sebastian Dröge
7fddeaa878 pbutils: Link to libgstbase for bytewriter and adapter 2015-12-24 13:59:52 +01:00
Thibault Saunier
512ac3ea72 encodebin: Implement an encoding profile serialization format
https://bugzilla.gnome.org/show_bug.cgi?id=759356
2015-12-24 09:52:53 +01:00
Kazunori Kobayashi
d43f1b2a5a appsrc: Clear is_eos flag when receiving the flush-stop event
The EOS event can be propagated to the downstream elements when
is_eos flag remains set even after leaving the flushing state.
This fix allows this element to normally restart the streaming
after receiving the flush event by clearing the is_eos flag.

https://bugzilla.gnome.org/show_bug.cgi?id=759110
2015-12-19 11:35:39 +01:00
Wim Taymans
08734e7598 audio-converter: rework the main processing loop
Rework the main processing loop. We now create an audio processing
chain from small core functions. This is very similar to how the
video-converter core works and allows us to statically calculate an
optimal allocation strategy for all possible combinations of operations.
Make sure we support non-interleaved data everywhere.
Add functions to calculate in and out frames and latency.
2015-12-16 11:13:15 +01:00
Xavier Claessens
429860e51f base: Add g_autoptr() support to all types
https://bugzilla.gnome.org/show_bug.cgi?id=754464
2015-12-14 13:39:43 -05:00
Sebastian Dröge
b0c834df1b rtspconnection: Properly initialize stack-allocated RTSP message to all-zeroes 2015-12-14 19:03:33 +01:00
Evan Callaway
5ac65d9e3a rtspconnection: Use relative URI for non-proxy tunneled requests
Match the section 5.1.2 of the HTTP/1.0 spec by using relative URIs unless we
are using a proxy server. Also, send Host header for compatability with
HTTP/1.1 and some HTTP/1.0 servers.

https://bugzilla.gnome.org/show_bug.cgi?id=758922
2015-12-14 18:21:10 +01:00
Evan Callaway
65c7bd7a2c rtspconnection: Support authentication during tunneling setup
gst_rtsp_connection_connect_with_response accepts a response pointer
which it fills with the response from setup_tunneling if the
connection is configured to be tunneled.  The motivation for this is to
allow the caller to inspect the response header to determine if
additional authentication is required so that the connection can be
retried with the appropriate authentication headers.

The function prototype of gst_rtsp_connection_connect has been
preserved for compatability with existing code and wraps
gst_rtsp_connection_connect_with_response.

https://bugzilla.gnome.org/show_bug.cgi?id=749596
2015-12-14 16:00:45 +01:00
Sebastian Dröge
d6be67265f rtpbasedepayload: Check if the packet loss event actually has timestamp and duration fields
CID 1139615
2015-12-14 13:11:21 +01:00
Wim Taymans
f5a3f70571 audio: adapt API for non-interleaved formats
Allow an array of sample blocks to be passed to the channel mix and
quantizer functions to support non-interleaved formats.
2015-12-14 09:16:08 +01:00
Wim Taymans
aec17c63fd audio-converter: improve API for non-interleaved formats
Make it possible to pass an array of sample blocks when dealing with
non-interleaved formats.
2015-12-14 09:16:08 +01:00
Luis de Bethencourt
055ed65d92 riff: add FourCC aliases
Support media using the aliases defined in http://www.fourcc.org/ that are
exact duplicates of already known codes.
2015-12-12 20:22:44 +00:00
Luis de Bethencourt
98e93ec5ee riff: use defined FourCC
Make gst_riff_create_video_caps() use the FourCC available in riff-ids.h,
like gst_riff_create_audio_caps() does.
2015-12-12 20:22:09 +00:00
Julien Isorce
4f396ae61c videodecoder: add some debug around pool negotiation
It lets us know easily which pool is activated or
inactivated during the negotiation.

https://bugzilla.gnome.org/show_bug.cgi?id=720597
2015-12-11 14:55:46 +00:00
Song Bing
a476145797 video/convertframe: Add crop meta support via videocrop
https://bugzilla.gnome.org/show_bug.cgi?id=759329
2015-12-11 16:14:59 +02:00
Tim-Philipp Müller
f0db396e63 rtpbasedepay: when setting discont flag make sure rtpbuffer is current
Depayloaders will look at rtpbuffer->buffer for the discont flag.
When we set the discont flag on a buffer in the rtp base depayloader
and we have to make the buffer writable, make sure the rtpbuffer
actually contains the newly-flagged buffer, not the original input
buffer. This was introduced with the addition of the process_rtp_packet
vfunc, but would only trigger if the input buffer wasn't flagged
already and was not writable already.
2015-12-11 11:06:35 +00:00
Tim-Philipp Müller
86350ff8b7 rtpbasedepay: fix possible refcounting issue when detecting a discont
When we detect a discont and the input buffer isn't already flagged
as discont, handle_buffer() does a gst_buffer_make_writable() on the
input buffer in order to set the flag. This assumed it had ownership
of the input buffer though, which it didn't. This would still work
fine in most scenarios, but could lead to crashes or mini object
unref criticals in some cases when a discont is detected, e.g. when
using pcapparse in front of a depayloader. This problem was
introduced in bc14cdf529.
2015-12-11 10:38:14 +00:00
Wim Taymans
5e55968546 audio-convert: improve converter API
Improve the converter API to allow for an max input and output number of
samples and return the number of consumed/produced samples.
2015-12-09 17:16:26 +01:00
Philippe Normand
872f40d7d9 appsrc: duration query support based on the size property
https://bugzilla.gnome.org/show_bug.cgi?id=759126
2015-12-08 12:42:46 +02:00
Edward Hervey
d34aaf9e9b videodecoder: Avoid pushing buffers before segment start
In the case where the stream doesn't have a framerate set and the frames
don't have a duration set, we still want to use the clipping path to
make sure we don't push buffers outside of the segment.

The problem was the previous iteration was setting a duration of 2s, which
meant that any buffer which was less than 2s before the segment start would
end up getting pushed.

Instead, use a saner 40ms (25fps single frame duration) to figure out whether
the frame could be within the segment or not
2015-12-03 16:42:50 +01:00
Reynaldo H. Verdejo Pinochet
4ed7b0a0e6 Drop usage of deprecated g-ir-scanner --strip-prefix flag 2015-12-02 20:19:43 -08:00
Edward Hervey
f9b9472ad4 discoverer: Also consider XSUB as a subtitle format 2015-12-02 16:37:50 +01:00
Edward Hervey
817c780380 pbutils: Add description for XSUB subpicture format 2015-12-02 16:37:50 +01:00
Edward Hervey
27f2328348 riff: 'DXSA' is the same as 'DXSB'
Which is subpicture/x-xsub
2015-12-02 16:37:50 +01:00
Evan Callaway
e47643122c rtspconnection: Update capitalization of x-sessioncookie
Some servers incorrectly parse header names with strict case-sensitivity.  For
compatibility with these systems change X-Sessioncookie to x-sessioncookie.

https://bugzilla.gnome.org/show_bug.cgi?id=758921
2015-12-02 16:29:53 +02:00
Sebastian Dröge
2f3eb47a95 audiobasesrc: Post latency message on the bus after set_caps()
The latency is only known once the caps are known, and might change
whenever the caps are changing.

https://bugzilla.gnome.org/show_bug.cgi?id=758911
2015-12-01 19:58:25 +02:00
Michael Olbrich
43155807cd audiobasesink: Post latency message on the bus after set_caps()
Any latency query before this will not get the correct latency so a new
latency query should be triggered once the audio sink know its own latency.

Without this the initial latency query from the pipeline arrives too early
sometimes and the resulting latency is too short.

https://bugzilla.gnome.org/show_bug.cgi?id=758911
2015-12-01 19:58:25 +02:00
Luis de Bethencourt
2a70c86e85 codec-utils: accept wrong version field in OpusHead header
Some Opus files found on the wild have 0 in the version field of the
OpusHead header, instead of the correct value of 1. The files still
play, don't make this error fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=758754
2015-12-01 15:47:35 +00:00
William Manley
aae0dc37c9 allocators: add debug category for fd memory and allocator
Debugging can now be viewed by setting GST_DEBUG=fdmemory:9

https://bugzilla.gnome.org/show_bug.cgi?id=758744
2015-11-27 15:33:47 +00:00
Ravi Kiran K N
df5725e683 id3v2frames: Handle private frames
Handle PRIV ID3 tag having owner information (string)
and binary data, add to tag messages list.

https://bugzilla.gnome.org/show_bug.cgi?id=730926
2015-11-20 20:20:18 +00:00
Tim-Philipp Müller
93a92d7f70 tags: id3: make sure to register private-id3v2-frame tag before using it 2015-11-20 19:15:22 +00:00
Ognyan Tonchev
7a702df863 rtspconnection: Add support for parsing custom headers
https://bugzilla.gnome.org/show_bug.cgi?id=758235
2015-11-18 00:15:32 +00:00
Reynaldo H. Verdejo Pinochet
0c95b0a738 Remove unnecessary NULL checks before g_free()
g_free() is NULL-safe
2015-11-17 14:50:27 -08:00
Luis de Bethencourt
09c881ee14 codec-utils: guint8 can't hold value over 255
channels is a guint8, so the max value is 255 and checking if it value is
> 256 will never be false.

CID 1338687, CID 1338688
2015-11-12 14:39:22 +00:00
Luis de Bethencourt
df16e8dd5a audio-converter: remove unneeded check for unsigned < 0
Commit ff6d1a2a25 changed sample's type from
gint to gsize (and renamed it to in_samples). gsize is an unsigned long,
which means it can never be a negative value and the check making sure that
in_samples is >= 0 is never going to be false. Removing it.

CID 1338689
2015-11-12 14:18:30 +00:00
Vineeth TM
3f099e3c29 pbutils:encoding-target: Fix string memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=757926
2015-11-11 15:40:52 +01:00
Vineeth TM
b61e1465b7 audio-quantize: Fix dither_buffer memory leak
https://bugzilla.gnome.org/show_bug.cgi?id=757928
2015-11-11 15:01:08 +01:00
Matthew Waters
0b98ed32ce videometa: add GstVideoAffineTransformationMeta
Adds a simple 4x4 affine transformations meta for passing arbitrary
transformations on buffers.

Based on patch by Matthieu Bouron

https://bugzilla.gnome.org/show_bug.cgi?id=731791
2015-11-11 00:19:25 +11:00
Wim Taymans
ff6d1a2a25 audio-converter: add output size argument
Make it possible to have a different number of output samples than input
samples when we, for example, want to add resampling later.
2015-11-10 09:53:59 +01:00
Thibault Saunier
629b63d1f2 discoverer: Check API arguments and assert if needed 2015-11-07 00:46:47 +01:00
Wim Taymans
30977cf1a5 audio-converter: require interleaved samples and no resampling
We can't yet do resampling or anything other than interleaved audio.
2015-11-06 18:00:41 +01:00
Wim Taymans
7abed02858 audio: update ORC dist files 2015-11-06 17:54:21 +01:00
Wim Taymans
e3f0f3b91e audio-converter: move audio converter to audio libs
Move the audio-converter helper to the audio library.
2015-11-06 17:53:22 +01:00
Wim Taymans
dfa25a40fc audio-channel-mix: move channel mixer to audio libs
Move the channel mixer code to the audio library
2015-11-06 17:39:33 +01:00
Wim Taymans
b8bea9d8be audio: add debug categories 2015-11-06 17:29:22 +01:00
Wim Taymans
59db8ce542 audio-quantize: update docs
Update docs
Add another flag for the quantizer
2015-11-06 13:02:19 +01:00
Wim Taymans
dfbeb78342 audio: update orc files 2015-11-06 12:37:14 +01:00
Wim Taymans
c36ac3ce45 audioconvert: move audio quantize code to libs
Move the audio quantize code from audioconvert to the audio library.
work on making an audio converter helper function similar to the video
converter.
Fold fastrandom directly into the quantizer, add some ORC code to
optimize this later.
2015-11-06 12:10:48 +01:00
Wim Taymans
a7789854d5 audio-channels: rename get_default_mask
Rename _get_default_mask() to _get_fallback_mask() to make it more
clear that the function only provides a fallback if nothing else can be
done. Also clarify this in the documentation.

API: gst_audio_channel_get_fallback_mask()
2015-11-05 12:50:18 +01:00
Wim Taymans
f86ed8cdf6 audio-channels: make method to get default channel-mask
Add a new method to get the default channel-mask.
Use the new method on audiodecoder and audioconvert.

API: gst_audio_channel_get_default_mask()
2015-11-05 10:52:53 +01:00
Arnaud Vrac
dfe250d17d video: blend using OVER operation
Also support all premultiplied/non-premultiplied source/destination
configurations

https://bugzilla.gnome.org/show_bug.cgi?id=681447
2015-11-04 21:58:32 +01:00
Sebastian Dröge
bcd7b2fff2 codec-utils: Add utilities for Opus caps and the OpusHead header
https://bugzilla.gnome.org/show_bug.cgi?id=757152
2015-11-03 20:35:33 +02:00
Sebastian Dröge
35ea6fdddf audio: Add GstAudioClippingMeta for specifying clipping on encoded audio buffers
https://bugzilla.gnome.org/show_bug.cgi?id=757153
2015-11-03 20:35:33 +02:00
Tim-Philipp Müller
1f2fdd3789 audio: update disted orc backup files 2015-11-03 16:38:09 +00:00
Luis de Bethencourt
94a7f9fc4e audioclock: use GST_STIME_FORMAT for GstClockTimeDiff
GST_STIME_FORMAT is more appropriate for GstClockTimeDiff since it can
handle negative values better.

https://bugzilla.gnome.org/show_bug.cgi?id=757480
2015-11-03 14:08:29 +00:00
Luis de Bethencourt
227f1d1e0f videodecoder: Print GstClockTimeDiff as a signed integer in debug logs 2015-11-03 13:44:39 +00:00
Wim Taymans
801f7ca464 audio-format: add TRUNCATE_RANGE flag
Add a TRUNCATE_RANGE flag for unpack functions to fill the least
significate bits with 0 (as did the old code). Also add functions
that don't truncate. Use the TRUNC flag in audioconvert for
backwards compatibility for now.
2015-11-03 12:12:08 +01:00
Wim Taymans
914aa4aed1 audiopack: improve pack functions
Avoid shifts by using convh functions.
2015-11-03 12:12:08 +01:00
Luis de Bethencourt
fe62e797d5 audiobasesink: use GST_STIME_ARGS for GstClockTimeDiff
No need to use G_GINT64_FORMAT for potentially negative values of
GstClockTimeDiff. Since 1.6 these can be handled with GST_STIME_ARGS.
Plus it creates more readable values in the logs.

https://bugzilla.gnome.org/show_bug.cgi?id=757480
2015-11-02 17:35:20 +00:00
Sebastian Dröge
443171bb4c audio: Fix parameters to gst_buffer_get_audio_downmix_meta() in macro 2015-11-02 17:35:45 +02:00
Luis de Bethencourt
b81b3f07ec videodecoder: subtract time difference with GST_CLOCK_DIFF
To ensure the subtraction of two GstClockTime values (which are guint64)
can be negative. Use GST_CLOCK_DIFF which returns a gint64.

CID 1338049
2015-11-02 12:09:45 +00:00
Thibault Saunier
a7123ebb58 encoding-profile: Do not force user to provide an encoding profile name
And use the profile called `default` if none provided.
2015-11-02 11:35:55 +01:00
Thibault Saunier
83fa06aab5 encoding-target: Do not unconditionally break when searching for a target
Otherwise the loop is useless!

Fixes CID 1338051
2015-11-02 11:31:34 +01:00
Sebastian Dröge
736a27fe1e audiofilter: Clip input buffers to the segment before handling them
https://bugzilla.gnome.org/show_bug.cgi?id=757068
2015-11-02 10:20:37 +02:00
Sebastian Dröge
1da79c76a7 videodecoder: Print another time difference as a signed integer instead of a huge unsigned one 2015-10-29 16:52:49 +02:00
Sebastian Dröge
f17758d9e3 videodecoder: Print GstClockTimeDiff as a signed integer in debug logs 2015-10-29 16:01:26 +02:00
Thibault Saunier
2e20f3ba4f encoding-target: Add a GST_ENCODING_TARGET_PATH envvar to find target files 2015-10-28 16:07:44 +01:00
Thibault Saunier
96f69fa998 encoding-target: Allow having encoding target without a category set
There was already some code to handle that, but the support was not
complete in those code paths.
2015-10-28 16:07:44 +01:00
Thibault Saunier
0256381f6f encoding-target: Create directory before trying to save encoding targets 2015-10-28 16:07:44 +01:00
Thibault Saunier
db272cf9cb encoding-profile: Allow specifying the target category in the serialized encoding target 2015-10-28 16:07:44 +01:00
Pavel Bludov
8051434c03 video: overlay-composition: fix rectangle and composition cast macros
Closing parenthesis was missing in two cases.

https://bugzilla.gnome.org/show_bug.cgi?id=756893
2015-10-22 09:24:01 +01:00
Sebastian Dröge
5bdeed32bc rtp: GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING is Since 1.6.1 2015-10-20 12:10:52 +03:00
eunhae choi
e98b96247f audiobasesink: fix issue about eos handling during flushing
If the flush-start is arrived during _eos_wait() in basesink,
the 'eos' flag is overwritten to TRUE after exiting the _eos_wait().
To resolve the overwritten issue,
the subclass doing the _eos_wait() call should return the right value.
If the eos flag is set to TRUE again, it will cause error(enter the eos flow)
of the following state changing from PAUSED to PLAYING in basesink.

https://bugzilla.gnome.org/show_bug.cgi?id=754980
2015-10-19 12:12:12 -03:00
Sebastian Dröge
df0d5aa4d5 video: Add out annotations to the out parameters of gst_video_calculate_display_ratio()
https://bugzilla.gnome.org/show_bug.cgi?id=754567
2015-10-17 20:37:22 +03:00
Stian Selnes
0a668c1866 rtpbuffer: Add map flag to skip padding
Encrypted RTP buffers may contain encrypted padding, hence it's
necessary to have an option to relax the validation in order to
successfully map the buffer.

When the flag GST_RTP_BUFFER_MAP_FLAG_SKIP_PADDING is set
gst_rtp_buffer_map() will map the buffer like if padding is not
present.

https://bugzilla.gnome.org/show_bug.cgi?id=752705
2015-10-15 22:42:37 +03:00
Sebastian Dröge
79d4765525 Revert "rtpbuffer: increase logging level when map fails"
This reverts commit e3c8a82017.

It causes too much noise in the logs.
2015-10-15 22:40:50 +03:00
Miguel París Díaz
e3c8a82017 rtpbuffer: increase logging level when map fails
https://bugzilla.gnome.org/show_bug.cgi?id=756641
2015-10-15 16:48:08 +03:00
Sebastian Dröge
b60ab758e4 Revert "audioencoder: timestamp headers same as first buffer and use duration 0"
This reverts commit dd4d6d9ed5.

It breaks ogg muxing and the vorbisenc unit test.
2015-10-12 14:02:58 +03:00
Havard Graff
dd4d6d9ed5 audioencoder: timestamp headers same as first buffer and use duration 0
https://bugzilla.gnome.org/show_bug.cgi?id=754224
2015-10-11 11:04:53 +01:00
Sebastian Dröge
4115814f36 Update GLib dependency to 2.40.0 2015-10-02 22:19:52 +03:00
Sebastian Rasmussen
042e71a117 rtpbasepayload: Implement video SDP attributes
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=726472
2015-10-02 17:44:14 +03:00
Vineeth TM
8e5f7f27f5 gstreamer: base: Fix memory leaks when context parse fails.
When g_option_context_parse fails, context and error variables are not getting free'd
which results in memory leaks. Free'ing the same.

And replacing g_error_free with g_clear_error, which checks if the error being passed
is not NULL and sets the variable to NULL on free'ing.

https://bugzilla.gnome.org/show_bug.cgi?id=753852
2015-10-02 17:26:27 +03:00
Luis de Bethencourt
e90464d2f9 visual: make private all variable subclasses don't need
Subclasses don't need access to all variables. Making them private.

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-10-01 16:05:58 +01:00
Luis de Bethencourt
8ae0fd3990 visual: merge audiovisalizer base classes
Move the audiovisualizer base class to pbutils, so it can be used by plugins
from other modules

https://bugzilla.gnome.org/show_bug.cgi?id=742875
2015-10-01 16:05:58 +01:00
Perry Hung
c5c2466d36 app: pass PKG_CONFIG_PATH for gir files for libgstapp as well
gir include search directories should respect PKG_CONFIG_PATH,
just like we do everywhere else. Makes g-i pick up the right
paths when using ./configure --with-pkg-config-path=

https://bugzilla.gnome.org/show_bug.cgi?id=755494
2015-09-29 13:10:35 +01:00
Sebastian Dröge
e49c492a53 Release 1.6.0 2015-09-25 23:15:20 +02:00
Sebastian Dröge
8239da2311 video-dither: Use saturated add when adding ordered dither for > 8 bit targets
Otherwise our 16 bit integers are going to overflow in intermediate
calculations, causing video to become mostly black.

https://bugzilla.gnome.org/show_bug.cgi?id=755392
2015-09-24 23:01:58 +02:00
Sebastian Dröge
1fb85733f5 video-frame: Fix gst_video_frame_copy() for formats with pstride==0
v210, UYVP and IYU1 are complex formats for which pixel stride does not really
have a meaning. If we copy width*pstride bytes per line, it's not going to do
the right thing. As a fallback, copy stride bytes per line. This might copy
uninitialized bytes at the end of each line, but at least copies the frame.

https://bugzilla.gnome.org/show_bug.cgi?id=755392
2015-09-24 17:39:43 +02:00
Aurélien Zanelli
94e0279c44 fdmemory: remove 'allow-none' annotation in gst_fd_allocator_alloc() doc
gst_fd_allocator_alloc() ensure that passed allocator is a fd memory
allocator, so that we can't pass NULL allocator.

https://bugzilla.gnome.org/show_bug.cgi?id=754833
2015-09-23 10:01:41 -04:00
Aurélien Zanelli
4559feb69e dmabuf: remove 'allow-none' annotation in gst_dmabuf_allocator_alloc() doc
gst_dmabuf_allocator_alloc() ensure that passed allocator is a DMABuf
allocator, so that we can't pass NULL allocator.

https://bugzilla.gnome.org/show_bug.cgi?id=754833
2015-09-23 10:01:41 -04:00
Christophe Fergeau
f096f1f9d3 appsink: Fix 'steaming' typo in API doc
There are several occurrences of 'steaming' where 'streaming' was meant.
2015-09-18 17:48:49 +02:00
Vineeth T M
060f0c21f2 audiosink, multisocketsink: Fix error leak during failures
https://bugzilla.gnome.org/show_bug.cgi?id=755143
2015-09-17 11:59:35 +02:00
Tim-Philipp Müller
a7bcdc3608 appsink: minor docs fix 2015-09-15 16:32:45 +01:00
Tim-Philipp Müller
8b96b52a62 videopool: ensure allocation alignment is consistent with video alignment requirements
Make sure GstAllocationParams alignment is not less than
any alignment requirement specified via GstVideoAlignment.

https://bugzilla.gnome.org/show_bug.cgi?id=754120
2015-09-15 10:20:37 +01:00
Thiago Santos
df931fb0b8 video-format: add missing alpha flag for some formats
Some formats didn't have the alpha flag marked, use the correct
macro so they get it right.

https://bugzilla.gnome.org/show_bug.cgi?id=754808
2015-09-10 07:28:21 -03:00
Sebastian Dröge
8613525301 appsrc: Always take the mutex before flushing the queue
Otherwise the application might push new buffers into the queue while we're
flushing, potentially causing the GQueue data structure to become inconsistent
and causing crashes soon after.

https://bugzilla.gnome.org/show_bug.cgi?id=754597
2015-09-09 12:33:02 +03:00
Vikram Fugro
bbe967a278 appsrc: retain the latest caps in queue when flushing
- Retain the latest caps in the internal queue, when
  flushing.
- Add a unit test case for the same.

https://bugzilla.gnome.org/show_bug.cgi?id=754597
2015-09-09 12:27:40 +03:00
Tim-Philipp Müller
86a1092e59 video: improve GstVideoFormatUnpack docs
https://bugzilla.gnome.org/show_bug.cgi?id=754650
2015-09-07 00:19:09 +01:00
Kouhei Sutou
3e41e784be libs: Fix build error on MinGW where "%ll" is not available
"ll" isn't available on MinGW. We can use G_GINT64_MODIFIER for portable
64bit size data modifier.

https://bugzilla.gnome.org/show_bug.cgi?id=754630
2015-09-06 18:32:16 +03:00
Havard Graff
181845ec1b libs: build rtp after audio
The dependency setup does not seem to work for all systems,
causing the build to fail with:

gstrtpbaseaudiopayload.c:65:0:
fatal error: gst/audio/audio-enumtypes.h: No such file or directory

My setup:
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
autoconf (GNU Autoconf) 2.69
automake (GNU automake) 1.14.1
libtool (GNU libtool) 2.4.2

https://bugzilla.gnome.org/show_bug.cgi?id=754344
2015-09-04 09:53:42 +01:00
Tim-Philipp Müller
c8ce5765a0 libs: rtp is no longer an independent subdir
https://bugzilla.gnome.org/show_bug.cgi?id=754344
2015-09-04 09:53:42 +01:00
Philippe Normand
9361f7c576 appsrc: remove duplicate get_size vfunc assignment 2015-08-31 12:11:10 +03:00
George Kiagiadakis
7860060536 allocators: include gstfdmemory.h in the main library header, allocators.h 2015-08-29 21:38:52 +02:00
Tim-Philipp Müller
7dac2e1eb1 audiobasesink: fix misleading error message debug detail
https://bugzilla.gnome.org/show_bug.cgi?id=754260
2015-08-29 10:44:28 +01:00
Carlos Rafael Giani
c95d809a96 audiobasesink: Fix incorrect/missing custom slaving method documentation
https://bugzilla.gnome.org/show_bug.cgi?id=754199
2015-08-28 10:13:44 +03:00
Sebastian Dröge
64301f1005 video(en|de)coder: Return TRUE when we consumed a tag event without creating a new event
Fixes spurious flow errors that especially break gst-validate.
2015-08-18 16:28:42 +03:00
Sebastian Dröge
6cda5d3494 audiodecoder: If there are no tags, don't try to do event handling on a NULL event
Fixes some crashes.
2015-08-18 16:01:28 +03:00
Sebastian Dröge
2de91c32e4 audioencoder: If there are no tags, don't try to do event handling on a NULL event
Fixes some crashes.
2015-08-18 15:58:57 +03:00
Tim-Philipp Müller
c21a972421 videoencoder: fix tag handling
Merge upstream tags with encoder tags and update whenever
any of those changes.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-18 12:44:04 +01:00
Tim-Philipp Müller
4c00709e22 audioencoder: fix tag handling
Merge upstream tags with encoder tags and update whenever
any of those changes.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-18 11:46:21 +01:00
Vineeth TM
fd7724b6e1 pbutils: discoverer: Set GError when NULL info is being returned.
When discovering the URI, if info is NULL, then instead of just returning NULL,
set the GError, so the error can be printed and notified.

https://bugzilla.gnome.org/show_bug.cgi?id=753701
2015-08-18 12:13:41 +03:00
Tim-Philipp Müller
135cad5b6e audiodecoder: try harder to avoid sending unnecessary tag updates 2015-08-16 18:28:09 +01:00
Tim-Philipp Müller
30b7cc6670 videodecoder: fix tag handling
Before we just merged everything in pretty much random ways
ad-hoc instead of keeping state properly. In 0.10 that was
how it worked, but in 1.x the tag events sent should always
reflect the latest state and replace any previous tags.

So save the upstream (stream) tags, and save the tags set
by the decoder subclass with merge mode, and then update
the merged tags whenever either of those two changes.

This slightly changes the behaviour of gst_video_decoder_merge_tags()
in case it is called multiple times, since now any call replaces
the previously-set tags. However, it leads to much more predictable
outcomes, and also we are not aware of any subclass which sets this
multiple times and expects all the tags set to be merged.

If more complex tag merging scenarios are required, we'll have
to add a new vfunc for that or the subclass has to intercept
the upstream tags itself and send merged tags itself.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 18:23:07 +01:00
Tim-Philipp Müller
5ccc8432e0 audiodecoder: fix tag handling
Before we just merged everything in pretty much random ways
ad-hoc instead of keeping state properly. In 0.10 that was
how it worked, but in 1.x the tag events sent should always
reflect the latest state and replace any previous tags.

So save the upstream (stream) tags, and save the tags set
by the decoder subclass with merge mode, and then update
the merged tags whenever either of those two changes.

This slightly changes the behaviour of gst_audio_decoder_merge_tags()
in case it is called multiple times, since now any call replaces
the previously-set tags. However, it leads to much more predictable
outcomes, and also we are not aware of any subclass which sets this
multiple times and expects all the tags set to be merged.

If more complex tag merging scenarios are required, we'll have
to add a new vfunc for that or the subclass has to intercept
the upstream tags itself and send merged tags itself.

https://bugzilla.gnome.org/show_bug.cgi?id=679768
2015-08-16 16:34:31 +01:00
Thiago Santos
5a0bee3f13 audioencoder: add src and sink query methods
Allows subclasses to do their own handling of GstQuery and still
chain up to the parent class to handle the ones that they don't want
to handle
2015-08-16 08:14:35 -03:00
Thiago Santos
d19f347223 Revert "audiodecoder: expose default query handling function"
Apparently I forgot how gobject works, there is no need to expose
it directly as one can call it from the parent_class pointer

This reverts commit 8a64592481.
2015-08-15 13:44:35 -03:00
Thiago Santos
c63db0e104 Revert "videodecoder: expose default query handling function"
Apparently I forgot how gobject works, there is no need to expose
it directly as one can call it from the parent_class pointer

This reverts commit ea9b6a7e3c.
2015-08-15 13:44:35 -03:00
Thiago Santos
33b1da7b80 audiodecoder: add option to use default pad accept-caps handling
Add gst_audio_decoder_set_use_default_pad_acceptcaps() to allow
subclasses to make videodecoder use the default pad acceptcaps
handling instead of resorting to the caps query that is, usually,
less efficient and unecessary

API: gst_audio_decoder_set_use_default_pad_acceptcaps
2015-08-15 13:44:34 -03:00
Thiago Santos
4982188cf7 videodecoder: add option to use default pad accept-caps handling
Add gst_video_decoder_set_use_default_pad_acceptcaps() to allow
subclasses to make videodecoder use the default pad acceptcaps
handling instead of resorting to the caps query that is, usually,
less efficient and unecessary

API: gst_video_decoder_set_use_default_pad_acceptcaps
2015-08-15 13:44:34 -03:00
Jan Schmidt
95eb641821 rtpbasedepayload: Make stats creation threadsafe, fix a CRITICAL
Use the object lock to protect the internal segment when updating
against access from getting the stats property.

Fix a critical in gst-inspect or when retrieving the stats
before any segment has arrived by checking whether the
segment has been initted..
2015-08-15 23:37:26 +10:00
George Kiagiadakis
897371ac4f appsink: unref the preroll buffer and cleanup the segments on stop()
Just for consistency. No need to keep data around.
2015-08-14 19:27:07 +02:00
George Kiagiadakis
c3e4d8ca6f appsink: do not update preroll_caps unless the sink is prerolling
Just for consistency with the preroll_segment
2015-08-14 19:27:07 +02:00
George Kiagiadakis
c411819452 appsink: put the correct segment in the preroll sample
last_segment is only being updated in dequeue_buffer(),
which is only called from _pull_sample(). _pull_preroll()
simply re-uses an old or dummy segment while the actual
one sits and waits in the queue.

https://bugzilla.gnome.org/show_bug.cgi?id=751147
2015-08-14 19:27:06 +02:00
Thiago Santos
ea9b6a7e3c videodecoder: expose default query handling function
Subclasses can use it to select what queries they want to handle
and forward the rest to the default handling function.

API: gst_video_decoder_sink_query_default

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:41:58 -03:00
Thiago Santos
8a64592481 audiodecoder: expose default query handling function
Subclasses can use it to select what queries they want to handle
and forward the rest to the default handling function.

API: gst_audio_decoder_sink_query_default

https://bugzilla.gnome.org/show_bug.cgi?id=753623
2015-08-14 13:41:58 -03:00
Sebastian Dröge
8dc4bfdd0e rtp: Depend on the audio library 2015-08-11 14:10:57 +02:00
Sebastian Dröge
a0f1b964f1 rtpbaseaudiopayload: Copy metadata in the (de)payloader, but only the relevant ones
The payloader didn't copy anything so far, the depayloader copied every
possible meta. Let's make it consistent and just copy all metas without
tags or with only the audio tag.

https://bugzilla.gnome.org/show_bug.cgi?id=751774
2015-08-11 12:46:36 +02:00
Nicolas Dufresne
6ddab6918d basedepayloader: Don't re-timestamp with running-time
There was a confusion, six depayloaders where passing through the
timestamp while the base class was re-timestamping to running
time. This inconstancy has been unnoticed has in most use cases
the incoming segment is [0, inifnity] in which case timestamps are
the same as running time. With DTS/PTS shifting added (to avoid
negative values) and pcapparse sending a different segment this
started being an issue.

https://bugzilla.gnome.org/show_bug.cgi?id=753037
2015-08-10 13:26:20 -04:00
Thiago Santos
d259a233a5 videoencoder: remove empty line to make g-i-scanner happy
gstvideoencoder.h:228: Warning: GstVideo: "@transform_meta"
parameter unexpected at this location:
 * @transform_meta: Optional. Transform the metadata on ...
2015-08-10 10:40:19 -03:00
Thiago Santos
a1c3276159 videodecoder: documentation cleanup
Remove some whitespace and break lines longer than 80 columns
2015-08-10 10:40:07 -03:00
Thiago Santos
e59d1308cc videodecoder: push pending events before gap
Push all pending events before pushing the gap. This ensures the
segment is pushed before the gap so it can be properly translated
to the running time

Includes unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=753360
2015-08-10 00:21:37 -03:00
Brian Peters
1273848bf5 rtpbuffer: avoid accessing NULL buffer even more
Previous commit was incompletely applied.

https://bugzilla.gnome.org/show_bug.cgi?id=753001
2015-07-30 15:16:57 +01:00
Brian Peters
04c69952c0 rtp: buffer: don't access NULL buffer pointer
unmap will set rtpbuffer->buffer to NULL, so we need to
save the pointer to access it while the RTP buffer is
unmapped.

https://bugzilla.gnome.org/show_bug.cgi?id=753001
2015-07-30 14:30:44 +01:00
Tim-Philipp Müller
232bdf1711 rtpbasedepayload: fix leaks in error code paths
This was introduced when reshuffling the buffer unmaps
in commit bc14cdf529
rtp: rtpbasedepayload: add process_rtp_packet() vfunc

Fixes make check-valgrind.

https://bugzilla.gnome.org/show_bug.cgi?id=750235
2015-07-30 12:50:56 +01:00
Nicolas Dufresne
7c638e06ff depayloader: Use input segment start
When there is no clock_base provided, the start position is
set to 0 instead of the original segment start value. This
would break synchronization if start was not 0.

https://bugzilla.gnome.org/show_bug.cgi?id=752228
2015-07-18 15:40:26 -04:00
Wim Taymans
14083178b8 video: improve logging
Add logging categories for most video objects.
Remove some useless debug lines in video-info and videotestsrc.
Add a performance debug line in the video scaler.
2015-07-15 12:47:42 +02:00
Olivier Crête
dec3fb3723 rtsp: Include generated enum types in gstrtsptransport.h
GST_TYPE_RTSP_LOWER_TRANS used to be defined in there, not
including the generated file makes older gst-p-good fail to build,
so it constitues an API break.
2015-07-14 17:18:12 -04:00
Tim-Philipp Müller
bc14cdf529 rtp: rtpbasedepayload: add process_rtp_packet() vfunc
Add process_rtp_packet() vfunc that works just like the
existing process() vfunc only that it takes the GstRTPBuffer
that the base class has already mapped (with MAP_READ),
which means that the subclass doesn't have to map it again,
which allows more performant processing of input buffers
for most RTP depayloaders.

https://bugzilla.gnome.org/show_bug.cgi?id=750235
2015-07-12 14:29:29 +01:00
Nicolas Dufresne
8be88f0364 doc/build: Fix doc typos
This minor update should workaround a build system bug. While the
makefile has been updated to generate more enum type, there is nothing
that updates the header and would lead to the generated code to be
produced again. This minor doc fix should ensure no one get a build with
missing symbols.
2015-07-09 10:47:20 -04:00
Tim-Philipp Müller
3d7a92b452 rtpbasedepayload: fix typo in comment 2015-07-07 19:56:52 +01:00
Tim-Philipp Müller
fbf2773b2e rtpbasepayload: fix possible segment event leak
Need to clear it when shutting down, not when starting up.
Fixes leak in rtp-payloading unit test.
2015-07-07 15:05:59 +01:00
Hyunjun Ko
9dc463346e video/audio meta: transform_func: return FALSE if not supported or failed
https://bugzilla.gnome.org/show_bug.cgi?id=751778
2015-07-07 16:41:23 +03:00
Sebastian Dröge
a1f8fb32cb video: Add some more GTypes for enums 2015-07-07 14:32:56 +03:00
Tobias Mueller
190c7f1928 GstVideoScaler: Initialised scaling functions to get rid of compiler messages
E.g.

video-scaler.c: In function 'gst_video_scaler_horizontal':
video-scaler.c:1332:3: error: 'func' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   func (scale, src, dest, dest_offset, width, n_elems);
   ^

video-scaler.c: In function 'gst_video_scaler_vertical':
video-scaler.c:1373:3: error: 'func' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   func (scale, src_lines, dest, dest_offset, width, n_elems);
   ^

GCC's analyses seem to be correct, for the simple fact that if you pass
get_functions a known format, but no hscale or vscale, it'll return
True without having done anything.
Some callers check for the scale values to be not NULL, but then
hscale->resampler.max_taps could return 0.
A different approach to the one presented in this patch is to check
for those max_taps, too, before calling get_functions.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=752051
2015-07-07 13:06:34 +02:00
Sebastian Dröge
b495dfa5e6 {audio,video}info: Add GST_TYPE_{AUDIO,VIDEO}_INFO macros 2015-07-06 12:53:15 +03:00
Marcin Kolny
95fa0c58a2 video-info: implement GstVideoInfo as boxed type
GstVideoInfo usually is created on the stack, but boxed type can be useful
for bindings.

https://bugzilla.gnome.org/show_bug.cgi?id=752011
2015-07-06 12:52:51 +03:00
Stian Selnes
1586981b1b rtcpbuffer: Fix validation of packets with padding
The padding (if any) is included in the length of the last packet, see
RFC 3550.

Section 6.4.1:
   padding (P): 1 bit
      If the padding bit is set, this individual RTCP packet contains
      some additional padding octets at the end which are not part of
      the control information but are included in the length field. The
      last octet of the padding is a count of how many padding octets
      should be ignored, including itself (it will be a multiple of
      four).

Section A.2:
   *  The padding bit (P) should be zero for the first packet of a
      compound RTCP packet because padding should only be applied, if it
      is needed, to the last packet.

   *  The length fields of the individual RTCP packets must add up to
      the overall length of the compound RTCP packet as received.

https://bugzilla.gnome.org/show_bug.cgi?id=751883
2015-07-06 12:06:47 +03:00
Stian Selnes
008a228865 videodecoder: Fix setting default pixel-aspect-ratio
It's needed to check if pixel-aspect-ratio exists before fixating.
It does not exist if input caps is not set yet and allowed caps
does not contain pixel-aspect-ratio (e.g. when using GST_VIDEO_CAPS_MAKE)

https://bugzilla.gnome.org/show_bug.cgi?id=751932
2015-07-06 11:59:38 +03:00
Sebastian Dröge
56add20dc7 audioencoder: Don't try to get buffers from an empty adapter 2015-07-02 13:16:15 +02:00
Sebastian Dröge
f5eebb27a2 {audio,video}{en,de}oder: Also copy POOL metas and make sure to copy over metas when creating subbuffers
POOL meta just means that this specific instance of the meta is related to a
pool, a copy should be made when reasonable and the flag should just not be
set in the copy.
2015-07-01 10:58:07 +02:00
Sebastian Dröge
844fa28c67 audiodecoder: Add transform_meta() vfunc with default implementation
The default implementation copies all metadata without tags, and metadata
with only the audio tag. Same behaviour as in GstAudioFilter.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 10:40:10 +02:00
Sebastian Dröge
cc1719130b audioencoder: Add transform_meta() vfunc with default implementation
The default implementation copies all metadata without tags, and metadata
with only the audio tag. Same behaviour as in GstAudioFilter.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 10:40:10 +02:00
Sebastian Dröge
d2cc76b228 videodecoder: Add transform_meta() vfunc with default implementation
The default implementation copies all metadata without tags, and metadata
with only the video tag. Same behaviour as in GstVideoFilter.

This currently does not work if the ::parse() vfunc is implemented as all
metas are getting lost inside GstAdapter.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 10:40:09 +02:00
Sebastian Dröge
ceef2cc12d videoencoder: Add transform_meta() vfunc with default implementation
The default implementation copies all metadata without tags, and metadata
with only the video tag. Same behaviour as in GstVideoFilter.

https://bugzilla.gnome.org/show_bug.cgi?id=742385
2015-06-30 10:40:09 +02:00
Sebastian Dröge
353fb82ea1 rtpbaseaudiopayload: Don't copy memory if not needed, just append payload to the RTP buffer 2015-06-30 10:39:01 +02:00
Luis de Bethencourt
6e263cc5f6 videoscaler: remove check for below zero for unsigned value
CLAMP checks both if value is '< 0' and '> max'. Value will never be a negative
number since it is a division of an unsigned integer (i). Removing that check
and only checking if it is bigger than max and setting it appropriately.

CID #1308950
2015-06-29 16:18:49 +01:00
Sebastian Dröge
0acdfeed69 audiofilter: Also copy metas if their API has no tags attached to it
This is the default basetransform behaviour, being more strict than that
is not really useful.
2015-06-29 13:06:33 +02:00
Sebastian Dröge
4bb9548026 videofilter: Also copy metas if their API has no tags attached to it
This is the default basetransform behaviour, being more strict than that
is not really useful.
2015-06-29 13:05:54 +02:00
Sebastian Dröge
18c610edda rtspconnection: Only drop everything after the ; of a session header in requests
For responses it is actually allowed and used to signal the timeout to the
client!

https://bugzilla.gnome.org/show_bug.cgi?id=736267
2015-06-22 19:51:32 +02:00
Lyon Wang
829b7298e9 audioringbuffer: Fix alaw/mulaw channel positions
For alaw/mulaw we should also try to initialize the channel positions in the
ringbuffer's audio info. This allow pulsesink to directly use the channel
positions instead of using the default zero-initialized ones, which doesn't
work well.

https://bugzilla.gnome.org/show_bug.cgi?id=751144
2015-06-22 18:29:00 +02:00
Nicolas Dufresne
757cd8ffce doc: Fix gsttrtphdrext section name 2015-06-18 21:03:15 -04:00
Jan Schmidt
95cd8dc4f1 multiview: Add gst_video_multiview_guess_half_aspect()
Add a utility function that, given a video size and a
packed stereoscopic mode, attempts to guess if the video
is packed at half resolution per view or not, since
very few videos provide the information.
2015-06-19 02:05:37 +10:00
Wim Taymans
c0b0fd52f3 video-converter: make sure we draw enough border for YUY2 formats
Round width up to 2 so that we draw all border pixels for YUY2 formats
2015-06-17 17:09:46 +02:00
Wim Taymans
f4a5277340 video-scaler: fix scaling of odd width for YUY2 formats
We need to scale groups of 4 bytes for YUY2 formats so round up to 4.
It's possible that there is no Y byte for the last pixel so make sure
we clamp correctly.
2015-06-17 16:43:03 +02:00
Thibault Saunier
70363766cd discoverer: Fix a wrong naming in the documentation
gst_discoverer_stream_get_missing_elements_installer_details does not
exist, one should use gst_discoverer_info_get_missing_elements_installer_details
2015-06-17 10:16:47 +02:00
Nicolas Dufresne
c101452a4a gi: Use INTROSPECTION_INIT for --add-init-section
This new define was added to common. The new init section fixed
compilation warning found in the init line that was spread across
all files.
2015-06-16 18:04:57 -04:00
Nicolas Dufresne
65b7b9954a gi: Skip Scaler, Chroma, Conveter, Dither constructor
Please box these types before removing the skip mark.
2015-06-16 16:08:39 -04:00
Nicolas Dufresne
3d594ad57f gi: Add (transfer none) for various video meta
These method chains gst_buffer_add_meta() which is also transfer
none.
2015-06-16 16:07:27 -04:00
Nicolas Dufresne
c9a536af47 gi: Fix warnings in GstRtsp
* The custom GSource is not boxed (skip for now)
* The comment block has wrong name for _read_socket()
2015-06-16 15:50:13 -04:00
Nicolas Dufresne
49912b3313 gi: Don't produce gir and typlib for GstRiff
The API does not follow the type naming convention. Re-enable
only if one take the time to box and rename (see (rename-to SYMBOL)
annotation) all types.
2015-06-16 15:16:33 -04:00
Nicolas Dufresne
37598add15 gi: Skip fft constructor for now
These types have never been boxed, hence cannot be used
safely in interpreted languages. This fixes warnings.
2015-06-16 14:36:44 -04:00
Nicolas Dufresne
e8aba7db8b gi: Fix warnings in libgstaudio
* Duplicate section
* Miss-named parameter
* Missing transfer none annotation for meta
2015-06-16 14:34:04 -04:00
Tim-Philipp Müller
5df6cc074f videoencoder: fix gtk-doc chunk for new function 2015-06-13 13:41:35 +01:00
Matej Knopp
dc7b254805 videoencoder: Add gst_video_encoder_set_min_pts()
For streams with reordered frames this can be used to ensure that there
is enough time to accomodate first DTS, which may be less than first PTS

https://bugzilla.gnome.org/show_bug.cgi?id=740575
2015-06-12 17:17:25 -04:00
Jan Schmidt
4b373d4c97 videodecoder: Copy multiview-mode, flags and view count from ref info
When copying info from the reference input state, duplicate
all the fields of the video info. The sub-class will have the
chance to override them later.
2015-06-13 01:36:45 +10:00
Wim Taymans
b31c805a56 video-scaler: enforce same taps when combining scalers 2015-06-12 16:58:10 +02:00
Wim Taymans
1fbbff491a video-scaler: make sure to clamp to max width
When estimating the area that should first be vertically scaled, make
sure we clamp to the max input size or else we get invalid reads.
2015-06-12 16:58:10 +02:00
Wim Taymans
f4f3894836 video-scaler: Enforce same taps on Y and UV scalers for merged formats
Make sure we have the same number of taps for the Y and UV scalers so
that the scalers can be merged correctly.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=749764
2015-06-12 16:58:10 +02:00
Arun Raghavan
37684b35b6 rtsp: Add a FIXME 2.0 for gst_rtsp_connection_create_from_socket()
There's a couple of redundant arguments from the pre-GIO days.
2015-06-12 12:51:22 +05:30
Jan Schmidt
7c1da700c4 video: Add multiview/stereo support
Add flags and enums to support multiview signalling in
GstVideoInfo and GstVideoFrame, and the caps serialisation and
deserialisation.

videoencoder: Copy multiview settings from reference input state

Add gst_video_multiview_* support API and GstVideoMultiviewMeta meta

https://bugzilla.gnome.org/show_bug.cgi?id=611157
2015-06-11 12:05:00 +10:00
Sebastian Dröge
abcaa71485 rtpbaseaudiopayload: Use GST_BUFFER_PTS() instead of GST_BUFFER_TIMESTAMP() 2015-06-10 14:33:01 +02:00
Xavier Claessens
74a4347614 GstRTSPConnection: Add GTlsInteraction support
https://bugzilla.gnome.org/show_bug.cgi?id=750471
2015-06-09 19:47:51 -04:00
Carlos Rafael Giani
c5b75394a9 audiobasesink: added custom clock slaving method
This new clock slaving method allows for installing a callback that is
invoked during playback. Inside this callback, a custom slaving
mechanism can be used (for example, a control loop adjusting a PLL or an
asynchronous resampler). Upon request, it can skew the playout pointer
just like the "skew" method. This is useful if the clocks drifted apart
too much, and a quick reset is necessary.

Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org>

https://bugzilla.gnome.org/show_bug.cgi?id=708362
2015-06-09 21:51:05 +10:00
Nicolas Dufresne
cb49acf158 video: Allow using bt2020 by name in colorimetry
As the lookup stops at the first element in the array with a NULL
name, bt2020 could not be used by name. Moving up this entry
fixes the issue.
2015-06-08 13:01:43 -04:00
Sebastian Dröge
3113e341ea rtpbasepayload: Always prefer downstream's ssrc suggestion if any
Otherwise ssrc changes via rtpsession's (deprecated!) internal-ssrc property
are not possible anymore. rtpsession was now patched to only suggest an ssrc
if it makes sense to do so.

In 2.0 we should get rid of all the properties that are also negotiated via
caps, the code and behaviour is too confusing otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=749581
2015-06-05 16:44:08 +02:00
Sebastian Dröge
bf5d3bf868 rtcpbuffer: Improve documentation of new functions a bit
Also actually add them to the documentation.
2015-06-05 10:18:21 +02:00
Jose Antonio Santos Cadenas
9931bef8ca rtcpbuffer: Update package validation to support reduced size rtcp packets
According to this section of the rfc.
https://tools.ietf.org/html/rfc5506#section-3.4.2
The validation should be updated to accept more types of RTCP
packages, with this mask change feedback packages will be also
accepted.

Change-Id: If5ead59e03c7c60bbe45a9b09f3ff680e7fa4868
2015-06-05 10:18:21 +02:00
Mathieu Duponchelle
579967278a audiofilter: copy metadata that only has the "audio" tag.
https://bugzilla.gnome.org/show_bug.cgi?id=750406
2015-06-04 19:16:40 +02:00
Mathieu Duponchelle
decea41ac7 discoverer: Serialize the top level DiscovererInfo
Which contains fields such as duration, uri and tags.

https://bugzilla.gnome.org/show_bug.cgi?id=749673
2015-06-04 19:16:40 +02:00
Sebastian Dröge
b3b2251c59 codec-utils: Add AAC channel configurations 11, 12 and 14 and levels 6 and 7 2015-06-04 16:31:12 +02:00
Tim-Philipp Müller
c0f55ecf4d pbutils: add description for video/x-cavs caps
https://bugzilla.gnome.org/show_bug.cgi?id=727731
2015-06-02 12:47:50 +01:00
Tim-Philipp Müller
6410aba1aa rtpbuffer: optimise payload mapping for buffers with one memory
Micro-optimisation: if the buffer consist of just one memory, we
know we have already mapped that memory to read the headers, so
no need to map it another time to get to the payload data, we
can just set up the payload data details right there and then
and avoid another map call in gst_rtp_buffer_get_payload().
Adds up when receiving RTP-payloaded raw video which can easily
be thousands of packets per frame.
2015-06-01 19:01:23 +01:00
Tim-Philipp Müller
bc309a100f rtpbasedepayload: provide chain_list function on sink pad
Implement a chain_list function, which avoids lots of locking
compared to the default fallback implementation in GstPad.
We may also want to do some more sophisticated timestamp
tracking here at some point, but for now leave it up to the
jitterbuffer and/or subclasses (in case buffers in the
buffer list have no timestamp set on them, there may only
be a timestamp for the whole list on the first buffer).
This provides the exact same behaviour as the default
fallback implementation.
2015-06-01 19:00:55 +01:00
Thibault Saunier
dcfb8a83a5 encodebin: Add a way to enable/disabled a GstEncodingProfile
Summary:
So that the user can easily use the same encoding profile to render
with/without audio/video stream.

API:
  gst_encoding_profile_is_disabled
  gst_encoding_pofile_set_enabled

https://bugzilla.gnome.org/show_bug.cgi?id=749056
2015-06-01 10:22:31 +02:00
Sebastian Dröge
8803ea2d8b id3v2frames: Fix compiler warnings
id3v2frames.c:951:20: error: unused variable 'utf16enc' [-Werror,-Wunused-const-variable]
static const gchar utf16enc[] = "UTF-16";
                   ^
id3v2frames.c:952:20: error: unused variable 'utf16leenc' [-Werror,-Wunused-const-variable]
static const gchar utf16leenc[] = "UTF-16LE";
                   ^
id3v2frames.c:953:20: error: unused variable 'utf16beenc' [-Werror,-Wunused-const-variable]
static const gchar utf16beenc[] = "UTF-16BE";
                   ^
2015-05-30 08:12:03 +02:00
Jan Schmidt
4882cb9f37 video-format: Fix minor docs typo 2015-05-30 01:11:47 +10:00
Jan Schmidt
d18aa5b741 video: Make gst_buffer_get_video_meta() a real function, Return lowest id
Instead of returning the first video meta found on a buffer, return the
one with the lowest id (which is usually the same thing, except on
multi-view buffers)
2015-05-30 01:11:47 +10:00
Tim-Philipp Müller
a24b9cd5c2 discoverer: don't crash on unknown info types when deserializing
Handle unknown info types when deserializing instead of
dereferencing NULL pointers.

Coverity CID 1302394
2015-05-29 15:30:41 +01:00
George Kiagiadakis
6ab46d8f0a sdp: prevent the sdp message parser from reading past the end of the buffer
Otherwise, a malformed SDP message could crash the application,
or even maliciously gather data from the memory located after
this buffer...

https://bugzilla.gnome.org/show_bug.cgi?id=750096
2015-05-29 15:05:31 +02:00
Tim-Philipp Müller
ea5d912b9f tag: id3v2: fix parsing of UTF-16 text on systems with crippled iconv
Use g_utf16_to_utf8() instead of the more generic g_convert(), so
that we can extract text in UTF-16 format even on embedded systems
with crippled iconv support.

This code path is exercised by the id3demux test_unsync_v23
check in gst-plugins-good.

https://bugzilla.gnome.org/show_bug.cgi?id=741144
2015-05-25 22:40:17 +01:00
Sebastian Dröge
4a993cb316 rtp: Clean G-I files on make clean too 2015-05-21 13:07:50 +03:00
Sebastian Dröge
6dd14bb6d6 rtp: Add builddir to the include path for gobject-introspection
And also add missing headers/sources

https://bugzilla.gnome.org/show_bug.cgi?id=749632
2015-05-20 16:24:07 +03:00
Sebastian Dröge
bfc13c8e51 rtp: Add GstRTPProfile enum 2015-05-20 15:41:06 +03:00
Sebastian Dröge
2511bca11c rtsp: Add FIXME 2.0 comment about GstRTSPTransport being an enum instead of flags 2015-05-20 15:41:06 +03:00
Sebastian Dröge
1a1d8a0b61 rtsp: Use glib-mkenums to generate GstRTSPProfile and GstRTSPLowerTrans GTypes 2015-05-20 15:41:06 +03:00
Tim-Philipp Müller
853951b646 rtsp: don't use soon-to-be-deprecated g_cancellable_reset()
From the API documentation: "Note that it is generally not
a good idea to reuse an existing cancellable for more
operations after it has been cancelled once, as this
function might tempt you to do. The recommended practice
is to drop the reference to a cancellable after cancelling
it, and let it die with the outstanding async operations.
You should create a fresh cancellable for further async
operations."

https://bugzilla.gnome.org/show_bug.cgi?id=739132
2015-05-19 18:53:01 +01:00
Mathieu Duponchelle
7048ecdc49 gstdiscoverer: Add since annotation.
Forgot to add the since annotation to the
GstDiscovererSerializeFlags in the previous commit.
2015-05-19 18:53:09 +02:00
Mathieu Duponchelle
2e423dd129 discoverer: Add serialization methods.
[API] gst_discoverer_info_to_variant
[API] gst_discoverer_info_from_variant
[API] GstDiscovererSerializeFlags

+ Serializes as a GVariant
+ Adds a test
+ Does not serialize potential GstToc (s)

https://bugzilla.gnome.org/show_bug.cgi?id=748814
2015-05-19 18:48:07 +02:00
Sebastian Dröge
faafaaec56 rtpbasepayload: Try harder to reuse previously configured caps values and give more preference to anything set as properties
This affects the pt, ssrc, seqnum-offset and timestamp-offset properties. If
they were set from a property, or we configured caps before, we try to use
that value for them. Even if the first structure of the downstream caps
specifies a different value, we check if the value is supported by other
structures.
Only if all this fails, we use the values given by downstream in the first
structure, i.e. if no properties were set and these are the first caps we
negotiate or downstream does not support our values.

By doing this we ensure that we don't spuriously change ssrcs or other fields
in the middle of the stream (and also consider property values more). Ssrc
changes would currently happen after sending an RTX packet (thus creating a
new internal source inside the rtpsession), and then renegotiating the
payloader (which then gets the RTX ssrc from rtpsession).

https://bugzilla.gnome.org/show_bug.cgi?id=749581
2015-05-19 16:59:45 +03:00
Stefan Sauer
b3c136eb4f docs: a random set of trivial fixes for the library docs
Warnings down to 35, unused symbols doen to 112.
2015-05-18 21:16:41 +02:00
Stefan Sauer
b8a6aefa38 docs: add fdmemory to docs 2015-05-18 20:56:28 +02:00
Stefan Sauer
b364f5576d docs: a random set of trivial fixes for the library docs
All those where super straight forward from the warnings gtkdoc prints. It kind
of makes sense to apply them before the list of warnings is >100 and people
complain that gtkdoc is noisy.
2015-05-18 20:45:45 +02:00
Stefan Sauer
d67da3c5f6 mikey: fix a bunch of doc warnings
Rename header/source mismatch of parameters. Update the exposed API in
sections.txt.
2015-05-18 20:31:30 +02:00
Tim-Philipp Müller
8304893d06 appsrc: optimise caps changing when previously-set caps have not taken effect yet
Only negotiate/change caps once when setting caps twice and
the first-set caps have not been used yet.

Based on patch by Eunhae Choi.

https://bugzilla.gnome.org/show_bug.cgi?id=747517
2015-05-18 13:37:54 +01:00
Vivia Nikolaidou
c9cfd0196f video-converter: Change some implicit string enums to real enums
GST_VIDEO_CONVERTER_OPT_ALPHA_MODE, GST_VIDEO_CONVERTER_OPT_CHROMA_MODE,
GST_VIDEO_CONVERTER_OPT_MATRIX_MODE, GST_VIDEO_CONVERTER_OPT_GAMMA_MODE and
GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE were G_TYPE_STRING with only a few valid
options. Changed those to real enums.

https://bugzilla.gnome.org/show_bug.cgi?id=749104
2015-05-08 15:13:54 +02:00
Sebastian Dröge
0c43005f54 audiodecoder: Also negotiate with downstream if needed before handling a GAP event 2015-05-08 15:07:56 +02:00
Sebastian Dröge
f74524b58d videodecoder: Also negotiate with downstream if needed before handling a GAP event 2015-05-08 15:07:56 +02:00
Sebastian Dröge
21b5741251 videodecoder: Try to be smarter when clipping buffers without duration/framerate to the segment
2 second frame duration is rather unlikely... but if we don't clip
away buffers that far before the segment we can cause the pipeline to
lockup. This can happen if audio is properly clipped, and thus the
audio sink does not preroll yet but the video sink prerolls because
we already outputted a buffer here... and then queues run full.

In the worst case we will clip one buffer too many here now if no
framerate is given, no buffer duration is given and the actual
framerate is less than 0.5fps.

Fixes seeking on HLS/DASH streams, when seeking into the middle of
fragments and having no framerate/buffer duration.
2015-05-06 12:42:33 +02:00
Guillaume Desmottes
f90bb8140d navigation: fix structure leak if subclass doesn't implement send_event()
The send_event() implementation is supposed to consume @structure.

https://bugzilla.gnome.org/show_bug.cgi?id=748903
2015-05-05 13:54:08 -03:00
Sebastian Dröge
1a2c590cd2 rtpbasedepayload: Add some debug output 2015-05-05 13:16:05 +02:00
Aurélien Zanelli
c52adc8fcc video: add NV61 format support
https://bugzilla.gnome.org/show_bug.cgi?id=746466
2015-05-04 20:37:59 +01:00
Jan Schmidt
62bdb117ac video: check colorimetry and chroma_site equality in gst_video_info_is_equal()
Add VideoInfo accessors for colorimetry and chroma_site and use them
when checking the equality of two GstVideoInfo
2015-05-04 13:16:27 +10:00
Jan Schmidt
14fafc74a3 video-color: Add gst_video_colorimetry_is_equal()
Add a function for comparing the equality of 2 colorimetry
structures.
2015-05-04 13:16:27 +10:00
Sreerenj Balachandran
6af56187e8 pbutils: Use more strict profile checking for hevc
Use the profile_idc value to set the profile string in caps.
Don't use compatibility flags for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=747613
2015-04-30 21:42:34 +02:00
Ravi Kiran K N
955dc5258f video-converter: Remove unused macro
Remove unused macro GET_TMP_LINE

https://bugzilla.gnome.org/show_bug.cgi?id=748687
2015-04-30 20:24:32 +01:00
Tim-Philipp Müller
44e571c5e9 navigation: sprinkle some since markers and add new API to .def file
https://bugzilla.gnome.org/show_bug.cgi?id=747245
2015-04-29 15:30:26 +01:00
Edward Hervey
01e2a2152d video: Add a new "event" navigation message type
This will be useful for elements that wish to post unhandled navigation
events on the bus to give the application a chance to do something with
it

https://bugzilla.gnome.org/show_bug.cgi?id=747245
2015-04-29 15:47:49 +02:00
Wim Taymans
b3db5883e1 video-info: expose InterlaceMode conversion to/from string
Expose the methods used to convert a GstVideoInterlaceMode to and
from a string.
2015-04-28 12:01:02 +02:00
Sebastian Dröge
9e480d11a2 audio: Change the remaining "samples" in the ::delay() vfunc docs to "frames"
https://bugzilla.gnome.org/show_bug.cgi?id=748289
2015-04-27 10:08:17 +02:00
Sebastian Dröge
531b9ba951 audio: The delay vfunc returns the number of frames, not samples
https://bugzilla.gnome.org/show_bug.cgi?id=748289
2015-04-26 21:08:14 +02:00
Tim-Philipp Müller
c680e324bc Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:42:34 +01:00
Guillaume Desmottes
2b0b08b74c xmptag: fix invalid reads in GST_DEBUG statement
Don't try to print a string that is not NUL-terminated. This
log line does not really seem useful so let's just drop it.

https://bugzilla.gnome.org/show_bug.cgi?id=748413
2015-04-24 17:32:51 +01:00
Wonchul Lee
5dffb8a311 audiodecoder: Add sink and src query virtual method
API: GstAudioDecoderClass::src_query()
API: GstAudioDecoderClass::sink_query()

https://bugzilla.gnome.org/show_bug.cgi?id=747293
2015-04-23 19:29:20 +01:00
Ravi Kiran K N
0ff9b1e276 video-converter: n_lines member should be a guint not a boolean
https://bugzilla.gnome.org/show_bug.cgi?id=748348
2015-04-23 13:30:45 +01:00
Wim Taymans
0588c9a53f video-scaler: fix YUY2 scaling some more
Take into account the different steps between Y and UV when calculating
the line size for vertical resampling or else we might not resample
enough pixels and leave bad lines.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=747790
2015-04-21 13:31:44 +02:00
Wim Taymans
8f82ee70f9 video-scaler: scale enough pixels in YUY2 (and friends) mode
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=747790
2015-04-21 13:16:29 +02:00
Ravi Kiran K N
e78d44ac0b video-converter: Remove unused variables
Remove unused variables n_taps, max_taps in setup_scale()

https://bugzilla.gnome.org/show_bug.cgi?id=748021
2015-04-17 19:12:00 +01:00
Thiago Santos
befafccf35 video: add missing part of documentation text 2015-04-17 14:17:44 -03:00
Guillaume Desmottes
d7d8fc5652 discoverer: fix GstToc leak when parsing toc messages
gst_message_parse_toc() returns a reffed GstToc which is owned by the
GstDiscovererInfo. But we have to make sure we unref its previous value before
setting the new one.

https://bugzilla.gnome.org/show_bug.cgi?id=747103
2015-04-17 14:49:01 +01:00
Wim Taymans
7c059b4530 allocators: make GstFdAllocator non-abstract
Make the GstFdAllocator non-abstract because it is perfectly possible
to make memory from a generic fd. Mark the memory as simply "fd".
2015-04-17 09:31:40 +02:00
Sebastian Dröge
6539d1da29 videodecoder: Break instead of return if default negotiation on GAP events fails
Otherwise we're going to leak the event.
2015-04-11 19:52:50 +02:00
Ilya Konstantinov
d668b511d1 appsrc: docs grammar fixes
https://bugzilla.gnome.org/show_bug.cgi?id=747516
2015-04-09 20:39:42 +01:00
Vincent Penquerc'h
5cb40d7320 audiobasesink: fix ring buffer leak on open failure 2015-04-09 13:00:58 +01:00
Vincent Penquerc'h
4e6b917ba3 audiobasesrc: fix ring buffer leak on open failure 2015-04-09 13:00:57 +01:00
Sebastian Dröge
a21795260f audiodecoder: Don't post error messages while holding the stream lock 2015-04-08 20:49:39 -07:00
Sebastian Dröge
9196c3dcca audiodecoder: Don't get and parse the current srcpad caps
We only get here if we don't have any srcpad caps, and we're going
to override the GstAudioInfo a few lines below anyway without ever
using it if for whatever reason we get caps here.
2015-04-08 20:49:39 -07:00
Sebastian Dröge
f268f2be92 videodecoder: Try to invent default caps instead of setting none at all when getting a GAP event before CAPS
Otherwise we would forward the GAP event without ever providing any caps,
which then would make decodebin expose a srcpad without any caps set. That's
confusing for applications and can lead to all kinds of interesting bugs.

Instead do the same as already is done in GstAudioDecoder, and try to invent
caps based on the sinkpad caps and the caps allowed by downstream and the
srcpad template caps.

https://bugzilla.gnome.org/show_bug.cgi?id=747190
2015-04-08 20:49:39 -07:00
Tim-Philipp Müller
dfc34c5841 rtp: rtcpbuffer: fix typo in enum
and in docs. Spotted by Rob Swain.
2015-04-07 16:44:20 +01:00
Sebastian Dröge
0c72d0acdf {audio,video}decoder: Forward SEGMENT_DONE events immediately and drain decoders
Otherwise we're going to wait with draining until the next data comes, which
is a bit suboptimal and might take a long time... or maybe never happens.
2015-04-06 19:20:51 -07:00
Tim-Philipp Müller
99929b7ffa tag: exiftag: don't try to convert utf-8 to latin1 if string is ASCII already
Bypass g_convert/iconv if there's nothing to convert. That way,
conversion won't fail on systems where iconv doesn't support
converting utf-8 to latin1 and there's nothing to convert.

https://bugzilla.gnome.org/show_bug.cgi?id=723252
2015-04-03 21:03:50 +01:00
Vincent Penquerc'h
2954813b86 audio,video: use gst_segment_is_equal instead of memcmp
memcmp will blindly compare the reserved fields, as well as any
padding the compiler may choose to sprinkle in GstSegment.

Fixes valgrind complaints in unit tests, as well as some found via
https://bugzilla.gnome.org/show_bug.cgi?id=738216
2015-04-03 12:09:41 +01:00
Edward Hervey
3eb35c77cc introspection: Don't use g-ir-scanner cache at compile time
It pollutes user directories and we don't need to cache it

https://bugzilla.gnome.org/show_bug.cgi?id=747095
2015-03-31 11:21:43 +02:00
Vincent Penquerc'h
e2a9f0ef4e id3v2: ignore RVA2 tags with more than 64 peak bits
The spec for this does not say nor imply how this should be
interpreted.  The previous code would try to shift by 64 bits,
which is undefined.

Coverity 1195119

https://bugzilla.gnome.org/show_bug.cgi?id=727955
2015-03-30 12:33:06 +01:00
Nicola Murino
f23736d52f appsrc: handle a sample not having caps or a buffer more gracefully
https://bugzilla.gnome.org/show_bug.cgi?id=746908
2015-03-28 12:00:38 +00:00
Nicolas Dufresne
b7facbaf22 basedepay: Handle initial gaps and no clock-base
When generating segment, we can't assume the first buffer is actually
the first expected one. If it's not, we need to adjust the segment to
start a bit before.

Additionally, we if don't know when the stream is suppose to have
started (no clock-base in caps), it means we need to keep everything in
running time and only rely on jitterbuffer to synchronize.

https://bugzilla.gnome.org/show_bug.cgi?id=635701
2015-03-27 19:03:41 -04:00
Song Bing
992101f82a videoencoder: Keep sticky events around when doing a soft reset
The current code will first discard all frames, and then tries to copy
all sticky events from the (now discarded) frames. Let's change the order.

https://bugzilla.gnome.org/show_bug.cgi?id=746865
2015-03-27 09:46:28 +01:00
David Schleef
8b0329c45d riff: Add FLLR tag 2015-03-26 18:03:12 -07:00
Nicolas Dufresne
802ad73103 basedepayload: Fix generated segment
This fixes playback position in RTSP.

https://bugzilla.gnome.org/show_bug.cgi?id=635701
2015-03-26 17:43:47 -04:00
Luis de Bethencourt
90d428a553 Revert "fdmemory: freed pointer will always be 0"
This reverts commit 7fbcefb753.
2015-03-24 10:46:44 +00:00
Luis de Bethencourt
7fbcefb753 fdmemory: freed pointer will always be 0 2015-03-24 10:20:05 +00:00
Wim Taymans
9f0b9eeb58 video-convert: fix clamping for 16 bits alpha mult 2015-03-19 13:31:21 +01:00
Tim-Philipp Müller
5d456c7adc video-frame: fix height/width assertions
As commit 274984e8 states:
When doing CROP META it is expected that the width and/or height
in the GstVideoMeta is bigger or equal to the caps negotiated size.

https://bugzilla.gnome.org/show_bug.cgi?id=741030
2015-03-18 20:40:42 +00:00
Wim Taymans
3205e90e83 fdmemory: make a base class for allocating fd-backed memory
Make a base class that can help with allocating fd-backed memory.
Make dmabuf extend from the base class.
We can now make methods to check if memory has an fd and get the fd for
all the different types of fd-backed memory.
2015-03-18 15:12:03 +01:00
Wim Taymans
e6cb520036 fdmemory: add flags to control behaviour
Add some flags to the GstFdMemory to control how memory is mapped and
unmapped.
2015-03-15 17:27:33 +01:00
Wim Taymans
4e6fba8604 fdmemory: add fd backed GstMemory to separate file
Make a separate file for the code to handle the fd backed memory.
This would make it possible later to add other allocators also using
fd backed memory.
2015-03-15 15:26:28 +01:00
Arun Raghavan
592fc9cdba audioringbuffer: Log with the ringbuffer object where possible 2015-03-13 23:24:58 +05:30
Nicolas Dufresne
274984e83b video-frame: Relax width/height assertion
When doing CROP META it is exepcted that the width and/or height in the
GstVideoMeta is bigger or equal to the caps negotiated size.
2015-03-13 10:30:43 +00:00
Nicolas Dufresne
c5824f1b43 videopool: Choose the biggest buffer size
We should respect what has been negotiated.
2015-03-13 10:29:00 +00:00
Jan Schmidt
3d60fb654b docs: Add new video functions and objects. Cleanup a little.
Add GstVideoChroma, GstVideoDither, GstVideoScaler and friends to the docs.

Remove and clean up a few obsolete/deleted refs and typos
2015-03-13 01:08:25 +11:00
Wim Taymans
3cd2eb5847 video-converter: fix border handling of YUY2 and friends
Don't draw the border in groups of 4 pixels for YUY2 but instead in
groups of 2 with alternating U and V. This avoids a crash on odd width
borders.
2015-03-11 09:48:20 +01:00
Wim Taymans
757669481c video-converter: force yuv conversion for border
Make sure we always do yuv conversion for the border.
2015-03-11 09:47:23 +01:00
Wim Taymans
dd5fa311a1 video-format: fix A422 subsampling description 2015-03-10 17:29:51 +01:00
Wim Taymans
0d333d8d44 video-converter: add table based matrix8 implementation
Based on patch from Mozzhuhin Andrey <nopscmn at gmail.com>

Add a table based matrix8 multiplication implementation. The algorithm
does not do any clipping so we need to make sure we never call this on
input that might need to be clipped. In general, this algorithm is
2 times faster than the orc optimized one and would be chosen for all
RGB -> YUV conversions and some YUV->YUV and RGB->RGB conversions.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=732186
2015-03-10 15:22:17 +01:00
Sebastian Dröge
06fd6f2f63 video: Add support for 10 bit planar AYUV formats 2015-03-10 10:31:28 +01:00
Tim-Philipp Müller
c53ba4beeb Fix double semicolons 2015-03-10 09:27:08 +00:00
Wim Taymans
62ff9b8bca video-info: validate parsed colorimetry
Validate the parsed colorimetry and reset to defaults when we get RGB
with a matrix or YUV without a matrix.
2015-03-09 16:28:02 +01:00
Wim Taymans
6ee67a8aa1 video-converter: detect identity matrix
Do nothing if we have an identity matrix conversion.
2015-03-09 16:02:17 +01:00
Wim Taymans
cf572ae2cb video-info: use default colorimetry on error
When we fail to parse the colorimetry property, fall back to the default
colorimetry for the format and dimension instead of leaving things
undefined.
2015-03-09 16:02:17 +01:00
Luis de Bethencourt
fedc1dba1a videoencoder: unused value
Value set in ret is immediately overwritten in the next line outside of the if
block. Run reset but don't store return.

CID #1226470
2015-03-09 11:25:47 +00:00
Wim Taymans
8296cdbfd5 video-converter: only convert to/from rgb when needed
Only use the YUV->RGB matrix when we have YUV as input and only use the
matrix when we need to make YUV output.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745780
2015-03-09 12:16:56 +01:00
Sebastian Dröge
8f13a31bae rtpbuffer: Link to an explanation why the seqnum comparison function does the right thing even for wraparounds 2015-03-09 11:12:46 +01:00
Mark Nauwelaerts
f134072c66 videodecoder: only return EOS upon clipping if applicable
See also https://bugzilla.gnome.org/show_bug.cgi?id=709224
2015-03-07 20:12:23 +01:00
Mark Nauwelaerts
eeeb2eab82 audiodecoder: only return EOS upon clipping if applicable
See also https://bugzilla.gnome.org/show_bug.cgi?id=709224
2015-03-07 20:10:31 +01:00
Sebastian Dröge
13a93575e1 video: Update orc generated C files 2015-03-07 16:49:07 +01:00
Wim Taymans
7b6278b7e4 video-converter: add transfer full annotation for config 2015-03-06 12:54:56 +01:00
Ravi Kiran K N
6bd458abc1 video-converter: correct right-border location for YUY2, YVYU, UYVY
Remove 'r_border /= 2' in convert_fill_border(). It doesn't
take the right border to correct location.

https://bugzilla.gnome.org/show_bug.cgi?id=745719
2015-03-06 12:27:18 +01:00
Wim Taymans
31a3e6c9f1 video-converter: avoid scaler when size is unchanged 2015-03-05 09:52:18 +01:00
Wim Taymans
6602861d00 video-scaler: add horizontal 2tap u16 orc function
Add slightly faster u16 horizontal resampler orc function.
2015-03-04 16:45:35 +01:00
Wim Taymans
e0a192d3dd video-converter: don't reuse the input line when adding borders
When we need to add borders, we need a writable input line, so
don't reuse the source memory directly.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745207
2015-03-04 12:29:45 +01:00
Arun Raghavan
557c2c9be1 audiobasesink: Reset audio clock if necessary
When the ringbuffer is deactivated and then acquired, if the audio clock
provided by the sink gets reset to zero, we need to add an offset to the
clock to make sure that subsequent samples are written out at the right
times. While we need to leave this to derived classes to take care of
when they provide their own clock (since that clock may or may not be
reset to zero), we can do this ourselves if we know the provided clock
is our own (which does reset to zero on a re-acquire).
2015-03-03 23:26:54 +05:30
Wim Taymans
4643d34a7a video-converter: avoid making scalers for outsize == 0 2015-03-02 16:42:23 +01:00
Wim Taymans
b2a7ac2766 video-converter: v-resample enough pixels
When we are using the fast linear resampler, use the ->inc to calculate
the first and last pixel we need so that we can do vertical resampling
on the right amount of pixels.
2015-03-02 16:33:09 +01:00
Wim Taymans
0062dadc35 video-orc: fix unpack functions for RGB/RGB15 on BE
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745337
2015-03-02 15:07:34 +01:00
Wim Taymans
d1a9eacb75 video-format: more fixes for big endian 2015-03-02 13:27:23 +01:00
Wim Taymans
569ca5770c video-format: add big-endian versions of RGB/BGR 15/16 pack/unpack
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745337
2015-03-02 12:27:24 +01:00
Olivier Crête
6046421ecc pbutils: description: Make static strings static
Otherwise, they're not guaranteed to still be valid when leaving the scope.

https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-27 15:08:50 -05:00
Luis de Bethencourt
7175417f7e video-converter: remove check for below zero for unsigned int
CLAMP checks both if value is '< 0' and '> max'. Value will never be a negative
number since it in an unsigned integer. Removing that check and only checking
if it is bigger than max and setting it appropriately.

CID #1271606
2015-02-26 14:48:51 +00:00
Wim Taymans
621292e754 video-converter: we can use the scaler without scalers to copy 2015-02-25 17:00:34 +01:00
Wim Taymans
e1715f7728 video-converter: only make a scaler when we are scaling
Only make a scaler when we are actually doing any scaling. Without
scalers, the scale function will simply do a copy.
2015-02-25 16:50:02 +01:00
Wim Taymans
330fb44a6f video-scaler: add support for copy
When no scalers are given, simply do a copy of the requested area.
2015-02-25 16:49:20 +01:00
Wim Taymans
3046935e03 video-converter: activate scaler fastpath depending on method
Only activate the scaler fastpath for x2 up and downscale when the
scaler method is respectively nearest and linear because that is what
those fastpaths really implement.
2015-02-25 16:15:52 +01:00
Wim Taymans
9e8799924b video-scaler: add scaler optimization
If we are vertically downscaling, it is better to first downscale and
then do the horizontal scaling in most cases.
2015-02-25 15:33:26 +01:00
Wim Taymans
4d8c277656 video-scaler: remove unused case 2015-02-25 15:32:57 +01:00
Wim Taymans
495873298c video-converter: don't overwrite border alpha
Let border alpha and image alpha be independent.
2015-02-25 11:39:20 +01:00
Wim Taymans
c4f071546d video-converter: use 1.0 as default alpha 2015-02-24 17:33:57 +01:00
Wim Taymans
5077a5e3af video-converter: add alpha handling
Add support for alpha. Make it possible to copy, set and multiply the
alpha value of a frame during conversion.
Set the border alpha to 0xff by default.
Go over some of the fastpaths and add alpha handling.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=745006
2015-02-24 17:29:18 +01:00
Wim Taymans
5744b7995c video-converter: fix chroma subsampling
Also adjust the output line number with the offset.
2015-02-24 17:29:18 +01:00
Wim Taymans
cb5ec197da video-converter: disable fastpath when scaling and gamma
Disable the fastpath when scaling and doing gamma remap.
2015-02-24 17:29:18 +01:00
Wim Taymans
bf916a244d video-converter: don't do gamma on alpha channel
The alpha channel is not supposed to be gamma encoded.
2015-02-24 17:29:18 +01:00
Tim-Philipp Müller
0b0c667e57 video-converter: minor docs fix 2015-02-24 12:38:10 +00:00
Jan Schmidt
b3053925ac audiodecoder: Don't send pending events before decode
Make sure to update the output segment to track the segment
we're decoding in, but don't actually push it downstream until
after buffers are decoded.

https://bugzilla.gnome.org/show_bug.cgi?id=744806
2015-02-24 01:36:44 +11:00
Jan Schmidt
af26201429 videodecoder: Add drain() vfunc
drain() is a new vfunc which does what finish() does, while
explicitly requiring the decoder be able to continue processing
data afterward.

https://bugzilla.gnome.org/show_bug.cgi?id=734617
2015-02-24 01:36:44 +11:00
Mark Nauwelaerts
ccee86a7dd Revert "videodecoder: drain current segment upon new one to ensure correct flow return"
This reverts commit cc1b4eaf9e.

See https://bugzilla.gnome.org/show_bug.cgi?id=734617
2015-02-22 16:59:08 +01:00
Mark Nauwelaerts
c321b6bd81 Revert "audiodecoder: drain current segment upon new one to ensure correct flow return"
This reverts commit 696b8cdc40.

See https://bugzilla.gnome.org/show_bug.cgi?id=734617
2015-02-22 16:58:33 +01:00
Mark Nauwelaerts
cc1b4eaf9e videodecoder: drain current segment upon new one to ensure correct flow return
See also https://bugzilla.gnome.org/show_bug.cgi?id=709224
2015-02-22 13:23:44 +01:00
Mark Nauwelaerts
696b8cdc40 audiodecoder: drain current segment upon new one to ensure correct flow return
See also https://bugzilla.gnome.org/show_bug.cgi?id=709224
2015-02-22 13:23:44 +01:00
Thiago Santos
7e39a51a50 audio: video: fix a few GI annotations
transfer-full -> transfer full
@Since -> Since
2015-02-19 15:51:42 -03:00
Thiago Santos
cd07101420 tagdemux: ensure tags have been fetched before pulling data
Otherwise upstream can get confused about offsets as there will
be a jump once the tags have been parsed due to the stripped area.

If upstream pulls from 0 to 100, and then tagdemux does the
tag reading and finds out that the first 200 bytes are the tag, the
next pull from upstream will have an offset of 200 bytes. So
upstream will get the following data:

0 - 100, 300 - (EOS), as it will continue requesting from where
it has last stopped, but tagdemux will add an offset to skip the
tags.

This patch makes sure that the tags have been parsed and skipped
since the first pull range call.

https://bugzilla.gnome.org/show_bug.cgi?id=744580
2015-02-18 21:00:50 -03:00
Tim-Philipp Müller
f0f6bd4910 pbutils: description: fix MPEG-2 video profiles in description
We would accidentally use the profile nick as profile name
in the description for MPEG video that's not version 4.
2015-02-18 11:34:15 +00:00
Sebastian Dröge
11c126363f Revert "codec-utils: Handle the two rext profiles for h265"
This reverts commit 19b9356680.

These two "profiles" are actually a complete set of profiles, which we will
need to handle separately. Unfortunately it seems like we need information
from the SPS to detect the exact profile.
2015-02-16 09:48:03 +02:00
Tim-Philipp Müller
6af7b70162 pbutils: description: move some code into utility function 2015-02-15 20:08:36 +00:00
Tim-Philipp Müller
4e1a43d4ea pbutils: descriptions: add H.265 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 20:05:28 +00:00
Tim-Philipp Müller
58d19cb7ca pbutils: descriptions: add MPEG-4 video profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 19:03:58 +00:00
Tim-Philipp Müller
001bd78957 pbutils: descriptions: add Dirac/VC-2 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 18:50:48 +00:00
Tim-Philipp Müller
1d528459be pbutils: descriptions: add H.264 profile to description if available
https://bugzilla.gnome.org/show_bug.cgi?id=673976
2015-02-15 18:50:43 +00:00
Tim-Philipp Müller
0aa81614ac install-plugins: fix indentation and add Since marker
Forgot to squash this into the actual patch before pushing.
2015-02-13 22:56:50 +00:00
Kalev Lember
4d8f52eeef install-plugins: Add API to suppress confirmation before searching
The new gst_install_plugins_context_set_confirm_search() API can be used
to pass a hint to modify the behaviour of the external installer
process.

https://bugzilla.gnome.org/show_bug.cgi?id=744465
2015-02-13 22:45:29 +00:00
Kalev Lember
538dc374c6 install-plugins: Add API for passing desktop ID and startup ID
The new gst_install_plugins_context_set_desktop_id() and
gst_install_plugins_context_set_startup_notification_id() API can be
used to pass extra details to the external installer process.

https://bugzilla.gnome.org/show_bug.cgi?id=744465
2015-02-13 22:43:46 +00:00
Wim Taymans
1caf1ae1fd video-orc: update with new methods 2015-02-12 12:08:16 +01:00
Wim Taymans
45e408735c video-format: add orc function for RGB15/16 unpack 2015-02-12 11:39:33 +01:00
Sebastian Dröge
19b9356680 codec-utils: Handle the two rext profiles for h265
These values are for now taken from x265 and need to be checked against
the spec. Especially we need to check if information from other fields
need to be taken into consideration too, e.g. the bit depth and chroma
index from the SPS.

This however makes 4:4:4 output of x265enc actually work.
2015-02-11 17:53:49 +02:00
Sebastian Dröge
8547594727 Improve and fix LATENCY query handling
This now follows the design docs everywhere, especially the maximum latency
handling.

https://bugzilla.gnome.org/show_bug.cgi?id=744106
2015-02-11 17:53:49 +02:00
Wim Taymans
cdd86d025a video-scaler: add 2d scaler
Make a convenience function that combines 2 scalers to perform a 2d
scale. This removes quite a bit of overhead in method calls when doing a
typical scale and it also can reuse a piece of unused memory in the
vertical scaler.
Use the 2d scaler in video-converter and remove the other scalers and
temp memory.
2015-02-11 13:32:25 +01:00
Wim Taymans
80249d4bea video-converter: Fix YUY2 formats and friends
Only merge scalers for selected formats.
Use nearest neighbour scaling for chroma when doing nearest neighbour
for the luma.
Also fastpath GRAY16_OE in nearest neighbour.
configure parameters correctly for packed fastpath.
2015-02-10 16:45:38 +01:00
Wim Taymans
4313970678 video-scaler: Small performance tweaks
Small performance tweaks for RGB and friends.
Add, but ifdef out, alternative nearest neighbour scaling, it is slower
than the current table based version.
Use memcpy instead of orc_memcpy because it is measurably faster.
Fix YUY2 and friends vertical scaling.
2015-02-10 16:45:38 +01:00
Sebastian Dröge
13643870bf video-scaler: Guard against (impossible) bits!=16 && bits!=8 case to fix compiler warning with clang
video-scaler.c:1331:14: error: variable 'func' is used uninitialized whenever 'if' condition is false
      [-Werror,-Wsometimes-uninitialized]
  } else if (bits == 16) {
             ^~~~~~~~~~
video-scaler.c:1348:3: note: uninitialized use occurs here
  func (scale, src_lines, dest, dest_offset, width, n_elems);
  ^~~~
video-scaler.c:1331:10: note: remove the 'if' if its condition is always true
  } else if (bits == 16) {
         ^~~~~~~~~~~~~~~~
video-scaler.c:1260:27: note: initialize the variable 'func' to silence this warning
  GstVideoScalerVFunc func;
                          ^
                           = NULL
2015-02-10 16:44:38 +01:00
Sebastian Dröge
b680671374 video-converter: Use correct enum type to fix compiler warnings with clang
video-converter.c:3406:12: error: implicit conversion from enumeration type 'GstVideoFormat' to different
      enumeration type 'GstFormat' [-Werror,-Wenum-conversion]
  format = convert->fformat[plane];
         ~ ^~~~~~~~~~~~~~~~~~~~~~~
video-converter.c:3413:44: error: implicit conversion from enumeration type 'GstFormat' to different enumeration
      type 'GstVideoFormat' [-Werror,-Wenum-conversion]
    gst_video_scaler_horizontal (h_scaler, format,
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~            ^~~~~~
video-converter.c:3471:12: error: implicit conversion from enumeration type 'GstVideoFormat' to different
      enumeration type 'GstFormat' [-Werror,-Wenum-conversion]
  format = convert->fformat[plane];
         ~ ^~~~~~~~~~~~~~~~~~~~~~~
video-converter.c:3487:42: error: implicit conversion from enumeration type 'GstFormat' to different enumeration
      type 'GstVideoFormat' [-Werror,-Wenum-conversion]
    gst_video_scaler_vertical (v_scaler, format, lines, d + out_x, i,
    ~~~~~~~~~~~~~~~~~~~~~~~~~            ^~~~~~
video-converter.c:3551:12: error: implicit conversion from enumeration type 'GstVideoFormat' to different
      enumeration type 'GstFormat' [-Werror,-Wenum-conversion]
  format = convert->fformat[plane];
         ~ ^~~~~~~~~~~~~~~~~~~~~~~
video-converter.c:3569:46: error: implicit conversion from enumeration type 'GstFormat' to different enumeration
      type 'GstVideoFormat' [-Werror,-Wenum-conversion]
      gst_video_scaler_horizontal (h_scaler, format,
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~            ^~~~~~
video-converter.c:3577:42: error: implicit conversion from enumeration type 'GstFormat' to different enumeration
      type 'GstVideoFormat' [-Werror,-Wenum-conversion]
    gst_video_scaler_vertical (v_scaler, format, lines, d + out_x, i,
    ~~~~~~~~~~~~~~~~~~~~~~~~~            ^~~~~~
2015-02-10 16:38:05 +01:00
Luis de Bethencourt
4fb0095898 video-converter: bits variable always set
In function gst_video_scaler_vertical() the bits variable is always
set to either 8 or 16 in every possible format. No need to initialize it.

If the format isn't valid it goes to no_func, so there is no need to
handle the case of bits not being 8 or 16.

CID #1268401
2015-02-10 15:25:04 +00:00
Wim Taymans
622fa74a07 video-converter: only enable backlog for interlaced video
Skip lines we don't need.
2015-02-10 11:15:53 +01:00
Wim Taymans
c15dfc30e5 video-converter: add fastpath for NV formats 2015-02-10 09:30:44 +01:00
Wim Taymans
c6fcb5575a video-format: fix pstride of NV16 and NV24 formats 2015-02-10 09:22:50 +01:00
Tim-Philipp Müller
1b4bd6e451 rtspmessage: map headers we know that are added by string to their enum
That way we can look them up by their field enum later as well.
2015-02-09 18:03:43 +00:00
Tim-Philipp Müller
9b4ea3f5dd rtspmessage: add API to add and get custom headers
Add API to add and get custom headers that are not
covered by our header fields enum. This is backwards
compatible in that it will also work for our defined
fields, so if we ever add a new header field to the
enum, get_header_by_name() for the same header string
will still work.

API: gst_rtsp_message_add_header_by_name()
API: gst_rtsp_message_take_header_by_name()
API: gst_rtsp_message_remove_header_by_name()
API: gst_rtsp_message_get_header_by_name()
2015-02-09 17:50:14 +00:00
Wim Taymans
72bb2d8637 video-converter: Add more fastpaths
Add fastpaths for all planar conversion and scaling.
Improve gray and alpha handling.
Add option to specify the chroma resampler method and set to linear as
default.
2015-02-09 17:56:37 +01:00
Wim Taymans
2566675a78 video-converter: add generic planar scaler/converter
Add code to convert and scale between any planar format and use it in
the fastpaths of some planare converters.
2015-02-09 17:55:49 +01:00
Sebastian Dröge
dc8181c12e video-converter: Fix compiler warnings by using the correct enum type
video-converter.c:3645:24: error: implicit conversion from enumeration type
      'GstFormat' to different enumeration type 'GstVideoFormat'
      [-Werror,-Wenum-conversion]
    convert->fformat = fformat;
                     ~ ^~~~~~~
video-converter.c:3667:24: error: implicit conversion from enumeration type
      'GstFormat' to different enumeration type 'GstVideoFormat'
      [-Werror,-Wenum-conversion]
    convert->fformat = fformat;
                     ~ ^~~~~~~
video-converter.c:3963:50: error: implicit conversion from enumeration type
      'const GstVideoFormat' to different enumeration type 'GstFormat'
      [-Werror,-Wenum-conversion]
        if (!setup_scale (convert, transforms[i].fformat))
             ~~~~~~~~~~~           ~~~~~~~~~~~~~~^~~~~~~
2015-02-09 10:20:37 +01:00
Wim Taymans
80ca1462cd video-converter: add more scaler fastpaths 2015-02-06 13:39:04 +01:00
Wim Taymans
72076e9521 video-orc: fix loading of param
param loading ignores the x4, loading only part of the param.
2015-02-06 13:25:51 +01:00
Wim Taymans
bca801492b video-converter: add border and crop to more fastpaths 2015-02-06 12:35:58 +01:00
Wim Taymans
a78ae80909 video-converter: fix border for YUY2 and friends
Convert as many pixels as the max subsampling so that we convert a
complete group of pixels.
2015-02-06 12:33:18 +01:00
Ravi Kiran K N
bd836e12a1 video-converter: support AYUV border
Convert the border color from ARGB to AYUV, using
colorimetry matrix when output format is YUV.

https://bugzilla.gnome.org/show_bug.cgi?id=741640
2015-02-06 11:43:49 +01:00
Wim Taymans
c78bdbfecb video-converter: fix swapped border width
And also do nothing when there is no border.
2015-02-06 11:43:49 +01:00
Wim Taymans
86c96e09cc video-converter: actually draw the border in some fastpaths
Don't forget to draw the border after doing the fastpath conversion.
2015-02-06 11:43:49 +01:00
Wim Taymans
8fe9299b00 video-converter: clamp width and heigth
Clamp the width and height based on the in and out offsets.
2015-02-06 11:43:49 +01:00
Wim Taymans
7b3bff644c video-format: add unaligned fallbacks
Add fallback C implementations for when we can't call the ORC function
because of bad alignment.
2015-02-06 11:43:49 +01:00
Jan Schmidt
4f961e6d95 audiodecoder: Where possible, skip decode for GST_SEGMENT_FLAG_TRICKMODE_NO_AUDIO
If we have timestamps on input buffers and are in trickmode no-audio
mode, then don't pass anything to the subclass for decode and simply
send gap events downstream

Only for forward playback for now - reverse requires accumulating
GAP events and pushing out in reverse order.

https://bugzilla.gnome.org/show_bug.cgi?id=735666
2015-02-06 04:09:37 +11:00
Jan Schmidt
ca231ce321 audiobasesink: Re-work GAP buffer and trick-mode handling
In trickmode no-audio mode, or when receiving a GAP buffer,
discard the contents and render as a GAP event instead.

Make sure when rendering a gap event that the ring buffer will
restart on PAUSED->PLAYING by setting the eos_rendering flag.

This mostly reverts commit 8557ee and replaces it. The problem
with the previous approach is that it hangs in wait_preroll()
on a PLAYING-PAUSED transition because it doesn't commit state
properly.

https://bugzilla.gnome.org/show_bug.cgi?id=735666
2015-02-06 04:09:37 +11:00
Jan Schmidt
c35e3e7c7d audiodecoder: Remove pointless else{} around some code 2015-02-06 04:02:48 +11:00
Jan Schmidt
7c0f885ad2 audiodecoder: Fix reverse playback when there's only one gather set.
The decoder can fail to drain on EOS if there was only one gather
set, because it will never have sent the segment event downstream
and set the output segment, and fail to detect that the rate < 0.0

Make sure to send pending events before sending all the gather data
for decode.
2015-02-06 04:02:48 +11:00
Jan Schmidt
7d4d63be21 video: Fix simple typo in GstVideoFrameMapFlags docs 2015-02-06 04:02:48 +11:00
Wim Taymans
b5aa23697c video-converter: add crop and border to some fastpaths 2015-02-05 17:49:55 +01:00
Wim Taymans
6985511fc9 video-converter: add support for borders in scale fastpath
Add support for borders and cropping in the scaler fastpaths.
2015-02-05 17:18:20 +01:00
Wim Taymans
36a50778af video-converter: disable fastpath for crop and border
Add crop and border properties to the fastpath table and only select
fastpath functions when it can handle the cropping or borders.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=744028
2015-02-05 15:03:24 +01:00
Wim Taymans
3dfbd11fc8 video-converter: add fastpath for some gray formats 2015-02-04 18:01:51 +01:00
Wim Taymans
0737316e7e video-converter: add fastpath for some more RGB formats
Add fastpath for RGB and BGR.
Add fastpath for nearest resampling for RGB15 and RGB16 formats.
2015-02-04 17:44:31 +01:00
Wim Taymans
750909abce video-converter: skip lines we don't need
Make sure to skip unused lines instead of doing a useless horizontal
resampling.
2015-02-04 16:39:48 +01:00
Luis de Bethencourt
d8308d5a8f video-resampler: make sure params.envelope is initialized
In gst_video_resampler_init () if method is GST_VIDEO_RESAMPLER_METHOD_NEAREST
then params.envelope is not initialized but still used later in line 382.
Make sure this variable is initiliazed to avoid undefined behaviour.

CID #1256568
2015-02-04 11:25:54 +00:00
Sebastian Dröge
aa645b11f1 video{enc,dec}oder: Don't reset latency all the time and handle max=GST_CLOCK_TIME_NONE correctly
max=NONE means that *this* element has no maximum latency. If upstream had a
maximum latency we must not override it with NONE.
2015-02-03 12:24:01 +01:00
Sebastian Dröge
823cb40642 audio{enc,dec}oder: Always directly post latency messages on the bus when the subclass sets the latency
Instead of doing it only in setcaps for the encoder, and never at all for the
decoder.
2015-02-03 12:15:25 +01:00
Sebastian Dröge
f2a762a3a0 audio{enc,dec}oder: Handle max_latency == GST_CLOCK_TIME_NONE
And initialize the latencies with 0 and NONE.
2015-02-03 12:12:18 +01:00
Jan Schmidt
efe54e50e9 audiobasesink: Don't render a GAP silence buffer
Don't render out silence samples to a buffer, just
start the clock running, since any buffer with the
GAP flag will be discarded in render() now anyway.
2015-01-31 00:45:33 +11:00
Jan Schmidt
1df69786c3 audiobasesink: Make sure the ringbuffer is started before waiting
Don't call the basesink wait_event implementation until we're sure
the ringbuffer is running, because it might wait on a non-running
clock.
2015-01-31 00:45:33 +11:00
Jan Schmidt
8557eead82 audiobasesink: drop GAP buffers, or all buffers in trickmode no-audio mode
Make the base audio sink throw away buffers marked GAP, or all
incoming buffers when performing a trick play with
GST_SEGMENT_TRICKMODE_NO_AUDIO flag set, and make sure to start
the ringbuffer when that happens so the clock starts running.

Preserve the timing calculations when rendering, so state is all
updated the same, but just don't render samples.

https://bugzilla.gnome.org/show_bug.cgi?id=735666
2015-01-31 00:45:32 +11:00
Sebastian Dröge
4e44f37abd video-converter: Fix compiler warnings
video-converter.c:3073:48: error: implicit conversion from enumeration type 'GstFormat' to different enumeration type 'GstVideoFormat'
      [-Werror,-Wenum-conversion]
        gst_video_scaler_horizontal (h_scaler, format,
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~            ^~~~~~
video-converter.c:3081:44: error: implicit conversion from enumeration type 'GstFormat' to different enumeration type 'GstVideoFormat'
      [-Werror,-Wenum-conversion]
      gst_video_scaler_vertical (v_scaler, format, lines, d, i, out_w);
      ~~~~~~~~~~~~~~~~~~~~~~~~~            ^~~~~~
video-converter.c:3137:24: error: implicit conversion from enumeration type 'const GstVideoFormat' to different enumeration type 'GstFormat'
      [-Werror,-Wenum-conversion]
    convert->fformat = GST_VIDEO_INFO_FORMAT (in_info);
                     ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../gst-libs/gst/video/video-info.h:125:43: note: expanded from macro 'GST_VIDEO_INFO_FORMAT'
                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../gst-libs/gst/video/video-format.h:361:59: note: expanded from macro 'GST_VIDEO_FORMAT_INFO_FORMAT'
                                                  ~~~~~~~~^~~~~~
video-converter.c:3157:24: error: implicit conversion from enumeration type 'GstVideoFormat' to different enumeration type 'GstFormat'
      [-Werror,-Wenum-conversion]
    convert->fformat = GST_VIDEO_FORMAT_GRAY8;
2015-01-28 17:44:57 +01:00
Sebastian Dröge
46e141067f video: Update orc files 2015-01-28 17:43:59 +01:00
Wim Taymans
f29b966c79 video-converter: add fast-path scaler for some packed YUV formats
Add fast path scaling for YUY2 and other packed YUV formats. Add a new
method to merge the scalers of the Y and UV components into one scaler.
Add faster horizontal 2tap scaler.

See https://bugzilla.gnome.org/show_bug.cgi?id=741987
2015-01-28 17:32:12 +01:00
Wim Taymans
ea3dcdc0da video-converter: the default is BAYER dithering 2015-01-28 17:30:14 +01:00
Wim Taymans
620dc30d0f video-converter: don't do dither when set to NONE 2015-01-28 17:29:45 +01:00
Wim Taymans
e16377c0c8 video-scaler: fix taps calculation for pstride == 1
Take pstride into consideration when calculating the scaler taps.
2015-01-28 11:39:41 +01:00
Jan Schmidt
caff09300b audiobasesink: Make sure the ringbuffer really starts when we need it to
Some audio sink sub-classes (pulsesink) don't start their clock
when the ringbuffer starts, but always have to on EOS. When we
explicitly need to start the ringbuffer, make sure sub-classes will
do it by (ab)using the existing eos_rendering flag.
2015-01-28 16:30:42 +11:00
Luis de Bethencourt
783204824d orc: update orc files 2015-01-27 13:39:14 +00:00
Wim Taymans
e2864494fe video-converter: add fastpath for planar scaling
Add fastpaths for scaling of planar subsampled formats.

See https://bugzilla.gnome.org/show_bug.cgi?id=741987
2015-01-27 10:52:29 +01:00
Wim Taymans
ba98d06767 video-scaler: add support for monochroma formats
Add support for scaling of images with pstride == 1. This can be used
to scale individual planes later.
Rework some of the scaling code to take the pstride as a parameter.
2015-01-27 10:52:29 +01:00
Wim Taymans
4ab23677a9 video-format: fix GBR unpack 2015-01-27 10:52:29 +01:00
Jan Schmidt
ef42a163e4 audiodecoder: Fix typo in documentation
Fix a couple of harmless warnings in the gtk-doc parsing
2015-01-27 02:12:08 +11:00
Edward Hervey
5e69a0f898 video: Fix leaked dither object in error cases
Coverity CID : 1256564
2015-01-23 12:46:41 +01:00
Sebastian Dröge
2bd4ea6e8e Constify some static arrays everywhere 2015-01-21 09:49:47 +01:00
Sebastian Dröge
564f001aa8 audio-format: Constify the audio format table 2015-01-21 09:39:30 +01:00
Sebastian Dröge
e63ad51dab audiosrc: Fill in the correct silence
For unsigned raw formats this is not all zeroes, and for non-raw formats
we just continue to assume all zeroes for now.

https://bugzilla.gnome.org/show_bug.cgi?id=739446
2015-01-21 09:37:30 +01:00
Thomas Roos
f0f854d501 audiosink: Fill in the correct silence
For unsigned raw formats this is not all zeroes, and for non-raw formats
we just continue to assume all zeroes for now.

https://bugzilla.gnome.org/show_bug.cgi?id=739446
2015-01-21 09:35:55 +01:00
Sebastian Dröge
ce8d261cd6 appsink: Only emit EOS signal after all buffers are consumed
Otherwise the application will possibly shut down the pipeline already
because EOS is received, while there are still some buffers pending.
2015-01-20 19:22:15 +01:00
Sebastian Dröge
5b7d9e1954 audio: Keep caps features when building the downstream filter
Based on 5fd4e3e0b6 for video
by Alessandro Decina.
2015-01-15 10:51:37 +01:00
Alessandro Decina
5fd4e3e0b6 videoutils: keep caps features in account when building the downstream filter
See 00c2ce6 and https://bugzilla.gnome.org/show_bug.cgi?id=741263 for reference.
2015-01-15 13:59:10 +11:00
Mark Nauwelaerts
13ee94ef10 audioringbuffer: start ringbuffer if needed upon commit
... to provide for a running clock.
2015-01-10 13:03:20 +01:00
Mark Nauwelaerts
04d447a825 videoencoder: fix comment typo 2015-01-10 13:02:59 +01:00
Luis de Bethencourt
6992da94b0 video-dither: remove check for below zero for unsigned value
CLAMP checks both if value is '< 0' and '> max'. Value will never be a negative
number since it is an unsigned integer. Removing that check and only checking if
it is bigger than max and setting it appropriately.

CID 1256559
2015-01-09 15:38:09 +00:00
Luis de Bethencourt
23880ec874 video-resampler: remove check for below zero for unsigned value
CLAMP checks both if n_taps is '< 0' and '> max_taps'. n_taps will never be a
negative number because it is an unsigned integer. Removing that check and only
making sure it isn't set bigger than max.

CID 1256558
2015-01-09 15:28:06 +00:00
Sebastian Dröge
7a35321710 video: Add support for BT2020 colorspace (UHD) 2015-01-08 10:45:46 +01:00
Wim Taymans
ff8129267e video-scaler: remove useless debug 2015-01-07 15:54:58 +01:00
Wim Taymans
fff41f06be video-converter: add options to control chroma resampling
Add an option to disable chroma resampling.
Improve the matrix option values so that you can choose to use the input
or output matrix or disable conversion.
2015-01-07 15:52:57 +01:00
Sam Thursfield
651fa00c12 Fix documentation that incorrectly says a return value should be freed
The gst_discoverer_info_get_missing_elements_installer_details()
documentation and annotation says that the return value should be freed
with g_strfreev(), but actually it's owned by the GstDiscovereInfo
object and should definitely not get freed by the caller as well.

https://bugzilla.gnome.org/show_bug.cgi?id=742006
2014-12-27 13:02:14 +00:00
Nirbheek Chauhan
54e4baa523 audiobasesrc: Explicitly document that buffer-time and latency-time may be ignored 2014-12-27 10:24:45 +01:00
Song Bing
e9c6c833c9 videopool: update video alignment after applying
Video buffer pool will update video alignment to respect stride alignment
requirement. But haven't updated it to video alignment in configure.
Which will cause user get wrong video alignment.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741501
2014-12-22 09:25:04 -05:00
Thiago Santos
ef580889e0 audiobasesink: get the internal time before the clock reset
Otherwise calls to get the clock time might change its internal state
and the internal/external time for calibration get unbalanced leading to
a clock jump

https://bugzilla.gnome.org/show_bug.cgi?id=740834
2014-12-22 10:22:03 -03:00
Sebastian Dröge
87d6c265a8 video{en,de}coder: Call reset() before the start() vfunc
This makes sure that the element is in the same state before start() is called
the very first time and every future call after the element was used already.

Also it ensure that we always have a clean state before start(), cleaned the
same way in every case.
2014-12-22 11:38:20 +01:00
Sebastian Dröge
aae6400962 audioencoder: Call reset() before the start() vfunc to guarantee a clean state
The same was done already in the decoder, and we cleaned some state just above
manually that would also be taken care of by reset().

This makes sure that the element is in the same state before start() is called
the very first time and every future call after the element was used already.
2014-12-22 11:36:58 +01:00
Sebastian Dröge
098b42f36b video{en,de}coder: Reset the codec after calling the stop() vfunc
The stop() vfunc might mess with some of our fields we have just
reset, which could cause memory leaks or invalid state taken over
to later.

Also the stop() vfunc, or anything called until it from another thread,
might want to be able to use the fields that were just resetted and
become confused because of that.

In the decoder we already had a workaround for things like this happening,
this workaround is not needed anymore.
2014-12-22 11:33:14 +01:00
Sebastian Dröge
ceb9de6e55 audiobase{sink,src}: Don't hold the object lock while calling create_ringbuffer() vfunc
The implementation of that vfunc might want to use the object lock for
something too. It's generally not a good idea to keep the object lock while
calling any function implemented elsewhere.

Also the ringbuffer can only be NULL at this point, remove a useless if block.

And in the sink actually hold the object lock while setting the ringbuffer on
the instance. Code accessing this is expected to use the object lock, so do it
here ourselves too.
2014-12-22 10:47:36 +01:00
Sebastian Dröge
c1776a9dd3 riff-media: Error out early if we observe an invalid audio format 2014-12-18 13:25:01 +01:00
Sebastian Dröge
5ecbc9eea2 riff: Also handle invalid block aligns for raw audio
Fixes audio playback of
http://demo.archermind.com/Test%20Sample/Video/MPEG%204/Divx3/Low-Motion/576-320.avi

Audio and video together is still broken because of other issues.
2014-12-18 13:25:01 +01:00
Edward Hervey
e527cea8d3 audio: Fix private header include/dist
We want to dist it, but we don't want to install it.

Fixes make dist/distcheck
2014-12-18 10:58:16 +01:00
Thiago Santos
17a7fac1a1 video: audio: fix GI annotations for proxy caps function
Add the annotations to parameters that can be null and also for stating
the ownership of the returned caps
2014-12-17 19:15:24 -03:00
Thiago Santos
36a99922e4 audiodecoder: expose getcaps virtual function
Allows subclasses to do custom caps query replies.

Also exposes the standard caps query handler so subclasses can just
extend on top of it instead of reimplementing the caps query proxying.
2014-12-17 19:15:24 -03:00
Thiago Santos
160dce872b audiodecoder: implement caps and accept-caps queries
Allows decoders to proxy downstream restrictions on caps.

Also implements accept-caps query to prevent regressions caused by the
new fields on the return of a caps query that would cause the accept-caps
to fail as it uses subset caps comparisons
2014-12-17 19:15:23 -03:00
Thiago Santos
5e3405bd08 audioencoder: refactor getcaps proxy function to be reusable
Makes the audioencoder's getcaps function that proxies downstream
restriction available to other elements in the audio module to use it
2014-12-17 19:15:23 -03:00
Thiago Santos
8085352fb3 videodecoder: expose getcaps virtual function
Allows subclasses to do custom caps query replies.

Also exposes the standard caps query handler so subclasses can just
extend on top of it instead of reimplementing the caps query proxying.

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
4956800549 videodecoder: accept-caps should only require fields from the template
With the new caps query results the caps returned might have extra fields
that are not required by the decoder (framerate for image decoders) and it
causes a regression making, for example, jpegdec reject caps that don't
have framerates.

The accept-caps implementation will do 2 checks:

1) Do subset check with the template caps, making sure all the required
fields that are present on the template are present on the received caps.
2) Do a intersection check with the result of a caps query, making sure
that downstream can accept the fields in the received caps.

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
00c2ce60c3 videoutils: proxy filter when doing a caps query downstream
Allows downstream to use the filter and possibly reduce caps complexity
to speed up negotiation

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
f492085552 videoutils: return empty if the element has no possible allowed caps
Instead of returning the template caps and having a failure happen
later because there are no possible caps

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Thiago Santos
f24075887f videodecoder: implement caps query
Refactor the encoder's caps query proxying function to a common place
and use it in the videodecoder to proxy downstream restrictions.

The new function is private to the gstvideo lib.

https://bugzilla.gnome.org/show_bug.cgi?id=741263
2014-12-17 19:15:23 -03:00
Song Bing
8baf1ec500 videopool: update buffer size after video alignment
Update the new buffer size after alignment in the pool configuration
before calling the parent set_config. This ensures that the parent knows
about the buffer size that we will allocate and makes the size check
work in the release_buffer method.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741420
2014-12-16 12:14:53 +01:00
Sebastian Dröge
0b7537f93b audiobasesrc/sink: Add _CAST macros 2014-12-15 20:57:30 +01:00
Edward Hervey
ff57f69134 video: Fix non-default usage of gst_video_sink_center_rect
Make sure we take into account non-0 x/y destination rectangles
2014-12-15 14:11:07 +01:00
Sanjay NM
d226d45d2f audio: Add error handling to gst_audio_decoder_drain()
https://bugzilla.gnome.org/show_bug.cgi?id=740686
2014-12-14 12:05:52 +01:00
Sebastian Dröge
f5cf586e77 audioclock: Fix redundant definitions compiler warning
gstaudioclock.c:51:31: error: redundant redeclaration of 'gst_audio_clock_init' [-Werror=redundant-decls]
 G_DEFINE_TYPE (GstAudioClock, gst_audio_clock, GST_TYPE_SYSTEM_CLOCK);

gstaudioclock.c:51:31: error: redundant redeclaration of 'gst_audio_clock_class_init' [-Werror=redundant-decls]
 G_DEFINE_TYPE (GstAudioClock, gst_audio_clock, GST_TYPE_SYSTEM_CLOCK);
2014-12-13 16:14:49 +01:00
Sebastian Dröge
cb70d3fdf0 audioclock: No need to get the parent class in class_init, G_DEFINE_TYPE does that for us 2014-12-13 16:04:40 +01:00
Sebastian Dröge
41f1ec1c81 audioclock: Use G_DEFINE_TYPE instead of a custom get_type() function 2014-12-13 16:02:01 +01:00
Zaheer Abbas Merali
3ef295d9d6 rtcpbuffer: fix spelling of word in comment 2014-12-12 08:32:15 -08:00
Sebastian Dröge
ee2418effd video: Update disted orc source files 2014-12-12 10:02:43 +01:00
Sebastian Dröge
3fc5791b3f Revert "video-converter: Fix compiler warning because of missing prototype of non-static function"
This reverts commit 406f32a946.

The problem was apparently that my video-orc.h was not updated and did not
include the prototype for that function. Only a "make clean" caused it to
be regenerated.
2014-12-12 10:01:36 +01:00
Sebastian Dröge
406f32a946 video-converter: Fix compiler warning because of missing prototype of non-static function
video-converter.c:838:1: error: no previous prototype for function
      '_custom_video_orc_matrix8' [-Werror,-Wmissing-prototypes]
2014-12-12 09:51:05 +01:00
Thiago Santos
fce946a1a3 audiodecoder: do not use fixed caps on source pad
decoders can change the caps on their source pads, so they don't
use fixed caps. Having fixed caps can cause renegotiation issues.
2014-12-11 17:35:03 -03:00
Thiago Santos
2034e5c153 videodecoder: do not use fixed caps on source pad
decoders can change the caps on their source pads, so they don't
use fixed caps. Having fixed caps can cause renegotiation issues.
2014-12-11 17:35:03 -03:00
Wim Taymans
903ba19593 video-orc: make RGB pack/unpack faster
Avoid all the merging and splitting and use a pair of shifts and or
2014-12-10 16:43:34 +01:00
Jan Schmidt
6e492304dd videodecoder: Add GST_VIDEO_DECODER_CAST macro
It's used in some macros already, so let's make it exist.
2014-12-11 01:53:15 +11:00
Göran Jönsson
e3a212e0d4 rtspconnection: No remove child if destroyed.
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=740730
2014-12-09 10:32:00 +01:00
Wim Taymans
a0b8e96b77 video-converter: set bits and format after conversion
Update the current format, bits and pstride.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=741187
2014-12-06 21:05:00 +01:00
Thiago Santos
5db596495b video-converter: free dither_lines
Avoid a memory leak
2014-12-05 22:23:55 -03:00
Wim Taymans
4ffd723c95 video-converter: use custom backup function
Use the new orc feature to set a custom backup function.
2014-12-05 14:51:28 +01:00
Wim Taymans
04e9a8dcc5 video-converter: improve matrix8 function
Avoid using a constant.
Avoid doing saturated adds, results are not supposed to overflow here.
Rework the C backup function a little in preparation for custom backup
functions in ORC.

See https://bugzilla.gnome.org/show_bug.cgi?id=741015
2014-12-05 12:20:26 +01:00
Mathieu Duponchelle
b2413d46ed audiodecoder: Push pending events before sending EOS.
Segments are added to the pending events, and pushing a segment
is mandatory before sending EOS.

+ Adds a test.

https://bugzilla.gnome.org/show_bug.cgi?id=740853
2014-12-05 12:04:04 +01:00
Wim Taymans
e2a693656b video-converter: fix chroma resampling check
Decide if we need chroma resampling by checking if we have a progressive
or interlaced chroma resampler.
2014-12-03 10:17:29 +01:00
Wim Taymans
6757296386 video-converter: only do dithering when needed
Only do dithering when one of the quantizers is > 1.
2014-12-03 10:17:29 +01:00
Wim Taymans
fc1d24ec45 video-scaler: add where orc functions could go
Add the disabled orc functions in #if 0 lines for when we can enable
them.
2014-12-02 15:11:12 +01:00
Wim Taymans
d03136f1ea video-converter: add dithering
Use the new dither object to perform dithering.
Add option to select dithering method.
Add option to quantize to a specific value
2014-12-02 15:10:49 +01:00
Wim Taymans
dfb202a117 video-converter: add palette when needed 2014-12-02 15:10:49 +01:00
Wim Taymans
0f2be22e76 video-dither: add video dither helper object
Add a new object that implements various dithering methods.
2014-12-02 15:10:43 +01:00
Sebastian Dröge
90eb93c2ef Don't compare booleans for equality to TRUE and FALSE
TRUE is 1, but every other non-zero value is also considered true. Comparing
for equality with TRUE would only consider 1 but not the others.
2014-12-01 09:51:12 +01:00
Thibault Saunier
72c05d1cbb encodebin: Add a way to disable caps renegotiation for output stream format
In some cases, the user might want the stream outputted by encodebin to
be in the exact same format during all the stream. We should let the
user specify when this is the case. This commit add some API in the
GstEncodingProfile to determine whether the format can be renegotiated
after the encoding started or not.

API:
    gst_encoding_profile_set_allow_dynamic_output
    gst_encoding_profile_get_allow_dynamic_output

https://bugzilla.gnome.org/show_bug.cgi?id=740214
2014-11-28 16:56:32 +01:00
Tim-Philipp Müller
19d2a5255c tagmux: fix criticals when there are no tags at all 2014-11-28 13:18:38 +00:00
Sebastian Dröge
afcc0b3c50 video-frame: Mapping a frame with inconsistent values between GstVideoMeta and GstVideoInfo is a bug
It will cause the frame to be initialized with inconsistent values that then
later can cause crashes or any other kind of interesting and hard to debug
bugs.
2014-11-28 10:27:28 +01:00
Tim-Philipp Müller
57811331de video-blend: make use of x offset when unpacking overlay image pixels
Now that it's implemented we can use it, which is a minor
optimisation when the image to overlay gets cropped on the
left.
2014-11-27 15:29:48 +00:00
Tim-Philipp Müller
60d18149e5 video-format: sprinkle some 'restrict' keywords in pack/unpack functions
In cases where we just call orc directly this is somewhat
superfluous, but let's do it anyway for consistency. In
other cases the compiler can hopefully use this to optimise
memory access a little.
2014-11-27 15:04:12 +00:00
Wim Taymans
52d4dd1cb0 video-format: handle x offset in unpack
Add support for x offset in almost all unpack methods.
Fix naming of source and dest pixels.
Add const to source pixels.
2014-11-27 13:01:03 +01:00
Wim Taymans
a3da634db6 video-format: improve unpack i420
unpack_i420 does not need extra code to handle odd widths, the orc code
already handles it fine.
2014-11-27 10:51:58 +01:00
Wim Taymans
0e3bfbd996 video-scale: combine adds when max_taps equals combine size
When the amount of pixels/lines matches the amount we can combine,
combine the adds and multiplies and do the scale as a separate
operation.
2014-11-25 17:42:07 +01:00