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

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

Issue 10696182: Add config change handling to SourceBufferStream & ChunkDemuxer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added copyright headers to manifest files Created 8 years, 4 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/audio_decoder_config.cc ('k') | media/base/stream_parser_buffer.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) 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 #ifndef MEDIA_BASE_BYTE_QUEUE_H_ 5 #ifndef MEDIA_BASE_BYTE_QUEUE_H_
6 #define MEDIA_BASE_BYTE_QUEUE_H_ 6 #define MEDIA_BASE_BYTE_QUEUE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/media_export.h"
10 11
11 namespace media { 12 namespace media {
12 13
13 // Represents a queue of bytes. 14 // Represents a queue of bytes.
14 // Data is added to the end of the queue via an Push() call and removed via 15 // Data is added to the end of the queue via an Push() call and removed via
15 // Pop(). The contents of the queue can be observed via the Peek() method. 16 // Pop(). The contents of the queue can be observed via the Peek() method.
16 // This class manages the underlying storage of the queue and tries to minimize 17 // This class manages the underlying storage of the queue and tries to minimize
17 // the number of buffer copies when data is appended and removed. 18 // the number of buffer copies when data is appended and removed.
18 class ByteQueue { 19 class MEDIA_EXPORT ByteQueue {
19 public: 20 public:
20 ByteQueue(); 21 ByteQueue();
21 ~ByteQueue(); 22 ~ByteQueue();
22 23
23 // Reset the queue to the empty state. 24 // Reset the queue to the empty state.
24 void Reset(); 25 void Reset();
25 26
26 // Appends new bytes onto the end of the queue. 27 // Appends new bytes onto the end of the queue.
27 void Push(const uint8* data, int size); 28 void Push(const uint8* data, int size);
28 29
(...skipping 19 matching lines...) Expand all
48 49
49 // Number of bytes stored in the queue. 50 // Number of bytes stored in the queue.
50 int used_; 51 int used_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(ByteQueue); 53 DISALLOW_COPY_AND_ASSIGN(ByteQueue);
53 }; 54 };
54 55
55 } // namespace media 56 } // namespace media
56 57
57 #endif // MEDIA_BASE_BYTE_QUEUE_H_ 58 #endif // MEDIA_BASE_BYTE_QUEUE_H_
OLDNEW
« no previous file with comments | « media/base/audio_decoder_config.cc ('k') | media/base/stream_parser_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698