Gstreamer Editing Service Set Window Handle

killerrats koreysjunkmail at gmail.com
Thu Apr 16 18:28:19 UTC 2020


okay i did a test on a short project instead of my big project.

i found out that if i set the overlay after i play the pipeline it will
work.

Set the *Ges Pipeline* not the Video Sink Element.

ges_init();
pipeline = ges_pipeline_new();
pipelineElement = GST_ELEMENT(pipeline);
GESTimeline *timeline = ges_timeline_new_audio_video();
GESLayer *layer = ges_layer_new();
ges_timeline_add_layer(timeline, layer);

// Load file as a clip & add to timeline
std::string uri_string = "file://" + file_path;
GESUriClip *clip = ges_uri_clip_new(uri_string.c_str());
ges_layer_add_clip(layer, GES_CLIP(clip));
ges_pipeline_set_timeline(pipeline, timeline);

// Setup audio & video sinks
GstElement *audioSink = gst_element_factory_make("autoaudiosink",
"audio-sink");
ges_pipeline_preview_set_audio_sink(pipeline, audioSink);

GstElement *videoSink = gst_element_factory_make("autovideosink",
"video-sink");
ges_pipeline_preview_set_video_sink(pipeline, videoSink);

setAndWaitForPipelineState(pipelineElement, GST_STATE_PAUSED);
setAndWaitForPipelineState(pipelineElement, GST_STATE_PLAYING);

if (this->windows_handle > 0)
{
    GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(pipeline);
    gst_video_overlay_set_window_handle(vOverlay, this->windows_handle);
    gst_object_unref(vOverlay);
}



-----
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list