5 #ifndef PACKAGER_MEDIA_FORMATS_WEBM_TRACKS_BUILDER_H_
6 #define PACKAGER_MEDIA_FORMATS_WEBM_TRACKS_BUILDER_H_
14 #include "packager/base/macros.h"
33 void AddVideoTrack(
int track_num,
35 const std::string& codec_id,
36 const std::string& name,
37 const std::string& language,
39 int video_pixel_width,
40 int video_pixel_height);
41 void AddAudioTrack(
int track_num,
43 const std::string& codec_id,
44 const std::string& name,
45 const std::string& language,
48 double audio_sampling_frequency);
49 void AddTextTrack(
int track_num,
51 const std::string& codec_id,
52 const std::string& name,
53 const std::string& language);
55 std::vector<uint8_t> Finish();
58 void AddTrackInternal(
int track_num,
61 const std::string& codec_id,
62 const std::string& name,
63 const std::string& language,
65 int video_pixel_width,
66 int video_pixel_height,
68 double audio_sampling_frequency);
69 int GetTracksSize()
const;
70 int GetTracksPayloadSize()
const;
71 void WriteTracks(uint8_t* buffer,
int buffer_size)
const;
78 const std::string& codec_id,
79 const std::string& name,
80 const std::string& language,
82 int video_pixel_width,
83 int video_pixel_height,
85 double audio_sampling_frequency,
86 bool allow_invalid_values);
89 void Write(uint8_t** buf,
int* buf_size)
const;
92 int GetPayloadSize()
const;
93 int GetVideoPayloadSize()
const;
94 int GetAudioPayloadSize()
const;
99 std::string codec_id_;
101 std::string language_;
102 int default_duration_;
103 int video_pixel_width_;
104 int video_pixel_height_;
106 double audio_sampling_frequency_;
109 typedef std::list<Track> TrackList;
111 bool allow_invalid_values_;
119 #endif // PACKAGER_MEDIA_FORMATS_WEBM_TRACKS_BUILDER_H_