OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 private ByteBuffer[] inputBuffers; | 78 private ByteBuffer[] inputBuffers; |
79 private ByteBuffer[] outputBuffers; | 79 private ByteBuffer[] outputBuffers; |
80 private static final String VP8_MIME_TYPE = "video/x-vnd.on2.vp8"; | 80 private static final String VP8_MIME_TYPE = "video/x-vnd.on2.vp8"; |
81 private static final String VP9_MIME_TYPE = "video/x-vnd.on2.vp9"; | 81 private static final String VP9_MIME_TYPE = "video/x-vnd.on2.vp9"; |
82 private static final String H264_MIME_TYPE = "video/avc"; | 82 private static final String H264_MIME_TYPE = "video/avc"; |
83 // List of supported HW VP8 decoders. | 83 // List of supported HW VP8 decoders. |
84 private static final String[] supportedVp8HwCodecPrefixes = | 84 private static final String[] supportedVp8HwCodecPrefixes = |
85 {"OMX.qcom.", "OMX.Nvidia.", "OMX.Exynos.", "OMX.Intel." }; | 85 {"OMX.qcom.", "OMX.Nvidia.", "OMX.Exynos.", "OMX.Intel." }; |
86 // List of supported HW VP9 decoders. | 86 // List of supported HW VP9 decoders. |
87 private static final String[] supportedVp9HwCodecPrefixes = | 87 private static final String[] supportedVp9HwCodecPrefixes = |
88 {"OMX.qcom."}; | 88 {"OMX.qcom.", "OMX.Exynos." }; |
89 // List of supported HW H.264 decoders. | 89 // List of supported HW H.264 decoders. |
90 private static final String[] supportedH264HwCodecPrefixes = | 90 private static final String[] supportedH264HwCodecPrefixes = |
91 {"OMX.qcom.", "OMX.Intel." }; | 91 {"OMX.qcom.", "OMX.Intel." }; |
92 // NV12 color format supported by QCOM codec, but not declared in MediaCodec - | 92 // NV12 color format supported by QCOM codec, but not declared in MediaCodec - |
93 // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h | 93 // see /hardware/qcom/media/mm-core/inc/OMX_QCOMExtns.h |
94 private static final int | 94 private static final int |
95 COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04; | 95 COLOR_QCOM_FORMATYUV420PackedSemiPlanar32m = 0x7FA30C04; |
96 // Allowable color formats supported by codec - in order of preference. | 96 // Allowable color formats supported by codec - in order of preference. |
97 private static final List<Integer> supportedColorList = Arrays.asList( | 97 private static final List<Integer> supportedColorList = Arrays.asList( |
98 CodecCapabilities.COLOR_FormatYUV420Planar, | 98 CodecCapabilities.COLOR_FormatYUV420Planar, |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 // MediaCodec.CodecException upon codec error. | 641 // MediaCodec.CodecException upon codec error. |
642 private void returnDecodedOutputBuffer(int index) | 642 private void returnDecodedOutputBuffer(int index) |
643 throws IllegalStateException, MediaCodec.CodecException { | 643 throws IllegalStateException, MediaCodec.CodecException { |
644 checkOnMediaCodecThread(); | 644 checkOnMediaCodecThread(); |
645 if (useSurface) { | 645 if (useSurface) { |
646 throw new IllegalStateException("returnDecodedOutputBuffer() called for su
rface decoding."); | 646 throw new IllegalStateException("returnDecodedOutputBuffer() called for su
rface decoding."); |
647 } | 647 } |
648 mediaCodec.releaseOutputBuffer(index, false /* render */); | 648 mediaCodec.releaseOutputBuffer(index, false /* render */); |
649 } | 649 } |
650 } | 650 } |
OLD | NEW |