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

Side by Side Diff: media/base/data_buffer.h

Issue 10269022: Add StreamParserBuffer to ChunkDemuxer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase ToT 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 | « no previous file | media/base/data_buffer.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) 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 // A simple implementation of Buffer that takes ownership of the given data 5 // A simple implementation of Buffer that takes ownership of the given data
6 // pointer. 6 // pointer.
7 // 7 //
8 // DataBuffer assumes that memory was allocated with new uint8[]. 8 // DataBuffer assumes that memory was allocated with new uint8[].
9 9
10 #ifndef MEDIA_BASE_DATA_BUFFER_H_ 10 #ifndef MEDIA_BASE_DATA_BUFFER_H_
(...skipping 27 matching lines...) Expand all
38 // Updates the size of valid data in bytes, which must be less than or equal 38 // Updates the size of valid data in bytes, which must be less than or equal
39 // to GetBufferSize(). 39 // to GetBufferSize().
40 virtual void SetDataSize(int data_size); 40 virtual void SetDataSize(int data_size);
41 41
42 // Returns the size of the underlying buffer. 42 // Returns the size of the underlying buffer.
43 virtual int GetBufferSize() const; 43 virtual int GetBufferSize() const;
44 44
45 virtual void SetDecryptConfig(scoped_ptr<DecryptConfig> decrypt_config); 45 virtual void SetDecryptConfig(scoped_ptr<DecryptConfig> decrypt_config);
46 46
47 protected: 47 protected:
48 // Copies from [data,data+size) to owned array.
49 DataBuffer(const uint8* data, int size);
48 virtual ~DataBuffer(); 50 virtual ~DataBuffer();
49 51
50 private: 52 private:
51 scoped_array<uint8> data_; 53 scoped_array<uint8> data_;
52 int buffer_size_; 54 int buffer_size_;
53 int data_size_; 55 int data_size_;
54 scoped_ptr<DecryptConfig> decrypt_config_; 56 scoped_ptr<DecryptConfig> decrypt_config_;
55 57
56 DISALLOW_COPY_AND_ASSIGN(DataBuffer); 58 DISALLOW_COPY_AND_ASSIGN(DataBuffer);
57 }; 59 };
58 60
59 } // namespace media 61 } // namespace media
60 62
61 #endif // MEDIA_BASE_DATA_BUFFER_H_ 63 #endif // MEDIA_BASE_DATA_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/data_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698