public abstract class AbstractVideoEncoder extends AbstractEncoder
| Modifier and Type | Field and Description |
|---|---|
protected int |
mBitRate |
protected int |
mColorFormat |
protected int |
mFramerate |
protected int |
mHeight |
protected int |
mIFrameIntervals |
static java.lang.String |
MIME_AVC |
protected int |
mWidth |
static int |
OMX_COLOR_Format12bitRGB444 |
static int |
OMX_COLOR_Format16bitARGB1555 |
static int |
OMX_COLOR_Format16bitARGB4444 |
static int |
OMX_COLOR_Format16bitBGR565 |
static int |
OMX_COLOR_Format16bitRGB565 |
static int |
OMX_COLOR_Format18bitARGB1665 |
static int |
OMX_COLOR_Format18BitBGR666 |
static int |
OMX_COLOR_Format18bitRGB666 |
static int |
OMX_COLOR_Format19bitARGB1666 |
static int |
OMX_COLOR_Format24BitABGR6666 |
static int |
OMX_COLOR_Format24bitARGB1887 |
static int |
OMX_COLOR_Format24BitARGB6666 |
static int |
OMX_COLOR_Format24bitBGR888 |
static int |
OMX_COLOR_Format24bitRGB888 |
static int |
OMX_COLOR_Format25bitARGB1888 |
static int |
OMX_COLOR_Format32bitARGB8888 |
static int |
OMX_COLOR_Format32bitBGRA8888 |
static int |
OMX_COLOR_Format8bitRGB332 |
static int |
OMX_COLOR_FormatAndroidOpaque |
static int |
OMX_COLOR_FormatCbYCrY |
static int |
OMX_COLOR_FormatCrYCbY |
static int |
OMX_COLOR_FormatKhronosExtensions |
static int |
OMX_COLOR_FormatL16 |
static int |
OMX_COLOR_FormatL2 |
static int |
OMX_COLOR_FormatL24 |
static int |
OMX_COLOR_FormatL32 |
static int |
OMX_COLOR_FormatL4 |
static int |
OMX_COLOR_FormatL8 |
static int |
OMX_COLOR_FormatMax |
static int |
OMX_COLOR_FormatMonochrome |
static int |
OMX_COLOR_FormatRawBayer10bit |
static int |
OMX_COLOR_FormatRawBayer8bit |
static int |
OMX_COLOR_FormatRawBayer8bitcompressed |
static int |
OMX_COLOR_FormatUnused
非圧縮image/videoで使用可能なカラーフォーマット
from OMX_IVCommon.h
MediaCodecInfo.CodecCapabilities.COLOR_FormatXXXに一部のものは定義されている
Unused : Placeholder value when format is N/A
Monochrome : black and white
8bitRGB332 : Red 7:5, Green 4:2, Blue 1:0
12bitRGB444 : Red 11:8, Green 7:4, Blue 3:0
16bitARGB4444 : Alpha 15:12, Red 11:8, Green 7:4, Blue 3:0
16bitARGB1555 : Alpha 15, Red 14:10, Green 9:5, Blue 4:0
16bitRGB565 : Red 15:11, Green 10:5, Blue 4:0
16bitBGR565 : Blue 15:11, Green 10:5, Red 4:0
18bitRGB666 : Red 17:12, Green 11:6, Blue 5:0
18bitARGB1665 : Alpha 17, Red 16:11, Green 10:5, Blue 4:0
19bitARGB1666 : Alpha 18, Red 17:12, Green 11:6, Blue 5:0
24bitRGB888 : Red 24:16, Green 15:8, Blue 7:0
24bitBGR888 : Blue 24:16, Green 15:8, Red 7:0
24bitARGB1887 : Alpha 23, Red 22:15, Green 14:7, Blue 6:0
25bitARGB1888 : Alpha 24, Red 23:16, Green 15:8, Blue 7:0
32bitBGRA8888 : Blue 31:24, Green 23:16, Red 15:8, Alpha 7:0
32bitARGB8888 : Alpha 31:24, Red 23:16, Green 15:8, Blue 7:0
YUV411Planar : U,Y are subsampled by a factor of 4 horizontally
YUV411PackedPlanar : packed per payload in planar slices
YUV420Planar : Three arrays Y,U,V.
|
static int |
OMX_COLOR_FormatVendorStartUnused |
static int |
OMX_COLOR_FormatYCbYCr |
static int |
OMX_COLOR_FormatYCrYCb |
static int |
OMX_COLOR_FormatYUV411PackedPlanar |
static int |
OMX_COLOR_FormatYUV411Planar |
static int |
OMX_COLOR_FormatYUV420PackedPlanar |
static int |
OMX_COLOR_FormatYUV420PackedSemiPlanar |
static int |
OMX_COLOR_FormatYUV420Planar |
static int |
OMX_COLOR_FormatYUV420SemiPlanar |
static int |
OMX_COLOR_FormatYUV422PackedPlanar |
static int |
OMX_COLOR_FormatYUV422PackedSemiPlanar |
static int |
OMX_COLOR_FormatYUV422Planar |
static int |
OMX_COLOR_FormatYUV422SemiPlanar |
static int |
OMX_COLOR_FormatYUV444Interleaved |
static int |
OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m |
static int |
OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka |
static int |
OMX_QCOM_COLOR_FormatYVU420SemiPlanar |
static int |
OMX_SEC_COLOR_FormatNV12Tiled |
static int |
OMX_TI_COLOR_FormatYUV420PackedSemiPlanar |
static int[] |
recognizedFormats
使用可能なカラーフォーマットを設定
|
static boolean |
supportsAdaptiveStreaming |
MIME_TYPE, mIsCapturing, mIsEOS, mMediaCodec, mRecorderStarted, mRequestStop, mSync, mTrackIndex, START_MARK, TIMEOUT_USEC| Constructor and Description |
|---|
AbstractVideoEncoder(java.lang.String mime,
IRecorder recorder,
EncoderListener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustBitrate(int targetBitrate) |
protected android.media.MediaFormat |
createOutputFormat(byte[] csd,
int size,
int ix0,
int ix1) |
static void |
dumpVideoCodecEncoders() |
abstract int |
getCaptureFormat() |
int |
getHeight() |
abstract android.view.Surface |
getInputSurface() |
int |
getWidth() |
boolean |
isAudio() |
protected static boolean |
isSemiPlanarYUV(int colorFormat)
Returns true if the specified color format is semi-planar YUV.
|
android.media.MediaCodecInfo |
selectVideoCodec(java.lang.String mimeType)
指定したMIMEで使用可能がcodecの一覧の中から先頭のものを取得する
もし使用可能なのがなければnullを返す
|
void |
setVideoConfig(int bitRate,
int frameRate,
int iFrameIntervals) |
void |
setVideoSize(int width,
int height)
動画サイズをセット
ビットレートもサイズとVideoConfigの設定値に合わせて変更される
|
byteComp, callOnError, callOnStartEncode, checkProfileLevel, dumpProfileLevel, encode, encode, finalize, frameAvailableSoon, getCodecCapabilities, getCodecCount, getCodecInfoAt, getCodecs, getInputPTSUs, getNextOutputPTSUs, getOutputPath, getProfileLevelString, getRecorder, isCapturing, release, run, signalEndOfInputStream, start, startRecorder, stop, stopRecorderpublic static final java.lang.String MIME_AVC
public static final int OMX_COLOR_FormatUnused
public static final int OMX_COLOR_FormatMonochrome
public static final int OMX_COLOR_Format8bitRGB332
public static final int OMX_COLOR_Format12bitRGB444
public static final int OMX_COLOR_Format16bitARGB4444
public static final int OMX_COLOR_Format16bitARGB1555
public static final int OMX_COLOR_Format16bitRGB565
public static final int OMX_COLOR_Format16bitBGR565
public static final int OMX_COLOR_Format18bitRGB666
public static final int OMX_COLOR_Format18bitARGB1665
public static final int OMX_COLOR_Format19bitARGB1666
public static final int OMX_COLOR_Format24bitRGB888
public static final int OMX_COLOR_Format24bitBGR888
public static final int OMX_COLOR_Format24bitARGB1887
public static final int OMX_COLOR_Format25bitARGB1888
public static final int OMX_COLOR_Format32bitBGRA8888
public static final int OMX_COLOR_Format32bitARGB8888
public static final int OMX_COLOR_FormatYUV411Planar
public static final int OMX_COLOR_FormatYUV411PackedPlanar
public static final int OMX_COLOR_FormatYUV420Planar
public static final int OMX_COLOR_FormatYUV420PackedPlanar
public static final int OMX_COLOR_FormatYUV420SemiPlanar
public static final int OMX_COLOR_FormatYUV422Planar
public static final int OMX_COLOR_FormatYUV422PackedPlanar
public static final int OMX_COLOR_FormatYUV422SemiPlanar
public static final int OMX_COLOR_FormatYCbYCr
public static final int OMX_COLOR_FormatYCrYCb
public static final int OMX_COLOR_FormatCbYCrY
public static final int OMX_COLOR_FormatCrYCbY
public static final int OMX_COLOR_FormatYUV444Interleaved
public static final int OMX_COLOR_FormatRawBayer8bit
public static final int OMX_COLOR_FormatRawBayer10bit
public static final int OMX_COLOR_FormatRawBayer8bitcompressed
public static final int OMX_COLOR_FormatL2
public static final int OMX_COLOR_FormatL4
public static final int OMX_COLOR_FormatL8
public static final int OMX_COLOR_FormatL16
public static final int OMX_COLOR_FormatL24
public static final int OMX_COLOR_FormatL32
public static final int OMX_COLOR_FormatYUV420PackedSemiPlanar
public static final int OMX_COLOR_FormatYUV422PackedSemiPlanar
public static final int OMX_COLOR_Format18BitBGR666
public static final int OMX_COLOR_Format24BitARGB6666
public static final int OMX_COLOR_Format24BitABGR6666
public static final int OMX_COLOR_FormatKhronosExtensions
public static final int OMX_COLOR_FormatVendorStartUnused
public static final int OMX_COLOR_FormatAndroidOpaque
public static final int OMX_TI_COLOR_FormatYUV420PackedSemiPlanar
public static final int OMX_QCOM_COLOR_FormatYVU420SemiPlanar
public static final int OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka
public static final int OMX_SEC_COLOR_FormatNV12Tiled
public static final int OMX_QCOM_COLOR_FormatYUV420PackedSemiPlanar32m
public static final int OMX_COLOR_FormatMax
protected int mColorFormat
protected int mWidth
protected int mHeight
protected int mBitRate
protected int mFramerate
protected int mIFrameIntervals
public static int[] recognizedFormats
public static boolean supportsAdaptiveStreaming
public AbstractVideoEncoder(java.lang.String mime,
IRecorder recorder,
EncoderListener listener)
public void setVideoSize(int width,
int height)
width - height - public void setVideoConfig(int bitRate,
int frameRate,
int iFrameIntervals)
public int getWidth()
public int getHeight()
public abstract int getCaptureFormat()
public abstract android.view.Surface getInputSurface()
public final android.media.MediaCodecInfo selectVideoCodec(java.lang.String mimeType)
public final boolean isAudio()
public void adjustBitrate(int targetBitrate)
protected android.media.MediaFormat createOutputFormat(byte[] csd,
int size,
int ix0,
int ix1)
createOutputFormat in class AbstractEncoderpublic static final void dumpVideoCodecEncoders()
protected static final boolean isSemiPlanarYUV(int colorFormat)