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

Side by Side Diff: media/formats/webm/cluster_builder.h

Issue 328653002: Fix WebMStreamParser to continue parsing after a cluster end (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/chunk_demuxer_unittest.cc ('k') | media/formats/webm/cluster_builder.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_FORMATS_WEBM_CLUSTER_BUILDER_H_ 5 #ifndef MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_H_
6 #define MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_H_ 6 #define MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_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/buffers.h" 10 #include "media/base/buffers.h"
(...skipping 22 matching lines...) Expand all
33 33
34 void SetClusterTimecode(int64 cluster_timecode); 34 void SetClusterTimecode(int64 cluster_timecode);
35 void AddSimpleBlock(int track_num, int64 timecode, int flags, 35 void AddSimpleBlock(int track_num, int64 timecode, int flags,
36 const uint8* data, int size); 36 const uint8* data, int size);
37 void AddBlockGroup(int track_num, int64 timecode, int duration, int flags, 37 void AddBlockGroup(int track_num, int64 timecode, int duration, int flags,
38 const uint8* data, int size); 38 const uint8* data, int size);
39 void AddBlockGroupWithoutBlockDuration(int track_num, int64 timecode, 39 void AddBlockGroupWithoutBlockDuration(int track_num, int64 timecode,
40 int flags, const uint8* data, int size); 40 int flags, const uint8* data, int size);
41 41
42 scoped_ptr<Cluster> Finish(); 42 scoped_ptr<Cluster> Finish();
43 scoped_ptr<Cluster> FinishWithUnknownSize();
43 44
44 private: 45 private:
45 void AddBlockGroupInternal(int track_num, int64 timecode, 46 void AddBlockGroupInternal(int track_num, int64 timecode,
46 bool include_block_duration, int duration, 47 bool include_block_duration, int duration,
47 int flags, const uint8* data, int size); 48 int flags, const uint8* data, int size);
48 void Reset(); 49 void Reset();
49 void ExtendBuffer(int bytes_needed); 50 void ExtendBuffer(int bytes_needed);
50 void UpdateUInt64(int offset, int64 value); 51 void UpdateUInt64(int offset, int64 value);
51 void WriteBlock(uint8* buf, int track_num, int64 timecode, int flags, 52 void WriteBlock(uint8* buf, int track_num, int64 timecode, int flags,
52 const uint8* data, int size); 53 const uint8* data, int size);
53 54
54 scoped_ptr<uint8[]> buffer_; 55 scoped_ptr<uint8[]> buffer_;
55 int buffer_size_; 56 int buffer_size_;
56 int bytes_used_; 57 int bytes_used_;
57 int64 cluster_timecode_; 58 int64 cluster_timecode_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(ClusterBuilder); 60 DISALLOW_COPY_AND_ASSIGN(ClusterBuilder);
60 }; 61 };
61 62
62 } // namespace media 63 } // namespace media
63 64
64 #endif // MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_H_ 65 #endif // MEDIA_FORMATS_WEBM_CLUSTER_BUILDER_H_
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/formats/webm/cluster_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698