5 #ifndef MEDIA_BASE_AUDIO_TIMESTAMP_HELPER_H_
6 #define MEDIA_BASE_AUDIO_TIMESTAMP_HELPER_H_
10 #include "packager/base/macros.h"
12 namespace edash_packager {
33 uint32_t samples_per_second);
36 void SetBaseTimestamp(int64_t base_timestamp);
38 int64_t base_timestamp()
const;
39 int64_t frame_count()
const {
return frame_count_; }
44 void AddFrames(int64_t frame_count);
48 int64_t GetTimestamp()
const;
54 int64_t GetFrameDuration(int64_t frame_count)
const;
58 int64_t GetFramesToTarget(int64_t target)
const;
61 int64_t ComputeTimestamp(int64_t frame_count)
const;
63 double ticks_per_frame_;
65 int64_t base_timestamp_;