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

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

Issue 100195: Enable video in linux build and remove unneeded ifdefs to guard windows. (Closed)
Patch Set: Fix inifite loop. Created 11 years, 7 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.h ('k') | media/media.gyp » ('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) 2009 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/filters/ffmpeg_common.h"
8 #include "media/filters/ffmpeg_glue.h" 8 #include "media/filters/ffmpeg_glue.h"
9 9
10 namespace { 10 namespace {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 &OpenContext, 98 &OpenContext,
99 &ReadContext, 99 &ReadContext,
100 &WriteContext, 100 &WriteContext,
101 &SeekContext, 101 &SeekContext,
102 &CloseContext, 102 &CloseContext,
103 }; 103 };
104 104
105 FFmpegGlue::FFmpegGlue() { 105 FFmpegGlue::FFmpegGlue() {
106 // Register our protocol glue code with FFmpeg. 106 // Register our protocol glue code with FFmpeg.
107 avcodec_init(); 107 avcodec_init();
108 register_protocol(&kFFmpegProtocol); 108 av_register_protocol(&kFFmpegProtocol);
109 109
110 // Now register the rest of FFmpeg. 110 // Now register the rest of FFmpeg.
111 av_register_all(); 111 av_register_all();
112 } 112 }
113 113
114 FFmpegGlue::~FFmpegGlue() { 114 FFmpegGlue::~FFmpegGlue() {
115 } 115 }
116 116
117 std::string FFmpegGlue::AddDataSource(DataSource* data_source) { 117 std::string FFmpegGlue::AddDataSource(DataSource* data_source) {
118 AutoLock auto_lock(lock_); 118 AutoLock auto_lock(lock_);
(...skipping 28 matching lines...) Expand all
147 } 147 }
148 148
149 std::string FFmpegGlue::GetDataSourceKey(DataSource* data_source) { 149 std::string FFmpegGlue::GetDataSourceKey(DataSource* data_source) {
150 // Use the DataSource's memory address to generate the unique string. This 150 // Use the DataSource's memory address to generate the unique string. This
151 // also has the nice property that adding the same DataSource reference will 151 // also has the nice property that adding the same DataSource reference will
152 // not generate duplicate entries. 152 // not generate duplicate entries.
153 return StringPrintf("%s://0x%lx", kProtocol, static_cast<void*>(data_source)); 153 return StringPrintf("%s://0x%lx", kProtocol, static_cast<void*>(data_source));
154 } 154 }
155 155
156 } // namespace media 156 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_demuxer.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698