OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 MEDIA_BASE_MEDIA_FORMAT_H_ | 5 #ifndef MEDIA_BASE_MEDIA_FORMAT_H_ |
6 #define MEDIA_BASE_MEDIA_FORMAT_H_ | 6 #define MEDIA_BASE_MEDIA_FORMAT_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 | 12 |
13 namespace media { | 13 namespace media { |
14 | 14 |
15 // Common MIME types. | 15 // Common MIME types. |
16 namespace mime_type { | 16 namespace mime_type { |
17 extern const char kURL[]; | 17 extern const char kURL[]; |
18 extern const char kApplicationOctetStream[]; | 18 extern const char kApplicationOctetStream[]; |
19 extern const char kMPEGAudio[]; | 19 extern const char kMPEGAudio[]; |
20 extern const char kAACAudio[]; | 20 extern const char kAACAudio[]; |
21 extern const char kH264AnnexB[]; | 21 extern const char kH264AnnexB[]; |
22 extern const char kUncompressedAudio[]; | 22 extern const char kUncompressedAudio[]; |
23 extern const char kUncompressedVideo[]; | 23 extern const char kUncompressedVideo[]; |
24 extern const char kUncompressedVideoEglImage[]; | 24 extern const char kUncompressedVideoEglImage[]; |
25 extern const char kMajorTypeAudio[]; | 25 extern const char kMajorTypeAudio[]; |
26 extern const char kMajorTypeVideo[]; | 26 extern const char kMajorTypeVideo[]; |
27 } // namespace mime_type | 27 } // namespace mime_type |
28 | 28 |
29 // MediaFormat is used to describe the output of a MediaFilterInterface to | 29 // MediaFormat is used to describe the output of a Filter to determine whether |
30 // determine whether a downstream filter can accept the output from an upstream | 30 // a downstream filter can accept the output from an upstream filter. |
31 // filter. In general, every MediaFormat contains a MIME type describing | 31 // In general, every MediaFormat contains a MIME type describing its output as |
32 // its output as well as additional key-values describing additional details. | 32 // well as additional key-values describing additional details. |
33 // | 33 // |
34 // For example, an audio decoder could output audio/x-uncompressed and include | 34 // For example, an audio decoder could output audio/x-uncompressed and include |
35 // additional key-values such as the number of channels and the sample rate. | 35 // additional key-values such as the number of channels and the sample rate. |
36 // An audio renderer would use this information to properly initialize the | 36 // An audio renderer would use this information to properly initialize the |
37 // audio hardware before playback started. | 37 // audio hardware before playback started. |
38 // | 38 // |
39 // It's also perfectly acceptable to create your own MIME types and standards | 39 // It's also perfectly acceptable to create your own MIME types and standards |
40 // to allow communication between two filters that goes beyond the basics | 40 // to allow communication between two filters that goes beyond the basics |
41 // described here. For example, you could write a video decoder that outputs | 41 // described here. For example, you could write a video decoder that outputs |
42 // a MIME type video/x-special for which your video renderer knows it's some | 42 // a MIME type video/x-special for which your video renderer knows it's some |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 typedef std::map<std::string, Value*> ValueMap; | 87 typedef std::map<std::string, Value*> ValueMap; |
88 ValueMap value_map_; | 88 ValueMap value_map_; |
89 | 89 |
90 DISALLOW_COPY_AND_ASSIGN(MediaFormat); | 90 DISALLOW_COPY_AND_ASSIGN(MediaFormat); |
91 }; | 91 }; |
92 | 92 |
93 } // namespace media | 93 } // namespace media |
94 | 94 |
95 #endif // MEDIA_BASE_MEDIA_FORMAT_H_ | 95 #endif // MEDIA_BASE_MEDIA_FORMAT_H_ |
OLD | NEW |