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

Side by Side Diff: chromecast/media/base/media_codec_support.h

Issue 2783963002: Add IsSupportedAudioConfig in MediaClient (Closed)
Patch Set: CR feedback Created 3 years, 8 months 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROMECAST_MEDIA_BASE_MEDIA_CODEC_SUPPORT_H_ 5 #ifndef CHROMECAST_MEDIA_BASE_MEDIA_CODEC_SUPPORT_H_
6 #define CHROMECAST_MEDIA_BASE_MEDIA_CODEC_SUPPORT_H_ 6 #define CHROMECAST_MEDIA_BASE_MEDIA_CODEC_SUPPORT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "chromecast/public/media/decoder_config.h" 11 #include "chromecast/public/media/decoder_config.h"
12 #include "media/base/audio_codecs.h"
12 #include "media/base/mime_util.h" 13 #include "media/base/mime_util.h"
13 #include "media/base/video_codecs.h" 14 #include "media/base/video_codecs.h"
14 15
15 // TODO(slan|servolk): remove when this definition exists in //media. 16 // TODO(slan|servolk): remove when this definition exists in //media.
16 namespace media { 17 namespace media {
17 typedef base::Callback<bool(const std::string&)> IsCodecSupportedCB; 18 typedef base::Callback<bool(const std::string&)> IsCodecSupportedCB;
18 } 19 }
19 20
20 namespace chromecast { 21 namespace chromecast {
21 namespace media { 22 namespace media {
22 23
23 // Returns the callback to decide whether a given codec (passed in as a string 24 // Returns the callback to decide whether a given codec (passed in as a string
24 // representation of the codec id conforming to RFC 6381) is supported or not. 25 // representation of the codec id conforming to RFC 6381) is supported or not.
25 ::media::IsCodecSupportedCB GetIsCodecSupportedOnChromecastCB(); 26 ::media::IsCodecSupportedCB GetIsCodecSupportedOnChromecastCB();
26 27
28 // Converts ::media::AudioCodec to chromecast::media::AudioCodec. Any unknown or
29 // unsupported codec will be converted to chromecast::media::kCodecUnknown.
30 AudioCodec ToCastAudioCodec(const ::media::AudioCodec codec);
31
27 // Converts ::media::VideoCodec to chromecast::media::VideoCodec. Any unknown or 32 // Converts ::media::VideoCodec to chromecast::media::VideoCodec. Any unknown or
28 // unsupported codec will be converted to chromecast::media::kCodecUnknown. Note 33 // unsupported codec will be converted to chromecast::media::kCodecUnknown. Note
29 // |codec_profile| is ignored for codecs other than Dolby Vision. 34 // |codec_profile| is ignored for codecs other than Dolby Vision.
30 // TODO(erickung): Remove |codec_profile| parameter by changing VideoCodec enum 35 // TODO(erickung): Remove |codec_profile| parameter by changing VideoCodec enum
31 // to align with ::media::VideoCodecs. 36 // to align with ::media::VideoCodecs.
32 VideoCodec ToCastVideoCodec(const ::media::VideoCodec codec, 37 VideoCodec ToCastVideoCodec(const ::media::VideoCodec codec,
33 const ::media::VideoCodecProfile codec_profile); 38 const ::media::VideoCodecProfile codec_profile);
34 39
35 // Converts ::media::VideoCodecProfile to chromecast::media::VideoProfile. 40 // Converts ::media::VideoCodecProfile to chromecast::media::VideoProfile.
36 VideoProfile ToCastVideoProfile(const ::media::VideoCodecProfile profile); 41 VideoProfile ToCastVideoProfile(const ::media::VideoCodecProfile profile);
37 CodecProfileLevel ToCastCodecProfileLevel( 42 CodecProfileLevel ToCastCodecProfileLevel(
38 const ::media::CodecProfileLevel& codec_profile_level); 43 const ::media::CodecProfileLevel& codec_profile_level);
39 } // namespace media 44 } // namespace media
40 } // namespace chromecast 45 } // namespace chromecast
41 46
42 #endif // CHROMECAST_MEDIA_BASE_MEDIA_CODEC_SUPPORT_H_ 47 #endif // CHROMECAST_MEDIA_BASE_MEDIA_CODEC_SUPPORT_H_
OLDNEW
« no previous file with comments | « chromecast/common/media/cast_media_client.cc ('k') | chromecast/media/base/media_codec_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698