| OLD | NEW |
| 1 // Copyright (c) 2009 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 #include "base/string_util.h" | 5 #include "base/string_util.h" |
| 6 #include "media/base/filters.h" | 6 #include "media/base/filters.h" |
| 7 #include "media/filters/ffmpeg_common.h" | 7 #include "media/ffmpeg/ffmpeg_common.h" |
| 8 #include "media/filters/ffmpeg_glue.h" | 8 #include "media/filters/ffmpeg_glue.h" |
| 9 | 9 |
| 10 namespace { | 10 namespace { |
| 11 | 11 |
| 12 media::FFmpegURLProtocol* ToProtocol(void* data) { | 12 media::FFmpegURLProtocol* ToProtocol(void* data) { |
| 13 return reinterpret_cast<media::FFmpegURLProtocol*>(data); | 13 return reinterpret_cast<media::FFmpegURLProtocol*>(data); |
| 14 } | 14 } |
| 15 | 15 |
| 16 // FFmpeg protocol interface. | 16 // FFmpeg protocol interface. |
| 17 int OpenContext(URLContext* h, const char* filename, int flags) { | 17 int OpenContext(URLContext* h, const char* filename, int flags) { |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 } | 148 } |
| 149 | 149 |
| 150 std::string FFmpegGlue::GetProtocolKey(FFmpegURLProtocol* protocol) { | 150 std::string FFmpegGlue::GetProtocolKey(FFmpegURLProtocol* protocol) { |
| 151 // Use the FFmpegURLProtocol's memory address to generate the unique string. | 151 // Use the FFmpegURLProtocol's memory address to generate the unique string. |
| 152 // This also has the nice property that adding the same FFmpegURLProtocol | 152 // This also has the nice property that adding the same FFmpegURLProtocol |
| 153 // reference will not generate duplicate entries. | 153 // reference will not generate duplicate entries. |
| 154 return StringPrintf("%s://%p", kProtocol, static_cast<void*>(protocol)); | 154 return StringPrintf("%s://%p", kProtocol, static_cast<void*>(protocol)); |
| 155 } | 155 } |
| 156 | 156 |
| 157 } // namespace media | 157 } // namespace media |
| OLD | NEW |