cc: Added inline to Tile::IsReadyToDraw
[chromium-blink-merge.git] / media / webm / tracks_builder.h
blob87ceaed3adc9cbc88e07f46b4594e92407d0a5d3
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_WEBM_TRACKS_BUILDER_H_
6 #define MEDIA_WEBM_TRACKS_BUILDER_H_
8 #include <list>
9 #include <string>
10 #include <vector>
12 #include "base/basictypes.h"
14 namespace media {
16 class TracksBuilder {
17 public:
18 TracksBuilder();
19 ~TracksBuilder();
21 void AddTrack(int track_num, int track_type, const std::string& codec_id,
22 const std::string& name, const std::string& language);
24 std::vector<uint8> Finish();
26 private:
27 int GetTracksSize() const;
28 int GetTracksPayloadSize() const;
29 void WriteTracks(uint8* buffer, int buffer_size) const;
31 class Track {
32 public:
33 Track(int track_num, int track_type, const std::string& codec_id,
34 const std::string& name, const std::string& language);
36 int GetSize() const;
37 void Write(uint8** buf, int* buf_size) const;
38 private:
39 int GetPayloadSize() const;
41 int track_num_;
42 int track_type_;
43 std::string codec_id_;
44 std::string name_;
45 std::string language_;
48 typedef std::list<Track> TrackList;
49 TrackList tracks_;
51 DISALLOW_COPY_AND_ASSIGN(TracksBuilder);
54 } // namespace media
56 #endif // MEDIA_WEBM_TRACKS_BUILDER_H_