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

Side by Side Diff: media/webm/webm_cluster_parser.h

Issue 8989041: Revert 115214 (caused media_unittests failure in FFmpegGlueTest, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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/webm/webm_cluster_parser.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) 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_WEBM_WEBM_CLUSTER_PARSER_H_ 5 #ifndef MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_
6 #define MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ 6 #define MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "media/base/buffers.h" 12 #include "media/base/buffers.h"
13 #include "media/webm/webm_parser.h" 13 #include "media/webm/webm_parser.h"
14 14
15 namespace media { 15 namespace media {
16 16
17 class WebMClusterParser : public WebMParserClient { 17 class WebMClusterParser : public WebMParserClient {
18 public: 18 public:
19 typedef std::deque<scoped_refptr<Buffer> > BufferQueue; 19 typedef std::deque<scoped_refptr<Buffer> > BufferQueue;
20 20
21 WebMClusterParser(int64 timecode_scale, 21 WebMClusterParser(int64 timecode_scale,
22 int audio_track_num, 22 int audio_track_num,
23 base::TimeDelta audio_default_duration, 23 base::TimeDelta audio_default_duration,
24 int video_track_num, 24 int video_track_num,
25 base::TimeDelta video_default_duration); 25 base::TimeDelta video_default_duration);
26 virtual ~WebMClusterParser(); 26 virtual ~WebMClusterParser();
27 27
28 // Resets the parser state so it can accept a new cluster.
29 void Reset();
30
31 // Parses a WebM cluster element in |buf|. 28 // Parses a WebM cluster element in |buf|.
32 // 29 //
33 // Returns -1 if the parse fails. 30 // Returns -1 if the parse fails.
34 // Returns 0 if more data is needed. 31 // Returns 0 if more data is needed.
35 // Returns the number of bytes parsed on success. 32 // Returns the number of bytes parsed on success.
36 int Parse(const uint8* buf, int size); 33 int Parse(const uint8* buf, int size);
37 34
38 const BufferQueue& audio_buffers() const { return audio_buffers_; } 35 const BufferQueue& audio_buffers() const { return audio_buffers_; }
39 const BufferQueue& video_buffers() const { return video_buffers_; } 36 const BufferQueue& video_buffers() const { return video_buffers_; }
40 37
(...skipping 22 matching lines...) Expand all
63 int64 cluster_timecode_; 60 int64 cluster_timecode_;
64 BufferQueue audio_buffers_; 61 BufferQueue audio_buffers_;
65 BufferQueue video_buffers_; 62 BufferQueue video_buffers_;
66 63
67 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); 64 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser);
68 }; 65 };
69 66
70 } // namespace media 67 } // namespace media
71 68
72 #endif // MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ 69 #endif // MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/webm/webm_cluster_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698