gstreamer-java / gst1-java-core

Java bindings for GStreamer 1.x
GNU Lesser General Public License v3.0
194 stars 72 forks source link

CustomSrc/CustomTrsnform/CustomSink #181

Open fabien-degroote-dev opened 4 years ago

fabien-degroote-dev commented 4 years ago

In Gstreamer-java for 0.10 there was few examples with CustomSrc/CustomTrsnform/CustomSink. Could anyone provide example for gstreamer-java 1.XX (or a way ahead)?

It was very useful and I would need it for the migration to gstreamer1.xx... https://github.com/gstreamer-java/gstreamer-java/blob/master/gstreamer-java/src/org/gstreamer/elements/CustomSrc.java

neilcsmith-net commented 4 years ago

@fabien-degroote-dev this is something that's not been looked at in the migration to 1.x yet. Is there a particular reason that use of AppSrc, AppSink, etc. isn't enough? What's the project? Is it commercial or hobby / open-source?

Your link is broken btw!

fabien-degroote-dev commented 4 years ago

To be honest, when I was playing with 0.10, I was 'extending' CustomSrc, CustomSink and CustomTransform as they were fitting my needs. I have no clue whether AppSrc, AppSink would be enough or not. Let me explain the context. When playing with some equipments (raido over IP), I faced s specific RTP header (EUROCAE ED137A). As I couldn't find any suitable native gstreamer element to pay/depay this kind of packet, I had to create my own java Source and Sink... And I found very convenient to 'extend/inherits' from CustomSrc and CustomSink. Now, the problem is that 0.10 is obsolete and I would like to migrate to 1.XX (of course...). So, I need to undertand how to do that and my first idea is, of course, to keep the same design/solution.

neilcsmith-net commented 4 years ago

Well, I would take a look at whether AppSrc and AppSink are suitable for you. To be honest I'd forgotten about the Custom*** classes, and they are not on the roadmap currently. We could consider a PR for them, or possibly they might make sense as a separate library. But from a brief look porting them over will take a fair bit of work.

I would ask about this on the mailing list - you might find other people interested in working on this functionality there.

fabien-degroote-dev commented 4 years ago

Could you please detail what has to be done in order to implement these functionalities? Does that also involve modifications on the native library (C code) or is that limited to java? Which steps would that imply?

neilcsmith-net commented 4 years ago

There is no C code in the library. Although you will likely need to look at the upstream C code to update the mappings.

I cannot spend time at the moment to research and detail all that needs to be done to update this code, hence suggesting you try the mailing list first to see if anyone else is in a position to help with this.

fabien-degroote-dev commented 4 years ago

Hi Dev team,

There is a similar request (#133). Did you have a chance to work on this enhancement? It becomes very critical for me as it really improves the usability of gstreamer in my software. I would really appreciate if you could have a look on it...

neilcsmith-net commented 4 years ago

No, sorry, and the only way I see this happening in the near future is if you provide a PR or fund it.

fabien-degroote-dev commented 4 years ago

I am really eager to help but I would need some guidance to start. Do you think you could guide me?