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

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

Issue 46015: Buffer interface is not uint8*. Slight change to way data buffers are create... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/filters/audio_renderer_base.cc ('k') | no next file » | 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 "base/time.h" 6 #include "base/time.h"
7 #include "media/base/filter_host.h" 7 #include "media/base/filter_host.h"
8 #include "media/filters/ffmpeg_common.h" 8 #include "media/filters/ffmpeg_common.h"
9 #include "media/filters/ffmpeg_demuxer.h" 9 #include "media/filters/ffmpeg_demuxer.h"
10 #include "media/filters/ffmpeg_glue.h" 10 #include "media/filters/ffmpeg_glue.h"
(...skipping 11 matching lines...) Expand all
22 DCHECK(packet); 22 DCHECK(packet);
23 SetTimestamp(timestamp); 23 SetTimestamp(timestamp);
24 SetDuration(duration); 24 SetDuration(duration);
25 } 25 }
26 26
27 virtual ~AVPacketBuffer() { 27 virtual ~AVPacketBuffer() {
28 av_free_packet(packet_.get()); 28 av_free_packet(packet_.get());
29 } 29 }
30 30
31 // Buffer implementation. 31 // Buffer implementation.
32 virtual const char* GetData() const { 32 virtual const uint8* GetData() const {
33 return reinterpret_cast<const char*>(packet_->data); 33 return reinterpret_cast<const uint8*>(packet_->data);
34 } 34 }
35 35
36 virtual size_t GetDataSize() const { 36 virtual size_t GetDataSize() const {
37 return static_cast<size_t>(packet_->size); 37 return static_cast<size_t>(packet_->size);
38 } 38 }
39 39
40 private: 40 private:
41 scoped_ptr<AVPacket> packet_; 41 scoped_ptr<AVPacket> packet_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(AVPacketBuffer); 43 DISALLOW_COPY_AND_ASSIGN(AVPacketBuffer);
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 StreamVector::iterator iter; 272 StreamVector::iterator iter;
273 for (iter = streams_.begin(); iter != streams_.end(); ++iter) { 273 for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
274 if ((*iter)->HasPendingReads()) { 274 if ((*iter)->HasPendingReads()) {
275 return true; 275 return true;
276 } 276 }
277 } 277 }
278 return false; 278 return false;
279 } 279 }
280 280
281 } // namespace media 281 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/audio_renderer_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698