From 11c43a625e83636927e87a0ab99c9ba6ffd77c70 Mon Sep 17 00:00:00 2001 From: "scherkus@chromium.org" Date: Wed, 17 Dec 2008 21:38:25 +0000 Subject: Updated media::MediaFormat to use char/std::string instead of wchar_t/std::wstring. Review URL: http://codereview.chromium.org/14805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7168 0039d316-1c4b-4281-b951-d872f2087c98 --- media/base/media_format.cc | 22 +++++++++++----------- media/base/media_format.h | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) (limited to 'media/base') diff --git a/media/base/media_format.cc b/media/base/media_format.cc index c3f0c89..6e41b1e 100644 --- a/media/base/media_format.cc +++ b/media/base/media_format.cc @@ -11,30 +11,30 @@ namespace mime_type { // Represents a URI, typically used to create a DataSourceInterface. // Expected keys: // kUri String The URI -const wchar_t kURI[] = L"text/x-uri"; +const char kURI[] = "text/x-uri"; // Represents a generic byte stream, typically from a DataSourceInterface. // Expected keys: // None -const wchar_t kApplicationOctetStream[] = L"application/octet-stream"; +const char kApplicationOctetStream[] = "application/octet-stream"; // Represents encoded audio data, typically from an DemuxerStreamInterface. // Expected keys: // None -const wchar_t kMPEGAudio[] = L"audio/mpeg"; -const wchar_t kAACAudio[] = L"audio/aac"; +const char kMPEGAudio[] = "audio/mpeg"; +const char kAACAudio[] = "audio/aac"; // Represents encoded video data, typically from a DemuxerStreamInterface. // Expected keys: // None -const wchar_t kH264AnnexB[] = L"video/x-h264-annex-b"; +const char kH264AnnexB[] = "video/x-h264-annex-b"; // Represents decoded audio data, typically from an AudioDecoderInterface. // Expected keys: // kChannels Integer Number of audio channels // kSampleRate Integer Audio sample rate (i.e., 44100) // kSampleBits Integer Audio bits-per-sample (i.e., 16) -const wchar_t kRawAudio[] = L"audio/x-uncompressed"; +const char kRawAudio[] = "audio/x-uncompressed"; // Represents decoded video data, typically from a VideoDecoderInterface. // Other information, such as surface format (i.e., YV12), stride and planes are @@ -42,13 +42,13 @@ const wchar_t kRawAudio[] = L"audio/x-uncompressed"; // Expected keys: // kWidth Integer Display width of the surface // kHeight Integer Display height of the surface -const wchar_t kRawVideo[] = L"video/x-uncompressed"; +const char kRawVideo[] = "video/x-uncompressed"; // Represents FFmpeg encoded packets, typically from an DemuxerStreamInterface. // Expected keys: // kFfmpegCodecId Integer The FFmpeg CodecID identifying the decoder -const wchar_t kFFmpegAudio[] = L"audio/x-ffmpeg"; -const wchar_t kFFmpegVideo[] = L"video/x-ffmpeg"; +const char kFFmpegAudio[] = "audio/x-ffmpeg"; +const char kFFmpegVideo[] = "video/x-ffmpeg"; } // namespace mime_type @@ -94,7 +94,7 @@ void MediaFormat::SetAsReal(const std::string& key, double in_value) { } void MediaFormat::SetAsString(const std::string& key, - const std::wstring& in_value) { + const std::string& in_value) { value_map_[key] = Value::CreateStringValue(in_value); } @@ -114,7 +114,7 @@ bool MediaFormat::GetAsReal(const std::string& key, double* out_value) const { } bool MediaFormat::GetAsString(const std::string& key, - std::wstring* out_value) const { + std::string* out_value) const { Value* value = GetValue(key); return value != NULL && value->GetAsString(out_value); } diff --git a/media/base/media_format.h b/media/base/media_format.h index 34b0ee5..c5132a9 100644 --- a/media/base/media_format.h +++ b/media/base/media_format.h @@ -11,15 +11,15 @@ namespace media { // Common MIME types. namespace mime_type { -extern const wchar_t kURI[]; -extern const wchar_t kApplicationOctetStream[]; -extern const wchar_t kMPEGAudio[]; -extern const wchar_t kAACAudio[]; -extern const wchar_t kH264AnnexB[]; -extern const wchar_t kUncompressedAudio[]; -extern const wchar_t kUncompressedVideo[]; -extern const wchar_t kFFmpegAudio[]; -extern const wchar_t kFFmpegVideo[]; +extern const char kURI[]; +extern const char kApplicationOctetStream[]; +extern const char kMPEGAudio[]; +extern const char kAACAudio[]; +extern const char kH264AnnexB[]; +extern const char kUncompressedAudio[]; +extern const char kUncompressedVideo[]; +extern const char kFFmpegAudio[]; +extern const char kFFmpegVideo[]; } // namespace mime_type // MediaFormat is used to describe the output of a MediaFilterInterface to @@ -65,12 +65,12 @@ class MediaFormat { void SetAsBoolean(const std::string& key, bool in_value); void SetAsInteger(const std::string& key, int in_value); void SetAsReal(const std::string& key, double in_value); - void SetAsString(const std::string& key, const std::wstring& in_value); + void SetAsString(const std::string& key, const std::string& in_value); bool GetAsBoolean(const std::string& key, bool* out_value) const; bool GetAsInteger(const std::string& key, int* out_value) const; bool GetAsReal(const std::string& key, double* out_value) const; - bool GetAsString(const std::string& key, std::wstring* out_value) const; + bool GetAsString(const std::string& key, std::string* out_value) const; private: // Helper to return a value. -- cgit v1.1