<div dir="ltr">Hi,<div>Thanks for the detailed reply.</div><div>I'll have a play with your updated code soon :)</div><div><br></div><div>Is there anywhere your WIP is being tracked so that I follow and know when it is ready? I would love to switch to that approach once it's ready.</div><div><br></div><div>Thanks,</div><div>Dan.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 25, 2021 at 3:01 AM Thibault Saunier <<a href="mailto:tsaunier@gnome.org">tsaunier@gnome.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I checked a bit your code and there are a few issues to get that working:</div><div>* the `GESAudioSource::create_source` vmethod is not exposed through GI, and for some reason even properly annotating it makes it not working.</div><div>* We need <a href="https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/231" target="_blank">https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/merge_requests/231</a> to fix some annotations so we can subclass GESSource properly</div><div>* There is a floating reference mishandling in PyGObject leading to a crash, we need <a href="https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/129" target="_blank">https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/129</a> to get it working</div><div><br></div><div>I then updated the code here: <a href="https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/snippets/1633" target="_blank">https://gitlab.freedesktop.org/gstreamer/gst-editing-services/-/snippets/1633</a> - your source element doesn't seem to work properly yet though.</div><div><br></div><div>Also not that I have some WIP that would allow doing something like:</div><div><br></div><div>```</div><div>class YourSource(GstApp.AppSrc):</div><div> ...</div><div>Gst.Element.register("myaudiosrc", 0, YourSource)</div><div><br></div><div>clip = GES.Clip.new(video_source_bin_desc=None, audio_source_bin_desc="myaudiosource")<br></div><div>```<br></div><div><br></div><div>removing the need for any subclass.<br></div><div><br></div><div>- Thibault<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 20, 2021 at 9:15 AM Daniel Bailey <<a href="mailto:danieljabailey@gmail.com" target="_blank">danieljabailey@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, thanks for the quick reply.<div><br></div><div>I have stripped down my project code to just the bare minimum to show the approach I am using and the problem I'm having, see the code here:</div><div><a href="https://gist.github.com/danieljabailey/594e77728e55b88ff2b81cbf0cbde651" target="_blank">https://gist.github.com/danieljabailey/594e77728e55b88ff2b81cbf0cbde651</a><br></div><div><br></div><div>The output from this program is pasted below.</div><div>Thanks.</div><div>Dan.</div><div><br></div><div>Adding asset to layer <__gi__.GESTestClipAsset object at 0x7f16541e4540 (GESTestClipAsset at 0x56462a434b00)><br>Adding asset to layer <GES.SourceClipAsset object at 0x7f16541e4680 (GESSourceClipAsset at 0x56462a84b050)><br>Creating audio synth element<br>Created source<br><__main__.SynthAudioSourceElement object at 0x7f16541e4780 (__main__+SynthAudioSourceElement at 0x56462a4a08f0)><br><br>(raw_audio_in_ges.py:44181): GES-CRITICAL **: 12:12:52.336: _set_priority: assertion 'object->priv->nleobject' failed<br><br>(raw_audio_in_ges.py:44181): GES-CRITICAL **: 12:12:52.336: _set_duration: assertion 'priv->nleobject' failed<br><br>(raw_audio_in_ges.py:44181): GES-CRITICAL **: 12:12:52.336: ges_track_element_is_active: assertion 'object->priv->nleobject' failed<br><br>(raw_audio_in_ges.py:44181): GES-CRITICAL **: 12:12:52.336: ges_track_element_set_track: assertion 'object->priv->nleobject' failed<br>Creating audio synth element<br>Created source<br><__main__.SynthAudioSourceElement object at 0x7f16541e4680 (__main__+SynthAudioSourceElement at 0x56462a4a08f0)><br><br>(raw_audio_in_ges.py:44181): GES-CRITICAL **: 12:12:52.336: _set_priority: assertion 'object->priv->nleobject' failed<br><br>(raw_audio_in_ges.py:44181): GES-CRITICAL **: 12:12:52.336: _set_duration: assertion 'priv->nleobject' failed<br><br>(raw_audio_in_ges.py:44181): GES-CRITICAL **: 12:12:52.336: ges_track_element_is_active: assertion 'object->priv->nleobject' failed<br><br>(raw_audio_in_ges.py:44181): GES-CRITICAL **: 12:12:52.336: ges_track_element_set_track: assertion 'object->priv->nleobject' failed<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 19, 2021 at 10:52 PM Thibault Saunier <<a href="mailto:tsaunier@gnome.org" target="_blank">tsaunier@gnome.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>Hi,<div dir="auto"><br></div><div dir="auto">Your approach sounds about right, although. I guess the issues are related to assets, could you paste the assertions you get/a piece of code to reproduce?</div><div dir="auto"><br></div><div dir="auto">- Thibault</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 19 févr. 2021 à 15:32, Daniel Bailey <<a href="mailto:danieljabailey@gmail.com" target="_blank">danieljabailey@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<div>I am working on an audio synthesis tool, which allows the user to generate audio to play over the top of a sequence of videos.</div><div>I'm writing this in python.</div><div>I am using GES to create a simple video sequence editor.</div><div>The application needs to be able to play the synthesised audio in sync with the video.</div><div><br></div><div>I have written a simple proof of concept subclass of GstApp.AppSrc which can do some simple audio synthesis, and feed it into a GStreamer pipeline. This works fine for me if I just connect it up to an autoaudiosink without using any GES stuff.</div><div><br></div><div>Is there a way to get this gstreamer element to be part of the GES timeline?</div><div><br></div><div>I tried to do this using the following method:</div><div><br></div><div>Create a Subclass of GES.SourceClip</div><div>Implement do_create_track_element on this subclass</div><div>do_create_track_element instantiates a custom subclass of GES.AudioSource</div><div>the subclass of AudioSource overrides do_create_source and returns a pipeline that wraps my custom AppSrc.</div><div>call layer.add_clip on a layer in a GES timeline to add one of these custom clips</div><div><br></div><div>This method does not work, I see various assertion errors when I try this.</div><div><br></div><div>Is this the right approach? Am I doing roughly the right thing? Or is there a totally different way to achieve what I want?</div><div>If this is roughly the right idea then where am I going wrong?</div><div><br></div><div>Thanks.</div><div>Dan.</div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" rel="noreferrer" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div></div></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>