Home
last modified time | relevance | path

Searched refs:MediaFormat (Results 1 – 25 of 44) sorted by relevance

12

/frameworks/av/media/tests/benchmark/MediaBenchmarkTest/src/androidTest/java/com/android/media/benchmark/tests/
DEncoderTest.java21 import android.media.MediaFormat;
101 {DECODE_AUDIO_UNPACKED, MediaFormat.MIMETYPE_AUDIO_AAC, in inputFiles()
103 {DECODE_AUDIO_UNPACKED, MediaFormat.MIMETYPE_AUDIO_AMR_NB, in inputFiles()
105 {DECODE_AUDIO_UNPACKED, MediaFormat.MIMETYPE_AUDIO_AMR_WB, in inputFiles()
107 {DECODE_AUDIO_UNPACKED, MediaFormat.MIMETYPE_AUDIO_FLAC, in inputFiles()
109 {DECODE_AUDIO_UNPACKED, MediaFormat.MIMETYPE_AUDIO_OPUS, in inputFiles()
115 {DECODE_FULLHD_UNPACKED, MediaFormat.MIMETYPE_VIDEO_VP8, in inputFiles()
117 {DECODE_FULLHD_UNPACKED, MediaFormat.MIMETYPE_VIDEO_AVC, in inputFiles()
119 {DECODE_FULLHD_UNPACKED, MediaFormat.MIMETYPE_VIDEO_HEVC, in inputFiles()
121 {DECODE_FULLHD_UNPACKED, MediaFormat.MIMETYPE_VIDEO_VP9, in inputFiles()
[all …]
DDecoderTest.java21 import android.media.MediaFormat;
134 MediaFormat format = extractor.getFormat(currentTrack); in testDecoder()
135 String mime = format.getString(MediaFormat.KEY_MIME); in testDecoder()
206 MediaFormat format = extractor.getFormat(currentTrack); in testNativeDecoder()
207 String mime = format.getString(MediaFormat.KEY_MIME); in testNativeDecoder()
DExtractorTest.java25 import android.media.MediaFormat;
99 MediaFormat format = extractor.getFormat(mTrackId); in testExtractor()
100 String mime = format.getString(MediaFormat.KEY_MIME); in testExtractor()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/decoder/
DDecoderUtil.java20 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()
DAudioTrackDecoder.java22 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()
DGpuVideoTrackDecoder.java24 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()
DCpuVideoTrackDecoder.java25 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()
DTrackDecoder.java23 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()
DMediaDecoder.java22 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()
DVideoTrackDecoder.java19 import android.media.MediaFormat;
35 protected VideoTrackDecoder(int trackIndex, MediaFormat format, Listener listener) { in VideoTrackDecoder()
/frameworks/base/media/java/android/media/
DMediaCodecInfo.java716 public final boolean isFormatSupported(MediaFormat format) { in isFormatSupported()
718 final String mime = (String)map.get(MediaFormat.KEY_MIME); in isFormatSupported()
727 Integer yesNo = (Integer)map.get(MediaFormat.KEY_FEATURE_ + feat.mName); in isFormatSupported()
737 Integer profile = (Integer)map.get(MediaFormat.KEY_PROFILE); in isFormatSupported()
738 Integer level = (Integer)map.get(MediaFormat.KEY_LEVEL); in isFormatSupported()
763 mapWithoutProfile.remove(MediaFormat.KEY_PROFILE); in isFormatSupported()
764 MediaFormat formatWithoutProfile = new MediaFormat(mapWithoutProfile); in isFormatSupported()
782 Range<Integer> bitrateRange, MediaFormat format) { in supportsBitrate()
786 Integer maxBitrate = (Integer)map.get(MediaFormat.KEY_MAX_BIT_RATE); in supportsBitrate()
787 Integer bitrate = (Integer)map.get(MediaFormat.KEY_BIT_RATE); in supportsBitrate()
[all …]
DAmrInputStream.java62 MediaFormat format = new MediaFormat(); in AmrInputStream()
63 format.setString(MediaFormat.KEY_MIME, MediaFormat.MIMETYPE_AUDIO_AMR_NB); in AmrInputStream()
64 format.setInteger(MediaFormat.KEY_SAMPLE_RATE, 8000); in AmrInputStream()
65 format.setInteger(MediaFormat.KEY_CHANNEL_COUNT, 1); in AmrInputStream()
66 format.setInteger(MediaFormat.KEY_BIT_RATE, 12200); in AmrInputStream()
DSubtitleController.java227 MediaFormat format = track.getFormat(); in getDefaultTrack()
228 String language = format.getString(MediaFormat.KEY_LANGUAGE); in getDefaultTrack()
230 format.getInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0; in getDefaultTrack()
232 format.getInteger(MediaFormat.KEY_IS_AUTOSELECT, 1) != 0; in getDefaultTrack()
234 format.getInteger(MediaFormat.KEY_IS_DEFAULT, 0) != 0; in getDefaultTrack()
280 MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0)) { in doSelectDefaultTrack()
325 public SubtitleTrack addTrack(MediaFormat format) { in addTrack()
398 public abstract boolean supports(MediaFormat format); in supports()
412 public abstract SubtitleTrack createTrack(MediaFormat format); in createTrack()
433 public boolean hasRendererFor(MediaFormat format) { in hasRendererFor()
DMediaFormat.java124 public final class MediaFormat { class
1065 /* package private */ MediaFormat(@NonNull Map<String, Object> map) { in MediaFormat() method in MediaFormat
1072 public MediaFormat() { in MediaFormat() method in MediaFormat
1548 public MediaFormat(@NonNull MediaFormat other) { in MediaFormat() method in MediaFormat
1576 public static final @NonNull MediaFormat createAudioFormat( in createAudioFormat()
1580 MediaFormat format = new MediaFormat(); in createAudioFormat()
1596 public static final @NonNull MediaFormat createSubtitleFormat( in createSubtitleFormat()
1599 MediaFormat format = new MediaFormat(); in createSubtitleFormat()
1612 public static final @NonNull MediaFormat createVideoFormat( in createVideoFormat()
1616 MediaFormat format = new MediaFormat(); in createVideoFormat()
DSRTRenderer.java39 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()
DMediaExtractor.java27 import android.media.MediaFormat;
343 if (formatMap.containsKey(MediaFormat.KEY_CA_SYSTEM_ID)) { in getCasInfo()
344 int systemId = ((Integer)formatMap.get(MediaFormat.KEY_CA_SYSTEM_ID)).intValue(); in getCasInfo()
347 if (formatMap.containsKey(MediaFormat.KEY_CA_PRIVATE_DATA)) { in getCasInfo()
348 ByteBuffer buf = (ByteBuffer) formatMap.get(MediaFormat.KEY_CA_PRIVATE_DATA); in getCasInfo()
353 if (mMediaCas != null && formatMap.containsKey(MediaFormat.KEY_CA_SESSION_ID)) { in getCasInfo()
354 ByteBuffer buf = (ByteBuffer) formatMap.get(MediaFormat.KEY_CA_SESSION_ID); in getCasInfo()
589 public MediaFormat getTrackFormat(int index) {
590 return new MediaFormat(getTrackFormatNative(index));
DMediaCodecList.java215 public final String findDecoderForFormat(MediaFormat format) { in findDecoderForFormat()
239 public final String findEncoderForFormat(MediaFormat format) { in findEncoderForFormat()
243 private String findCodecForFormat(boolean encoder, MediaFormat format) { in findCodecForFormat()
244 String mime = format.getString(MediaFormat.KEY_MIME); in findCodecForFormat()
DMediaCodec.java1766 new MediaFormat((Map<String, Object>) msg.obj)); in handleCallback()
1951 @Nullable MediaFormat format, in configure()
1981 @Nullable MediaFormat format, @Nullable Surface surface, in configure()
1988 @Nullable MediaFormat format, @Nullable Surface surface, in configure()
2005 if (entry.getKey().equals(MediaFormat.KEY_AUDIO_SESSION_ID)) { in configure()
2928 public final MediaFormat getOutputFormat() { in getOutputFormat()
2929 return new MediaFormat(getFormatNative(false /* input */)); in getOutputFormat()
2943 public final MediaFormat getInputFormat() { in getInputFormat()
2944 return new MediaFormat(getFormatNative(true /* input */)); in getInputFormat()
2957 public final MediaFormat getOutputFormat(int index) { in getOutputFormat()
[all …]
DMediaPlayer.java2404 String language = mFormat.getString(MediaFormat.KEY_LANGUAGE); in getLanguage()
2412 public MediaFormat getFormat() { in getFormat()
2441 final MediaFormat mFormat;
2449 mFormat = MediaFormat.createSubtitleFormat(mime, language); in TrackInfo()
2452 mFormat.setInteger(MediaFormat.KEY_IS_AUTOSELECT, in.readInt()); in TrackInfo()
2453 mFormat.setInteger(MediaFormat.KEY_IS_DEFAULT, in.readInt()); in TrackInfo()
2454 mFormat.setInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, in.readInt()); in TrackInfo()
2459 TrackInfo(int type, MediaFormat format) { in TrackInfo()
2478 dest.writeString(mFormat.getString(MediaFormat.KEY_MIME)); in writeToParcel()
2482 dest.writeInt(mFormat.getInteger(MediaFormat.KEY_IS_AUTOSELECT)); in writeToParcel()
[all …]
/frameworks/base/tests/AccessoryDisplay/source/src/com/android/accessorydisplay/source/
DDisplaySourceService.java29 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/av/media/tests/benchmark/MediaBenchmarkTest/src/main/java/com/android/media/benchmark/library/
DExtractor.java21 import android.media.MediaFormat;
66 public MediaFormat getFormat(int trackID) { return mExtractor.getTrackFormat(trackID); } in getFormat()
112 MediaFormat trackFormat = mExtractor.getTrackFormat(trackId); in selectExtractorTrack()
113 mDurationUs = trackFormat.getLong(MediaFormat.KEY_DURATION); in selectExtractorTrack()
DDecoder.java21 import android.media.MediaFormat;
63 private MediaCodec createCodec(String codecName, MediaFormat format) throws IOException { in createCodec()
64 String mime = format.getString(MediaFormat.KEY_MIME); in createCodec()
103 @NonNull MediaFormat format, String codecName) throws IOException { in decode()
143 @NonNull MediaCodec mediaCodec, @NonNull MediaFormat format) { in decode()
196 MediaFormat outFormat = mCodec.getOutputFormat(); in decode()
258 public MediaFormat getFormat() { in getFormat()
DEncoder.java21 import android.media.MediaFormat;
116 public int encode(String codecName, MediaFormat encodeFormat, String mime, int frameRate, in encode()
140 MediaFormat format = mCodec.getInputFormat(); in encode()
141 if (format.containsKey(MediaFormat.KEY_MAX_INPUT_SIZE)) { in encode()
142 maxInputSize = format.getInteger(MediaFormat.KEY_MAX_INPUT_SIZE); in encode()
186 @NonNull MediaFormat format) { in encode()
223 MediaFormat outFormat = mCodec.getOutputFormat(); in encode()
DMuxer.java20 import android.media.MediaFormat;
39 public int setUpMuxer(Context context, int outputFormat, MediaFormat trackFormat) { in setUpMuxer()
/frameworks/base/tests/AccessoryDisplay/sink/src/com/android/accessorydisplay/sink/
DDisplaySinkService.java27 import android.media.MediaFormat;
152 MediaFormat format = MediaFormat.createVideoFormat( in updateSurfaceFromUi()

12