HomeSort by relevance Sort by last modified time
    Searched refs:MediaFormat (Results 1 - 25 of 102) sorted by null

1 2 3 4 5

  /frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/decoder/
DecoderUtil.java 20 import android.media.MediaFormat;
25 public static boolean isAudioFormat(MediaFormat format) {
26 return format.getString(MediaFormat.KEY_MIME).startsWith("audio/");
29 public static boolean isVideoFormat(MediaFormat format) {
30 return format.getString(MediaFormat.KEY_MIME).startsWith("video/");
AudioTrackDecoder.java 22 import android.media.MediaFormat;
45 public AudioTrackDecoder(int trackIndex, MediaFormat format, Listener listener) {
56 mAudioSampleRate = format.getInteger(MediaFormat.KEY_SAMPLE_RATE);
57 mAudioChannelCount = format.getInteger(MediaFormat.KEY_CHANNEL_COUNT);
61 protected MediaCodec initMediaCodec(MediaFormat format) {
65 format.getString(MediaFormat.KEY_MIME));
69 + format.getString(MediaFormat.KEY_MIME), e);
TrackDecoder.java 23 import android.media.MediaFormat;
44 private final MediaFormat mMediaFormat;
48 private MediaFormat mOutputFormat;
58 protected abstract MediaCodec initMediaCodec(MediaFormat format);
69 protected TrackDecoder(int trackIndex, MediaFormat mediaFormat, Listener listener) {
72 if (mediaFormat == null) {
73 throw new NullPointerException("mediaFormat cannot be null");
75 mMediaFormat = mediaFormat;
GpuVideoTrackDecoder.java 24 import android.media.MediaFormat;
68 int trackIndex, MediaFormat format, Listener listener) {
82 mOutputWidth = format.getInteger(MediaFormat.KEY_WIDTH);
83 mOutputHeight = format.getInteger(MediaFormat.KEY_HEIGHT);
89 protected MediaCodec initMediaCodec(MediaFormat format) {
93 format.getString(MediaFormat.KEY_MIME));
97 + format.getString(MediaFormat.KEY_MIME), e);
  /packages/apps/TV/usbtuner/src/com/google/android/exoplayer/
MediaFormatUtil.java 23 /** {@link MediaFormat} creation helper util */
27 * Creates {@link MediaFormat} from {@link android.media.MediaFormat}.
28 * Since {@link com.google.android.exoplayer.TrackRenderer} uses {@link MediaFormat},
29 * {@link android.media.MediaFormat} should be converted to be used with ExoPlayer.
31 public static MediaFormat createMediaFormat(android.media.MediaFormat format) {
33 String mimeType = format.getString(android.media.MediaFormat.KEY_MIME);
34 String language = getOptionalStringV16(format, android.media.MediaFormat.KEY_LANGUAGE);
36 getOptionalIntegerV16(format, android.media.MediaFormat.KEY_MAX_INPUT_SIZE)
    [all...]
  /cts/tests/tests/media/src/android/media/cts/
EncoderTest.java 26 import android.media.MediaFormat;
70 LinkedList<MediaFormat> formats = new LinkedList<MediaFormat>();
76 MediaFormat format = new MediaFormat();
77 format.setString(MediaFormat.KEY_MIME, MediaFormat.MIMETYPE_AUDIO_AMR_NB);
78 format.setInteger(MediaFormat.KEY_SAMPLE_RATE, 8000);
79 format.setInteger(MediaFormat.KEY_CHANNEL_COUNT, 1);
80 format.setInteger(MediaFormat.KEY_BIT_RATE, kBitRates[j])
    [all...]
MediaCodecListTest.java 28 import android.media.MediaFormat;
53 CodecType(String type, boolean isEncoder, MediaFormat sampleFormat) {
75 private MediaFormat mSampleFormat;
80 super(mime, isEncoder, MediaFormat.createAudioFormat(
88 super(mime, isEncoder, MediaFormat.createVideoFormat(
301 private boolean codecCanBeFound(boolean isEncoder, MediaFormat format) {
356 // list.add(new CodecType(MediaFormat.MIMETYPE_AUDIO_FLAC, false, 8000));
357 // list.add(new CodecType(MediaFormat.MIMETYPE_AUDIO_FLAC, false, 48000));
358 list.add(new AudioCodec(MediaFormat.MIMETYPE_AUDIO_MPEG, false, 8000)); // mp3
359 list.add(new AudioCodec(MediaFormat.MIMETYPE_AUDIO_MPEG, false, 48000)); // mp
    [all...]
MediaCodecCapabilitiesTest.java 28 import android.media.MediaFormat;
29 import static android.media.MediaFormat.MIMETYPE_VIDEO_AVC;
30 import static android.media.MediaFormat.MIMETYPE_VIDEO_H263;
31 import static android.media.MediaFormat.MIMETYPE_VIDEO_HEVC;
32 import static android.media.MediaFormat.MIMETYPE_VIDEO_MPEG4;
33 import static android.media.MediaFormat.MIMETYPE_VIDEO_VP8;
34 import static android.media.MediaFormat.MIMETYPE_VIDEO_VP9;
362 adaptiveFormats.add(MediaFormat.MIMETYPE_VIDEO_AVC);
363 adaptiveFormats.add(MediaFormat.MIMETYPE_VIDEO_HEVC);
364 adaptiveFormats.add(MediaFormat.MIMETYPE_VIDEO_VP8)
    [all...]
MediaMuxerTest.java 24 import android.media.MediaFormat;
100 muxer.addTrack(MediaFormat.createVideoFormat(MediaFormat.MIMETYPE_VIDEO_AVC, 480, 320));
113 muxer.addTrack(MediaFormat.createVideoFormat(MediaFormat.MIMETYPE_VIDEO_AVC, 480, 320));
116 muxer.addTrack(MediaFormat.createVideoFormat(MediaFormat.MIMETYPE_VIDEO_AVC, 480, 320));
126 muxer.addTrack(MediaFormat.createAudioFormat(MediaFormat.MIMETYPE_AUDIO_AAC, 48000, 1));
128 muxer.addTrack(MediaFormat.createAudioFormat(MediaFormat.MIMETYPE_AUDIO_AAC, 48000, 1))
    [all...]
DecoderConformanceTest.java 30 import android.media.MediaFormat;
73 put(MediaFormat.MIMETYPE_VIDEO_VP9, "vp9");
144 MediaFormat format = mExtractor.getTrackFormat(trackIndex);
193 MediaFormat bufferFormat = mDecoder.getOutputFormat(outputBufIndex);
194 int width = bufferFormat.getInteger(MediaFormat.KEY_WIDTH);
195 int height = bufferFormat.getInteger(MediaFormat.KEY_HEIGHT);
196 int colorFmt = bufferFormat.getInteger(MediaFormat.KEY_COLOR_FORMAT);
219 MediaFormat decOutputFormat = mDecoder.getOutputFormat();
220 int width = decOutputFormat.getInteger(MediaFormat.KEY_WIDTH);
221 int height = decOutputFormat.getInteger(MediaFormat.KEY_HEIGHT)
    [all...]
MediaCodecTest.java 31 import android.media.MediaFormat;
65 private static final String MIME_TYPE = MediaFormat.MIMETYPE_VIDEO_AVC;
72 private static final String MIME_TYPE_AUDIO = MediaFormat.MIMETYPE_AUDIO_AAC;
96 MediaFormat format = MediaFormat.createAudioFormat(
97 MediaFormat.MIMETYPE_AUDIO_MPEG, 44100 /* sampleRate */, 2 /* channelCount */);
101 format = MediaFormat.createAudioFormat(
102 MediaFormat.MIMETYPE_AUDIO_AMR_WB, 16000 /* sampleRate */, 1 /* channelCount */);
103 format.setInteger(MediaFormat.KEY_BIT_RATE, 19850);
138 private static boolean verifyException(MediaFormat format, boolean isEncoder
    [all...]
ResourceManagerTestActivityBase.java 25 import android.media.MediaFormat;
39 private static final String MIME = MediaFormat.MIMETYPE_VIDEO_AVC;
61 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) {
68 private MediaFormat getTestFormat(CodecCapabilities caps, boolean securePlayback) {
74 MediaFormat format = MediaFormat.createVideoFormat(MIME, width, height);
75 format.setInteger(MediaFormat.KEY_COLOR_FORMAT, caps.colorFormats[0]);
76 format.setInteger(MediaFormat.KEY_BIT_RATE, bitrate);
77 format.setInteger(MediaFormat.KEY_FRAME_RATE, FRAME_RATE);
78 format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, IFRAME_INTERVAL)
    [all...]
MediaCodecTunneledPlayer.java 22 import android.media.MediaFormat;
123 MediaFormat format = mAudioExtractor.getTrackFormat(i);
124 String mime = format.getString(MediaFormat.KEY_MIME);
131 " Is ADTS:" + getMediaFormatInteger(format, MediaFormat.KEY_IS_ADTS) +
132 " Sample rate:" + getMediaFormatInteger(format, MediaFormat.KEY_SAMPLE_RATE) +
134 getMediaFormatInteger(format, MediaFormat.KEY_CHANNEL_COUNT));
142 if (format.containsKey(MediaFormat.KEY_DURATION)) {
143 long durationUs = format.getLong(MediaFormat.KEY_DURATION);
157 MediaFormat format = mVideoExtractor.getTrackFormat(i);
158 String mime = format.getString(MediaFormat.KEY_MIME)
    [all...]
CodecState.java 21 import android.media.MediaFormat;
50 private MediaFormat mFormat;
51 private MediaFormat mOutputFormat;
61 MediaFormat format,
84 String mime = mFormat.getString(MediaFormat.KEY_MIME);
275 String mime = mOutputFormat.getString(MediaFormat.KEY_MIME);
283 mOutputFormat.getInteger(MediaFormat.KEY_SAMPLE_RATE);
286 mOutputFormat.getInteger(MediaFormat.KEY_CHANNEL_COUNT);
304 int width = mOutputFormat.getInteger(MediaFormat.KEY_WIDTH);
305 int height = mOutputFormat.getInteger(MediaFormat.KEY_HEIGHT)
    [all...]
MediaCodecClearKeyPlayer.java 28 import android.media.MediaFormat;
172 MediaFormat format = mAudioExtractor.getTrackFormat(i);
173 String mime = format.getString(MediaFormat.KEY_MIME);
179 " Is ADTS:" + getMediaFormatInteger(format, MediaFormat.KEY_IS_ADTS) +
180 " Sample rate:" + getMediaFormatInteger(format, MediaFormat.KEY_SAMPLE_RATE) +
182 getMediaFormatInteger(format, MediaFormat.KEY_CHANNEL_COUNT));
189 if (format.containsKey(MediaFormat.KEY_DURATION)) {
190 long durationUs = format.getLong(MediaFormat.KEY_DURATION);
210 MediaFormat format = mVideoExtractor.getTrackFormat(i);
211 String mime = format.getString(MediaFormat.KEY_MIME)
    [all...]
  /packages/apps/TV/usbtuner/src/com/android/usbtuner/exoplayer/cache/
DvrStorageManager.java 19 import android.media.MediaFormat;
90 private void readFormatInt(DataInputStream in, MediaFormat format, String key)
98 private void readFormatLong(DataInputStream in, MediaFormat format, String key)
106 private void readFormatFloat(DataInputStream in, MediaFormat format, String key)
124 private void readFormatString(DataInputStream in, MediaFormat format, String key)
146 private void readFormatByteBuffer(DataInputStream in, MediaFormat format, String key)
155 public Pair<String, MediaFormat> readTrackInfoFile(boolean isAudio) throws IOException {
159 MediaFormat format = new MediaFormat();
160 readFormatString(in, format, MediaFormat.KEY_MIME)
    [all...]
TrickplayStorageManager.java 20 import android.media.MediaFormat;
93 public Pair<String, MediaFormat> readTrackInfoFile(boolean isAudio) {
103 public void writeTrackInfoFile(String trackId, MediaFormat format, boolean isAudio) {
  /cts/tests/video/src/android/video/cts/
CodecInfo.java 27 import android.media.MediaFormat;
48 private static final String VIDEO_AVC = MediaFormat.MIMETYPE_VIDEO_AVC;
52 * @param mimeType codec type in mime format like MediaFormat.MIMETYPE_VIDEO_AVC
84 MediaFormat format = MediaFormat.createVideoFormat(mimeType, w, h);
86 info.mFps = format.getInteger(MediaFormat.KEY_FRAME_RATE);
87 info.mBitRate = format.getInteger(MediaFormat.KEY_BIT_RATE);
  /packages/apps/TV/usbtuner/src/com/android/usbtuner/exoplayer/ac3/
AudioTrackWrapper.java 19 import android.media.MediaFormat;
115 public void reconfigure(MediaFormat format) {
120 if (MediaFormat.MIMETYPE_AUDIO_AC3.equalsIgnoreCase(format.getString(MediaFormat.KEY_MIME))
121 && format.getInteger(MediaFormat.KEY_CHANNEL_COUNT) == 1) {
125 format.setInteger(MediaFormat.KEY_CHANNEL_COUNT, 2);
  /packages/apps/TV/usbtuner/src/com/android/usbtuner/exoplayer/
ReplaySampleSourceExtractor.java 19 import com.google.android.exoplayer.MediaFormat;
42 private android.media.MediaFormat[] mMediaFormats;
43 private MediaFormat[] mTrackFormats;
61 ArrayList<Pair<String, android.media.MediaFormat>> trackInfos =
68 mMediaFormats = new android.media.MediaFormat[mTrackCount];
69 mTrackFormats = new MediaFormat[mTrackCount];
71 Pair<String, android.media.MediaFormat> pair = trackInfos.get(i);
83 public MediaFormat[] getTrackFormats() {
SampleExtractor.java 18 import com.google.android.exoplayer.MediaFormat;
50 MediaFormat[] getTrackFormats();
78 /** Stores the {@link MediaFormat} of {@code track}. */
  /cts/tests/tests/mediastress/src/android/mediastress/cts/
NativeMediaTest.java 21 import android.media.MediaFormat;
32 private static final String MIME_TYPE = MediaFormat.MIMETYPE_VIDEO_AVC;
58 MediaFormat format = MediaFormat.createVideoFormat(MIME_TYPE, width, height);
  /frameworks/base/media/java/android/media/
MediaFormat.java 99 public final class MediaFormat {
138 * A key describing the mime type of the MediaFormat.
188 * described by this MediaFormat.
    [all...]
SubtitleController.java 224 MediaFormat format = track.getFormat();
225 String language = format.getString(MediaFormat.KEY_LANGUAGE);
227 format.getInteger(MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0;
229 format.getInteger(MediaFormat.KEY_IS_AUTOSELECT, 1) != 0;
231 format.getInteger(MediaFormat.KEY_IS_DEFAULT, 0) != 0;
277 MediaFormat.KEY_IS_FORCED_SUBTITLE, 0) != 0)) {
318 * the MIME type {@link MediaFormat@KEY_MIME}.
321 public SubtitleTrack addTrack(MediaFormat format) {
387 * the MIME type {@link MediaFormat@KEY_MIME}.
392 public abstract boolean supports(MediaFormat format)
    [all...]
  /cts/libs/deviceutil/src/android/cts/util/
MediaUtils.java 26 import android.media.MediaFormat;
189 boolean isEncoder, Boolean isGoog, MediaFormat... formats) {
201 for (MediaFormat format : formats) {
202 String mime = format.getString(MediaFormat.KEY_MIME);
220 public static String[] getDecoderNames(/* Nullable */ Boolean isGoog, MediaFormat... formats) {
224 public static String[] getDecoderNames(MediaFormat... formats) {
229 public static String[] getEncoderNames(/* Nullable */ Boolean isGoog, MediaFormat... formats) {
233 public static String[] getEncoderNames(MediaFormat... formats) {
238 int count, boolean isEncoder, Boolean isGoog, MediaFormat... formats) {
250 public static MediaCodec getDecoder(MediaFormat format)
    [all...]

Completed in 474 milliseconds

1 2 3 4 5