OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/filters/ffmpeg_glue.h" | 5 #include "media/filters/ffmpeg_glue.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/logging.h" |
| 8 #include "base/stringprintf.h" |
8 #include "media/base/filters.h" | 9 #include "media/base/filters.h" |
9 #include "media/ffmpeg/ffmpeg_common.h" | 10 #include "media/ffmpeg/ffmpeg_common.h" |
10 | 11 |
11 namespace media { | 12 namespace media { |
12 | 13 |
13 static FFmpegURLProtocol* ToProtocol(void* data) { | 14 static FFmpegURLProtocol* ToProtocol(void* data) { |
14 return reinterpret_cast<FFmpegURLProtocol*>(data); | 15 return reinterpret_cast<FFmpegURLProtocol*>(data); |
15 } | 16 } |
16 | 17 |
17 // FFmpeg protocol interface. | 18 // FFmpeg protocol interface. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 *protocol = NULL; | 175 *protocol = NULL; |
175 return; | 176 return; |
176 } | 177 } |
177 *protocol = iter->second; | 178 *protocol = iter->second; |
178 } | 179 } |
179 | 180 |
180 std::string FFmpegGlue::GetProtocolKey(FFmpegURLProtocol* protocol) { | 181 std::string FFmpegGlue::GetProtocolKey(FFmpegURLProtocol* protocol) { |
181 // Use the FFmpegURLProtocol's memory address to generate the unique string. | 182 // Use the FFmpegURLProtocol's memory address to generate the unique string. |
182 // This also has the nice property that adding the same FFmpegURLProtocol | 183 // This also has the nice property that adding the same FFmpegURLProtocol |
183 // reference will not generate duplicate entries. | 184 // reference will not generate duplicate entries. |
184 return StringPrintf("%s://%p", kProtocol, static_cast<void*>(protocol)); | 185 return base::StringPrintf("%s://%p", kProtocol, static_cast<void*>(protocol)); |
185 } | 186 } |
186 | 187 |
187 } // namespace media | 188 } // namespace media |
OLD | NEW |