According to the documentation, I am supposed to be able to set the 'zorder' property of a GESVideoSource: 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@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 [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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 <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Also I removed the mention to GESVideoSource::zorder in the
documentation: https://cgit.freedesktop.org/gstreamer/gst-editing-services/commit/?id=4cff10fb916d209ede449e1172fad5e38b3c5dd8 avoiding the confusion! On Mon, Mar 19, 2018 at 7:09 AM, Thibault Saunier <[hidden email]> wrote: > 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 <[hidden email]> 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@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 >> [hidden email] >> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |