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

Side by Side Diff: media/filters/ffmpeg_glue.cc

Issue 555087: Refactor some code that depends on FFmpeg (Closed)
Patch Set: 2010 Created 10 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
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/filters/ffmpeg_glue_unittest.cc » ('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) 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
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
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer_unittest.cc ('k') | media/filters/ffmpeg_glue_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698