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

Side by Side Diff: media/base/media_format.cc

Issue 18546: Implementation of Pipeline and FilterHost interfaces. This is a large change... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « media/base/media_format.h ('k') | media/base/pipeline.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "media/base/media_format.h" 5 #include "media/base/media_format.h"
6 6
7 namespace media { 7 namespace media {
8 8
9 namespace mime_type { 9 namespace mime_type {
10 10
11 // Represents a URI, typically used to create a DataSourceInterface. 11 // Represents a URL, typically used to create a DataSourceInterface.
12 // Expected keys: 12 // Expected keys:
13 // kUri String The URI 13 // kURL String The URL
14 const char kURI[] = "text/x-uri"; 14 const char kURL[] = "text/x-url";
15 15
16 // Represents a generic byte stream, typically from a DataSourceInterface. 16 // Represents a generic byte stream, typically from a DataSourceInterface.
17 // Expected keys: 17 // Expected keys:
18 // None 18 // None
19 const char kApplicationOctetStream[] = "application/octet-stream"; 19 const char kApplicationOctetStream[] = "application/octet-stream";
20 20
21 // Represents encoded audio data, typically from an DemuxerStreamInterface. 21 // Represents encoded audio data, typically from an DemuxerStreamInterface.
22 // Expected keys: 22 // Expected keys:
23 // None 23 // None
24 const char kMPEGAudio[] = "audio/mpeg"; 24 const char kMPEGAudio[] = "audio/mpeg";
(...skipping 12 matching lines...) Expand all
37 const char kUncompressedAudio[] = "audio/x-uncompressed"; 37 const char kUncompressedAudio[] = "audio/x-uncompressed";
38 38
39 // Represents decoded video data, typically from a VideoDecoderInterface. 39 // Represents decoded video data, typically from a VideoDecoderInterface.
40 // Other information, such as surface format (i.e., YV12), stride and planes are 40 // Other information, such as surface format (i.e., YV12), stride and planes are
41 // included with the buffer itself and is not part of the MediaFormat. 41 // included with the buffer itself and is not part of the MediaFormat.
42 // Expected keys: 42 // Expected keys:
43 // kWidth Integer Display width of the surface 43 // kWidth Integer Display width of the surface
44 // kHeight Integer Display height of the surface 44 // kHeight Integer Display height of the surface
45 const char kUncompressedVideo[] = "video/x-uncompressed"; 45 const char kUncompressedVideo[] = "video/x-uncompressed";
46 46
47 // Major types of media types begin with the prefix "audio/" or "video/".
48 const char kMajorTypeVideo[] = "video/";
49 const char kMajorTypeAudio[] = "audio/";
50
47 } // namespace mime_type 51 } // namespace mime_type
48 52
49 // Common keys. 53 // Common keys.
50 const char MediaFormat::kMimeType[] = "MimeType"; 54 const char MediaFormat::kMimeType[] = "MimeType";
51 const char MediaFormat::kURI[] = "Uri"; 55 const char MediaFormat::kURL[] = "URL";
52 const char MediaFormat::kSurfaceFormat[] = "SurfaceFormat"; 56 const char MediaFormat::kSurfaceFormat[] = "SurfaceFormat";
53 const char MediaFormat::kSampleRate[] = "SampleRate"; 57 const char MediaFormat::kSampleRate[] = "SampleRate";
54 const char MediaFormat::kSampleBits[] = "SampleBits"; 58 const char MediaFormat::kSampleBits[] = "SampleBits";
55 const char MediaFormat::kChannels[] = "Channels"; 59 const char MediaFormat::kChannels[] = "Channels";
56 const char MediaFormat::kWidth[] = "Width"; 60 const char MediaFormat::kWidth[] = "Width";
57 const char MediaFormat::kHeight[] = "Height"; 61 const char MediaFormat::kHeight[] = "Height";
58 62
59 MediaFormat::MediaFormat() { 63 MediaFormat::MediaFormat() {
60 } 64 }
61 65
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 Value* value = GetValue(key); 115 Value* value = GetValue(key);
112 return value != NULL && value->GetAsString(out_value); 116 return value != NULL && value->GetAsString(out_value);
113 } 117 }
114 118
115 Value* MediaFormat::GetValue(const std::string& key) const { 119 Value* MediaFormat::GetValue(const std::string& key) const {
116 ValueMap::const_iterator value_iter = value_map_.find(key); 120 ValueMap::const_iterator value_iter = value_map_.find(key);
117 return (value_iter == value_map_.end()) ? NULL : value_iter->second; 121 return (value_iter == value_map_.end()) ? NULL : value_iter->second;
118 } 122 }
119 123
120 } // namespace media 124 } // namespace media
OLDNEW
« no previous file with comments | « media/base/media_format.h ('k') | media/base/pipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698