5 #ifndef PACKAGER_MEDIA_FORMATS_WEBM_TRACKS_BUILDER_H_
6 #define PACKAGER_MEDIA_FORMATS_WEBM_TRACKS_BUILDER_H_
13 #include <packager/macros/classes.h>
32 void AddVideoTrack(
int track_num,
34 const std::string& codec_id,
35 const std::string& name,
36 const std::string& language,
38 int video_pixel_width,
39 int video_pixel_height);
40 void AddAudioTrack(
int track_num,
42 const std::string& codec_id,
43 const std::string& name,
44 const std::string& language,
47 double audio_sampling_frequency);
48 void AddTextTrack(
int track_num,
50 const std::string& codec_id,
51 const std::string& name,
52 const std::string& language);
54 std::vector<uint8_t> Finish();
57 void AddTrackInternal(
int track_num,
60 const std::string& codec_id,
61 const std::string& name,
62 const std::string& language,
64 int video_pixel_width,
65 int video_pixel_height,
67 double audio_sampling_frequency);
68 int GetTracksSize()
const;
69 int GetTracksPayloadSize()
const;
70 void WriteTracks(uint8_t* buffer,
int buffer_size)
const;
77 const std::string& codec_id,
78 const std::string& name,
79 const std::string& language,
81 int video_pixel_width,
82 int video_pixel_height,
84 double audio_sampling_frequency,
85 bool allow_invalid_values);
88 void Write(uint8_t** buf,
int* buf_size)
const;
91 int GetPayloadSize()
const;
92 int GetVideoPayloadSize()
const;
93 int GetAudioPayloadSize()
const;
98 std::string codec_id_;
100 std::string language_;
101 int default_duration_;
102 int video_pixel_width_;
103 int video_pixel_height_;
105 double audio_sampling_frequency_;
108 typedef std::list<Track> TrackList;
110 bool allow_invalid_values_;
All the methods that are virtual are virtual for mocking.