123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- #ifndef API_VIDEO_VIDEO_TIMING_H_
- #define API_VIDEO_VIDEO_TIMING_H_
- #include <stdint.h>
- #include <limits>
- #include <string>
- namespace webrtc {
- struct VideoSendTiming {
- enum TimingFrameFlags : uint8_t {
- kNotTriggered = 0,
-
- kTriggeredByTimer = 1 << 0,
- kTriggeredBySize = 1 << 1,
- kInvalid = std::numeric_limits<uint8_t>::max()
- };
-
-
-
-
- static uint16_t GetDeltaCappedMs(int64_t base_ms, int64_t time_ms);
- uint16_t encode_start_delta_ms;
- uint16_t encode_finish_delta_ms;
- uint16_t packetization_finish_delta_ms;
- uint16_t pacer_exit_delta_ms;
- uint16_t network_timestamp_delta_ms;
- uint16_t network2_timestamp_delta_ms;
- uint8_t flags;
- };
- struct TimingFrameInfo {
- TimingFrameInfo();
-
-
- int64_t EndToEndDelay() const;
-
-
-
- bool IsLongerThan(const TimingFrameInfo& other) const;
-
-
- bool IsOutlier() const;
-
-
- bool IsTimerTriggered() const;
-
-
- bool IsInvalid() const;
- std::string ToString() const;
- bool operator<(const TimingFrameInfo& other) const;
- bool operator<=(const TimingFrameInfo& other) const;
- uint32_t rtp_timestamp;
-
-
-
-
- int64_t capture_time_ms;
- int64_t encode_start_ms;
- int64_t encode_finish_ms;
- int64_t packetization_finish_ms;
- int64_t pacer_exit_ms;
-
- int64_t network_timestamp_ms;
- int64_t network2_timestamp_ms;
- int64_t receive_start_ms;
- int64_t receive_finish_ms;
- int64_t decode_start_ms;
- int64_t decode_finish_ms;
- int64_t render_time_ms;
- uint8_t flags;
- };
- struct VideoPlayoutDelay {
- VideoPlayoutDelay() = default;
- VideoPlayoutDelay(int min_ms, int max_ms) : min_ms(min_ms), max_ms(max_ms) {}
- int min_ms = -1;
- int max_ms = -1;
- bool operator==(const VideoPlayoutDelay& rhs) const {
- return min_ms == rhs.min_ms && max_ms == rhs.max_ms;
- }
- };
- using PlayoutDelay = VideoPlayoutDelay;
- }
- #endif
|