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

David Ing ding at panopto.com
Mon Mar 19 06:11:25 UTC 2018


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));
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180318/3bc36f0b/attachment.html>


More information about the gstreamer-devel mailing list