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

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: once more new test_expectations.txt 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
« no previous file with comments | « media/ffmpeg/ffmpeg_unittest.cc ('k') | media/filters/bitstream_converter.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) 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 } 175 }
176 176
177 current_frame += frames_read; 177 current_frame += frames_read;
178 } 178 }
179 179
180 return true; 180 return true;
181 } 181 }
182 182
183 } // namespace media 183 } // namespace media
OLDNEW
« no previous file with comments | « media/ffmpeg/ffmpeg_unittest.cc ('k') | media/filters/bitstream_converter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698