Class GstVideo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
A bufferpool option to enable extra padding.static final String
An option that can be activated on a bufferpool to request gl texture upload meta on buffers from the pool.static final String
An option that can be activated on bufferpool to request video metadata on buffers from the pool.static final String
Name of the caps feature indicating that the stream is interlaced.static final String
static final String
static final String
static final String
static final String
This metadata stays relevant as long as video colorspace is unchanged.static final String
This metadata stays relevant as long as video orientation is unchanged.static final String
This metadata stays relevant as long as video size is unchanged.static final String
This metadata is relevant for video streams.static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String
GstVideoAlphaMode
, the alpha mode to use.static final String
G_TYPE_DOUBLE
, the alpha color value to use.static final String
G_TYPE_BOOLEAN
, whether gst_video_converter_frame() will return immediately without waiting for the conversion to complete.static final String
G_TYPE_UINT
, the border color to use ifGST_VIDEO_CONVERTER_OPT_FILL_BORDER
is set totrue
.static final String
GstVideoChromaMode
, set the chroma resample mode subsampled formats.static final String
GstVideoChromaMethod
, The resampler method to use for chroma resampling.static final String
G_TYPE_INT
, height in the destination frame, default destination heightstatic final String
G_TYPE_INT
, width in the destination frame, default destination widthstatic final String
G_TYPE_INT
, x position in the destination frame, default 0static final String
G_TYPE_INT
, y position in the destination frame, default 0static final String
GstVideoDitherMethod
, The dither method to use when changing bit depth.static final String
G_TYPE_UINT
, The quantization amount to dither to.static final String
G_TYPE_BOOLEAN
, if the destination rectangle does not fill the complete destination image, render a border withGST_VIDEO_CONVERTER_OPT_BORDER_ARGB
.static final String
GstVideoGammaMode
, set the gamma mode.static final String
GstVideoMatrixMode
, set the color matrix conversion mode for converting between Y'PbPr and non-linear RGB (R'G'B').static final String
GstVideoPrimariesMode
, set the primaries conversion mode.static final String
GstVideoResamplerMethod
, The resampler method to use for resampling.static final String
G_TYPE_UINT
, The number of taps for the resampler.static final String
G_TYPE_INT
, source height to convert, default source heightstatic final String
G_TYPE_INT
, source width to convert, default source widthstatic final String
G_TYPE_INT
, source x position to start conversion, default 0static final String
G_TYPE_INT
, source y position to start conversion, default 0static final String
G_TYPE_UINT
, maximum number of threads to use.static final int
Default maximum number of errors tolerated before signaling error.static final String
The name of the templates for the sink pad.static final String
The name of the templates for the source pad.static final String
Generic caps string for video wit DMABuf(GST_CAPS_FEATURE_MEMORY_DMABUF) feature, for use in pad templates.static final String
The name of the templates for the sink pad.static final String
The name of the templates for the source pad.static final String
List of all video formats, for use in template caps strings.static final String
Declare all video formats as a string.static final String
This is similar toGST_VIDEO_FORMATS_ALL
but includes formats like DMA_DRM that do not have a software converter.static final String
This is similar toGST_VIDEO_FORMATS_ALL_STR
but includes formats like DMA_DRM for which no software converter exists.static final String
static final int
static final int
static final String
G_TYPE_DOUBLE, B parameter of the cubic filter.static final String
G_TYPE_DOUBLE, C parameter of the cubic filter.static final String
G_TYPE_DOUBLE, specifies the size of filter envelope forGSTVIDEORESAMPLERMETHODLANCZOS
.static final String
G_TYPE_INT, limits the maximum number of taps to use.static final String
G_TYPE_DOUBLE, specifies sharpening of the filter forGSTVIDEORESAMPLERMETHODLANCZOS
.static final String
G_TYPE_DOUBLE, specifies sharpness of the filter forGSTVIDEORESAMPLERMETHODLANCZOS
.static final String
GstVideoDitherMethod
, The dither method to use for propagating quatization errors.static final String
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Type
static AncillaryMeta
bufferAddAncillaryMeta
(Buffer buffer) Adds a newGstAncillaryMeta
to thebuffer
.static VideoAFDMeta
bufferAddVideoAfdMeta
(Buffer buffer, byte field, VideoAFDSpec spec, VideoAFDValue afd) AttachesGstVideoAFDMeta
metadata tobuffer
with the given parameters.Attaches GstVideoAffineTransformationMeta metadata tobuffer
with the given parameters.static VideoBarMeta
bufferAddVideoBarMeta
(Buffer buffer, byte field, boolean isLetterbox, int barData1, int barData2) AttachesGstVideoBarMeta
metadata tobuffer
with the given parameters.static VideoCaptionMeta
bufferAddVideoCaptionMeta
(Buffer buffer, VideoCaptionType captionType, byte[] data) AttachesGstVideoCaptionMeta
metadata tobuffer
with the given parameters.static VideoCodecAlphaMeta
bufferAddVideoCodecAlphaMeta
(Buffer buffer, Buffer alphaBuffer) Attaches aGstVideoCodecAlphaMeta
metadata tobuffer
with the given alpha buffer.static VideoGLTextureUploadMeta
bufferAddVideoGlTextureUploadMeta
(Buffer buffer, VideoGLTextureOrientation textureOrientation, int nTextures, MemorySegment textureType, VideoGLTextureUpload upload, BoxedCopyFunc userDataCopy, BoxedFreeFunc userDataFree) Attaches GstVideoGLTextureUploadMeta metadata tobuffer
with the given parameters.static VideoMeta
bufferAddVideoMeta
(Buffer buffer, Set<VideoFrameFlags> flags, VideoFormat format, int width, int height) Attaches GstVideoMeta metadata tobuffer
with the given parameters and the default offsets and strides forformat
andwidth
xheight
.static VideoMeta
bufferAddVideoMeta
(Buffer buffer, VideoFrameFlags flags, VideoFormat format, int width, int height) Attaches GstVideoMeta metadata tobuffer
with the given parameters and the default offsets and strides forformat
andwidth
xheight
.static VideoMeta
bufferAddVideoMetaFull
(Buffer buffer, Set<VideoFrameFlags> flags, VideoFormat format, int width, int height, int nPlanes, long[] offset, int[] stride) Attaches GstVideoMeta metadata tobuffer
with the given parameters.static VideoMeta
bufferAddVideoMetaFull
(Buffer buffer, VideoFrameFlags flags, VideoFormat format, int width, int height, int nPlanes, long[] offset, int[] stride) Attaches GstVideoMeta metadata tobuffer
with the given parameters.static VideoOverlayCompositionMeta
bufferAddVideoOverlayCompositionMeta
(Buffer buf, @Nullable VideoOverlayComposition comp) Sets an overlay composition on a buffer.static VideoRegionOfInterestMeta
bufferAddVideoRegionOfInterestMeta
(Buffer buffer, String roiType, int x, int y, int w, int h) AttachesGstVideoRegionOfInterestMeta
metadata tobuffer
with the given parameters.static VideoRegionOfInterestMeta
bufferAddVideoRegionOfInterestMetaId
(Buffer buffer, Quark roiType, int x, int y, int w, int h) AttachesGstVideoRegionOfInterestMeta
metadata tobuffer
with the given parameters.bufferAddVideoSeiUserDataUnregisteredMeta
(Buffer buffer, MemorySegment uuid, MemorySegment data, long size) AttachesGstVideoSEIUserDataUnregisteredMeta
metadata tobuffer
with the given parameters.static VideoTimeCodeMeta
bufferAddVideoTimeCodeMeta
(Buffer buffer, VideoTimeCode tc) AttachesGstVideoTimeCodeMeta
metadata tobuffer
with the given parameters.static VideoTimeCodeMeta
bufferAddVideoTimeCodeMetaFull
(Buffer buffer, int fpsN, int fpsD, DateTime latestDailyJam, Set<VideoTimeCodeFlags> flags, int hours, int minutes, int seconds, int frames, int fieldCount) AttachesGstVideoTimeCodeMeta
metadata tobuffer
with the given parameters.static VideoTimeCodeMeta
bufferAddVideoTimeCodeMetaFull
(Buffer buffer, int fpsN, int fpsD, DateTime latestDailyJam, VideoTimeCodeFlags flags, int hours, int minutes, int seconds, int frames, int fieldCount) AttachesGstVideoTimeCodeMeta
metadata tobuffer
with the given parameters.static VideoMeta
bufferGetVideoMeta
(Buffer buffer) Find theGstVideoMeta
onbuffer
with the lowestid
.static VideoMeta
bufferGetVideoMetaId
(Buffer buffer, int id) Find theGstVideoMeta
onbuffer
with the givenid
.static VideoRegionOfInterestMeta
bufferGetVideoRegionOfInterestMetaId
(Buffer buffer, int id) Find theGstVideoRegionOfInterestMeta
onbuffer
with the givenid
.static boolean
bufferPoolConfigGetVideoAlignment
(Structure config, VideoAlignment align) Get the video alignment from the bufferpool configurationconfig
in inalign
static void
bufferPoolConfigSetVideoAlignment
(Structure config, VideoAlignment align) Set the video alignment inalign
to the bufferpool configurationconfig
static boolean
Convenience function to check if the given message is a "prepare-window-handle" message from aGstVideoOverlay
.static void
static Type
static Type
static Type
static boolean
videoBlend
(VideoFrame dest, VideoFrame src, int x, int y, float globalAlpha) Lets you blend thesrc
image into thedest
imagestatic void
videoBlendScaleLinearRGBA
(VideoInfo src, Buffer srcBuffer, int destHeight, int destWidth, VideoInfo dest, Out<Buffer> destBuffer) Scales a buffer containing RGBA (or AYUV) video.static boolean
videoCalculateDisplayRatio
(Out<Integer> darN, Out<Integer> darD, int videoWidth, int videoHeight, int videoParN, int videoParD, int displayParN, int displayParD) Given the Pixel Aspect Ratio and size of an input video frame, and the pixel aspect ratio of the intended display device, calculates the actual display ratio the video will be rendered with.static Type
static void
videoCenterRect
(VideoRectangle src, VideoRectangle dst, VideoRectangle result, boolean scaling) Takessrc
rectangle and position it at the center ofdst
rectangle with or withoutscaling
.static Set
<VideoChromaSite> Deprecated.Use gst_video_chroma_site_from_string() instead.static void
videoChromaResample
(VideoChromaResample resample, @Nullable MemorySegment lines, int width) Perform resampling ofwidth
chroma pixels inlines
.static String
Deprecated.Use gst_video_chroma_site_to_string() instead.static String
videoChromaToString
(VideoChromaSite... site) Deprecated.Use gst_video_chroma_site_to_string() instead.static Type
static double
videoColorTransferDecode
(VideoTransferFunction func, double val) Deprecated.static double
videoColorTransferEncode
(VideoTransferFunction func, double val) Deprecated.static Sample
videoConvertSample
(Sample sample, Caps toCaps, ClockTime timeout) Converts a raw video buffer into the specified output caps.static void
videoConvertSampleAsync
(Sample sample, Caps toCaps, ClockTime timeout, VideoConvertSampleCallback callback) Converts a raw video buffer into the specified output caps.static Type
static int
Converting the video format into dma drm fourcc.static int
videoDmaDrmFourccFromString
(String formatStr, @Nullable Out<Long> modifier) Convert theformatStr
string into the drm fourcc value.static VideoFormat
videoDmaDrmFourccToFormat
(int fourcc) Converting a dma drm fourcc into the video format.static String
videoDmaDrmFourccToString
(int fourcc, long modifier) Returns a string containing drm kind format, such as NV12:0x0100000000000002, or NULL otherwise.static boolean
videoEventIsForceKeyUnit
(Event event) Checks if an event is a force key unit event.static Event
videoEventNewDownstreamForceKeyUnit
(ClockTime timestamp, ClockTime streamTime, ClockTime runningTime, boolean allHeaders, int count) Creates a new downstream force key unit event.static Event
videoEventNewStillFrame
(boolean inStill) Creates a new Still Frame event.static Event
videoEventNewUpstreamForceKeyUnit
(ClockTime runningTime, boolean allHeaders, int count) Creates a new upstream force key unit event.static boolean
videoEventParseDownstreamForceKeyUnit
(Event event, ClockTime timestamp, ClockTime streamTime, ClockTime runningTime, Out<Boolean> allHeaders, Out<Integer> count) Get timestamp, stream-time, running-time, all-headers and count in the force key unit event.static boolean
videoEventParseStillFrame
(Event event, Out<Boolean> inStill) Parse aGstEvent
, identify if it is a Still Frame event, and return the still-frame state from the event if it is.static boolean
videoEventParseUpstreamForceKeyUnit
(Event event, ClockTime runningTime, Out<Boolean> allHeaders, Out<Integer> count) Get running-time, all-headers and count in the force key unit event.static VideoFormat[]
Return all the raw video formats supported by GStreamer including special opaque formats such asVideoFormat.DMA_DRM
for which no software conversion exists.static VideoFormat[]
Return all the raw video formats supported by GStreamer.static Type
static boolean
Given the nominal duration of one video frame, this function will check some standard framerates for a close match (within 0.1%) and return one if possible,static boolean
videoIsCommonAspectRatio
(int width, int height, int parN, int parD) Given a frame's dimensions and pixel aspect ratio, this function will calculate the frame's aspect ratio and compare it against a set of common well-known "standard" aspect ratios.static boolean
videoIsDmaDrmCaps
(Caps caps) Check whether thecaps
is a dma drm kind caps.static Caps
videoMakeRawCaps
(@Nullable VideoFormat[] formats) Return a generic raw video caps for formats defined informats
.static Caps
videoMakeRawCapsWithFeatures
(@Nullable VideoFormat[] formats, @Nullable CapsFeatures features) Return a generic raw video caps for formats defined informats
with featuresfeatures
.static Type
static Value
static Value
static Value
static Value
static Value
static boolean
videoMultiviewGuessHalfAspect
(VideoMultiviewMode mvMode, int width, int height, int parN, int parD) static void
videoMultiviewVideoInfoChangeMode
(VideoInfo info, VideoMultiviewMode outMviewMode, Set<VideoMultiviewFlags> outMviewFlags) Utility function that transforms the width/height/PAR and multiview mode and flags of aGstVideoInfo
into the requested mode.static void
videoMultiviewVideoInfoChangeMode
(VideoInfo info, VideoMultiviewMode outMviewMode, VideoMultiviewFlags... outMviewFlags) Utility function that transforms the width/height/PAR and multiview mode and flags of aGstVideoInfo
into the requested mode.static Type
static Type
static Type
static boolean
videoSeiUserDataUnregisteredParsePrecisionTimeStamp
(VideoSEIUserDataUnregisteredMeta userData, Out<Byte> status, Out<Long> precisionTimeStamp) Parses and returns the Precision Time Stamp (ST 0604) from the SEI User Data Unregistered bufferstatic int
videoTileGetIndex
(VideoTileMode mode, int x, int y, int xTiles, int yTiles) Get the tile index of the tile at coordinatesx
andy
in the tiled image ofxTiles
byyTiles
.static Type
-
Field Details
-
BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META
- See Also:
-
BUFFER_POOL_OPTION_VIDEO_ALIGNMENT
A bufferpool option to enable extra padding. When a bufferpool supports this option, gst_buffer_pool_config_set_video_alignment() can be called.When this option is enabled on the bufferpool,
GST_BUFFER_POOL_OPTION_VIDEO_META
should also be enabled.- See Also:
-
BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META
An option that can be activated on a bufferpool to request gl texture upload meta on buffers from the pool.When this option is enabled on the bufferpool,
GSTBUFFERPOOLOPTIONVIDEOMETA
should also be enabled.- See Also:
-
BUFFER_POOL_OPTION_VIDEO_META
An option that can be activated on bufferpool to request video metadata on buffers from the pool.- See Also:
-
CAPS_FEATURE_FORMAT_INTERLACED
Name of the caps feature indicating that the stream is interlaced.Currently it is only used for video with 'interlace-mode=alternate' to ensure backwards compatibility for this new mode. In this mode each buffer carries a single field of interlaced video.
GSTVIDEOBUFFERFLAGTOPFIELD
andGSTVIDEOBUFFERFLAGBOTTOMFIELD
indicate whether the buffer carries a top or bottom field. The order of buffers/fields in the stream and the timestamps on the buffers indicate the temporal order of the fields. Top and bottom fields are expected to alternate in this mode. The frame rate in the caps still signals the frame rate, so the notional field rate will be twice the frame rate from the caps (seeGSTVIDEOINFOFIELDRATEN
).- See Also:
-
CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META
- See Also:
-
CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META
- See Also:
-
CAPS_FEATURE_META_GST_VIDEO_META
- See Also:
-
CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION
- See Also:
-
META_TAG_VIDEO_COLORSPACE_STR
This metadata stays relevant as long as video colorspace is unchanged.- See Also:
-
META_TAG_VIDEO_ORIENTATION_STR
This metadata stays relevant as long as video orientation is unchanged.- See Also:
-
META_TAG_VIDEO_SIZE_STR
This metadata stays relevant as long as video size is unchanged.- See Also:
-
META_TAG_VIDEO_STR
This metadata is relevant for video streams.- See Also:
-
VIDEO_COLORIMETRY_BT2020
- See Also:
-
VIDEO_COLORIMETRY_BT2020_10
- See Also:
-
VIDEO_COLORIMETRY_BT2100_HLG
- See Also:
-
VIDEO_COLORIMETRY_BT2100_PQ
- See Also:
-
VIDEO_COLORIMETRY_BT601
- See Also:
-
VIDEO_COLORIMETRY_BT709
- See Also:
-
VIDEO_COLORIMETRY_SMPTE240M
- See Also:
-
VIDEO_COLORIMETRY_SRGB
- See Also:
-
VIDEO_COMP_A
public static final int VIDEO_COMP_A- See Also:
-
VIDEO_COMP_B
public static final int VIDEO_COMP_B- See Also:
-
VIDEO_COMP_G
public static final int VIDEO_COMP_G- See Also:
-
VIDEO_COMP_INDEX
public static final int VIDEO_COMP_INDEX- See Also:
-
VIDEO_COMP_PALETTE
public static final int VIDEO_COMP_PALETTE- See Also:
-
VIDEO_COMP_R
public static final int VIDEO_COMP_R- See Also:
-
VIDEO_COMP_U
public static final int VIDEO_COMP_U- See Also:
-
VIDEO_COMP_V
public static final int VIDEO_COMP_V- See Also:
-
VIDEO_COMP_Y
public static final int VIDEO_COMP_Y- See Also:
-
VIDEO_CONVERTER_OPT_ALPHA_MODE
GstVideoAlphaMode
, the alpha mode to use. Default isGST_VIDEO_ALPHA_MODE_COPY
.- See Also:
-
VIDEO_CONVERTER_OPT_ALPHA_VALUE
G_TYPE_DOUBLE
, the alpha color value to use. Default to 1.0- See Also:
-
VIDEO_CONVERTER_OPT_ASYNC_TASKS
G_TYPE_BOOLEAN
, whether gst_video_converter_frame() will return immediately without waiting for the conversion to complete. A subsequent gst_video_converter_frame_finish() must be performed to ensure completion of the conversion before subsequent use. Defaultfalse
- See Also:
-
VIDEO_CONVERTER_OPT_BORDER_ARGB
G_TYPE_UINT
, the border color to use ifGST_VIDEO_CONVERTER_OPT_FILL_BORDER
is set totrue
. The color is in ARGB format. Default 0xff000000- See Also:
-
VIDEO_CONVERTER_OPT_CHROMA_MODE
GstVideoChromaMode
, set the chroma resample mode subsampled formats. Default isGST_VIDEO_CHROMA_MODE_FULL
.- See Also:
-
VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD
GstVideoChromaMethod
, The resampler method to use for chroma resampling. Other options for the resampler can be used, see theGstVideoResampler
. Default isGST_VIDEO_RESAMPLER_METHOD_LINEAR
- See Also:
-
VIDEO_CONVERTER_OPT_DEST_HEIGHT
G_TYPE_INT
, height in the destination frame, default destination height- See Also:
-
VIDEO_CONVERTER_OPT_DEST_WIDTH
G_TYPE_INT
, width in the destination frame, default destination width- See Also:
-
VIDEO_CONVERTER_OPT_DEST_X
G_TYPE_INT
, x position in the destination frame, default 0- See Also:
-
VIDEO_CONVERTER_OPT_DEST_Y
G_TYPE_INT
, y position in the destination frame, default 0- See Also:
-
VIDEO_CONVERTER_OPT_DITHER_METHOD
GstVideoDitherMethod
, The dither method to use when changing bit depth. Default isGST_VIDEO_DITHER_BAYER
.- See Also:
-
VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION
G_TYPE_UINT
, The quantization amount to dither to. Components will be quantized to multiples of this value. Default is 1- See Also:
-
VIDEO_CONVERTER_OPT_FILL_BORDER
G_TYPE_BOOLEAN
, if the destination rectangle does not fill the complete destination image, render a border withGST_VIDEO_CONVERTER_OPT_BORDER_ARGB
. Otherwise the unusded pixels in the destination are untouched. Defaulttrue
.- See Also:
-
VIDEO_CONVERTER_OPT_GAMMA_MODE
GstVideoGammaMode
, set the gamma mode. Default isGST_VIDEO_GAMMA_MODE_NONE
.- See Also:
-
VIDEO_CONVERTER_OPT_MATRIX_MODE
GstVideoMatrixMode
, set the color matrix conversion mode for converting between Y'PbPr and non-linear RGB (R'G'B'). Default isGST_VIDEO_MATRIX_MODE_FULL
.- See Also:
-
VIDEO_CONVERTER_OPT_PRIMARIES_MODE
GstVideoPrimariesMode
, set the primaries conversion mode. Default isGST_VIDEO_PRIMARIES_MODE_NONE
.- See Also:
-
VIDEO_CONVERTER_OPT_RESAMPLER_METHOD
GstVideoResamplerMethod
, The resampler method to use for resampling. Other options for the resampler can be used, see theGstVideoResampler
. Default isGST_VIDEO_RESAMPLER_METHOD_CUBIC
- See Also:
-
VIDEO_CONVERTER_OPT_RESAMPLER_TAPS
G_TYPE_UINT
, The number of taps for the resampler. Default is 0: let the resampler choose a good value.- See Also:
-
VIDEO_CONVERTER_OPT_SRC_HEIGHT
G_TYPE_INT
, source height to convert, default source height- See Also:
-
VIDEO_CONVERTER_OPT_SRC_WIDTH
G_TYPE_INT
, source width to convert, default source width- See Also:
-
VIDEO_CONVERTER_OPT_SRC_X
G_TYPE_INT
, source x position to start conversion, default 0- See Also:
-
VIDEO_CONVERTER_OPT_SRC_Y
G_TYPE_INT
, source y position to start conversion, default 0- See Also:
-
VIDEO_CONVERTER_OPT_THREADS
G_TYPE_UINT
, maximum number of threads to use. Default 1, 0 for the number of cores.- See Also:
-
VIDEO_DECODER_MAX_ERRORS
public static final int VIDEO_DECODER_MAX_ERRORSDefault maximum number of errors tolerated before signaling error.- See Also:
-
VIDEO_DECODER_SINK_NAME
The name of the templates for the sink pad.- See Also:
-
VIDEO_DECODER_SRC_NAME
The name of the templates for the source pad.- See Also:
-
VIDEO_DMA_DRM_CAPS_MAKE
Generic caps string for video wit DMABuf(GST_CAPS_FEATURE_MEMORY_DMABUF) feature, for use in pad templates. As drm-format is supposed to be defined at run-time it's not predefined here.- See Also:
-
VIDEO_ENCODER_SINK_NAME
The name of the templates for the sink pad.- See Also:
-
VIDEO_ENCODER_SRC_NAME
The name of the templates for the source pad.- See Also:
-
VIDEO_FORMATS_ALL
List of all video formats, for use in template caps strings.Formats are sorted by decreasing "quality", using these criteria by priority:
- number of components
- depth
- subsampling factor of the width
- subsampling factor of the height
- number of planes
- native endianness preferred
- pixel stride
- poffset
- prefer non-complex formats
- prefer YUV formats over RGB ones
- prefer I420 over YV12
- format name
- See Also:
-
VIDEO_FORMATS_ALL_STR
Declare all video formats as a string.Formats are sorted by decreasing "quality", using these criteria by priority:
- number of components
- depth
- subsampling factor of the width
- subsampling factor of the height
- number of planes
- native endianness preferred
- pixel stride
- poffset
- prefer non-complex formats
- prefer YUV formats over RGB ones
- prefer I420 over YV12
- format name
- See Also:
-
VIDEO_FORMATS_ANY
This is similar toGST_VIDEO_FORMATS_ALL
but includes formats like DMA_DRM that do not have a software converter. This should be used for passthrough template caps.- See Also:
-
VIDEO_FORMATS_ANY_STR
This is similar toGST_VIDEO_FORMATS_ALL_STR
but includes formats like DMA_DRM for which no software converter exists. This should be used for passthrough template caps.- See Also:
-
VIDEO_FPS_RANGE
- See Also:
-
VIDEO_MAX_COMPONENTS
public static final int VIDEO_MAX_COMPONENTS- See Also:
-
VIDEO_MAX_PLANES
public static final int VIDEO_MAX_PLANES- See Also:
-
VIDEO_RESAMPLER_OPT_CUBIC_B
G_TYPE_DOUBLE, B parameter of the cubic filter. The B parameter controls the bluriness. Values between 0.0 and 2.0 are accepted. 1/3 is the default.Below are some values of popular filters: B C Hermite 0.0 0.0 Spline 1.0 0.0 Catmull-Rom 0.0 1/2 Mitchell 1/3 1/3 Robidoux 0.3782 0.3109 Robidoux Sharp 0.2620 0.3690 Robidoux Soft 0.6796 0.1602
- See Also:
-
VIDEO_RESAMPLER_OPT_CUBIC_C
G_TYPE_DOUBLE, C parameter of the cubic filter. The C parameter controls the Keys alpha value. Values between 0.0 and 2.0 are accepted. 1/3 is the default.See
GST_VIDEO_RESAMPLER_OPT_CUBIC_B
for some more common values- See Also:
-
VIDEO_RESAMPLER_OPT_ENVELOPE
G_TYPE_DOUBLE, specifies the size of filter envelope forGSTVIDEORESAMPLERMETHODLANCZOS
. values are clamped between 1.0 and 5.0. 2.0 is the default.- See Also:
-
VIDEO_RESAMPLER_OPT_MAX_TAPS
G_TYPE_INT, limits the maximum number of taps to use. 16 is the default.- See Also:
-
VIDEO_RESAMPLER_OPT_SHARPEN
G_TYPE_DOUBLE, specifies sharpening of the filter forGSTVIDEORESAMPLERMETHODLANCZOS
. values are clamped between 0.0 and 1.0. 0.0 is the default.- See Also:
-
VIDEO_RESAMPLER_OPT_SHARPNESS
G_TYPE_DOUBLE, specifies sharpness of the filter forGSTVIDEORESAMPLERMETHODLANCZOS
. values are clamped between 0.5 and 1.5. 1.0 is the default.- See Also:
-
VIDEO_SCALER_OPT_DITHER_METHOD
GstVideoDitherMethod
, The dither method to use for propagating quatization errors.- See Also:
-
VIDEO_SIZE_RANGE
- See Also:
-
VIDEO_TILE_TYPE_MASK
public static final int VIDEO_TILE_TYPE_MASK- See Also:
-
VIDEO_TILE_TYPE_SHIFT
public static final int VIDEO_TILE_TYPE_SHIFT- See Also:
-
VIDEO_TILE_X_TILES_MASK
public static final int VIDEO_TILE_X_TILES_MASK- See Also:
-
VIDEO_TILE_Y_TILES_SHIFT
public static final int VIDEO_TILE_Y_TILES_SHIFT- See Also:
-
-
Constructor Details
-
GstVideo
public GstVideo()
-
-
Method Details
-
javagi$ensureInitialized
public static void javagi$ensureInitialized() -
ancillaryMetaApiGetType
-
bufferAddAncillaryMeta
Adds a newGstAncillaryMeta
to thebuffer
. The caller is responsible for setting the appropriate fields.- Parameters:
buffer
- AGstBuffer
- Returns:
- A new
GstAncillaryMeta
, ornull
if an error happened.
-
bufferAddVideoAfdMeta
public static VideoAFDMeta bufferAddVideoAfdMeta(Buffer buffer, byte field, VideoAFDSpec spec, VideoAFDValue afd) AttachesGstVideoAFDMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
field
- 0 for progressive or field 1 and 1 for field 2spec
-GstVideoAFDSpec
that applies to AFD valueafd
-GstVideoAFDValue
AFD enumeration- Returns:
- the
GstVideoAFDMeta
onbuffer
.
-
bufferAddVideoAffineTransformationMeta
Attaches GstVideoAffineTransformationMeta metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
- Returns:
- the
GstVideoAffineTransformationMeta
onbuffer
.
-
bufferAddVideoBarMeta
public static VideoBarMeta bufferAddVideoBarMeta(Buffer buffer, byte field, boolean isLetterbox, int barData1, int barData2) AttachesGstVideoBarMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
field
- 0 for progressive or field 1 and 1 for field 2isLetterbox
- if true then bar data specifies letterbox, otherwise pillarboxbarData1
- IfisLetterbox
is true, then the value specifies the last line of a horizontal letterbox bar area at top of reconstructed frame. Otherwise, it specifies the last horizontal luminance sample of a vertical pillarbox bar area at the left side of the reconstructed framebarData2
- IfisLetterbox
is true, then the value specifies the first line of a horizontal letterbox bar area at bottom of reconstructed frame. Otherwise, it specifies the first horizontal luminance sample of a vertical pillarbox bar area at the right side of the reconstructed frame.- Returns:
- the
GstVideoBarMeta
onbuffer
.See Table 6.11 Bar Data Syntax
https://www.atsc.org/wp-content/uploads/2015/03/a_53-Part-4-2009.pdf
-
bufferAddVideoCaptionMeta
public static VideoCaptionMeta bufferAddVideoCaptionMeta(Buffer buffer, VideoCaptionType captionType, byte[] data) AttachesGstVideoCaptionMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
captionType
- The type of Closed Caption to adddata
- The Closed Caption data- Returns:
- the
GstVideoCaptionMeta
onbuffer
.
-
bufferAddVideoCodecAlphaMeta
Attaches aGstVideoCodecAlphaMeta
metadata tobuffer
with the given alpha buffer.- Parameters:
buffer
- aGstBuffer
alphaBuffer
- aGstBuffer
- Returns:
- the
GstVideoCodecAlphaMeta
onbuffer
.
-
bufferAddVideoGlTextureUploadMeta
public static VideoGLTextureUploadMeta bufferAddVideoGlTextureUploadMeta(Buffer buffer, VideoGLTextureOrientation textureOrientation, int nTextures, MemorySegment textureType, VideoGLTextureUpload upload, BoxedCopyFunc userDataCopy, BoxedFreeFunc userDataFree) Attaches GstVideoGLTextureUploadMeta metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
textureOrientation
- theGstVideoGLTextureOrientation
nTextures
- the number of texturestextureType
- array ofGstVideoGLTextureType
upload
- the function to upload the buffer to a specific texture IDuserDataCopy
- function to copyuserData
userDataFree
- function to freeuserData
- Returns:
- the
GstVideoGLTextureUploadMeta
onbuffer
.
-
bufferAddVideoMeta
public static VideoMeta bufferAddVideoMeta(Buffer buffer, Set<VideoFrameFlags> flags, VideoFormat format, int width, int height) Attaches GstVideoMeta metadata tobuffer
with the given parameters and the default offsets and strides forformat
andwidth
xheight
.This function calculates the default offsets and strides and then calls gst_buffer_add_video_meta_full() with them.
- Parameters:
buffer
- aGstBuffer
flags
-GstVideoFrameFlags
format
- aGstVideoFormat
width
- the widthheight
- the height- Returns:
- the
GstVideoMeta
onbuffer
.
-
bufferAddVideoMeta
public static VideoMeta bufferAddVideoMeta(Buffer buffer, VideoFrameFlags flags, VideoFormat format, int width, int height) Attaches GstVideoMeta metadata tobuffer
with the given parameters and the default offsets and strides forformat
andwidth
xheight
.This function calculates the default offsets and strides and then calls gst_buffer_add_video_meta_full() with them.
- Parameters:
buffer
- aGstBuffer
flags
-GstVideoFrameFlags
format
- aGstVideoFormat
width
- the widthheight
- the height- Returns:
- the
GstVideoMeta
onbuffer
.
-
bufferAddVideoMetaFull
public static VideoMeta bufferAddVideoMetaFull(Buffer buffer, Set<VideoFrameFlags> flags, VideoFormat format, int width, int height, int nPlanes, long[] offset, int[] stride) Attaches GstVideoMeta metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
flags
-GstVideoFrameFlags
format
- aGstVideoFormat
width
- the widthheight
- the heightnPlanes
- number of planesoffset
- offset of each planestride
- stride of each plane- Returns:
- the
GstVideoMeta
onbuffer
.
-
bufferAddVideoMetaFull
public static VideoMeta bufferAddVideoMetaFull(Buffer buffer, VideoFrameFlags flags, VideoFormat format, int width, int height, int nPlanes, long[] offset, int[] stride) Attaches GstVideoMeta metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
flags
-GstVideoFrameFlags
format
- aGstVideoFormat
width
- the widthheight
- the heightnPlanes
- number of planesoffset
- offset of each planestride
- stride of each plane- Returns:
- the
GstVideoMeta
onbuffer
.
-
bufferAddVideoOverlayCompositionMeta
public static VideoOverlayCompositionMeta bufferAddVideoOverlayCompositionMeta(Buffer buf, @Nullable @Nullable VideoOverlayComposition comp) Sets an overlay composition on a buffer. The buffer will obtain its own reference to the composition, meaning this function does not take ownership ofcomp
.- Parameters:
buf
- aGstBuffer
comp
- aGstVideoOverlayComposition
- Returns:
- a
GstVideoOverlayCompositionMeta
-
bufferAddVideoRegionOfInterestMeta
public static VideoRegionOfInterestMeta bufferAddVideoRegionOfInterestMeta(Buffer buffer, String roiType, int x, int y, int w, int h) AttachesGstVideoRegionOfInterestMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
roiType
- Type of the region of interest (e.g. "face")x
- X positiony
- Y positionw
- widthh
- height- Returns:
- the
GstVideoRegionOfInterestMeta
onbuffer
.
-
bufferAddVideoRegionOfInterestMetaId
public static VideoRegionOfInterestMeta bufferAddVideoRegionOfInterestMetaId(Buffer buffer, Quark roiType, int x, int y, int w, int h) AttachesGstVideoRegionOfInterestMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
roiType
- Type of the region of interest (e.g. "face")x
- X positiony
- Y positionw
- widthh
- height- Returns:
- the
GstVideoRegionOfInterestMeta
onbuffer
.
-
bufferAddVideoSeiUserDataUnregisteredMeta
public static VideoSEIUserDataUnregisteredMeta bufferAddVideoSeiUserDataUnregisteredMeta(Buffer buffer, MemorySegment uuid, MemorySegment data, long size) AttachesGstVideoSEIUserDataUnregisteredMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
uuid
- User Data Unregistered UUIDdata
- SEI User Data Unregistered buffersize
- size of the data buffer- Returns:
- the
GstVideoSEIUserDataUnregisteredMeta
onbuffer
.
-
bufferAddVideoTimeCodeMeta
AttachesGstVideoTimeCodeMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
tc
- aGstVideoTimeCode
- Returns:
- the
GstVideoTimeCodeMeta
onbuffer
, or (since 1.16)null
if the timecode was invalid.
-
bufferAddVideoTimeCodeMetaFull
public static VideoTimeCodeMeta bufferAddVideoTimeCodeMetaFull(Buffer buffer, int fpsN, int fpsD, DateTime latestDailyJam, Set<VideoTimeCodeFlags> flags, int hours, int minutes, int seconds, int frames, int fieldCount) AttachesGstVideoTimeCodeMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
fpsN
- framerate numeratorfpsD
- framerate denominatorlatestDailyJam
- aGDateTime
for the latest daily jamflags
- aGstVideoTimeCodeFlags
hours
- hours since the daily jamminutes
- minutes since the daily jamseconds
- seconds since the daily jamframes
- frames since the daily jamfieldCount
- fields since the daily jam- Returns:
- the
GstVideoTimeCodeMeta
onbuffer
, or (since 1.16)null
if the timecode was invalid.
-
bufferAddVideoTimeCodeMetaFull
public static VideoTimeCodeMeta bufferAddVideoTimeCodeMetaFull(Buffer buffer, int fpsN, int fpsD, DateTime latestDailyJam, VideoTimeCodeFlags flags, int hours, int minutes, int seconds, int frames, int fieldCount) AttachesGstVideoTimeCodeMeta
metadata tobuffer
with the given parameters.- Parameters:
buffer
- aGstBuffer
fpsN
- framerate numeratorfpsD
- framerate denominatorlatestDailyJam
- aGDateTime
for the latest daily jamflags
- aGstVideoTimeCodeFlags
hours
- hours since the daily jamminutes
- minutes since the daily jamseconds
- seconds since the daily jamframes
- frames since the daily jamfieldCount
- fields since the daily jam- Returns:
- the
GstVideoTimeCodeMeta
onbuffer
, or (since 1.16)null
if the timecode was invalid.
-
bufferGetVideoMeta
Find theGstVideoMeta
onbuffer
with the lowestid
.Buffers can contain multiple
GstVideoMeta
metadata items when dealing with multiview buffers.- Parameters:
buffer
- aGstBuffer
- Returns:
- the
GstVideoMeta
with lowest id (usually 0) ornull
when there is no such metadata onbuffer
.
-
bufferGetVideoMetaId
Find theGstVideoMeta
onbuffer
with the givenid
.Buffers can contain multiple
GstVideoMeta
metadata items when dealing with multiview buffers.- Parameters:
buffer
- aGstBuffer
id
- a metadata id- Returns:
- the
GstVideoMeta
withid
ornull
when there is no such metadata onbuffer
.
-
bufferGetVideoRegionOfInterestMetaId
Find theGstVideoRegionOfInterestMeta
onbuffer
with the givenid
.Buffers can contain multiple
GstVideoRegionOfInterestMeta
metadata items if multiple regions of interests are marked on a frame.- Parameters:
buffer
- aGstBuffer
id
- a metadata id- Returns:
- the
GstVideoRegionOfInterestMeta
withid
ornull
when there is no such metadata onbuffer
.
-
bufferPoolConfigGetVideoAlignment
Get the video alignment from the bufferpool configurationconfig
in inalign
- Parameters:
config
- aGstStructure
align
- aGstVideoAlignment
- Returns:
true
ifconfig
could be parsed correctly.
-
bufferPoolConfigSetVideoAlignment
Set the video alignment inalign
to the bufferpool configurationconfig
- Parameters:
config
- aGstStructure
align
- aGstVideoAlignment
-
isVideoOverlayPrepareWindowHandleMessage
Convenience function to check if the given message is a "prepare-window-handle" message from aGstVideoOverlay
.- Parameters:
msg
- aGstMessage
- Returns:
- whether
msg
is a "prepare-window-handle" message
-
videoAfdMetaApiGetType
-
videoAffineTransformationMetaApiGetType
-
videoBarMetaApiGetType
-
videoBlend
Lets you blend thesrc
image into thedest
image- Parameters:
dest
- TheGstVideoFrame
where to blendsrc
insrc
- theGstVideoFrame
that we want to blend intox
- The x offset in pixel where thesrc
image should be blendedy
- the y offset in pixel where thesrc
image should be blendedglobalAlpha
- the global_alpha each per-pixel alpha value is multiplied with
-
videoBlendScaleLinearRGBA
public static void videoBlendScaleLinearRGBA(VideoInfo src, Buffer srcBuffer, int destHeight, int destWidth, VideoInfo dest, Out<Buffer> destBuffer) Scales a buffer containing RGBA (or AYUV) video. This is an internal helper function which is used to scale subtitle overlays, and may be deprecated in the near future. UseGstVideoScaler
to scale video buffers instead.- Parameters:
src
- theGstVideoInfo
describing the video data insrcBuffer
srcBuffer
- the source buffer containing video pixels to scaledestHeight
- the height in pixels to scale the video data insrcBuffer
todestWidth
- the width in pixels to scale the video data insrcBuffer
todest
- pointer to aGstVideoInfo
structure that will be filled in with the details fordestBuffer
destBuffer
- a pointer to aGstBuffer
variable, which will be set to a newly-allocated buffer containing the scaled pixels.
-
videoCalculateDisplayRatio
public static boolean videoCalculateDisplayRatio(Out<Integer> darN, Out<Integer> darD, int videoWidth, int videoHeight, int videoParN, int videoParD, int displayParN, int displayParD) Given the Pixel Aspect Ratio and size of an input video frame, and the pixel aspect ratio of the intended display device, calculates the actual display ratio the video will be rendered with.- Parameters:
darN
- Numerator of the calculated display_ratiodarD
- Denominator of the calculated display_ratiovideoWidth
- Width of the video frame in pixelsvideoHeight
- Height of the video frame in pixelsvideoParN
- Numerator of the pixel aspect ratio of the input video.videoParD
- Denominator of the pixel aspect ratio of the input video.displayParN
- Numerator of the pixel aspect ratio of the display devicedisplayParD
- Denominator of the pixel aspect ratio of the display device- Returns:
- A boolean indicating success and a calculated Display Ratio in the dar_n and dar_d parameters. The return value is FALSE in the case of integer overflow or other error.
-
videoCaptionMetaApiGetType
-
videoCenterRect
public static void videoCenterRect(VideoRectangle src, VideoRectangle dst, VideoRectangle result, boolean scaling) Takessrc
rectangle and position it at the center ofdst
rectangle with or withoutscaling
. It handles clipping if thesrc
rectangle is bigger than thedst
one andscaling
is set to FALSE.- Parameters:
src
- a pointer toGstVideoRectangle
describing the source areadst
- a pointer toGstVideoRectangle
describing the destination arearesult
- a pointer to aGstVideoRectangle
which will receive the result areascaling
- agboolean
indicating if scaling should be applied or not
-
videoChromaFromString
Deprecated.Use gst_video_chroma_site_from_string() instead.Converts
to aGstVideoChromaSite
- Parameters:
s
- a chromasite string- Returns:
- a
GstVideoChromaSite
orVideoChromaSite.UNKNOWN
whens
does not contain a valid chroma description.
-
videoChromaResample
public static void videoChromaResample(VideoChromaResample resample, @Nullable @Nullable MemorySegment lines, int width) Perform resampling ofwidth
chroma pixels inlines
.- Parameters:
resample
- aGstVideoChromaResample
lines
- pixel lineswidth
- the number of pixels on one line
-
videoChromaToString
Deprecated.Use gst_video_chroma_site_to_string() instead.Convertssite
to its string representation.- Parameters:
site
- aGstVideoChromaSite
- Returns:
- a string describing
site
.
-
videoChromaToString
Deprecated.Use gst_video_chroma_site_to_string() instead.Convertssite
to its string representation.- Parameters:
site
- aGstVideoChromaSite
- Returns:
- a string describing
site
.
-
videoCodecAlphaMetaApiGetType
-
videoColorTransferDecode
Deprecated. -
videoColorTransferEncode
Deprecated. -
videoConvertSample
public static Sample videoConvertSample(Sample sample, Caps toCaps, ClockTime timeout) throws GErrorException Converts a raw video buffer into the specified output caps.The output caps can be any raw video formats or any image formats (jpeg, png, ...).
The width, height and pixel-aspect-ratio can also be specified in the output caps.
- Parameters:
sample
- aGstSample
toCaps
- theGstCaps
to convert totimeout
- the maximum amount of time allowed for the processing.- Returns:
- The converted
GstSample
, ornull
if an error happened (in which caseerr
will point to theGError
). - Throws:
GErrorException
- seeGError
-
videoConvertSampleAsync
public static void videoConvertSampleAsync(Sample sample, Caps toCaps, ClockTime timeout, VideoConvertSampleCallback callback) Converts a raw video buffer into the specified output caps.The output caps can be any raw video formats or any image formats (jpeg, png, ...).
The width, height and pixel-aspect-ratio can also be specified in the output caps.
callback
will be called after conversion, when an error occurred or if conversion didn't finish aftertimeout
.callback
will always be called from the thread defaultGMainContext
, see g_main_context_get_thread_default(). If GLib before 2.22 is used, this will always be the global default main context.destroyNotify
will be called after the callback was called anduserData
is not needed anymore.- Parameters:
sample
- aGstSample
toCaps
- theGstCaps
to convert totimeout
- the maximum amount of time allowed for the processing.callback
-GstVideoConvertSampleCallback
that will be called after conversion.
-
videoCropMetaApiGetType
-
videoDmaDrmFourccFromFormat
Converting the video format into dma drm fourcc. If no matching fourcc found, then DRM_FORMAT_INVALID is returned.- Parameters:
format
- aGstVideoFormat
- Returns:
- the DRM_FORMAT_* corresponding to the
format
.
-
videoDmaDrmFourccFromString
public static int videoDmaDrmFourccFromString(String formatStr, @Nullable @Nullable Out<Long> modifier) Convert theformatStr
string into the drm fourcc value. Themodifier
is also parsed if we want. Please note that theformatStr
should follow the fourcc:modifier kind style, such as NV12:0x0100000000000002- Parameters:
formatStr
- a drm format stringmodifier
- Return the modifier informat
ornull
to ignore.- Returns:
- The drm fourcc value or DRM_FORMAT_INVALID if
formatStr
is invalid.
-
videoDmaDrmFourccToFormat
Converting a dma drm fourcc into the video format. If no matching video format found, then GST_VIDEO_FORMAT_UNKNOWN is returned.- Parameters:
fourcc
- the dma drm value.- Returns:
- the GST_VIDEO_FORMAT_* corresponding to the
fourcc
.
-
videoDmaDrmFourccToString
Returns a string containing drm kind format, such as NV12:0x0100000000000002, or NULL otherwise.- Parameters:
fourcc
- a drm fourcc value.modifier
- the associated modifier value.- Returns:
- the drm kind string composed
of to
fourcc
andmodifier
.
-
videoEventIsForceKeyUnit
Checks if an event is a force key unit event. Returns true for both upstream and downstream force key unit events.- Parameters:
event
- AGstEvent
to check- Returns:
true
if the event is a valid force key unit event
-
videoEventNewDownstreamForceKeyUnit
public static Event videoEventNewDownstreamForceKeyUnit(ClockTime timestamp, ClockTime streamTime, ClockTime runningTime, boolean allHeaders, int count) Creates a new downstream force key unit event. A downstream force key unit event can be sent down the pipeline to request downstream elements to produce a key unit. A downstream force key unit event must also be sent when handling an upstream force key unit event to notify downstream that the latter has been handled.To parse an event created by gst_video_event_new_downstream_force_key_unit() use gst_video_event_parse_downstream_force_key_unit().
- Parameters:
timestamp
- the timestamp of the buffer that starts a new key unitstreamTime
- the stream_time of the buffer that starts a new key unitrunningTime
- the running_time of the buffer that starts a new key unitallHeaders
-true
to produce headers when starting a new key unitcount
- integer that can be used to number key units- Returns:
- The new GstEvent
-
videoEventNewStillFrame
Creates a new Still Frame event. IfinStill
istrue
, then the event represents the start of a still frame sequence. If it isfalse
, then the event ends a still frame sequence.To parse an event created by gst_video_event_new_still_frame() use gst_video_event_parse_still_frame().
- Parameters:
inStill
- boolean value for the still-frame state of the event.- Returns:
- The new GstEvent
-
videoEventNewUpstreamForceKeyUnit
public static Event videoEventNewUpstreamForceKeyUnit(ClockTime runningTime, boolean allHeaders, int count) Creates a new upstream force key unit event. An upstream force key unit event can be sent to request upstream elements to produce a key unit.runningTime
can be set to request a new key unit at a specific running_time. If set to GST_CLOCK_TIME_NONE, upstream elements will produce a new key unit as soon as possible.To parse an event created by gst_video_event_new_downstream_force_key_unit() use gst_video_event_parse_downstream_force_key_unit().
- Parameters:
runningTime
- the running_time at which a new key unit should be producedallHeaders
-true
to produce headers when starting a new key unitcount
- integer that can be used to number key units- Returns:
- The new GstEvent
-
videoEventParseDownstreamForceKeyUnit
public static boolean videoEventParseDownstreamForceKeyUnit(Event event, ClockTime timestamp, ClockTime streamTime, ClockTime runningTime, Out<Boolean> allHeaders, Out<Integer> count) Get timestamp, stream-time, running-time, all-headers and count in the force key unit event. See gst_video_event_new_downstream_force_key_unit() for a full description of the downstream force key unit event.runningTime
will be adjusted for any pad offsets of pads it was passing through.- Parameters:
event
- AGstEvent
to parsetimestamp
- A pointer to the timestamp in the eventstreamTime
- A pointer to the stream-time in the eventrunningTime
- A pointer to the running-time in the eventallHeaders
- A pointer to the all_headers flag in the eventcount
- A pointer to the count field of the event- Returns:
true
if the event is a valid downstream force key unit event.
-
videoEventParseStillFrame
Parse aGstEvent
, identify if it is a Still Frame event, and return the still-frame state from the event if it is. If the event represents the start of a still frame, the in_still variable will be set to TRUE, otherwise FALSE. It is OK to pass NULL for the in_still variable order to just check whether the event is a valid still-frame event.Create a still frame event using gst_video_event_new_still_frame()
- Parameters:
event
- AGstEvent
to parseinStill
- A boolean to receive the still-frame status from the event, or NULL- Returns:
true
if the event is a valid still-frame event.false
if not
-
videoEventParseUpstreamForceKeyUnit
public static boolean videoEventParseUpstreamForceKeyUnit(Event event, ClockTime runningTime, Out<Boolean> allHeaders, Out<Integer> count) Get running-time, all-headers and count in the force key unit event. See gst_video_event_new_upstream_force_key_unit() for a full description of the upstream force key unit event.Create an upstream force key unit event using gst_video_event_new_upstream_force_key_unit()
runningTime
will be adjusted for any pad offsets of pads it was passing through.- Parameters:
event
- AGstEvent
to parserunningTime
- A pointer to the running_time in the eventallHeaders
- A pointer to the all_headers flag in the eventcount
- A pointer to the count field in the event- Returns:
true
if the event is a valid upstream force-key-unit event.false
if not
-
videoFormatsAny
Return all the raw video formats supported by GStreamer including special opaque formats such asVideoFormat.DMA_DRM
for which no software conversion exists. This should be use for passthrough template cpas.- Returns:
- an array of
GstVideoFormat
-
videoFormatsRaw
Return all the raw video formats supported by GStreamer.- Returns:
- an array of
GstVideoFormat
-
videoGlTextureUploadMetaApiGetType
-
videoGuessFramerate
public static boolean videoGuessFramerate(ClockTime duration, @Nullable @Nullable Out<Integer> destN, @Nullable @Nullable Out<Integer> destD) Given the nominal duration of one video frame, this function will check some standard framerates for a close match (within 0.1%) and return one if possible,It will calculate an arbitrary framerate if no close match was found, and return
false
.It returns
false
if a duration of 0 is passed.- Parameters:
duration
- Nominal duration of one framedestN
- Numerator of the calculated frameratedestD
- Denominator of the calculated framerate- Returns:
true
if a close "standard" framerate was recognised, andfalse
otherwise.
-
videoIsCommonAspectRatio
public static boolean videoIsCommonAspectRatio(int width, int height, int parN, int parD) Given a frame's dimensions and pixel aspect ratio, this function will calculate the frame's aspect ratio and compare it against a set of common well-known "standard" aspect ratios.- Parameters:
width
- Width of the video frameheight
- Height of the video frameparN
- Pixel aspect ratio numeratorparD
- Pixel aspect ratio denominator- Returns:
true
if a known "standard" aspect ratio was recognised, andfalse
otherwise.
-
videoIsDmaDrmCaps
Check whether thecaps
is a dma drm kind caps. Please note that the caps should be fixed.- Parameters:
caps
- aGstCaps
- Returns:
true
if the caps is a dma drm caps.
-
videoMakeRawCaps
Return a generic raw video caps for formats defined informats
. Ifformats
isnull
returns a caps for all the supported raw video formats, see gst_video_formats_raw().- Parameters:
formats
- an array of rawGstVideoFormat
, ornull
- Returns:
- a video
GstCaps
-
videoMakeRawCapsWithFeatures
public static Caps videoMakeRawCapsWithFeatures(@Nullable @Nullable VideoFormat[] formats, @Nullable @Nullable CapsFeatures features) Return a generic raw video caps for formats defined informats
with featuresfeatures
. Ifformats
isnull
returns a caps for all the supported video formats, see gst_video_formats_raw().- Parameters:
formats
- an array of rawGstVideoFormat
, ornull
features
- theGstCapsFeatures
to set on the caps- Returns:
- a video
GstCaps
-
videoMetaApiGetType
-
videoMultiviewGetDoubledHeightModes
-
videoMultiviewGetDoubledSizeModes
-
videoMultiviewGetDoubledWidthModes
-
videoMultiviewGetMonoModes
-
videoMultiviewGetUnpackedModes
-
videoMultiviewGuessHalfAspect
public static boolean videoMultiviewGuessHalfAspect(VideoMultiviewMode mvMode, int width, int height, int parN, int parD) -
videoMultiviewVideoInfoChangeMode
public static void videoMultiviewVideoInfoChangeMode(VideoInfo info, VideoMultiviewMode outMviewMode, Set<VideoMultiviewFlags> outMviewFlags) Utility function that transforms the width/height/PAR and multiview mode and flags of aGstVideoInfo
into the requested mode.- Parameters:
info
- AGstVideoInfo
structure to operate onoutMviewMode
- AGstVideoMultiviewMode
valueoutMviewFlags
- A set ofGstVideoMultiviewFlags
-
videoMultiviewVideoInfoChangeMode
public static void videoMultiviewVideoInfoChangeMode(VideoInfo info, VideoMultiviewMode outMviewMode, VideoMultiviewFlags... outMviewFlags) Utility function that transforms the width/height/PAR and multiview mode and flags of aGstVideoInfo
into the requested mode.- Parameters:
info
- AGstVideoInfo
structure to operate onoutMviewMode
- AGstVideoMultiviewMode
valueoutMviewFlags
- A set ofGstVideoMultiviewFlags
-
videoOverlayCompositionMetaApiGetType
-
videoRegionOfInterestMetaApiGetType
-
videoSeiUserDataUnregisteredMetaApiGetType
-
videoSeiUserDataUnregisteredParsePrecisionTimeStamp
public static boolean videoSeiUserDataUnregisteredParsePrecisionTimeStamp(VideoSEIUserDataUnregisteredMeta userData, Out<Byte> status, Out<Long> precisionTimeStamp) Parses and returns the Precision Time Stamp (ST 0604) from the SEI User Data Unregistered buffer- Parameters:
userData
- aGstVideoSEIUserDataUnregisteredMeta
status
- User Data Unregistered UUIDprecisionTimeStamp
- The parsed Precision Time Stamp SEI- Returns:
- True if data is a Precision Time Stamp and it was parsed correctly
-
videoTileGetIndex
Get the tile index of the tile at coordinatesx
andy
in the tiled image ofxTiles
byyTiles
.Use this method when
mode
is of typeVideoTileType.INDEXED
.- Parameters:
mode
- aGstVideoTileMode
x
- x coordinatey
- y coordinatexTiles
- number of horizintal tilesyTiles
- number of vertical tiles- Returns:
- the index of the tile at
x
andy
in the tiled image ofxTiles
byyTiles
.
-
videoTimeCodeMetaApiGetType
-