Class VideoConverter
- All Implemented Interfaces:
Proxy
-
Constructor Summary
ConstructorsConstructorDescriptionVideoConverter(MemorySegment address) Create a VideoConverter proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoidframe(VideoFrame src, VideoFrame dest) Convert the pixels ofsrcintodestusingconvert.voidWait for a previous async conversion performed using gst_video_converter_frame() to complete.voidfree()Free this VideoConverterGet the current configuration ofconvert.Retrieve the input format ofconvert.Retrieve the output format ofconvert.static VideoConverterCreate a new converter object to convert betweeninInfoandoutInfowithconfig.static VideoConverternewWithPool(VideoInfo inInfo, VideoInfo outInfo, Structure config, @Nullable TaskPool pool) Create a new converter object to convert betweeninInfoandoutInfowithconfig.booleanSetconfigas extra configuration forconvert.Methods inherited from class org.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 betweeninInfoandoutInfowithconfig.Returns (nullable): a
GstVideoConverterornullif conversion is not possible.- Parameters:
inInfo- aGstVideoInfooutInfo- aGstVideoInfoconfig- aGstStructurewith configuration options- Since:
- 1.6
-
newWithPool
public static VideoConverter newWithPool(VideoInfo inInfo, VideoInfo outInfo, Structure config, @Nullable TaskPool pool) Create a new converter object to convert betweeninInfoandoutInfowithconfig.The optional
poolcan be used to spawn threads, this is useful when creating new converters rapidly, for example when updating cropping.Returns (nullable): a
GstVideoConverterornullif conversion is not possible.- Parameters:
inInfo- aGstVideoInfooutInfo- aGstVideoInfoconfig- aGstStructurewith configuration optionspool- aGstTaskPoolto spawn threads from- Since:
- 1.20
-
frame
Convert the pixels ofsrcintodestusingconvert.If
GST_VIDEO_CONVERTER_OPT_ASYNC_TASKSistruethen this function will return immediately and needs to be followed by a call to gst_video_converter_frame_finish().- Parameters:
src- aGstVideoFramedest- aGstVideoFrame- Since:
- 1.6
-
frameFinish
public void frameFinish()Wait for a previous async conversion performed using gst_video_converter_frame() to complete.- Since:
- 1.20
-
free
public void free()Free this VideoConverter- Since:
- 1.6
-
getConfig
Get the current configuration ofconvert.- Returns:
- a
GstStructurethat remains valid for as long as this VideoConverter is valid or until gst_video_converter_set_config() is called.
-
getInInfo
Retrieve the input format ofconvert.- Returns:
- a
GstVideoInfo - Since:
- 1.22
-
getOutInfo
Retrieve the output format ofconvert.- Returns:
- a
GstVideoInfo - Since:
- 1.22
-
setConfig
Setconfigas extra configuration forconvert.If the parameters in
configcan not be set exactly, this function returnsfalseand 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:
truewhenconfigcould be set.- Since:
- 1.6
-