This declares the interface types CoglFramebuffer, CoglBuffer,
CoglTexture, CoglMetaTexture and CoglPrimitiveTexture as void when
including the public cogl.h header so that users don't have to use lots
of C type casts between instance types and interface types.
This also removes all of the COGL_XYZ() type cast macros since they do
nothing more than compile time type casting but it's less readable if
you haven't seen that coding pattern before.
Unlike with gobject based apis that use per-type macros for casting and
performing runtime type checking we instead prefer to do our runtime
type checking internally within the front-end public apis when objects
are passed into Cogl. This greatly reduces the verbosity for users of
the api and may help reduce the chance of excessive runtime type
checking that can sometimes be a problem.
(cherry picked from commit 248a76f5eac7e5ae4fb45208577f9a55360812a7)
Since we can't break the 1.x api this version of the patch actually
defines compatible NOP macros within deprecated/cogl-type-casts.h
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)
This is an inappropriately pessimistic remark for the header of
CoglGstVideoSink.
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit ce2a70165054fea3e9d992c14650ba8cccf60e97)
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)
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)