Administrator
|
This post was updated on .
I seem to set the overlay handle like i do with the regular pipeline.
I set the preview video sink. things i tried: 1. after setting the preview video sink used the object had no luck. 2. grabbed the object from the Pipeline. 3. grabbed the preview video sink then set the video overlay. no luck so far. any ideas? ----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list gstreamer-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
Hello, I do not see any reason why it would work with other pipeline than GESPipeline I have to say. Could you show some code? BR, Thibault On Wed, Apr 15, 2020 at 5:38 PM killerrats <[hidden email]> wrote: I seem to set the overlay handle like i do with the regular pipeline. _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
--------- 1 -----------
GstElement* pipeline = GST_ELEMENT(gespipeline); GstElement* vSink = gst_bin_get_by_name(GST_BIN(pipeline),"VIDEOSINK"); GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(vSink); gst_video_overlay_set_window_handle(vOverlay, _windows_handle); gst_object_unref(vOverlay); gst_object_unref(vSink); --------- 2 ------------ GstElement* vSink = ges_pipeline_preview_get_video_sink(gespipeline); GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(vSink); gst_video_overlay_set_window_handle(vOverlay, _windows_handle); gst_object_unref(vOverlay); gst_object_unref(vSink); ----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
Note that GESPipeline also implements the VideoOverlay interface, have you tried using it directly? On Wed, Apr 15, 2020 at 5:49 PM killerrats <[hidden email]> wrote: --------- 1 ----------- _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
This post was updated on .
This setting for the video overlay is the only one i know of. I'm new to the
GES environment. can you show an example. ----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list gstreamer-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
You can basically do `GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(gespipeline);`... and use it from there. On Wed, Apr 15, 2020 at 5:57 PM killerrats <[hidden email]> wrote: This setting for the video overlay is the only one i know of. I'm new to the _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
it seemed to stop the pipeline completely. I did the code after I did the set
preview videosink and after I set the mode of the pipeline for preview mode. ----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
Can you show some more code? Also it is not clear what the exact problem is to me. On Wed, Apr 15, 2020 at 6:12 PM killerrats <[hidden email]> wrote: it seemed to stop the pipeline completely. I did the code after I did the set _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
this is before even playing the preview it will error out on setting the
overlay. I set it to Render Mode and later will set to preview mode. setup... gespipeline = ges_pipeline_new(); // Setup audio & video sinks GstElement *audioSink = gst_element_factory_make("directsoundsink", "audio-sink"); ges_pipeline_preview_set_audio_sink(this->gespipeline, audioSink); GstElement *videoSink = gst_element_factory_make("d3dvideosink", "video-sink"); ges_pipeline_preview_set_video_sink(this->gespipeline, videoSink); GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(gespipeline); if (this->_windows_handle > 0) gst_video_overlay_set_window_handle(vOverlay, this->_windows_handle); gst_object_unref(vOverlay); timeline = ges_timeline_new(); a = GES_TRACK(ges_audio_track_new()) , v = GES_TRACK(ges_video_track_new()); ges_pipeline_set_timeline(gespipeline, timeline); ges_timeline_add_track(timeline, v); ges_timeline_add_track(timeline, a); ... Add tracks(); ges_timeline_commit(timeline); ges_pipeline_set_render_settings(gespipeline, uri, mediacat_gen_profile()); this->mediacat_set_output(GES_PIPELINE_MODE_RENDER); error happens: "(CombineVideoFiles.exe:58456): GES-CRITICAL **: ges_pipeline_set_render_settings: assertion 'GES_IS_PIPELINE (pipeline)' failed (CombineVideoFiles.exe:58456): GES-CRITICAL **: ges_pipeline_set_mode: assertion 'GES_IS_PIPELINE (pipeline)' failed (CombineVideoFiles.exe:58456): GLib-GObject-WARNING **: invalid unclassed pointer in cast to 'GstElement' " ----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
The warning makes me think you either have a refcount issue, or that you are mixing up variables. Also, if you set the pipeline to RENDER mode you won't have the PREVIEW, you could set `RENDER | PREVIEW` - it should work but hasen't been extensively tested I have to admit. BR, Thibault On Wed, Apr 15, 2020 at 6:34 PM killerrats <[hidden email]> wrote: this is before even playing the preview it will error out on setting the _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Administrator
|
the casting is at the end where i cast the gespipeline to
GST_ELEMENT(gespipeline). I put the mode to preview first right after then i cast the gespipeline to GstElement. gespipeline = ges_pipeline_new(); this->mediacat_set_output(GES_PIPELINE_MODE_PREVIEW); // Setup audio & video sinks GstElement *audioSink = gst_element_factory_make("directsoundsink", "audio-sink"); ges_pipeline_preview_set_audio_sink(this->gespipeline, audioSink); GstElement *videoSink = gst_element_factory_make("d3dvideosink", "video-sink"); ges_pipeline_preview_set_video_sink(this->gespipeline, videoSink); GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(gespipeline); if (this->_windows_handle > 0) gst_video_overlay_set_window_handle(vOverlay, this->_windows_handle); gst_object_unref(vOverlay); timeline = ges_timeline_new(); a = GES_TRACK(ges_audio_track_new()) , v = GES_TRACK(ges_video_track_new()); ges_pipeline_set_timeline(gespipeline, timeline); ges_timeline_add_track(timeline, v); ges_timeline_add_track(timeline, a); ... Add tracks(); ges_timeline_commit(timeline); pipeline = GST_ELEMENT(gespipeline); ----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
Administrator
|
if i set the videoSink element to use as the overlay it won't have a cast
pointer like it did if i use the gespipeline object. but will have a internal error. setup: gespipeline = ges_pipeline_new(); this->mediacat_set_output(GES_PIPELINE_MODE_PREVIEW); // Setup audio & video sinks GstElement *audioSink = gst_element_factory_make("directsoundsink", "audio-sink"); ges_pipeline_preview_set_audio_sink(this->gespipeline, audioSink); GstElement *videoSink = gst_element_factory_make("d3dvideosink", "video-sink"); ges_pipeline_preview_set_video_sink(this->gespipeline, videoSink); GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(videoSink); if (this->_windows_handle > 0) gst_video_overlay_set_window_handle(vOverlay, this->_windows_handle); gst_object_unref(vOverlay); timeline = ges_timeline_new(); a = GES_TRACK(ges_audio_track_new()) , v = GES_TRACK(ges_video_track_new()); ges_pipeline_set_timeline(gespipeline, timeline); ges_timeline_add_track(timeline, v); ges_timeline_add_track(timeline, a); ... Add tracks(); ges_timeline_commit(timeline); pipeline = GST_ELEMENT(gespipeline); error: (CombineVideoFiles.exe:62920): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed (CombineVideoFiles.exe:62920): GStreamer-CRITICAL **: gst_element_set_state: assertion 'GST_IS_ELEMENT (element)' failed 0:00:07.848664000 62920 05DC4400 WARN playsink gstplaysink.c:1997:gen_video_chain:<internal-sinks> error: Configured videosink (null) is not working. ----------------------internal-sinks error 4: Configured videosink (null) is not working.------------------------------- 0:00:07.849923900 62920 05E7BB70 WARN qtdemux qtdemux.c:6073:gst_qtdemux_loop:<qtdemux2> error: Internal data stream error. ----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
Administrator
|
This post was updated on .
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) { Option (one way works instead of another don't know why): 1.GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(pipeline); 2.GstElement* vSink = NULL; g_object_get(G_OBJECT(pipeline),"video-sink",&vSink,NULL); GstVideoOverlay* vOverlay = GST_VIDEO_OVERLAY(vSink); 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/ _______________________________________________ gstreamer-devel mailing list gstreamer-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2 ------------------------------ Windows |
Free forum by Nabble | Edit this page |