Package | Description |
---|---|
org.gstreamer | |
org.gstreamer.elements | |
org.gstreamer.elements.good | |
org.gstreamer.interfaces | |
org.gstreamer.io | |
org.gstreamer.lowlevel | |
org.gstreamer.media | |
org.gstreamer.swing |
Modifier and Type | Class and Description |
---|---|
class |
Bin
Base class and element that can contain other elements.
|
class |
Pipeline
A
Pipeline is a special Bin used as the toplevel container for
the filter graph. |
Modifier and Type | Method and Description |
---|---|
<T extends Element> |
Bin.getElementByInterface(java.lang.Class<T> iface)
Looks for an element inside the bin that implements the given
interface.
|
Modifier and Type | Method and Description |
---|---|
Element |
ElementFactory.create(java.lang.String name)
Creates a new element from the factory.
|
Element |
Bin.getElementByName(java.lang.String name)
Gets the
Element with the given name from the bin. |
Element |
Bin.getElementByNameRecurseUp(java.lang.String name)
Gets the element with the given name from this bin.
|
Element |
Pad.getParentElement()
Get the parent of this pad, cast to a
Element . |
Element |
GstXML.loadElement(java.lang.String elementName)
Loads a new
Element from the XML file |
static Element |
ElementFactory.make(java.lang.String factoryName,
java.lang.String name)
Creates a new Element from the specified factory.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Element> |
Bin.getElements()
Retrieve a list of the
Element s contained in the Bin. |
java.util.List<Element> |
Bin.getElementsRecursive()
Retrieve a list of the
Element s contained in the Bin and its Bin children. |
java.util.List<Element> |
Bin.getElementsSorted()
Gets an a list of the elements in this bin in topologically
sorted order.
|
java.util.List<Element> |
Bin.getSinks()
Retrieve a list of the sink
Element s contained in the Bin. |
java.util.List<Element> |
Bin.getSources()
Retrieve a list of the source
Element s contained in the Bin. |
Modifier and Type | Method and Description |
---|---|
boolean |
Bin.add(Element element)
Adds an Element to this Bin.
|
void |
Bin.addMany(Element... elements)
Adds an array of Element objects to this Bin
|
void |
Bin.ELEMENT_ADDED.elementAdded(Bin bin,
Element element)
|
void |
Bin.ELEMENT_REMOVED.elementRemoved(Bin bin,
Element element)
|
boolean |
Element.link(Element... elems)
Chain together a series of elements, with this element as the first in the list.
|
boolean |
Element.link(Element dest)
Links this element to another element.
|
static boolean |
Element.linkMany(Element... elements)
Link together a list of elements.
|
static boolean |
Element.linkPads(Element src,
java.lang.String srcPadName,
Element dest,
java.lang.String destPadName)
Link together source and destination pads of two elements.
|
static boolean |
Element.linkPadsFiltered(Element src,
java.lang.String srcPadName,
Element dest,
java.lang.String destPadName,
Caps caps)
Link together source and destination pads of two elements.
|
void |
Element.NO_MORE_PADS.noMorePads(Element element)
Called when an
Element ceases to generated dynamic pads. |
void |
Element.PAD_ADDED.padAdded(Element element,
Pad pad)
Called when a new
Pad is added to an Element. |
void |
Element.PAD_REMOVED.padRemoved(Element element,
Pad pad)
Called when a new
Pad is removed from an Element. |
boolean |
Bin.remove(Element element)
Removes a Element from this Bin
|
void |
Bin.removeMany(Element... elements)
Removes an array of
Element objects from this Bin |
void |
GstXML.saveElement(Element element)
Saves an existing pipeline to a XML file.
|
void |
Element.unlink(Element dest)
Unlinks all source pads of this source element with all sink pads
of the sink element to which they are linked.
|
static void |
Element.unlinkMany(Element... elements)
Unlink a list of elements.
|
static void |
Element.unlinkPads(Element src,
java.lang.String srcPadName,
Element dest,
java.lang.String destPadName)
Unlink source and destination pads of two elements.
|
Modifier and Type | Method and Description |
---|---|
static void |
ElementFactory.registerElement(java.lang.Class<? extends Element> klass,
java.lang.String name) |
Modifier and Type | Class and Description |
---|---|
class |
AppSink
A sink
Element that enables an application to pull data
from a pipeline. |
class |
AppSrc
Enables an application to feed buffers into a pipeline.
|
class |
BaseSink |
class |
BaseSrc |
class |
BaseTransform |
class |
BufferDataAppSink
Class that allows to pull out native buffers from the GStreamer pipeline into
the application.
|
class |
BufferDataSink
Class that allows to pull out native buffers from the GStreamer pipeline into
the application.
|
class |
ByteDataAppSink
Class that allows to pull out buffers from the GStreamer pipeline into
the application, using an appsink.
|
class |
ByteDataSink
Class that allows to pull out buffers from the GStreamer pipeline into
the application, using an appsink.
|
class |
CustomSink |
class |
CustomSrc |
class |
DecodeBin
Deprecated.
This element is deprecated and no longer supported. You should use the uridecodebin or decodebin2 element instead (or, even better: playbin2).
|
class |
DecodeBin2
Utility
Element to automatically identify media stream types and hook
up elements. |
class |
FakeSink |
class |
FakeSrc |
class |
FileSink
A gstreamer element that write to a file.
|
class |
FileSrc
A gstreamer element that reads from a file.
|
class |
Identity |
class |
InputSelector |
class |
MultiQueue
A gstreamer element for Multiple data queue.
|
class |
PlayBin
Deprecated.
This element is deprecated and no longer supported. You should use the PlayBin2 element instead.
Playbin provides a stand-alone everything-in-one abstraction for an audio
and/or video player.
It can handle both audio and video files and features
Usage
A playbin element can be created just like any other element using
The file/URI to play should be set via
Playbin is a
Playback can be initiated by setting the PlayBin to PLAYING state using
When playback has finished (an EOS message has been received on the bus) or an error has occured (an ERROR message has been received on the bus) or the user wants to play a different track, playbin should be set back to READY or NULL state, then the input file/URI should be set to the new location and then playbin be set to PLAYING state again.
Seeking can be done using
Applications may query the current position and duration of the stream
via Advanced Usage: specifying the audio and video sink
By default, if no audio sink or video sink has been specified via
If the application wants more control over how audio or video should be
output, it may create the audio/video sink elements itself (for example
using GNOME-based applications, for example, will usually want to create gconfaudiosink and gconfvideosink elements and make playbin use those, so that output happens to whatever the user has configured in the GNOME Multimedia System Selector confinguration dialog.
The sink elements do not necessarily need to be ready-made sinks. It is
possible to create container elements that look like a sink to playbin,
but in reality contain a number of custom elements linked together. This
can be achieved by creating a It is also possible to 'suppress' audio and/or video output by using 'fakesink' elements (or capture it from there using the fakesink element's "handoff" signal, which, nota bene, is fired from the streaming thread!). Retrieving Tags and Other Meta DataMost of the common meta data (artist, title, etc.) can be retrieved by watching for TAG messages on the pipeline's bus (see above). Other more specific meta information like width/height/framerate of video streams or samplerate/number of channels of audio streams can be obtained using the "stream-info" property, which will return a GList of stream info objects, one for each stream. These are opaque objects that can only be accessed via the standard GObject property interface, ie. g_object_get(). Each stream info object has the following properties:
Stream information from the stream-info properties is best queried once playbin has changed into PAUSED or PLAYING state (which can be detected via a state-changed message on the bus where old_state=READY and new_state=PAUSED), since before that the list might not be complete yet or not contain all available information (like language-codes). > BufferingPlaybin handles buffering automatically for the most part, but applications need to handle parts of the buffering process as well. Whenever playbin is buffering, it will post BUFFERING messages on the bus with a percentage value that shows the progress of the buffering process. Applications need to set playbin to PLAYING or PAUSED state in response to these messages. They may also want to convey the buffering progress to the user in some way. Here is how to extract the percentage information from the message (requires GStreamer >= 0.10.11):
PlayBin playbin = new PlayBin("player"); playbin.getBus().connect(new Bus.BUFFERING() { public void bufferingMessage(GstObject element, int percent) { System.out.printf("Buffering (%u percent done)\n", percent); } }Note that applications should keep/set the pipeline in the PAUSED state when a BUFFERING message is received with a buffer percent value < 100 and set the pipeline back to PLAYING state when a BUFFERING message with a value of 100 percent is received (if PLAYING is the desired state, that is). > Embedding the video window in your applicationBy default, playbin (or rather the video sinks used) will create their own window. Applications will usually want to force output to a window of their own, however. This can be done using the GstXOverlay interface, which most video sinks implement. See the documentation there for more details. Specifying which CD/DVD device to useThe device to use for CDs/DVDs needs to be set on the source element playbin creates before it is opened. The only way to do this at the moment is to connect to playbin's "notify::source" signal, which will be emitted by playbin when it has created the source element for a particular URI. In the signal callback you can check if the source element has a "device" property and set it appropriately. In future ways might be added to specify the device as part of the URI, but at the time of writing this is not possible yet. ExamplesHere is a simple pipeline to play back a video or audio file:
This will play back the given AVI video file, given that the video and audio decoders required to decode the content are installed. Since no special audio sink or video sink is supplied (not possible via gst-launch), playbin will try to find a suitable audio and video sink automatically using the autoaudiosink and autovideosink elements. Here is a another pipeline to play track 4 of an audio CD:
This will play back track 4 on an audio CD in your disc drive (assuming the drive is detected automatically by the plugin).
Here is a another pipeline to play title 1 of a DVD:
|
class |
PlayBin2 |
class |
Queue
A gstreamer element for data queue.
|
class |
Queue2
A gstreamer element for data queue.
|
class |
RGBDataAppSink
Class that allows to pull out buffers from the GStreamer pipeline into
the application.
|
class |
RGBDataFileSink
This bin encapsulates a pipeline that allows to encode RGB buffers into a video
file.
|
class |
RGBDataSink
Class that allows to pull out buffers from the GStreamer pipeline into
the application.
|
class |
Tee
A gstreamer element for data queue.
|
class |
TypeFind
Utility
Element to identify media types in the stream. |
Modifier and Type | Method and Description |
---|---|
void |
PlayBin.setAudioSink(Element element)
Deprecated.
Sets the audio output Element.
|
void |
PlayBin2.setAudioSink(Element element)
Sets the audio output Element.
|
void |
PlayBin.setVideoSink(Element element)
Deprecated.
Sets the video output Element.
|
void |
PlayBin2.setVideoSink(Element element)
Sets the video output Element.
|
void |
PlayBin.setVisualization(Element element)
Deprecated.
Sets the visualization output Element.
|
void |
PlayBin2.setVisualization(Element element)
Sets the visualization output Element.
|
void |
TypeFind.HAVE_TYPE.typeFound(Element elem,
int probability,
Caps caps) |
Modifier and Type | Class and Description |
---|---|
class |
RTPBin
Java representation of gstreamer gstrtpbin
|
class |
RTSPSrc
Java representation of gstreamer rtspsrc
|
Modifier and Type | Field and Description |
---|---|
protected Element |
GstInterface.element |
Modifier and Type | Method and Description |
---|---|
Element |
GstInterface.getElement() |
Modifier and Type | Method and Description |
---|---|
static ColorBalance |
ColorBalance.wrap(Element element)
Wraps the
Element in a ColorBalance interface |
static Mixer |
Mixer.wrap(Element element)
Wraps the
Element in a Mixer interface |
static Navigation |
Navigation.wrap(Element element)
Wraps the
Element in a Navigation interface |
static PropertyProbe |
PropertyProbe.wrap(Element element)
Wraps the
Element in a PropertyProbe interface |
static Tuner |
Tuner.wrap(Element element)
Wraps the
Element in a Tuner interface |
static VideoOrientation |
VideoOrientation.wrap(Element element)
Wraps the
Element in a VideoOrientation interface |
static XOverlay |
XOverlay.wrap(Element element)
Wraps the
Element in a XOverlay interface |
Constructor and Description |
---|
GstInterface(Element element,
GType type) |
XOverlay(Element element)
Creates a new XOverlay instance
|
Modifier and Type | Class and Description |
---|---|
class |
InputStreamSrc |
class |
OutputStreamSink |
class |
ReadableByteChannelSrc |
class |
WriteableByteChannelSink |
Modifier and Type | Method and Description |
---|---|
Element |
GstBinAPI.gst_bin_get_by_interface(Bin bin,
GType iface) |
Element |
GstBinAPI.gst_bin_get_by_name_recurse_up(Bin bin,
java.lang.String name) |
Element |
GstBinAPI.gst_bin_get_by_name(Bin bin,
java.lang.String name) |
Element |
GstElementFactoryAPI.gst_element_factory_create(ElementFactory factory,
java.lang.String elementName) |
Element |
GstElementFactoryAPI.gst_element_factory_make(java.lang.String factoryName,
java.lang.String elementName) |
Element |
GstPadAPI.gst_pad_get_parent_element(Pad pad) |
Modifier and Type | Method and Description |
---|---|
StateChangeReturn |
GstElementAPI.GstElementClass.ChangeState.callback(Element element,
int transition) |
void |
GstElementAPI.GstElementClass.ReleasePad.callback(Element element,
Pad pad) |
StateChangeReturn |
GstElementAPI.GstElementClass.GetState.callback(Element element,
com.sun.jna.Pointer p_state,
com.sun.jna.Pointer p_pending,
long timeout) |
Pad |
GstElementAPI.GstElementClass.RequestNewPad.callback(Element element,
com.sun.jna.Pointer templ,
java.lang.String name) |
StateChangeReturn |
GstElementAPI.GstElementClass.SetState.callback(Element element,
State state) |
void |
GstBinAPI.gst_bin_add_many(Bin bin,
Element... elements) |
boolean |
GstBinAPI.gst_bin_add(Bin bin,
Element element) |
void |
GstBinAPI.gst_bin_remove_many(Bin bin,
Element... elements) |
boolean |
GstBinAPI.gst_bin_remove(Bin bin,
Element element) |
boolean |
GstElementAPI.gst_element_add_pad(Element elem,
Pad pad) |
ClockTime |
GstElementAPI.gst_element_get_base_time(Element element) |
Bus |
GstElementAPI.gst_element_get_bus(Element element) |
Clock |
GstElementAPI.gst_element_get_clock(Element element) |
ElementFactory |
GstElementAPI.gst_element_get_factory(Element element) |
Pad |
GstElementAPI.gst_element_get_pad(Element elem,
java.lang.String name) |
Pad |
GstElementAPI.gst_element_get_request_pad(Element element,
java.lang.String name) |
ClockTime |
GstElementAPI.gst_element_get_start_time(Element element) |
StateChangeReturn |
GstElementAPI.gst_element_get_state(Element elem,
State[] state,
State[] pending,
ClockTime timeout) |
StateChangeReturn |
GstElementAPI.gst_element_get_state(Element elem,
State[] state,
State[] pending,
long timeout) |
Pad |
GstElementAPI.gst_element_get_static_pad(Element element,
java.lang.String name) |
boolean |
GstInterfacesAPI.gst_element_implements_interface(Element element,
GType iface_type) |
boolean |
GstElementAPI.gst_element_implements_interface(Element element,
com.sun.jna.NativeLong iface_type) |
com.sun.jna.Pointer |
GstElementAPI.gst_element_iterate_pads(Element element) |
com.sun.jna.Pointer |
GstElementAPI.gst_element_iterate_sink_pads(Element element) |
com.sun.jna.Pointer |
GstElementAPI.gst_element_iterate_src_pads(Element element) |
boolean |
GstElementAPI.gst_element_link_many(Element... elements) |
boolean |
GstElementAPI.gst_element_link_pads_filtered(Element src,
java.lang.String srcpadname,
Element dest,
java.lang.String destpadname,
Caps filter) |
boolean |
GstElementAPI.gst_element_link_pads(Element src,
java.lang.String srcpadname,
Element dest,
java.lang.String destpadname) |
boolean |
GstElementAPI.gst_element_link(Element elem1,
Element elem2) |
boolean |
GstElementAPI.gst_element_post_message(Element element,
Message message) |
boolean |
GstElementAPI.gst_element_query_duration(Element elem,
Format[] fmt,
long[] pos) |
boolean |
GstElementAPI.gst_element_query_position(Element elem,
Format[] fmt,
long[] pos) |
boolean |
GstElementAPI.gst_element_query(Element elem,
Query query) |
void |
GstElementAPI.gst_element_release_request_pad(Element element,
Pad pad) |
boolean |
GstElementAPI.gst_element_remove_pad(Element elem,
Pad pad) |
boolean |
GstElementAPI.gst_element_seek_simple(Element elem,
Format format,
int flags,
long pos) |
boolean |
GstElementAPI.gst_element_seek(Element elem,
double rate,
Format format,
int flags,
SeekType cur_type,
long cur,
SeekType stop_type,
long stop) |
boolean |
GstElementAPI.gst_element_send_event(Element element,
Event event) |
void |
GstElementAPI.gst_element_set_base_time(Element element,
ClockTime time) |
boolean |
GstElementAPI.gst_element_set_clock(Element element,
Clock clock) |
boolean |
GstElementAPI.gst_element_set_locked_state(Element element,
boolean locked_state) |
void |
GstElementAPI.gst_element_set_start_time(Element element,
ClockTime time) |
StateChangeReturn |
GstElementAPI.gst_element_set_state(Element elem,
State state) |
boolean |
GstElementAPI.gst_element_sync_state_with_parent(Element elem) |
void |
GstElementAPI.gst_element_unlink_many(Element... elements) |
void |
GstElementAPI.gst_element_unlink_pads(Element src,
java.lang.String srcpadname,
Element dest,
java.lang.String destpadname) |
void |
GstElementAPI.gst_element_unlink(Element elem1,
Element elem2) |
Modifier and Type | Method and Description |
---|---|
void |
MediaPlayer.setAudioSink(Element sink)
Sets the Element to use for audio output.
|
void |
PlayBinMediaPlayer.setAudioSink(Element sink)
Sets the sink element to use for audio output.
|
void |
MediaPlayer.setVideoSink(Element sink)
Sets the Element to use for video output.
|
void |
PlayBinMediaPlayer.setVideoSink(Element sink)
Sets the sink element to use for video output.
|
Modifier and Type | Method and Description |
---|---|
Element |
VideoComponent.getElement() |