Package org.freedesktop.gstreamer.gst
Class Sample
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.Sample
- All Implemented Interfaces:
Proxy
A
GstSample
is a small object containing data, a type, timing and
extra arbitrary information.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Create a copy of the given sample.Get the buffer associated with this SampleGet the buffer list associated with this SamplegetCaps()
Get the caps associated with this SamplegetInfo()
Get extra information associated with this Sample.Get the segment associated with this Samplestatic Type
getType()
Get the GType of the Sample classref()
Increases the refcount of the given sample by one.void
Set the buffer associated with this Sample.void
setBufferList
(BufferList bufferList) Set the buffer list associated with this Sample.void
Set the caps associated with this Sample.boolean
Set the info structure associated with this Sample.void
setSegment
(Segment segment) Set the segment associated with this Sample.void
unref()
Decreases the refcount of the sample.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
Sample
Create a Sample proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
Sample
public Sample(@Nullable @Nullable Buffer buffer, @Nullable @Nullable Caps caps, @Nullable @Nullable Segment segment, @Nullable @Nullable Structure info) Create a newGstSample
with the provided details.Free-function: gst_sample_unref
- Parameters:
buffer
- aGstBuffer
, ornull
caps
- aGstCaps
, ornull
segment
- aGstSegment
, ornull
info
- aGstStructure
, ornull
-
-
Method Details
-
getType
-
copy
Create a copy of the given sample. This will also make a newly allocated copy of the data the source sample contains.- Returns:
- a new copy of this Sample.
-
getBuffer
Get the buffer associated with this Sample- Returns:
- the buffer of this Sample or
null
when there is no buffer. The buffer remains valid as long as this Sample is valid. If you need to hold on to it for longer than that, take a ref to the buffer with gst_buffer_ref().
-
getBufferList
Get the buffer list associated with this Sample- Returns:
- the buffer list of this Sample or
null
when there is no buffer list. The buffer list remains valid as long as this Sample is valid. If you need to hold on to it for longer than that, take a ref to the buffer list with gst_mini_object_ref ().
-
getCaps
Get the caps associated with this Sample- Returns:
- the caps of this Sample or
null
when there is no caps. The caps remain valid as long as this Sample is valid. If you need to hold on to the caps for longer than that, take a ref to the caps with gst_caps_ref().
-
getInfo
Get extra information associated with this Sample.- Returns:
- the extra info of this Sample. The info remains valid as long as this Sample is valid.
-
getSegment
Get the segment associated with this Sample- Returns:
- the segment of this Sample. The segment remains valid as long as this Sample is valid.
-
ref
-
setBuffer
Set the buffer associated with this Sample. this Sample must be writable.- Parameters:
buffer
- AGstBuffer
-
setBufferList
Set the buffer list associated with this Sample. this Sample must be writable.- Parameters:
bufferList
- aGstBufferList
-
setCaps
Set the caps associated with this Sample. this Sample must be writable.- Parameters:
caps
- AGstCaps
-
setInfo
Set the info structure associated with this Sample. this Sample must be writable, andinfo
must not have a parent set already.- Parameters:
info
- AGstStructure
-
setSegment
Set the segment associated with this Sample. this Sample must be writable.- Parameters:
segment
- AGstSegment
-
unref
public void unref()Decreases the refcount of the sample. If the refcount reaches 0, the sample will be freed.
-