/frameworks/support/heifwriter/src/main/java/androidx/heifwriter/ |
D | HeifEncoder.java | 29 import android.media.MediaFormat; 132 @NonNull HeifEncoder encoder, @NonNull MediaFormat format); in onOutputFormatChanged() 189 mEncoder = MediaCodec.createEncoderByType(MediaFormat.MIMETYPE_IMAGE_ANDROID_HEIC); in HeifEncoder() 191 MediaFormat.MIMETYPE_IMAGE_ANDROID_HEIC); in HeifEncoder() 200 mEncoder = MediaCodec.createEncoderByType(MediaFormat.MIMETYPE_VIDEO_HEVC); in HeifEncoder() 201 caps = mEncoder.getCodecInfo().getCapabilitiesForType(MediaFormat.MIMETYPE_VIDEO_HEVC); in HeifEncoder() 242 MediaFormat codecFormat; in HeifEncoder() 244 codecFormat = MediaFormat.createVideoFormat( in HeifEncoder() 245 MediaFormat.MIMETYPE_IMAGE_ANDROID_HEIC, mWidth, mHeight); in HeifEncoder() 247 codecFormat = MediaFormat.createVideoFormat( in HeifEncoder() [all …]
|
D | HeifWriter.java | 24 import android.media.MediaFormat; 309 MediaFormat format = MediaFormat.createVideoFormat( in HeifWriter() 310 MediaFormat.MIMETYPE_IMAGE_ANDROID_HEIC, width, height); in HeifWriter() 496 @NonNull HeifEncoder encoder, @NonNull MediaFormat format) { in onOutputFormatChanged() 509 int gridRows = format.getInteger(MediaFormat.KEY_GRID_ROWS); in onOutputFormatChanged() 510 int gridCols = format.getInteger(MediaFormat.KEY_GRID_COLUMNS); in onOutputFormatChanged() 526 format.setInteger(MediaFormat.KEY_IS_DEFAULT, (i == mPrimaryIndex) ? 1 : 0); in onOutputFormatChanged()
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/decoder/ |
D | DecoderUtil.java | 20 import android.media.MediaFormat; 25 public static boolean isAudioFormat(MediaFormat format) { in isAudioFormat() 26 return format.getString(MediaFormat.KEY_MIME).startsWith("audio/"); in isAudioFormat() 29 public static boolean isVideoFormat(MediaFormat format) { in isVideoFormat() 30 return format.getString(MediaFormat.KEY_MIME).startsWith("video/"); in isVideoFormat()
|
D | AudioTrackDecoder.java | 22 import android.media.MediaFormat; 45 public AudioTrackDecoder(int trackIndex, MediaFormat format, Listener listener) { in AudioTrackDecoder() 56 mAudioSampleRate = format.getInteger(MediaFormat.KEY_SAMPLE_RATE); in AudioTrackDecoder() 57 mAudioChannelCount = format.getInteger(MediaFormat.KEY_CHANNEL_COUNT); in AudioTrackDecoder() 61 protected MediaCodec initMediaCodec(MediaFormat format) { in initMediaCodec() 65 format.getString(MediaFormat.KEY_MIME)); in initMediaCodec() 69 + format.getString(MediaFormat.KEY_MIME), e); in initMediaCodec()
|
D | GpuVideoTrackDecoder.java | 24 import android.media.MediaFormat; 68 int trackIndex, MediaFormat format, Listener listener) { in GpuVideoTrackDecoder() 82 mOutputWidth = format.getInteger(MediaFormat.KEY_WIDTH); in GpuVideoTrackDecoder() 83 mOutputHeight = format.getInteger(MediaFormat.KEY_HEIGHT); in GpuVideoTrackDecoder() 89 protected MediaCodec initMediaCodec(MediaFormat format) { in initMediaCodec() 93 format.getString(MediaFormat.KEY_MIME)); in initMediaCodec() 97 + format.getString(MediaFormat.KEY_MIME), e); in initMediaCodec()
|
D | CpuVideoTrackDecoder.java | 25 import android.media.MediaFormat; 58 protected CpuVideoTrackDecoder(int trackIndex, MediaFormat format, Listener listener) { in CpuVideoTrackDecoder() 61 mWidth = format.getInteger(MediaFormat.KEY_WIDTH); in CpuVideoTrackDecoder() 62 mHeight = format.getInteger(MediaFormat.KEY_HEIGHT); in CpuVideoTrackDecoder() 66 protected MediaCodec initMediaCodec(MediaFormat format) { in initMediaCodec() 87 mColorFormat = codec.getOutputFormat().getInteger(MediaFormat.KEY_COLOR_FORMAT); in onDataAvailable() 184 private static MediaCodec findDecoderCodec(MediaFormat format, int[] requiredColorFormats) { in findDecoderCodec() 197 String requiredType = format.getString(MediaFormat.KEY_MIME); in findDecoderCodec()
|
D | TrackDecoder.java | 23 import android.media.MediaFormat; 44 private final MediaFormat mMediaFormat; 48 private MediaFormat mOutputFormat; 58 protected abstract MediaCodec initMediaCodec(MediaFormat format); in initMediaCodec() 69 protected TrackDecoder(int trackIndex, MediaFormat mediaFormat, Listener listener) { in TrackDecoder()
|
D | MediaDecoder.java | 22 import android.media.MediaFormat; 235 MediaFormat format = mMediaExtractor.getTrackFormat(i); in onStart() 252 MediaFormat videoFormat = mMediaExtractor.getTrackFormat(mVideoTrackIndex); in onStart() 264 MediaFormat audioFormat = mMediaExtractor.getTrackFormat(mAudioTrackIndex); in onStart() 391 MediaFormat mediaFormat = mMediaExtractor.getTrackFormat( in getDuration() 393 return mediaFormat.getLong(MediaFormat.KEY_DURATION) * 1000; in getDuration()
|
D | VideoTrackDecoder.java | 19 import android.media.MediaFormat; 35 protected VideoTrackDecoder(int trackIndex, MediaFormat format, Listener listener) { in VideoTrackDecoder()
|
/frameworks/base/media/java/android/media/ |
D | MediaFormat.java | 114 public final class MediaFormat { class 938 /* package private */ MediaFormat(Map<String, Object> map) { in MediaFormat() method in MediaFormat 945 public MediaFormat() { in MediaFormat() method in MediaFormat 1099 public static final MediaFormat createAudioFormat( in createAudioFormat() 1103 MediaFormat format = new MediaFormat(); in createAudioFormat() 1119 public static final MediaFormat createSubtitleFormat( in createSubtitleFormat() 1122 MediaFormat format = new MediaFormat(); in createSubtitleFormat() 1135 public static final MediaFormat createVideoFormat( in createVideoFormat() 1139 MediaFormat format = new MediaFormat(); in createVideoFormat()
|
D | MediaCodecInfo.java | 622 public final boolean isFormatSupported(MediaFormat format) { in isFormatSupported() 624 final String mime = (String)map.get(MediaFormat.KEY_MIME); in isFormatSupported() 633 Integer yesNo = (Integer)map.get(MediaFormat.KEY_FEATURE_ + feat.mName); in isFormatSupported() 643 Integer profile = (Integer)map.get(MediaFormat.KEY_PROFILE); in isFormatSupported() 644 Integer level = (Integer)map.get(MediaFormat.KEY_LEVEL); in isFormatSupported() 669 mapWithoutProfile.remove(MediaFormat.KEY_PROFILE); in isFormatSupported() 670 MediaFormat formatWithoutProfile = new MediaFormat(mapWithoutProfile); in isFormatSupported() 688 Range<Integer> bitrateRange, MediaFormat format) { in supportsBitrate() 692 Integer maxBitrate = (Integer)map.get(MediaFormat.KEY_MAX_BIT_RATE); in supportsBitrate() 693 Integer bitrate = (Integer)map.get(MediaFormat.KEY_BIT_RATE); in supportsBitrate() [all …]
|
D | AmrInputStream.java | 60 MediaFormat format = new MediaFormat(); in AmrInputStream() 61 format.setString(MediaFormat.KEY_MIME, MediaFormat.MIMETYPE_AUDIO_AMR_NB); in AmrInputStream() 62 format.setInteger(MediaFormat.KEY_SAMPLE_RATE, 8000); in AmrInputStream() 63 format.setInteger(MediaFormat.KEY_CHANNEL_COUNT, 1); in AmrInputStream() 64 format.setInteger(MediaFormat.KEY_BIT_RATE, 12200); in AmrInputStream()
|
D | SubtitleController.java | 224 MediaFormat format = track.getFormat(); in getDefaultTrack() 225 String language = format.getString(MediaFormat.KEY_LANGUAGE); in getDefaultTrack() 227 format.getInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0; in getDefaultTrack() 229 format.getInteger(MediaFormat.KEY_IS_AUTOSELECT, 1) != 0; in getDefaultTrack() 231 format.getInteger(MediaFormat.KEY_IS_DEFAULT, 0) != 0; in getDefaultTrack() 277 MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0)) { in doSelectDefaultTrack() 321 public SubtitleTrack addTrack(MediaFormat format) { in addTrack() 392 public abstract boolean supports(MediaFormat format); in supports() 406 public abstract SubtitleTrack createTrack(MediaFormat format); in createTrack() 426 public boolean hasRendererFor(MediaFormat format) { in hasRendererFor()
|
D | SRTRenderer.java | 39 public boolean supports(MediaFormat format) { in supports() 40 if (format.containsKey(MediaFormat.KEY_MIME)) { in supports() 41 if (!format.getString(MediaFormat.KEY_MIME) in supports() 45 return mRender == (format.getInteger(MediaFormat.KEY_IS_TIMED_TEXT, 0) == 0); in supports() 51 public SubtitleTrack createTrack(MediaFormat format) { in createTrack() 73 SRTTrack(WebVttRenderingWidget renderingWidget, MediaFormat format) { in SRTTrack() 78 SRTTrack(Handler eventHandler, MediaFormat format) { in SRTTrack()
|
D | MediaCodecList.java | 213 public final String findDecoderForFormat(MediaFormat format) { in findDecoderForFormat() 237 public final String findEncoderForFormat(MediaFormat format) { in findEncoderForFormat() 241 private String findCodecForFormat(boolean encoder, MediaFormat format) { in findCodecForFormat() 242 String mime = format.getString(MediaFormat.KEY_MIME); in findCodecForFormat()
|
D | MediaExtractor.java | 27 import android.media.MediaFormat; 321 if (formatMap.containsKey(MediaFormat.KEY_CA_SYSTEM_ID)) { in getCasInfo() 322 int systemId = ((Integer)formatMap.get(MediaFormat.KEY_CA_SYSTEM_ID)).intValue(); in getCasInfo() 324 if (mMediaCas != null && formatMap.containsKey(MediaFormat.KEY_CA_SESSION_ID)) { in getCasInfo() 325 ByteBuffer buf = (ByteBuffer) formatMap.get(MediaFormat.KEY_CA_SESSION_ID); in getCasInfo() 557 public MediaFormat getTrackFormat(int index) { 558 return new MediaFormat(getTrackFormatNative(index));
|
D | MediaCodec.java | 1713 new MediaFormat((Map<String, Object>) msg.obj)); in handleCallback() 1886 @Nullable MediaFormat format, in configure() 1916 @Nullable MediaFormat format, @Nullable Surface surface, in configure() 1923 @Nullable MediaFormat format, @Nullable Surface surface, in configure() 1940 if (entry.getKey().equals(MediaFormat.KEY_AUDIO_SESSION_ID)) { in configure() 2833 public final MediaFormat getOutputFormat() { in getOutputFormat() 2834 return new MediaFormat(getFormatNative(false /* input */)); in getOutputFormat() 2848 public final MediaFormat getInputFormat() { in getInputFormat() 2849 return new MediaFormat(getFormatNative(true /* input */)); in getInputFormat() 2862 public final MediaFormat getOutputFormat(int index) { in getOutputFormat() [all …]
|
D | MediaPlayer.java | 54 import android.media.MediaFormat; 2439 String language = mFormat.getString(MediaFormat.KEY_LANGUAGE); in getLanguage() 2447 public MediaFormat getFormat() { in getFormat() 2476 final MediaFormat mFormat; 2484 mFormat = MediaFormat.createSubtitleFormat(mime, language); in TrackInfo() 2487 mFormat.setInteger(MediaFormat.KEY_IS_AUTOSELECT, in.readInt()); in TrackInfo() 2488 mFormat.setInteger(MediaFormat.KEY_IS_DEFAULT, in.readInt()); in TrackInfo() 2489 mFormat.setInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, in.readInt()); in TrackInfo() 2494 TrackInfo(int type, MediaFormat format) { in TrackInfo() 2516 dest.writeString(mFormat.getString(MediaFormat.KEY_MIME)); in writeToParcel() [all …]
|
/frameworks/support/media/src/main/java/androidx/media/subtitle/ |
D | SubtitleController.java | 22 import android.media.MediaFormat; 238 MediaFormat format = track.getFormat(); in getDefaultTrack() 239 String language = format.getString(MediaFormat.KEY_LANGUAGE); in getDefaultTrack() 241 .getInteger(format, MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0; in getDefaultTrack() 243 .getInteger(format, MediaFormat.KEY_IS_AUTOSELECT, 1) != 0; in getDefaultTrack() 245 .getInteger(format, MediaFormat.KEY_IS_DEFAULT, 0) != 0; in getDefaultTrack() 275 static int getInteger(MediaFormat format, String name, int defaultValue) { in getInteger() 303 MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0)) { in doSelectDefaultTrack() 345 public SubtitleTrack addTrack(MediaFormat format) { in addTrack() 415 public abstract boolean supports(MediaFormat format); in supports() [all …]
|
D | ClosedCaptionRenderer.java | 28 import android.media.MediaFormat; 61 public boolean supports(MediaFormat format) { in supports() 62 if (format.containsKey(MediaFormat.KEY_MIME)) { in supports() 63 String mimeType = format.getString(MediaFormat.KEY_MIME); in supports() 64 return MediaFormat.MIMETYPE_TEXT_CEA_608.equals(mimeType); in supports() 70 public SubtitleTrack createTrack(MediaFormat format) { in createTrack() 71 String mimeType = format.getString(MediaFormat.KEY_MIME); in createTrack() 72 if (MediaFormat.MIMETYPE_TEXT_CEA_608.equals(mimeType)) { in createTrack() 85 Cea608CaptionTrack(Cea608CCWidget renderingWidget, MediaFormat format) { in Cea608CaptionTrack()
|
/frameworks/av/packages/MediaComponents/src/com/android/media/subtitle/ |
D | SubtitleController.java | 23 import android.media.MediaFormat; 228 MediaFormat format = track.getFormat(); in getDefaultTrack() 229 String language = format.getString(MediaFormat.KEY_LANGUAGE); in getDefaultTrack() 231 format.getInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0; in getDefaultTrack() 233 format.getInteger(MediaFormat.KEY_IS_AUTOSELECT, 1) != 0; in getDefaultTrack() 235 format.getInteger(MediaFormat.KEY_IS_DEFAULT, 0) != 0; in getDefaultTrack() 281 MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0)) { in doSelectDefaultTrack() 325 public SubtitleTrack addTrack(MediaFormat format) { in addTrack() 396 public abstract boolean supports(MediaFormat format); in supports() 410 public abstract SubtitleTrack createTrack(MediaFormat format); in createTrack() [all …]
|
/frameworks/support/media-widget/src/androidTest/java/androidx/media/widget/ |
D | MediaUtils2.java | 22 import android.media.MediaFormat; 63 MediaFormat format = ex.getTrackFormat(i); in hasCodecsForMedia() 65 String mime = format.getString(MediaFormat.KEY_MIME).toLowerCase(); in hasCodecsForMedia() 76 static boolean canDecode(MediaFormat format) { in canDecode()
|
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/ |
D | DisplaySourceService.java | 29 import android.media.MediaFormat; 189 MediaFormat format = MediaFormat.createVideoFormat("video/avc", mWidth, mHeight); in run() 190 format.setInteger(MediaFormat.KEY_COLOR_FORMAT, in run() 192 format.setInteger(MediaFormat.KEY_BIT_RATE, BIT_RATE); in run() 193 format.setInteger(MediaFormat.KEY_FRAME_RATE, FRAME_RATE); in run() 194 format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, I_FRAME_INTERVAL); in run()
|
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/ |
D | DisplaySinkService.java | 27 import android.media.MediaFormat; 152 MediaFormat format = MediaFormat.createVideoFormat( in updateSurfaceFromUi()
|
/frameworks/support/heifwriter/src/androidTest/java/androidx/heifwriter/ |
D | HeifWriterTest.java | 24 import android.media.MediaFormat; 574 MediaFormat format = extractor.getTrackFormat(0); in verifyResult() 575 int gridWidth = format.getInteger(MediaFormat.KEY_TILE_WIDTH); in verifyResult() 576 int gridHeight = format.getInteger(MediaFormat.KEY_TILE_HEIGHT); in verifyResult() 577 int gridRows = format.getInteger(MediaFormat.KEY_GRID_ROWS); in verifyResult() 578 int gridCols = format.getInteger(MediaFormat.KEY_GRID_COLUMNS); in verifyResult()
|