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)