Skip to content

Commit c258f62

Browse files
Add query(Query q) to Element, mapping to gst_element_query. (#94)
Add query(Query q) to Element, mapping to gst_element_query.
1 parent f2bb6fe commit c258f62

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/org/freedesktop/gstreamer/Element.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2018 Neil C Smith
23
* Copyright (c) 2009 Levente Farkas
34
* Copyright (C) 2007 Wayne Meissner
45
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
@@ -677,5 +678,21 @@ public ClockTime getStartTime() {
677678
public void setStartTime(ClockTime time) {
678679
GSTELEMENT_API.gst_element_set_start_time(this, time);
679680
}
681+
682+
/**
683+
* Performs a query on the element.
684+
*
685+
* For elements that don't implement a query handler, this function forwards
686+
* the query to a random srcpad or to the peer of a random linked sinkpad of
687+
* this element.
688+
*
689+
* Please note that some queries might need a running pipeline to work.
690+
*
691+
* @param query the Query to perform
692+
* @return true if the query could be performed
693+
*/
694+
public boolean query(Query query) {
695+
return GSTELEMENT_API.gst_element_query(this, query);
696+
}
697+
680698
}
681-

0 commit comments

Comments
 (0)