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

Side by Side Diff: media/base/stream_parser_buffer.cc

Issue 10067035: RefCounted types should not have public destructors, media/ and gpu/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 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 | Annotate | Revision Log
« no previous file with comments | « media/base/stream_parser_buffer.h ('k') | media/filters/audio_renderer_impl.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/base/stream_parser_buffer.h" 5 #include "media/base/stream_parser_buffer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 10
11 StreamParserBuffer::StreamParserBuffer(const uint8* data, int data_size,
12 bool is_keyframe)
13 : DataBuffer(data, data_size),
14 is_keyframe_(is_keyframe) {
15 SetDuration(kNoTimestamp());
16 }
17
18 scoped_refptr<StreamParserBuffer> StreamParserBuffer::CreateEOSBuffer() { 11 scoped_refptr<StreamParserBuffer> StreamParserBuffer::CreateEOSBuffer() {
19 return make_scoped_refptr(new StreamParserBuffer(NULL, 0, false)); 12 return make_scoped_refptr(new StreamParserBuffer(NULL, 0, false));
20 } 13 }
21 14
22 scoped_refptr<StreamParserBuffer> StreamParserBuffer::CopyFrom( 15 scoped_refptr<StreamParserBuffer> StreamParserBuffer::CopyFrom(
23 const uint8* data, int data_size, bool is_keyframe) { 16 const uint8* data, int data_size, bool is_keyframe) {
24 return make_scoped_refptr( 17 return make_scoped_refptr(
25 new StreamParserBuffer(data, data_size, is_keyframe)); 18 new StreamParserBuffer(data, data_size, is_keyframe));
26 } 19 }
27 20
28 base::TimeDelta StreamParserBuffer::GetEndTimestamp() const { 21 base::TimeDelta StreamParserBuffer::GetEndTimestamp() const {
29 DCHECK(GetTimestamp() != kNoTimestamp()); 22 DCHECK(GetTimestamp() != kNoTimestamp());
30 DCHECK(GetDuration() != kNoTimestamp()); 23 DCHECK(GetDuration() != kNoTimestamp());
31 return GetTimestamp() + GetDuration(); 24 return GetTimestamp() + GetDuration();
32 } 25 }
33 26
27 StreamParserBuffer::StreamParserBuffer(const uint8* data, int data_size,
28 bool is_keyframe)
29 : DataBuffer(data, data_size),
30 is_keyframe_(is_keyframe) {
31 SetDuration(kNoTimestamp());
32 }
33
34
35 StreamParserBuffer::~StreamParserBuffer() {
36 }
37
34 } // namespace media 38 } // namespace media
OLDNEW
« no previous file with comments | « media/base/stream_parser_buffer.h ('k') | media/filters/audio_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698