Class VideoConverter
- All Implemented Interfaces:
Proxy
-
Constructor Summary
ConstructorDescriptionVideoConverter
(MemorySegment address) Create a VideoConverter proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
frame
(VideoFrame src, VideoFrame dest) Convert the pixels ofsrc
intodest
using this VideoConverter.void
Wait for a previous async conversion performed using gst_video_converter_frame() to complete.void
free()
Free this VideoConverterGet the current configuration of this VideoConverter.Retrieve the input format of this VideoConverter.Retrieve the output format of this VideoConverter.static VideoConverter
Create a new converter object to convert betweeninInfo
andoutInfo
withconfig
.static VideoConverter
newWithPool
(VideoInfo inInfo, VideoInfo outInfo, Structure config, @Nullable TaskPool pool) Create a new converter object to convert betweeninInfo
andoutInfo
withconfig
.boolean
Setconfig
as extra configuration for this VideoConverter.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
VideoConverter
Create a VideoConverter proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
-
Method Details
-
new_
Create a new converter object to convert betweeninInfo
andoutInfo
withconfig
.Returns (nullable): a
GstVideoConverter
ornull
if conversion is not possible.- Parameters:
inInfo
- aGstVideoInfo
outInfo
- aGstVideoInfo
config
- aGstStructure
with configuration options
-
newWithPool
public static VideoConverter newWithPool(VideoInfo inInfo, VideoInfo outInfo, Structure config, @Nullable @Nullable TaskPool pool) Create a new converter object to convert betweeninInfo
andoutInfo
withconfig
.The optional
pool
can be used to spawn threads, this is useful when creating new converters rapidly, for example when updating cropping.Returns (nullable): a
GstVideoConverter
ornull
if conversion is not possible.- Parameters:
inInfo
- aGstVideoInfo
outInfo
- aGstVideoInfo
config
- aGstStructure
with configuration optionspool
- aGstTaskPool
to spawn threads from
-
frame
Convert the pixels ofsrc
intodest
using this VideoConverter.If
GST_VIDEO_CONVERTER_OPT_ASYNC_TASKS
istrue
then this function will return immediately and needs to be followed by a call to gst_video_converter_frame_finish().- Parameters:
src
- aGstVideoFrame
dest
- aGstVideoFrame
-
frameFinish
public void frameFinish()Wait for a previous async conversion performed using gst_video_converter_frame() to complete. -
free
public void free()Free this VideoConverter -
getConfig
Get the current configuration of this VideoConverter.- Returns:
- a
GstStructure
that remains valid for as long as this VideoConverter is valid or until gst_video_converter_set_config() is called.
-
getInInfo
Retrieve the input format of this VideoConverter.- Returns:
- a
GstVideoInfo
-
getOutInfo
Retrieve the output format of this VideoConverter.- Returns:
- a
GstVideoInfo
-
setConfig
Setconfig
as extra configuration for this VideoConverter.If the parameters in
config
can not be set exactly, this function returnsfalse
and will try to update as much state as possible. The new state can then be retrieved and refined with gst_video_converter_get_config().Look at the
GST_VIDEO_CONVERTER_OPT_*
fields to check valid configuration option and values.- Parameters:
config
- aGstStructure
- Returns:
true
whenconfig
could be set.
-