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

Unified Diff: media/base/media_format.h

Issue 7452016: Remove MediaFormat once and for all. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/filters.h ('k') | media/base/media_format.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_format.h
diff --git a/media/base/media_format.h b/media/base/media_format.h
deleted file mode 100644
index 419488b9f3a204e4b140fa427f83dfbbb08bbac0..0000000000000000000000000000000000000000
--- a/media/base/media_format.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_BASE_MEDIA_FORMAT_H_
-#define MEDIA_BASE_MEDIA_FORMAT_H_
-
-#include <map>
-#include <string>
-
-#include "base/values.h"
-
-namespace media {
-
-// MediaFormat is used to describe the output of a Filter to determine whether
-// a downstream filter can accept the output from an upstream filter.
-//
-// For example, an audio decoder could output key-values for the number of
-// channels and the sample rate. A downstream audio renderer would use this
-// information to properly initialize the audio hardware before playback
-// started.
-class MediaFormat {
- public:
- // Common keys.
- static const char kURL[];
- static const char kSurfaceType[];
- static const char kSurfaceFormat[];
- static const char kSampleRate[];
- static const char kSampleBits[];
- static const char kChannels[];
- static const char kWidth[];
- static const char kHeight[];
-
- MediaFormat();
- ~MediaFormat();
-
- // Basic map operations.
- bool empty() const { return value_map_.empty(); }
-
- bool Contains(const std::string& key) const;
-
- void Clear();
-
- // Value accessors.
- 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::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::string* out_value) const;
-
- bool operator==(MediaFormat const& other) const;
-
- private:
- // Helper to return a value.
- Value* GetValue(const std::string& key) const;
-
- // Helper to release Value of the key
- void ReleaseValue(const std::string& key);
-
- typedef std::map<std::string, Value*> ValueMap;
- ValueMap value_map_;
-
- DISALLOW_COPY_AND_ASSIGN(MediaFormat);
-};
-
-} // namespace media
-
-#endif // MEDIA_BASE_MEDIA_FORMAT_H_
« no previous file with comments | « media/base/filters.h ('k') | media/base/media_format.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698