Commit graph

1817 commits

Author SHA1 Message Date
Vincent Penquerc'h
6ec86ca1dc gl: prevent division by 0 on unsupported texture type
Coverity 1199697
2014-04-21 13:23:45 +01:00
Jan Schmidt
b2fe0c50ff glcolorconvert: Fix bt709 conversion matrices.
Fix the sign on one entry in the bt.709 YUV->RGB conversion
matrix, and the corresponding inverse matrix. Fixes really
wrong colouring of some videos.
2014-04-21 22:03:15 +10:00
Sebastian Dröge
cea860021d codecparsers: vp8: rename dboolhuff symbols.
Rename VP8 dboolhuff symbols so that to avoid clashes with libvpx when
static linking.
2014-04-18 16:32:40 +02:00
Gwenole Beauchesne
e2aaa91c5a codecparsers: vp8: add GStreamer native utilities.
Import libvpx 1.3.0 range decoder files (dboolhuff.[ch]) to implement
the VP8 utilities native interface. Likewise, copy and use the default
libvpx generated entropy probabilities tables.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 16:32:40 +02:00
Zhao, Halley
3da5a54399 codecparsers: add VP8 bitstream parser.
https://bugzilla.gnome.org/show_bug.cgi?id=722760

[refactored, among other fixes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 16:32:40 +02:00
Stefan Ringel
eeaf6e4811 mpegts: add dvb ca identifier descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727560
2014-04-16 09:23:23 +02:00
Stefan Ringel
0c773b8cdd mpegts: add scrambling descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727560
2014-04-16 09:23:05 +02:00
Stefan Ringel
e535967ee9 mpegts: add frequency list descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727560
2014-04-16 09:22:46 +02:00
Stefan Ringel
ace60abef5 mpegts: add data broadcast id descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
2014-04-16 09:21:45 +02:00
Stefan Ringel
065abf6d54 mpegts: add private data specifier descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
2014-04-16 09:21:45 +02:00
Sebastian Dröge
8407ee9ee9 dvb: Minor code style fix 2014-04-16 09:21:45 +02:00
Stefan Ringel
e71c264dbb mpegts: add parential rating descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
2014-04-16 09:21:45 +02:00
Stefan Ringel
eb246e2bfd mpegts: add linkage descriptor
https://bugzilla.gnome.org/show_bug.cgi?id=727403
2014-04-16 09:21:44 +02:00
Tim-Philipp Müller
990efe1fc0 mpegts: for loop initial declarations are only allowed in C99 mode
Fixes compiler warnings.
2014-04-16 00:28:37 +01:00
Julien Isorce
09116bf10d egl/eglglessink: remove since EGLImage and iOS support have been added in glimagesink
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-04-15 18:29:53 +01:00
Julien Isorce
d93ed2b870 gl: allow to include GLES/gl.h
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-04-15 17:40:54 +01:00
Sebastian Dröge
e5d96d052b gl/eagl: Fix compilation 2014-04-13 19:20:32 +02:00
Sebastian Dröge
d3d1b5a5e2 gl/eagl: Notify the window's resize callback about surface dimension changes
https://bugzilla.gnome.org/show_bug.cgi?id=728107
2014-04-13 16:55:26 +02:00
Sebastian Dröge
ef509077db gl/eagl: Remove spurious private struct pointer 2014-04-13 16:55:26 +02:00
Sebastian Dröge
5db4db6836 gl/android: Notify the window's resize callback about surface dimension changes
https://bugzilla.gnome.org/show_bug.cgi?id=728107
2014-04-13 16:55:26 +02:00
Matthew Waters
7f37505503 gl/context: output available extensions 2014-04-13 13:49:22 +10:00
Matthew Waters
24f533fae7 gl/context: provide get_gl_version 2014-04-13 13:44:31 +10:00
Julien Isorce
0586e49726 gl/color: restore viewport dimensions when fbo done
Regression introduced by 95abfda139.
It caused to display the wrong frame size when resizing the window.
2014-04-13 10:00:46 +10:00
Sebastian Dröge
47f7bf269a gl: Import QuartzCore/QuartzCore.h for CAEAGLLayer on older iOS versions 2014-04-12 22:45:30 +02:00
Sebastian Dröge
ae81268565 gl: Add support for iOS EAGL platform
https://bugzilla.gnome.org/show_bug.cgi?id=703341
2014-04-12 22:25:13 +02:00
Julien Isorce
6b2c24d0c4 gl/cocoa: make gst_gl_window_cocoa_send_message_async re-entrant
Backends that use g_main_context_invoke are re-entrant.

Il allows to call two nested gst_gl_context_thread_add.
ex: init_upload / init_colorconvert
2014-04-12 17:33:44 +01:00
Julien Isorce
871ddef9ce gl/cocoa: fix NSAutoreleasePool initialization 2014-04-12 15:51:47 +01:00
Julien Isorce
3c49f0f42a gl/cocoa: ensure to call NSApplication:sharedApplication in the main thread
"(NSApplication *)sharedApplication This method also makes a connection
to the window server and completes other initialization"
The implicit thing which is not mentioned is that it required
to be called in the main thread.

Fix a regression introduces by 82b7c915bb
When using with gst-launch, it was not possible to click on the close
cross of the window anymore which is a bit anoying and also because
it's was possible before.

Prior to this commit the GstGLContextCocoaClass was initialized
in the main thread because gst_gl_context_new was called in the
state change function from going from ready to paused.

From this commit this call is done from the streaming thread.
So that the call to [NSApplication sharedApplication];
was not done in the main thread anymore.

We now ensure that by assuming there is a GMainLoop running.
It's for debugging purpose so that's ok to do that. Also
note we already do this assumtion to run app itereations.

The regression had no consequence on the cocoa/videooverlay example
(that should be moved from gst-plugins-gl to -bad) because the
application is responsible for that necessary call.
2014-04-12 15:46:47 +01:00
Julien Isorce
995db85435 gl/color: fix warning type qualifiers ignored
i686-apple-darwin11-llvm-gcc-4.2
"warning: type qualifiers ignored on function return type"
2014-04-12 14:55:45 +01:00
Matthew Waters
ab9b54efdd gl/color: remove if statement with no effect
Coverity 1199698
2014-04-12 18:24:43 +10:00
Matthew Waters
a05d62d5ca gl/color: pass large value by reference
Coverity 1199700
2014-04-12 18:18:08 +10:00
Matthew Waters
b69e1f42bb gl/mem: cache the stride/unpack length for upload 2014-04-11 17:26:09 +10:00
Matthew Waters
7a424780ce gl/color: explicitly map the buffers we are copying into
Otherwise it may not be downloaded at all.
2014-04-11 17:26:09 +10:00
Matthew Waters
1e948cb42e gl/color: cache the temporary textures 2014-04-11 16:09:09 +10:00
Matthew Waters
d92eb6dbbe gl/mem: provide defines for tokens not defined in GLES2/ancient platforms 2014-04-11 11:04:43 +10:00
Matthew Waters
8cc10a1c9c gl: fixup incorrect number of arguments 2014-04-11 11:03:19 +10:00
Matthew Waters
ad30c8e7e8 gl: fix incorrect usage of g_return_if_fail 2014-04-11 10:55:21 +10:00
Matthew Waters
15d0c04933 gl/mem: allocate the memory per plane
This patch provides the basic infrastructure required for this.
Upload and Download has been ported to this.

Has the nice effect of allowing GstGLMemory to be our
refcounted texture object for any texture type (not just RGBA).

Should not lose any features/video formats.
2014-04-11 10:37:06 +10:00
Matthew Waters
d8b6303c95 gl/eglimage: #if 0 unused code 2014-04-11 10:37:06 +10:00
Matthew Waters
95abfda139 gl: add colorconvert object that converts between color spaces/formats
Currently used by both upload and download objects separately.
2014-04-11 10:37:05 +10:00
Thibault Saunier
15d00a32fd h264parse: Set framerate even for interlaced videos
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>

https://bugzilla.gnome.org/show_bug.cgi?id=726752
2014-04-10 09:09:38 +02:00
Stefan Ringel
f566d17202 mpegts: add atsc terrestrial virtual channel table
https://bugzilla.gnome.org/show_bug.cgi?id=727460
2014-04-10 09:09:38 +02:00
Vincent Penquerc'h
8f4123a881 mpegts: fix sdt length check
It was originally test for 9 bytes (as the comment says) and was
rewritten buggily. So rewrite it a third way, which is now
hopefully consistent with the original and the comment, while
being more sense-making to humans.

Coverity 1139654
2014-04-09 16:01:43 +01:00
Vincent Penquerc'h
195470a785 mpegts: turns out glib aborts on allocation failure
So this is actually pointless. We'll just have to ignore
Coverity moaning on those.

Revert "mpegts: test for allocation failure"

This reverts commit 224cb81b8f.
2014-04-09 16:01:43 +01:00
Vincent Penquerc'h
224cb81b8f mpegts: test for allocation failure
While it's unlikely to get there, it silences the coverity warning
on the error code path that we test for NULL before freeing, when
all branches there are from locations where pmt cannot be NULL,
and removing the NULL check makes the code more vulnerable to a
hypothetical future branch from somewhere where it can be.

Coverity 1139852
2014-04-09 15:44:10 +01:00
Vincent Penquerc'h
cdfce09fb7 gl: fix leaks
As the relevant variables are initialized to 0/NULL, we can loop
over the full range and make sure we free partial allocations
when an error happens partway through initialization.
2014-04-08 15:54:01 +01:00
Matthew Waters
e01e2cce9f gl: pass video info's by reference 2014-04-02 23:05:47 +11:00
Matthew Waters
7d2d3b3b80 gl/glx: use the context's display rather than asking for the window's 2014-04-02 22:53:10 +11:00
Matthew Waters
e58cd96b96 gl: avoid adding a NULL pool to propose allocation 2014-04-02 22:42:50 +11:00
Matthew Waters
14e993e745 gl: fix detection of extensions with GL versions < 3
Mesa, for example returns valid pointers for glGetIntegerv and
glGetStringi even if the gl version is less than that required for
both those functions to supposedly exist.

https://bugzilla.gnome.org/show_bug.cgi?id=727324
2014-04-01 22:02:46 +11:00
Stefan Ringel
73862d5096 mpegts: fix docs
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=727356
2014-03-31 15:05:48 +02:00
Stefan Ringel
b7efacfe15 mpegts: add dvb-t2 delivery system descriptor
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=727356
2014-03-31 15:05:48 +02:00
Stefan Ringel
e8c86e355f mpegts: bugfix delivery system descriptors
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=726979
2014-03-31 15:02:01 +02:00
Stefan Ringel
d108fe7ee1 mpegts: use GST_READ_UINT32_BE
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=727187
2014-03-31 15:00:54 +02:00
Stefan Ringel
8b8ceb2dd9 mpegts: add parsing data broadcast descriptor
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=727187
2014-03-31 15:00:54 +02:00
Stefan Ringel
f8b7a130cc mpegts: add parsing stream identifier
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=727187
2014-03-31 15:00:54 +02:00
Stefan Ringel
2e051cf412 mpegts: use glib alloc and free
Signed-off-by: Stefan Ringel <linuxtv@stefanringel.de>

https://bugzilla.gnome.org/show_bug.cgi?id=727159
2014-03-31 14:54:17 +02:00
Tim-Philipp Müller
0f02311d13 gl: egl: fix distcheck and out of source build 2014-03-28 20:22:43 +00:00
Rico Tzschichholz
d10fcf4d3f build: Fix make dist 2014-03-28 20:02:40 +00:00
Matthew Waters
e356088f15 gl: fix out-of-source builds pt2
21b897de2f did this for x11 and wayland.
Do it for the other backends as well.
2014-03-27 22:03:14 +11:00
Julien Isorce
75c92dc915 gl: only set CAPS_FEATURE_MEMORY_EGL_IMAGE on egl platform 2014-03-27 07:07:01 +00:00
Julien Isorce
218244a040 gl: let the user includes itself our egl headers if needed
Forgot to address this change.

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-03-26 19:17:03 +00:00
Julien Isorce
0ae3c984aa gl: add EGLImage support
* picked from old libgstegl:
  - GstEGLImageMemory
  - GstEGLImageAllocator
  - last_buffer management from removed GstEGLImageBufferPool

* add-ons:
  - GstEGLImageMemory now old a reference on GstGLContext
    so that it can delete the EGLImage and its gltexture source
    while having the associated gl context being current.
  - add EGLImage support for GstVideoGLTextureUploadMeta which
    mainly call EGLImageTargetTexture2D
  - GstGLBufferPool now supports GstEGLImageAllocator
  - glimagesink / glfilters / etc.. now propose GstEGLImageAllocator
    to upstream

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-03-26 19:09:13 +00:00
Julien Isorce
6d10548e7f gl: deploy egl headers in gst/gl/egl instead of gst/gl
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-03-26 14:52:39 +00:00
Julien Isorce
5bb4c4e866 gl: remove commented and unsued code in x11 Makefile.am
https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-03-26 14:52:31 +00:00
Julien Isorce
2893a70aa0 gl: fix crash if _build_extension_string is not called
On GLES2 then (gl->GetIntegerv && gl->GetStringi) is false
regression introduced by cc6df204e2

https://bugzilla.gnome.org/show_bug.cgi?id=703343
2014-03-26 14:51:41 +00:00
Gwenole Beauchesne
e84b0d626c codecparsers: cosmetics: drop TAB characters.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-25 15:48:40 +01:00
Li Xiaowei
24c1ae72d3 codecparsers: h264: fix slice_header() parsing for MVC.
The idr_pic_id syntax element depends on IdrPicFlag, which is a calculated
value that does not only depend on NAL unit type (IDR), but possibly also
on MVC non_idr_flag syntax element.

The computed idr_pic_flag is already stored in GstH264NalUnit structure.

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

Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 19:38:13 +01:00
Gwenole Beauchesne
8dc7ab49fe codecparsers: h264: add gst_h264_parse_nalu_header() helper.
Add helper to parse the NALU header. Move bounds checking to there.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 19:38:13 +01:00
Gwenole Beauchesne
e61ae7ffa2 codecparsers: h264: add gst_h264_parse_sps_data() helper.
Split seq_parameter_set_data() parsing off gst_h264_parse_sps() so
that it could be re-used later on.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 19:38:13 +01:00
Gwenole Beauchesne
bd4dceeff4 codecparsers: h264: complete set of NAL unit types.
Add missing NAL unit types. They are mostly related to alpha blending,
scalable video coding extensions (SVC, Annex.G), and multiview video
coding extensions (MVC, Annex.H).

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 19:38:13 +01:00
Gwenole Beauchesne
afff27651b codecparsers: h264: clean-up gst_h264_parser_parse_sei_message().
Fix build when GST_DISABLE_GST_DEBUG is not defined. Use a switch
statement to dispatch to the various SEI payload handlers.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 19:38:13 +01:00
Gwenole Beauchesne
1b42180817 codecparsers: h264: fix skipping of unsupported SEI messages.
The payloadSize does not account for emulation prevention bytes. So,
just use nal_reader_skip() for skipping payload_size bits. It should
be possible to further optimize this code since the NAL reader shall
be aligned to byte boundary already.

Kill the now unused nal_reader_skip_to_next_byte() function.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 18:09:27 +01:00
Gwenole Beauchesne
aa73624638 codecparsers: h264: fix SEI buffering_period() parsing.
Fix parsing of buffering_period() SEI messages. The number of bits
used to express {nal,vcl}_initial_cpb_removal_delay{,_offset} syntax
elements is not 5 but 1 + initial_cpb_removal_delay_length_minus1.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 18:09:27 +01:00
Gwenole Beauchesne
80a51a8fab codecparsers: h264: fix rbsp_more_data() implementation.
Account for trailing zero bits when checking for rbsp_more_data().

In particular, fix an hypothetical stream whereby rbsp_more_data()
is called in the following conditions for PPS header: NalReader
reached position 20, 12 bits are remaining and trailing data at
current byte position is c8 00.

rbsp_more_data() used to return TRUE whereas it should obviously
return FALSE because x8 00 represents a valid rbsp_trailing_bits()
structure.

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

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 18:09:27 +01:00
Gwenole Beauchesne
21b897de2f gl: fix out-of-source builds.
Always use the locally generated <gst/gl/gstglconfig.h> file.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-03-24 17:56:13 +01:00
Matthew Waters
48ef9402bf gl/download: add support for the bt709 color matrix 2014-03-25 00:50:30 +11:00
Matthew Waters
6d452f60ee gl/upload: add support for the bt709 color matrix 2014-03-25 00:34:13 +11:00
Matthew Waters
9908375fc0 gl: remove explicit reference to X_CFLAGS
They are in GL_CFLAGS if required
2014-03-24 23:19:02 +11:00
Matthew Waters
f55b299826 gl/upload: remove the legacy GL 1.x upload path
uploading requires shaders and fbos available in GL2.
2014-03-24 23:19:02 +11:00
Julien Isorce
cc6df204e2 gl: fallback to glGetString if GL_NUM_EXTENSIONS fails
Need it on MacOSX 10.7.5
2014-03-23 11:02:08 +00:00
Matthew Waters
11e8b3017a gl: and update the Makefile 2014-03-23 01:02:03 +11:00
Matthew Waters
3180899a98 gl: reorganize the extension headers by function rather than api 2014-03-23 00:39:43 +11:00
Matthew Waters
45c94fa750 gl/win32: use the correct include and gst-indent 2014-03-23 00:39:43 +11:00
Wang Xin-yu (王昕宇)
05cb4bc6a5 gl: use wglCreateContextAttribsARB to create share context
https://bugzilla.gnome.org/show_bug.cgi?id=726494
2014-03-20 15:45:02 +11:00
Matthew Waters
58aa3e9d64 gl/mixer: fix download check for failure 2014-03-20 07:01:01 +11:00
Matthew Waters
faa94a8737 gl: silence a critical if upstream does not provide us with meta params 2014-03-20 07:01:01 +11:00
Julien Isorce
fa4ce072ee gl: silence warnings building for RPI related to 'vcos_*'
Similar than 1190a79b19
2014-03-19 14:43:13 +00:00
Julien Isorce
e870244e39 gl: keep only one occurence of '#include <EGL/egl.h>'
To simply maintainance if we need to put specific includes around it.
2014-03-19 14:43:13 +00:00
Руслан Ижбулатов
2a8f52a976 gl: fix the use of always-defined macros
After 2a0f0399ae GST_GL_* macros are always
defined to 0 or 1. Don't use #ifdef ... or #if defined() on them.

https://bugzilla.gnome.org/show_bug.cgi?id=726591
2014-03-18 06:17:03 +00:00
Matthew Waters
a64dd649f5 gl: add GModule libs for win32 2014-03-17 15:16:13 +01:00
Matthew Waters
567820c551 gl: only link against gstegl if we are using egl
Assuming if we are building egl that the egl library is built
2014-03-17 15:06:25 +01:00
Matthew Waters
acf1616251 gl: add path of the gstegl library
Temporary until we merge the two libraries
2014-03-17 14:37:13 +01:00
Matthew Waters
023c10891e Revert "gl: add dep on gstegl"
It was already in _LIBADD

This reverts commit b10a353080.
2014-03-17 14:26:31 +01:00
Matthew Waters
b10a353080 gl: add dep on gstegl
Temporary until we merge the two libraries
2014-03-17 14:12:50 +01:00
Edward Hervey
16e60d0129 gl/cocoa: Fix debug statements and platform 2014-03-17 14:06:53 +01:00
Edward Hervey
0ae0bfcbc7 gl: Fix static build with objective-C
--tag=CC is needed for static build
2014-03-17 12:05:14 +01:00
Matthew Waters
49b37650f6 gl: Add EGLDisplay display subclass 2014-03-17 10:56:39 +01:00
Matthew Waters
b67af0e314 gl/window: add a dummy window class
Effective for the case where we have a platform that does not
require a native window.  We require a mainloop to run the GL
commands which is currently operated by GstGLWindow.
2014-03-17 10:44:32 +01:00
Matthew Waters
aaa7cfc9fc gl: fix undeclared symbol when building without GST_DEBUG 2014-03-17 08:10:50 +01:00
Matthew Waters
99c48c34c1 gl: fix a double unref of the query when building without X 2014-03-17 08:10:25 +01:00
Matthew Waters
6da1c48970 gl: silence a compiler warning about missing prototypes 2014-03-16 17:21:38 +01:00
Matthew Waters
5bf83bd48f gl/utils: add x11 GstContext handling
https://bugzilla.gnome.org/show_bug.cgi?id=726360
2014-03-16 16:32:33 +01:00
Matthew Waters
e8bbcb366e gl: define GL_NUM_EXTENSIONS if not defined 2014-03-16 15:34:11 +01:00
Matthew Waters
6b3fe44185 Move gst-plugins-gl to bad 2014-03-16 15:17:59 +01:00
Matthew Waters
870503dc6b gl: silence all the compiler warnings 2014-03-16 15:17:44 +01:00
Matthew Waters
92c7849979 [906/906] filter: warn about trying to share with multiple contexts at once 2014-03-15 18:37:07 +01:00
Matthew Waters
a8ce124628 [905/906] Add GL context sharing support for non-gstgl elements 2014-03-15 18:37:07 +01:00
Matthew Waters
f0b10d4edf [904/906] mixer: ask for display handles on pad activation 2014-03-15 18:37:07 +01:00
Matthew Waters
6527008c2a [903/906] api: add GstGLPlatform to/from string 2014-03-15 18:37:07 +01:00
Matthew Waters
ea0c6b3f70 [902/906] context: implement glGetStringi handling for GL core contexts/GLES3 2014-03-15 18:37:07 +01:00
Matthew Waters
c3146c0d48 [901/906] glx: use the display handle from the global display
Intel drivers require the display handles be the same for context
sharing to occur.  Also solves some cases of use after free of the
display when integrating with gstreamer-vaapi.

See https://bugs.freedesktop.org/show_bug.cgi?id=41736 for the intel bug.
2014-03-15 18:37:07 +01:00
Matthew Waters
25a5dabda9 [899/906] egl: warn if we resort to display handles from the window 2014-03-15 18:37:07 +01:00
Matthew Waters
105cfa62fc [897/906] api: plugin a small memory leak
Found by adrien.schwartzentruber@gmail.com
2014-03-15 18:37:07 +01:00
Matthew Waters
b9071875e7 [896/906] utils: use the vtable for deleting the texture 2014-03-15 18:37:07 +01:00
Matthew Waters
8b4503aa6f [895/906] context: call window_class->close last
We should destroy resources before closing the display connection

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725048
2014-03-15 18:37:07 +01:00
Wang Xin-yu (王昕宇)
c3020e3ed8 [894/906] gl: add missing G_BEGIN_DECLS/G_END_DECLS
https://bugzilla.gnome.org/show_bug.cgi?id=725111
2014-03-15 18:37:07 +01:00
Matthew Waters
b6b8f9cd88 [893/906] x11: close both of the display's we use
(the comment doesn't seem to apply anymore)

https://bugzilla.gnome.org/show_bug.cgi?id=725048
2014-03-15 18:37:07 +01:00
Matthew Waters
ba38db1961 [892/906] silence a compiler warning on older gcc versions (4.6) 2014-03-15 18:37:07 +01:00
Matthew Waters
3ad466945e [891/906] context: add support for wrapping external contexts 2014-03-15 18:37:07 +01:00
Matthew Waters
0d1d42b205 [890/906] x11: add display subclass
GstGLDisplayX11 holds the display connection and name.  Each thread requires
it's own X11 Display connection (initialised from name) due to the fact that
we do not want to call XInitThreads().  Doing so would result in segfaults
when integrating with GUI toolkits Gtk, Qt, etc.

The Display connection is for OpenGL platforms where a constant display is
required in order to share contexts (egl).  In the case of a wrapped context
(added later), we do not have GstGLWindow to retreive the display from so a
'master' connection is used instead.
2014-03-15 18:37:06 +01:00
Matthew Waters
f4036318da [889/906] display: add display type enum 2014-03-15 18:37:06 +01:00
Adrien SCH
08d71feaa4 [888/906] correct error handling in gstgldownload.c 2014-03-15 18:37:06 +01:00
Matthew Waters
cdfa3a03c9 [887/906] mixer: fixup a memory leak of the context in the GLTextureUploadMeta path
gst_structure_get returns a reference to the object and we asked
for another with gst_object_replace.

https://bugzilla.gnome.org/show_bug.cgi?id=724816
2014-03-15 18:37:06 +01:00
Matthew Waters
687ac78290 [886/906] fixup a memory leak of the context in the GLTextureUploadMeta path
gst_structure_get returns a reference to the object and we asked
for another with gst_object_replace.

https://bugzilla.gnome.org/show_bug.cgi?id=724816
2014-03-15 18:37:06 +01:00
Matthew Waters
506e4fc793 [885/906] filter: free our data
plugs some memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=724816
2014-03-15 18:37:06 +01:00
Matthew Waters
d57403ab98 [884/906] filter: return the pad template caps in transform_caps
We can transform from any input in our caps to any output.
With the following pipeline snippet:

  ... ! vaapidecode ! glcolorscale ! xvimagesink

GstVideoGLTextureUploadMeta was being used on both src and sink
pads causing linking to fail.  This allows the usage of the meta
on either pad without affecting whether the meta is chosen on the
other pad.
2014-03-15 18:37:06 +01:00
Matthew Waters
767a3524ae [883/906] api: provide from_string()
Also s/gst_gl_api_string/gst_gl_api_to_string/g
2014-03-15 18:37:06 +01:00
Matthew Waters
13aa186711 [881/906] upload: restore default values for unpack_length
fixes elements that upload a supplementary texture (glbumber,
gldifferencematte, etc)
2014-03-15 18:37:06 +01:00
Matthew Waters
75825b3626 [879/906] build: don't add X_CFLAGS to CFLAGS
It should already be included if needed inside GL_CFLAGS
2014-03-15 18:37:06 +01:00
Chris Paulson-Ellis
1a53bc22c7 [877/906] x11: Use correct format string for guintptr
https://bugzilla.gnome.org/show_bug.cgi?id=723537
2014-03-15 18:37:06 +01:00
Matthew Waters
cd7bfb92d4 [876/906] glmem: use GstVideoInfo for format configuration
Allows use of strides
2014-03-15 18:37:06 +01:00
Matthew Waters
cba72fbee3 [875/906] upload: support for arbitrary strides
Using GL_UNPACK_ALIGNMENT for GLES2 and GL_UNPACK_ROW_LENGTH for everything else
2014-03-15 18:37:06 +01:00
Matthew Waters
0c1a77ca6c [874/906] filter: implement draw_texture for GLES2
(taken from gleffects)
2014-03-15 18:37:06 +01:00
Matthew Waters
4386cc1c6b [873/906] upload: use GstVideoInfo for choosing the format 2014-03-15 18:37:05 +01:00
Matthew Waters
a2abc0d3b6 [872/906] upload: consolidate data _fill 2014-03-15 18:37:05 +01:00
Matthew Waters
721a5d4c36 [871/906] upload: fix texture scaling for YUY2/UYVY with GLES2
Another artifact from the transition to GL_TEXTURE_2D
2014-03-15 18:37:05 +01:00
Matthew Waters
31eb2f5f0d [870/906] upload: remove superflous g_mutex_init 2014-03-15 18:37:05 +01:00
Matthew Waters
57422186b5 [869/906] tests: add some upload tests 2014-03-15 18:37:05 +01:00
Matthew Waters
53c5245948 [868/906] upload: fix compilation for GLES2 2014-03-15 18:37:05 +01:00
Wang Xin-yu (王昕宇)
30b9bfbf55 [867/906] glupload: Add GRAY8/GRAY16LE/BE upload support to glimagesink
the 16bit data is uploaded as LUMINANCE_ALPHA, then expanded, composed
in shader. value weight is a little complicate, high byte weight is
255*256/65535 (denormalize to [0~255] ,shift to high byte,then normalize
to [0~1]), low byte weight is 255/65535(similar)

https://bugzilla.gnome.org/show_bug.cgi?id=722670
2014-03-15 18:37:05 +01:00
Matthew Waters
83d27b9bc2 [866/906] upload: update some docs 2014-03-15 18:37:05 +01:00
Matthew Waters
49a19fb6b1 [865/906] glmem: report successful copy to the caller 2014-03-15 18:37:05 +01:00
Matthew Waters
7b031f648c [863/906] window: hold a ref to our GstGLDisplay 2014-03-15 18:37:05 +01:00
Matthew Waters
cf7838a0b6 [862/906] window: remove set_need_lock
No-one is using it.  The only code that did was the x11 one which
doesn't need it anymore.
2014-03-15 18:37:05 +01:00
Wang Xin-yu (王昕宇)
48d92cbe88 [861/906] glprototypes: Add missing glScalef declare
https://bugzilla.gnome.org/show_bug.cgi?id=721903
2014-03-15 18:37:05 +01:00
Matthew Waters
cdad19fd43 [860/906] docs: misc updates 2014-03-15 18:37:05 +01:00
Matthew Waters
3049627b87 [859/906] window: provide some documetation 2014-03-15 18:37:05 +01:00
Matthew Waters
aa573cf138 [858/906] glmem: update the docs 2014-03-15 18:37:05 +01:00
Matthew Waters
4d30769b86 [857/906] display: document the new GstContext api 2014-03-15 18:37:05 +01:00