OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/logging.h" | 7 #include "base/logging.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "media/base/filters.h" | |
10 #include "media/ffmpeg/ffmpeg_common.h" | 9 #include "media/ffmpeg/ffmpeg_common.h" |
11 | 10 |
12 namespace media { | 11 namespace media { |
13 | 12 |
14 static FFmpegURLProtocol* ToProtocol(void* data) { | 13 static FFmpegURLProtocol* ToProtocol(void* data) { |
15 return reinterpret_cast<FFmpegURLProtocol*>(data); | 14 return reinterpret_cast<FFmpegURLProtocol*>(data); |
16 } | 15 } |
17 | 16 |
18 // FFmpeg protocol interface. | 17 // FFmpeg protocol interface. |
19 static int OpenContext(URLContext* h, const char* filename, int flags) { | 18 static int OpenContext(URLContext* h, const char* filename, int flags) { |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 } | 183 } |
185 | 184 |
186 std::string FFmpegGlue::GetProtocolKey(FFmpegURLProtocol* protocol) { | 185 std::string FFmpegGlue::GetProtocolKey(FFmpegURLProtocol* protocol) { |
187 // Use the FFmpegURLProtocol's memory address to generate the unique string. | 186 // Use the FFmpegURLProtocol's memory address to generate the unique string. |
188 // This also has the nice property that adding the same FFmpegURLProtocol | 187 // This also has the nice property that adding the same FFmpegURLProtocol |
189 // reference will not generate duplicate entries. | 188 // reference will not generate duplicate entries. |
190 return base::StringPrintf("%s://%p", kProtocol, static_cast<void*>(protocol)); | 189 return base::StringPrintf("%s://%p", kProtocol, static_cast<void*>(protocol)); |
191 } | 190 } |
192 | 191 |
193 } // namespace media | 192 } // namespace media |
OLD | NEW |