Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: media/base/android/sdk_media_codec_bridge.cc

Issue 2503233003: Add enumerations for compressed (E)AC3 sample format (Closed)
Patch Set: Fix proto Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/android/media_codec_util.cc ('k') | media/base/audio_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/android/sdk_media_codec_bridge.h" 5 #include "media/base/android/sdk_media_codec_bridge.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 static const std::string AudioCodecToAndroidMimeType(const AudioCodec& codec) { 53 static const std::string AudioCodecToAndroidMimeType(const AudioCodec& codec) {
54 switch (codec) { 54 switch (codec) {
55 case kCodecMP3: 55 case kCodecMP3:
56 return "audio/mpeg"; 56 return "audio/mpeg";
57 case kCodecVorbis: 57 case kCodecVorbis:
58 return "audio/vorbis"; 58 return "audio/vorbis";
59 case kCodecOpus: 59 case kCodecOpus:
60 return "audio/opus"; 60 return "audio/opus";
61 case kCodecAAC: 61 case kCodecAAC:
62 return "audio/mp4a-latm"; 62 return "audio/mp4a-latm";
63 case kCodecAC3:
64 return "audio/ac3";
65 case kCodecEAC3:
66 return "audio/eac3";
63 default: 67 default:
64 return std::string(); 68 return std::string();
65 } 69 }
66 } 70 }
67 71
68 static const std::string VideoCodecToAndroidMimeType(const VideoCodec& codec) { 72 static const std::string VideoCodecToAndroidMimeType(const VideoCodec& codec) {
69 switch (codec) { 73 switch (codec) {
70 case kCodecH264: 74 case kCodecH264:
71 return "video/avc"; 75 return "video/avc";
72 case kCodecHEVC: 76 case kCodecHEVC:
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
672 if (adaptive_playback_supported_for_testing_ == 0) 676 if (adaptive_playback_supported_for_testing_ == 0)
673 return false; 677 return false;
674 else if (adaptive_playback_supported_for_testing_ > 0) 678 else if (adaptive_playback_supported_for_testing_ > 0)
675 return true; 679 return true;
676 JNIEnv* env = AttachCurrentThread(); 680 JNIEnv* env = AttachCurrentThread();
677 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(env, media_codec(), 681 return Java_MediaCodecBridge_isAdaptivePlaybackSupported(env, media_codec(),
678 width, height); 682 width, height);
679 } 683 }
680 684
681 } // namespace media 685 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_codec_util.cc ('k') | media/base/audio_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698