This updates cogl-gst to use cogl_texture_2d_new_with_data instead of
cogl_texture_new_with_data in preparation for removing the automagic
apis in cogl-auto-texture.c
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit d3af8dc9bf6c4c1b09a4f7559b0375f848368c10)
Conflicts:
cogl-gst/cogl-gst-video-sink.c
This adds a cogl_gst_video_sink_is_ready() for code to be able to
check if it's safe to call cogl_gst_video_sink_get_pipeline() or
cogl_gst_video_sink_setup_pipeline() without causing an error.
Normally an application can listen for the pipeline-ready signal but
sometimes a sink can be passed between components that didn't have an
opportunity to connect a signal handler, so they need a way to
directly check the status.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 9e7db391a87beee7c448f2a67b3e7202779ce9b2)
This adds several utility apis that aim to make it as easy as possible
for an application to determine what size a video should be drawn at.
The important detail here is that these apis take into account the
pixel-aspect-ratio in addition to the video's own aspect ratio.
This patch updates the cogl-basic-video-player example to use the
cogl_gst_video_sink_fit_size() api to perform letterboxing.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit d26f17c97ff6b9f6d6211e0527d5965a85305a56)
Previously cogl_gst_video_sink_attach_frame returned the last layer
used by the sink. This can also be retrieved via
cogl_gst_video_sink_get_free_layer so I don't think it's necessary to
return it here and it seems kind of out of place.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 0805f3e9db715fc2c97b7e60d4f3a25e7fa598fc)
These are just internal convenience macros to define the GObject
properties so they shouldn't be in the public headers.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit b7b861aa87ad05a2c253afdd87323acd82fd988f)
Adds documentation comments to CoglGstVideoSink and makes it generate
a separate manual to contain it.
One thing that I wasn't able to figure out with this was how to get
the documentation to have correct references to the main Cogl docs.
You can pass arguments to gtkdoc-fixxref to point to other manuals,
but presumably this needs the installed locations and when the
Cogl-Gst documentation is generated the Cogl docs may not have been
installed yet.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 5acdf8db47311893a9cf9ea04a66a287b657b8b0)
This declaration was a leftover from a previous iteration of the
CoglGST patches.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 53ae6d39efa113e28f5d1177ccb8613ddf28ee43)
These functions are used when attaching frames at a start point other
than layer 0 is required. This could potentially be used to "layer"
videos and textures on top of each other in the CoglPipeline. This
layering could come handy if videos are used as alpha masks or normal
maps, or when arranging layers in a perticular order, so Cogl could
blend them nicely without extra hassle.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit f98b437c9ea79f04ef1ebbb6ff547f58b49b0008)
Previously, when CoglGST generated the default sampling snippet it
would set the replace string so that Cogl wouldn't generate any
redundant code for the other layers. However this also meant that it
wouldn't modulate with the default colour. This patch changes it to
set the combine mode on all of the layers to REPLACE(PREVIOUS) so that
it just copies the previous layer without generating any texture
sampling. That way the fragment snippet for the final layer can just
modulate the previous value with the video sampling function. This
makes it possible to set a color on the pipeline and have it modulate
the video. Also if we eventually add a way to insert layers before the
GST sampling layer then it can modulate with those.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit f5da8d2caf4b2fbaf6941642a5d5ea7b93d0dd0f)
This is an inappropriately pessimistic remark for the header of
CoglGstVideoSink.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit ce2a70165054fea3e9d992c14650ba8cccf60e97)
Luminance textures are not supported on GL3 and as the textures are
accessed via a shader anyway it doesn't seem like it should make much
difference which component the single-component textures are in. Cogl
already has code to fake alpha textures via the texture swizzle
extension on GL3.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit ca1666860a325fa4d2362cdd38297d6281e997d8)
Instead of hardcoding the version number “0.0” it now uses the version
number from the Cogl source. The web address has been changed to
cogl3d.org.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 5363e4a68da9811fb136a01b278846ce15913287)
• Fixes some overly long lines, hugging asterisks in the pointer type
declarations and indentation issues.
• Tidies up the GLSL source so that it will look nicer in the
debug output.
• Removes the backwards ‘parent_class’ define which hacks the
implementation of the G_DEFINE_TYPE macro and just uses the full
type name instead.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 3ffe8979da4d4dc7deb221e5653b6f24f41b412c)
There were a few hugging pointer asterisks and inconsistent newlines for
a prototype which this patch tweaks.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 488c074316b270b17d1000c68f26210108b1b0ca)
The experimental HW decode path was adapted from clutter-gst based on
some experimental gstreamer api. This path was disabled by upstream
gstreamer developers back in september last year due to instabilities.
Without understanding how the experimental api is implemented it seems
rather strange to be plucking out the GL handle of a cogl texture and
passing that to some unknown gstreamer code which would presumably
somehow have to use the same GL context as Cogl to be able to do
something with that texture. For now we can strip all of this unused
code and it would be easy enough to re-instate later if it's useful.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 2a24cb9f2a283af87bb685b3e9c7e3af1ffeab6e)
CoglGst is a GStreamer integration library that facilitates
video playback using the Cogl API. It works by retrieving
each video frame from the GStreamer pipeline and attaching
it to a Cogl pipeline in the form of a Cogl texture along
with possible color model conversion shaders. The pipeline
is then retrieved by the user during each draw. An example
use of the CoglGst API is included in the examples directory.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit dfb94cf4b0b6b42d6465df362a0c0af780596890)