public class VPX extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
CODEC_CX_FRAME_PKT
Compressed video frame packet type.
|
static int |
CODEC_LIST_END
An iterator reached the end of list.
|
static int |
CODEC_OK
Operation completed without error.
|
static int |
CODEC_USE_OUTPUT_PARTITION
Output one partition at a time.
|
static int |
CODEC_USE_XMA
Use eXternal Memory Allocation mode flag
Corresponds to VPX_CODEC_USE_XMA from vpx/vpx_codec.h
|
static int |
DL_REALTIME
Process and return as soon as possible ('realtime' deadline)
Corresponds to VPX_DL_REALTIME from vpx/vpx_encoder.h
|
static int |
ERROR_RESILIENT_DEFAULT
Improve resiliency against losses of whole frames.
|
static int |
ERROR_RESILIENT_PARTITIONS
The frame partitions are independently decodable by the bool decoder,
meaning that partitions can be decoded even though earlier partitions
have been lost.
|
static int |
IMG_FMT_I420
I420 format constant
Corresponds to VPX_IMG_FMT_I420 from vpx/vpx_image.h
|
static int |
INTEFACE_VP8_DEC
Constant for VP8 decoder interface
|
static int |
INTERFACE_VP8_ENC
Constant for VP8 encoder interface
|
static int |
KF_MODE_AUTO
Encoder determines optimal placement automatically.
|
static int |
KF_MODE_DISABLED
Encoder does not place keyframes.
|
static int |
RC_MODE_CBR
Constant Bitrate mode.
|
static int |
RC_MODE_CQ
Constant Quality mode.
|
static int |
RC_MODE_VBR
Variable Bitrate mode.
|
| Constructor and Description |
|---|
VPX() |
| Modifier and Type | Method and Description |
|---|---|
static long |
codec_ctx_malloc()
Allocates memory for a vpx_codec_ctx_t on the heap.
|
static long |
codec_cx_pkt_get_data(long pkt)
Returns a pointer to the data in the vpx_codec_cx_pkt_t pointed
to bypkt.
|
static int |
codec_cx_pkt_get_kind(long pkt)
Returns the kind of the vpx_codec_cx_pkt_t pointed to
by pkt.
|
static int |
codec_cx_pkt_get_size(long pkt)
Returns the size of the data in the vpx_codec_cx_pkt_t pointed
to by pkt.
|
static long |
codec_dec_cfg_malloc()
Allocates memory for a vpx_codec_dec_cfg_t on the heap.
|
static void |
codec_dec_cfg_set_h(long cfg,
int value)
Sets the h field of a vpx_codec_dec_cfg_t.
|
static void |
codec_dec_cfg_set_w(long cfg,
int value)
Sets the w field of a vpx_codec_dec_cfg_t.
|
static int |
codec_dec_init(long context,
int iface,
long cfg,
long flags)
Initializes a vpx decoder context.
|
static int |
codec_decode(long context,
byte[] buf,
int buf_offset,
int buf_size,
long user_priv,
long deadline)
Decodes the frame in buf, at offset buf_offset.
|
static int |
codec_destroy(long context)
Destroys a codec context, freeing any associated memory buffers.
|
static long |
codec_enc_cfg_malloc()
Allocates memory for a vpx_codec_enc_cfg_t on the heap.
|
static void |
codec_enc_cfg_set_error_resilient(long cfg,
int value)
Sets the g_error_resilient field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_h(long cfg,
int value)
Sets the g_h field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_kf_max_dist(long cfg,
int value)
Sets the kf_max_dist field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_kf_min_dist(long cfg,
int value)
Sets the kf_min_dist field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_kf_mode(long cfg,
int value)
Sets the kf_mode field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_profile(long cfg,
int value)
Sets the g_profile field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_buf_initial_sz(long cfg,
int value)
Sets the rc_buf_initial_sz field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_buf_optimal_sz(long cfg,
int value)
Sets the rc_buf_optimal_sz field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_buf_sz(long cfg,
int value)
Sets the rc_buf_sz field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_dropframe_thresh(long cfg,
int value)
Sets the rc_dropframe_thresh field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_end_usage(long cfg,
int value)
Sets the rc_end_usage field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_max_quantizer(long cfg,
int value)
Sets the rc_max_quantizer field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_min_quantizer(long cfg,
int value)
Sets the rc_min_quantizer field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_overshoot_pct(long cfg,
int value)
Sets the rc_overshoot_pct field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_resize_allowed(long cfg,
int value)
Sets the rc_resize_allowed field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_resize_down_thresh(long cfg,
int value)
Sets the rc_resize_down_thresh field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_resize_up_thresh(long cfg,
int value)
Sets the rc_resize_up_thresh field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_target_bitrate(long cfg,
int value)
Sets the rc_target_bitrate field of a
vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_rc_undershoot_pct(long cfg,
int value)
Sets the rc_undershoot_pct field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_threads(long cfg,
int value)
Sets the g_threads field of a vpx_codec_enc_cfg_t.
|
static void |
codec_enc_cfg_set_w(long cfg,
int value)
Sets the g_w field of a vpx_codec_enc_cfg_t.
|
static int |
codec_enc_config_default(int iface,
long cfg,
int usage)
Initializes a encoder configuration structure with default values.
|
static int |
codec_enc_config_set(long context,
long cfg) |
static int |
codec_enc_init(long context,
int iface,
long cfg,
long flags)
Initializes a vpx encoder context.
|
static int |
codec_encode(long context,
long img,
byte[] buf,
int offset0,
int offset1,
int offset2,
long pts,
long duration,
long flags,
long deadline)
Encodes the frame described by img, buf,
offset0, offset1 and offset2.
|
static String |
codec_err_to_string(int err)
Returns a String describing the error code err.
|
static int |
codec_err_to_string(int err,
byte[] buf,
int buf_size)
Fills in buf with a string description of the error code
err.
|
static long |
codec_get_cx_data(long context,
long[] iter)
Encoded data iterator.
|
static long |
codec_get_frame(long context,
long[] iter)
Gets the next frame available to display from the decoder context
context.
|
static int |
codec_peek_stream_info(int iface,
byte[] buf,
int buf_offset,
int buf_size,
long si_ptr)
Performs high level parsing of the bitstream.
|
static void |
free(long ptr)
Frees memory, which has been allocated with
malloc(long) or
one of the *_malloc() functions. |
static int |
img_get_d_h(long img)
Returns the value of the d_h (displayed height) field of a
vpx_image_t.
|
static int |
img_get_d_w(long img)
Returns the value of the d_w (displayed width) field of a
vpx_image_t.
|
static int |
img_get_fmt(long img)
Returns the value of the fmt field of a
vpx_image_t.
|
static int |
img_get_h(long img)
Returns the value of the h (height) field of a
vpx_image_t.
|
static long |
img_get_plane0(long img)
Returns the value of the planes[0] field of a
vpx_image_t.
|
static long |
img_get_plane1(long img)
Returns the value of the planes[1] field of a
vpx_image_t.
|
static long |
img_get_plane2(long img)
Returns the value of the planes[2] field of a
vpx_image_t.
|
static int |
img_get_stride0(long img)
Returns the value of the stride[0] field of a
vpx_image_t.
|
static int |
img_get_stride1(long img)
Returns the value of the stride[1] field of a
vpx_image_t.
|
static int |
img_get_stride2(long img)
Returns the value of the stride[2] field of a
vpx_image_t.
|
static int |
img_get_w(long img)
Returns the value of the w (width) field of a
vpx_image_t.
|
static long |
img_malloc()
Allocates memory for a vpx_image_t on the heap.
|
static void |
img_set_bps(long img,
int value)
Sets the bps (bits per sample) field of a vpx_image_t.
|
static void |
img_set_d_h(long img,
int value)
Sets the d_h (displayed height) field of a vpx_image_t.
|
static void |
img_set_d_w(long img,
int value)
Sets the d_w (displayed width) field of a vpx_image_t.
|
static void |
img_set_fmt(long img,
int value)
Sets the fmt (format) field of a vpx_image_t.
|
static void |
img_set_h(long img,
int value)
Sets the h (height) field of a vpx_image_t.
|
static void |
img_set_stride0(long img,
int value)
Sets the stride[0] field of a vpx_image_t.
|
static void |
img_set_stride1(long img,
int value)
Sets the stride[1] field of a vpx_image_t.
|
static void |
img_set_stride2(long img,
int value)
Sets the stride[2] field of a vpx_image_t.
|
static void |
img_set_stride3(long img,
int value)
Sets the stride[3] field of a vpx_image_t.
|
static void |
img_set_w(long img,
int value)
Sets the w (width) field of a vpx_image_t.
|
static void |
img_wrap(long img,
int fmt,
int d_w,
int d_h,
int align,
long data)
Open a descriptor, using existing storage for the underlying image.
|
static long |
malloc(long s)
Allocates memorry on the heap (a simple wrapped around the native
malloc())
|
static void |
memcpy(byte[] dst,
long src,
int n)
Copies n bytes from src to dst.
|
static int |
stream_info_get_h(long stream_info)
Returns the h field of a vpx_codec_stream_info_t.
|
static int |
stream_info_get_is_kf(long stream_info)
Returns the is_kf field of a vpx_codec_stream_info_t.
|
static int |
stream_info_get_w(long stream_info)
Returns the w field of a vpx_codec_stream_info_t.
|
static long |
stream_info_malloc()
Allocates memory for a vpx_codec_stream_info_t on the heap.
|
public static final int CODEC_OK
public static final int CODEC_LIST_END
public static final int CODEC_USE_XMA
public static final int CODEC_USE_OUTPUT_PARTITION
public static final int ERROR_RESILIENT_DEFAULT
public static final int ERROR_RESILIENT_PARTITIONS
public static final int IMG_FMT_I420
public static final int RC_MODE_VBR
public static final int RC_MODE_CBR
public static final int RC_MODE_CQ
public static final int KF_MODE_AUTO
public static final int KF_MODE_DISABLED
public static final int DL_REALTIME
public static final int CODEC_CX_FRAME_PKT
public static final int INTEFACE_VP8_DEC
public static final int INTERFACE_VP8_ENC
public static long codec_ctx_malloc()
public static int codec_dec_init(long context,
int iface,
long cfg,
long flags)
context - Pointer to a pre-allocated vpx_codec_ctx_t.iface - Interface to be used. Has to be one of the
VPX.INTERFACE_* constants.cfg - Pointer to a pre-allocated vpx_codec_dec_cfg_t, may
be 0.flags - Flags.codec_err_to_string(int)public static int codec_decode(long context,
byte[] buf,
int buf_offset,
int buf_size,
long user_priv,
long deadline)
context - The context to use.buf - Encoded frame buffer.buf_offset - Offset into buf where the encoded frame begins.buf_size - Size of the encoded frame.user_priv - Application specific data to associate with this frame.deadline - Soft deadline the decoder should attempt to meet,
in microseconds. Set to zero for unlimited.codec_err_to_string(int)public static long codec_get_frame(long context,
long[] iter)
context - The decoder context to use.iter - Iterator storage, initialized by setting its first element
to 0.public static int codec_destroy(long context)
context - Pointer to the vpx_codec_ctx_t context to destroy.codec_err_to_string(int)public static int codec_enc_init(long context,
int iface,
long cfg,
long flags)
context - Pointer to a pre-allocated vpx_codec_ctx_t.iface - Interface to be used. Has to be one of the
VPX.INTERFACE_* constants.cfg - Pointer to a pre-allocated vpx_codec_enc_cfg_t,
may be 0.flags - Flags.codec_err_to_string(int)public static int codec_enc_config_set(long context,
long cfg)
context - Pointer to the codec context on which to set the
confirutationcfg - Pointer to a vpx_codec_enc_cfg_t to set.codec_err_to_string(int)public static int codec_encode(long context,
long img,
byte[] buf,
int offset0,
int offset1,
int offset2,
long pts,
long duration,
long flags,
long deadline)
context - Pointer to the codec context to use.img - Pointer to a vpx_image_t describing the raw framebuf - Contains the raw frameoffset0 - Offset of the first planeoffset1 - Offset of the second planeoffset2 - Offset of the third planepts - Presentation time stamp, in timebase units.duration - Duration to show frame, in timebase units.flags - Flags to use for encoding this frame.deadline - Time to spend encoding, in microseconds. (0=infinite)codec_err_to_string(int)public static long codec_get_cx_data(long context,
long[] iter)
codec_cx_pkt_get_kind(long)
Packets of kind CODEC_CX_FRAME_PKT should be passed to the
application's muxer.context - The codec context to use.iter - Iterator storage, initialized by setting its first element
to 0.public static int codec_cx_pkt_get_kind(long pkt)
pkt - Pointer to the vpx_codec_cx_pkt_t to return the
kind of.public static int codec_cx_pkt_get_size(long pkt)
pkt - Pointer to a vpx_codec_cx_pkt_t.public static long codec_cx_pkt_get_data(long pkt)
pkt - Pointer to the vpx_codec_cx_pkt_t.public static long img_malloc()
public static int img_get_w(long img)
img - Pointer to a vpx_image_t.public static int img_get_h(long img)
img - Pointer to a vpx_image_t.public static int img_get_d_w(long img)
img - Pointer to a vpx_image_t.public static int img_get_d_h(long img)
img - Pointer to a vpx_image_t.public static long img_get_plane0(long img)
img - Pointer to a vpx_image_t.public static long img_get_plane1(long img)
img - Pointer to a vpx_image_t.public static long img_get_plane2(long img)
img - Pointer to a vpx_image_t.public static int img_get_stride0(long img)
img - Pointer to a vpx_image_t.public static int img_get_stride1(long img)
img - Pointer to a vpx_image_t.public static int img_get_stride2(long img)
img - Pointer to a vpx_image_t.public static int img_get_fmt(long img)
img - Pointer to a vpx_image_t.public static void img_set_w(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_h(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_d_w(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_d_h(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_stride0(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_stride1(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_stride2(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_stride3(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_fmt(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_set_bps(long img,
int value)
img - Pointer to a vpx_image_t.value - The value to set.public static void img_wrap(long img,
int fmt,
int d_w,
int d_h,
int align,
long data)
img - Pointer to a vpx_image_t.fmt - Format of the image.d_w - Width of the image.d_h - Height of the image.align - Alignment, in bytes, of each row in the image.data - Storage to use for the imagepublic static long codec_dec_cfg_malloc()
public static void codec_dec_cfg_set_w(long cfg,
int value)
cfg - Pointer to a vpx_codec_dec_cfg_t.value - The value to set.public static void codec_dec_cfg_set_h(long cfg,
int value)
cfg - Pointer to a vpx_codec_dec_cfg_t.value - The value to set.public static long codec_enc_cfg_malloc()
public static int codec_enc_config_default(int iface,
long cfg,
int usage)
iface - Interface. Should be one of the INTERFACE_*
constantscfg - Pointer to the vpx_codec_enc_cfg_t to initializeusage - End usage. Set to 0 or use codec specific values.codec_err_to_string(int)public static void codec_enc_cfg_set_profile(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_tvalue - The value to set.public static void codec_enc_cfg_set_threads(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_w(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_h(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_error_resilient(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_target_bitrate(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_dropframe_thresh(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_resize_allowed(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_resize_up_thresh(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_resize_down_thresh(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_end_usage(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_min_quantizer(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_max_quantizer(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_undershoot_pct(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_overshoot_pct(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_buf_sz(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_buf_initial_sz(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_rc_buf_optimal_sz(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_kf_mode(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_kf_min_dist(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static void codec_enc_cfg_set_kf_max_dist(long cfg,
int value)
cfg - Pointer to a vpx_codec_enc_cfg_t.value - The value to set.public static long stream_info_malloc()
public static int stream_info_get_w(long stream_info)
stream_info - Pointer to a vpx_codec_stream_info_t.public static int stream_info_get_h(long stream_info)
stream_info - Pointer to a vpx_codec_stream_info_t.public static int stream_info_get_is_kf(long stream_info)
stream_info - Pointer to a vpx_codec_stream_info_t.public static int codec_peek_stream_info(int iface,
byte[] buf,
int buf_offset,
int buf_size,
long si_ptr)
iface - Interface, should be one of the INTERFACE_*
constants.buf - Buffer containing a compressed frame.buf_offset - Offset into buf where the compressed frame
begins.buf_size - Size of the compressed frame.si_ptr - Pointer to a vpx_codec_stream_info_t which will
be filled with information about the compressed frame.codec_err_to_string(int)public static long malloc(long s)
s - Number of bytes to allocatepublic static void free(long ptr)
malloc(long) or
one of the *_malloc() functions.ptr - Pointer to the memory to free.public static void memcpy(byte[] dst,
long src,
int n)
dst - Destination.src - Source.n - Number of bytes to copy.public static int codec_err_to_string(int err,
byte[] buf,
int buf_size)
err - Error codebuf - Buffer to copy the string intobuf_size - Buffer sizepublic static String codec_err_to_string(int err)
err - Error codeCopyright © 2021 jitsi.org. All rights reserved.