Index: media/base/android/demuxer_stream_player_params.cc |
diff --git a/media/base/android/demuxer_stream_player_params.cc b/media/base/android/demuxer_stream_player_params.cc |
index 3ce2a76fb1d800113c95346c1108744da5743b23..bafcb6e01fa9e67623bc62fd0f3b921372ad53c4 100644 |
--- a/media/base/android/demuxer_stream_player_params.cc |
+++ b/media/base/android/demuxer_stream_player_params.cc |
@@ -46,51 +46,6 @@ const char* AsString(DemuxerStream::Type stream_type) { |
return nullptr; // crash early |
} |
-#undef RETURN_STRING |
-#define RETURN_STRING(x) \ |
- case x: \ |
- return #x; |
- |
-const char* AsString(AudioCodec codec) { |
- switch (codec) { |
- RETURN_STRING(kUnknownAudioCodec); |
- RETURN_STRING(kCodecAAC); |
- RETURN_STRING(kCodecMP3); |
- RETURN_STRING(kCodecPCM); |
- RETURN_STRING(kCodecVorbis); |
- RETURN_STRING(kCodecFLAC); |
- RETURN_STRING(kCodecAMR_NB); |
- RETURN_STRING(kCodecAMR_WB); |
- RETURN_STRING(kCodecPCM_MULAW); |
- RETURN_STRING(kCodecGSM_MS); |
- RETURN_STRING(kCodecPCM_S16BE); |
- RETURN_STRING(kCodecPCM_S24BE); |
- RETURN_STRING(kCodecOpus); |
- RETURN_STRING(kCodecEAC3); |
- RETURN_STRING(kCodecPCM_ALAW); |
- RETURN_STRING(kCodecALAC); |
- RETURN_STRING(kCodecAC3); |
- } |
- NOTREACHED(); |
- return nullptr; // crash early |
-} |
- |
-const char* AsString(VideoCodec codec) { |
- switch (codec) { |
- RETURN_STRING(kUnknownVideoCodec); |
- RETURN_STRING(kCodecH264); |
- RETURN_STRING(kCodecHEVC); |
- RETURN_STRING(kCodecVC1); |
- RETURN_STRING(kCodecMPEG2); |
- RETURN_STRING(kCodecMPEG4); |
- RETURN_STRING(kCodecTheora); |
- RETURN_STRING(kCodecVP8); |
- RETURN_STRING(kCodecVP9); |
- } |
- NOTREACHED(); |
- return nullptr; // crash early |
-} |
- |
const char* AsString(DemuxerStream::Status status) { |
switch (status) { |
case DemuxerStream::kOk: |
@@ -104,8 +59,6 @@ const char* AsString(DemuxerStream::Status status) { |
return nullptr; // crash early |
} |
-#undef RETURN_STRING |
- |
} // namespace (anonymous) |
} // namespace media |
@@ -133,7 +86,7 @@ std::ostream& operator<<(std::ostream& os, const media::DemuxerConfigs& conf) { |
} |
if (conf.audio_codec != media::kUnknownAudioCodec) { |
- os << " audio:" << media::AsString(conf.audio_codec) |
+ os << " audio:" << media::GetCodecName(conf.audio_codec) |
<< " channels:" << conf.audio_channels |
<< " rate:" << conf.audio_sampling_rate |
<< (conf.is_audio_encrypted ? " encrypted" : "") |
@@ -149,7 +102,7 @@ std::ostream& operator<<(std::ostream& os, const media::DemuxerConfigs& conf) { |
} |
if (conf.video_codec != media::kUnknownVideoCodec) { |
- os << " video:" << media::AsString(conf.video_codec) << " " |
+ os << " video:" << media::GetCodecName(conf.video_codec) << " " |
<< conf.video_size.width() << "x" << conf.video_size.height() |
<< (conf.is_video_encrypted ? " encrypted" : ""); |
} |