GES 1.12 -- GESVideoSource does not have the 'zorder' property

Thibault Saunier saunierthibault at gmail.com
Mon Mar 19 10:09:02 UTC 2018


Hello,

The `zorder` of sources linked to the compositor is computed from the
source layer priority. The clips from layers with highest prio (lower
number) have a higher zorder (rendered on top).

Regards,

Thibault

On Mon, Mar 19, 2018, 03:11 David Ing <ding at panopto.com> wrote:

> According to the documentation, I am supposed to be able to set the
> 'zorder' property of a GESVideoSource:
>
>
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-editing-services/html/GESVideoSource.html
>
> Well I am able to set some of its other properties (posx, posy, width,
> height), but I get a WARN message when I attempt to set 'zorder' ... it
> tells me that this proprety does not exist (so I cannot set it).
>
> 0:00:23.128239884  3376 000001FAD2B640F0 WARN  ges
> ges-timeline-element.c:1379:ges_timeline_element_set_child_property:<GESVideoUriSource at 000001FAD3111460>
> *The zorder property doesn't exist*
>
> I am trying to render a small video in the corner of a larger video (where
> the smaller video is in front of the larger one).  Presumably I need
> 'zorder' for that to work, right?  Or is there some other way that I can do
> it?
>
> Either the documentation is wrong about zorder, or I am doing something
> wrong.  Here is what I am doing:
>
> //----------------------------
> // My code is below.
> //----------------------------
> GList* videoElements = ges_clip_find_track_elements((GESClip*)gesUriClip,
> gesVideoTrack,
>         GESTrackType::GES_TRACK_TYPE_VIDEO, G_TYPE_NONE);
> GESVideoSource* videoSource = (GESVideoSource*)videoElements->data;
> GESTrackElement* trackElement =
> reinterpret_cast<GESTrackElement*>(videoSource);
> setInt(trackElement, "posx", destPosition.x.value, "Unable to set %s
> property of video source.");
> setInt(trackElement, "posy", destPosition.y.value, "Unable to set %s
> property of video source.");
> setInt(trackElement, "width", destPosition.width.value, "Unable to set %s
> property of video source.");
> setInt(trackElement, "height", destPosition.height.value, "Unable to set
> %s property of video source.");
> *// FIXME ... why doesn't this work?*
> setUint(trackElement, "zorder", (uint32_t)(iLayer), "Unable to set %s
> property of video source.");
>
> void setInt(GESTrackElement* trackElement, const char* name, int32_t
> value, const char* errorMessage)
> {
>     GValue val = G_VALUE_INIT;
>     g_value_init(&val, G_TYPE_INT);
>     g_value_set_int(&val, value);
>     if (!ges_track_element_set_child_property(trackElement, name, &val))
>         throw std::runtime_error(formstr(errorMessage, name));
> }
> void setUint(GESTrackElement* trackElement, const char* name, uint32_t
> value, const char* errorMessage)
> {
>     GValue val = G_VALUE_INIT;
>     g_value_init(&val, G_TYPE_UINT);
>     g_value_set_uint(&val, value);
>     if (!ges_track_element_set_child_property(trackElement, name, &val))
>         throw std::runtime_error(formstr(errorMessage, name));
> }
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180319/92d7fee4/attachment.html>


More information about the gstreamer-devel mailing list