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

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

Issue 6993042: ffmpeg chromium glue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
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/audio_file_reader.h" 5 #include "media/filters/audio_file_reader.h"
6 6
7 #include <string> 7 #include <string>
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return false; 64 return false;
65 } 65 }
66 66
67 DCHECK(context); 67 DCHECK(context);
68 format_context_ = context; 68 format_context_ = context;
69 69
70 // Get the codec context. 70 // Get the codec context.
71 codec_context_ = NULL; 71 codec_context_ = NULL;
72 for (size_t i = 0; i < format_context_->nb_streams; ++i) { 72 for (size_t i = 0; i < format_context_->nb_streams; ++i) {
73 AVCodecContext* c = format_context_->streams[i]->codec; 73 AVCodecContext* c = format_context_->streams[i]->codec;
74 if (c->codec_type == CODEC_TYPE_AUDIO) { 74 if (c->codec_type == AVMEDIA_TYPE_AUDIO) {
75 codec_context_ = c; 75 codec_context_ = c;
76 break; 76 break;
77 } 77 }
78 } 78 }
79 79
80 // Get the codec. 80 // Get the codec.
81 if (!codec_context_) 81 if (!codec_context_)
82 return false; 82 return false;
83 83
84 av_find_stream_info(format_context_); 84 av_find_stream_info(format_context_);
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 if (size_out) 216 if (size_out)
217 *size_out = size_; 217 *size_out = size_;
218 return true; 218 return true;
219 } 219 }
220 220
221 bool InMemoryDataReader::IsStreaming() { 221 bool InMemoryDataReader::IsStreaming() {
222 return false; 222 return false;
223 } 223 }
224 224
225 } // namespace media 225 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698