summaryrefslogtreecommitdiff
path: root/cogl-gst
Commit message (Collapse)AuthorAgeFilesLines
* cogl-gst-plugin: Fix the license name in the plugin descriptionNeil Roberts2014-03-141-1/+1
| | | | | | | | | In commit 1b83ef938f the license in the plugin description was changed from “LGPL” to “MIT”. GStreamer strictly whitelists the names of the licenses and the correct name for the MIT license is “MIT/X11” so it was rejecting the plugin. Reviewed-by: Robert Bragg <robert.bragg@intel.com>
* cogl-gst: Fix get_caps implementation when no context is setNeil Roberts2014-01-311-1/+5
| | | | | | | | | | | | | | If no context is set on the CoglGstVideoSink then it would previously call gst_caps_ref with a NULL pointer. This patch makes it just return NULL instead. I think that is a valid thing to do because that is what gst_base_sink_default_get_caps does. If we don't do this then it's not possible to use CoglGstVideoSink with GstParse because that tries to link the pipeline after parsing the string. That was previously causing a critical error because the freshly parsed sink doesn't have a CoglContext. Reviewed-by: Robert Bragg <robert@linux.intel.com> Reviewed-by: Lionel Landwerlin <llandwerlin@gmail.com>
* cogl-gst: video-sink: add NV12 supportNeil Roberts2014-01-311-6/+111
| | | | | | | | | | | | | | | | | | This adds a cogl-gst renderer to decode NV12 data. NV12 is split into two buffers, one for the luma component and another for the two chrominance components at a quarter of the resolution. The second buffer is uploaded to a two-component RG texture. RG-component textures are only supported if COGL_FEATURE_ID_TEXTURE_RG is advertised by Cogl so the NV12 cap is also only advertised when that is available. Based on a patch by Lionel Landwerlin which was in turn based on a patch from Edward Hervey and Matthieu Bouron for Clutter-Gst: https://bugzilla.gnome.org/show_bug.cgi?id=712832 Reviewed-by: Robert Bragg <robert@linux.intel.com> Reviewed-by: Lionel Landwerlin <llandwerlin@gmail.com>
* cogl-gst-video-sink: Premultiply the colors coming from the videoNeil Roberts2014-01-312-38/+125
| | | | | | | | | | | | | | | | | | | | | | | | Commit 99a53c82e9ab0a1e5 removed the internal format argument when uploading a video frame to a texture so that the format will just be determined automatically from the image format. However this also leaves the premultiplied state at the default and the default is TRUE. That means that when we upload RGBA data Cogl will do a premultiplied conversion on the CPU. We probably don't want to be putting a CPU conversion in the way of video frames so this patch changes it to set the premultiplied state to FALSE on the textures and then do the premultiplied conversion in the shader. This is particularly important for AYUV which uses the alpha channel for the V component so doing a premultiplied conversion on the CPU just creates garbage and messes up the image. The RGB and RGBA renderers have each been split into two; one that uses GLSL and one that uses a regular pipeline. The RGBA pipeline without GLSL is then changed to use 2 layers so we that we can do the premultiplied conversion in the second layer with a special layer combine string. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-gst: video-sink: fix not installed rgb shaderLionel Landwerlin2014-01-221-1/+3
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* This re-licenses Cogl under the MIT licenseRobert Bragg2014-01-144-94/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This follows up on the proposal that was sent to the Cogl mailing list to re-license from the LGPL to the MIT license: http://lists.freedesktop.org/archives/cogl/2013-December/001465.html Note: there was a copyright assignment policy in place for Clutter (and therefore Cogl which was part of Clutter at the time) until the 11th of June 2010 and so we only checked the details after that point (commit 0bbf50f905) For each file, authors were identified via this Git command: $ git blame -p -C -C -C20 -M -M10 0bbf50f905..HEAD We received blanket approvals for re-licensing all Red Hat and Collabora contributions which reduced how many people needed to be contacted individually: - http://lists.freedesktop.org/archives/cogl/2013-December/001470.html - http://lists.freedesktop.org/archives/cogl/2014-January/001536.html Individual approval requests were sent to all the other identified authors who all confirmed the re-license on the Cogl mailinglist: http://lists.freedesktop.org/archives/cogl/2014-January As well as updating the copyright header in all sources files, the COPYING file has been updated to reflect the license change and also document the other licenses used in Cogl such as the SGI Free Software License B, version 2.0 and the 3-clause BSD license.
* remove internal_format and redundant error argumentsRobert Bragg2014-01-011-30/+22
| | | | | | | | | | | | | | | | Texture allocation is now consistently handled lazily such that the internal format can now be controlled using cogl_texture_set_components() and cogl_texture_set_premultiplied() before allocating the texture with cogl_texture_allocate(). This means that the internal_format arguments to texture constructors are now redundant and since most of the texture constructors now can't ever fail the error arguments are also redundant. This now means we no longer use CoglPixelFormat in the public api for describing the internal format of textures which had been bad solution originally due to how specific CoglPixelFormat is which is missleading when we don't support such explicit control over the internal format. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-gst: video-sink: fix YV12/I420 supportRobert Bragg2014-01-011-3/+3
| | | | | | | This fixes a mistake in commit 637728dd89d51bc28 that was meant to fix yv12/i420 support but when the patch was updated based on review to use COGL_PIXEL_FORMAT_A instead of COGL_PIXEL_FORMAT_G the corresponding glsl code wasn't also updated to sample the .a component.
* cogl-gst: video-sink: fix ayuv pipeline setupLionel Landwerlin2013-12-111-2/+2
|
* cogl-gst: video-sink: fix YV12/I420 supportLionel Landwerlin2013-12-111-4/+49
|
* Declare interface types as void and remove cast macrosRobert Bragg2013-11-272-8/+21
| | | | | | | | | | | | | | | | | | 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.
* cogl-gst: add missing annotationsLionel Landwerlin2013-10-141-4/+5
| | | | | | Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 447488dd5bb0ebb6a505ef216186b3cc90ef0b79)
* cogl-gst: emit ready signal on sink only after the first frame is uploadedLionel Landwerlin2013-08-191-6/+10
| | | | | | | | | Developers listening to the 'ready' signal on CoglGstVideoSink might call process the current frame once the signal is triggered. We need to ensure the first frame has been uploaded before letting people know that the sink is ready. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-gst: adds _sink_is_ready() apiRobert Bragg2013-07-252-0/+26
| | | | | | | | | | | | 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>
* gst: don't use cogl_texture_new_with_dataRobert Bragg2013-07-111-36/+95
| | | | | | | | 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>
* cogl-gst: move initialization code so CoglGstVideoSink can be subclassedLionel Landwerlin2013-07-091-2/+2
| | | | Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-gst: protect public API using type checksLionel Landwerlin2013-07-091-5/+32
|
* cogl-gst: expose aspect ratio apisRobert Bragg2013-04-292-0/+149
| | | | | | | | | | | | | 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>
* cogl-gst: Remove the return value from attach_frame()Neil Roberts2013-04-252-7/+2
| | | | | | | | | 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>
* cogl-gst: Move the PARAM macros into the C fileNeil Roberts2013-04-252-12/+12
| | | | | | | 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>
* cogl-gst: Add some documentationNeil Roberts2013-04-251-0/+221
| | | | | | | | | | | | | | 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>
* cogl-gst: Remove the unused cogl_gst_video_sink_get_main_loopNeil Roberts2013-04-251-3/+0
| | | | | | | This declaration was a leftover from a previous iteration of the CoglGST patches. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-gst: Add a functions to facilitate layeringPlamena Manolova2013-04-255-242/+264
| | | | | | | | | | | | 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>
* cogl-gst: Don't replace previous layers in default shaderNeil Roberts2013-04-252-8/+14
| | | | | | | | | | | | | | | | 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>
* cogl-gst: Remove ‘FLOP’Neil Roberts2013-04-251-1/+0
| | | | | | | This is an inappropriately pessimistic remark for the header of CoglGstVideoSink. Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-gst: Use alpha textures instead of luminance texturesNeil Roberts2013-04-152-4/+4
| | | | | | | | | | 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>
* cogl-gst-plugin: Use a real version number and web addressNeil Roberts2013-03-211-4/+3
| | | | | | | | 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>
* cogl-gst: More pedantic style fixesNeil Roberts2013-03-213-78/+90
| | | | | | | | | | | | | | • 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>
* cogl-gst: pedantic typo fix in pkg-config descriptionChris Cummins2013-03-211-1/+1
| | | | Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-gst: pedantic style fixes in cogl-gst-video-sink.hRobert Bragg2013-03-211-4/+5
| | | | | | | 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>
* cogl-gst: remove experimental "HW Decode" codeRobert Bragg2013-03-211-71/+0
| | | | | | | | | | | | | | 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>
* Include CoglGstPlamena Manolova2013-03-198-0/+1609
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>