Re: [gstreamer-java] No AppTransform ala AppSrc/AppSink. Any way to emulate that?

22 views
Skip to first unread message

Neil C Smith

unread,
Oct 12, 2023, 1:18:00 PM10/12/23
to gstream...@googlegroups.com
On Thu, 12 Oct 2023 at 12:50, Ayberk Vardar <ava...@gmail.com> wrote:
> I am migrating an old code from 0.10 bindings and have some elements that do transformations, ie reading input from a single sinkpad and outputing to a single srcpad. (just like audioconvert or audioresample that are readily available that extend GstBaseTransform)
>
> My question is, is there a straightforward way to implement this behaviour by using AppSrc/AppSink, which are the only things that seem to be in my command in gst-core 1.x? One simple answer might be to break the pipeline into two where the transform happens and use AppSink/AppSrc at both ends. But obviously this is not ideal.
>
> It is also cumbersome to do this via the old (0.10) method of hooking custom callbacks by writing a CustomTransform such as CustomSrc/CustomSink (0.10).
>
> I assume I am overlooking a simple solution here.

Welcome!

Those transformers were never migrated over because they weren't
really mapped in the best way.

You can of course register your own element mappings and try porting
them across.

However, you might also take a look at whether an identity element and
buffer probe would work for you here - see eg. the example at
https://github.com/gstreamer-java/gst1-java-examples/blob/master/BufferProbe/src/main/java/org/freedesktop/gstreamer/examples/BufferProbe.java

Best wishes,

Neil


--
Neil C Smith
Codelerity Ltd.
www.codelerity.com

Codelerity Ltd. is a company registered in England and Wales
Registered company number : 12063669
Registered office address : 3rd Floor Suite, 207 Regent Street,
London, W1B 3HH, England

Ayberk Vardar

unread,
Oct 12, 2023, 4:44:49 PM10/12/23
to gstreamer-java
Hi Neil and everyone, 
Thank you Neil for the very fast reply. 

I tried using the "identity" element as you suggested but I had buffer overflows: 
The buffer input to identity's sinkpad is smaller than what I need to output from its srcpad 
because I am appending some bytes as part of the transform process I have. 

PS: My original post is gone because I deleted it to repost it with more detail later but then saw your answer so am following up here. 

Reply all
Reply to author
Forward
0 new messages