HemaNage / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
1 stars 0 forks source link

Query duration #131

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This is more a request for clarification, than an issue. In gstreamer you can 
query elements for their duration, e.g., as documented here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-que
ryevents.html

I found query-related interfaces in the Java bindings as well (e.g., 
DurationQuery) but they don't seem to be usable on an element as they should. 
Do they implicitly only work on the whole pipeline, or is there a way to 
associate a DurationQuery instance to, let's say, a FileSrc element one?

Original issue reported on code.google.com by mikebann...@gmail.com on 26 Jun 2013 at 10:55

GoogleCodeExporter commented 8 years ago
I think its a valid request, currently gstreamer-java only exposes some of the 
query functions in the Pipeline class.

While gst_element_query may be called on any element, not all elements have a 
handler query.

"For elements that don't implement a query handler, this function forwards the 
query to a random srcpad or to the peer of a random linked sinkpad of this 
element." [1]

So even if you target a specific element for a query, it might propagate that 
query onward to connected elements. To me this is not well defined behavior 
especially as it still may return false after exhausting its links. Perhaps 
since the pipeline will forward these queries, the function calls exist there.

That is my thought behind why it is in the Pipeline class. :)

However since it really is apart of the GstElementAPI, should it really exist 
in the Element class? There are elements that can handle queries.

Thanks,
Michael

Sources:
[1] GstElement API;
http://gstreamer.freedesktop.org/data/doc/gstreamer/0.10.36/gstreamer/html/GstEl
ement.html#gst-element-query

Original comment by Michael....@gmail.com on 28 Jun 2013 at 8:21

GoogleCodeExporter commented 8 years ago
I guess the same applies to some other methods as well, e.g., seeking, for 
which I can't find a counterpart for Bin elements either, only the Pipeline.

Original comment by mikebann...@gmail.com on 9 Jul 2013 at 2:00