| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // Some decoders require encoded image buffers to be padded with a small | 29 // Some decoders require encoded image buffers to be padded with a small |
| 30 // number of additional bytes (due to over-reading byte readers). | 30 // number of additional bytes (due to over-reading byte readers). |
| 31 static size_t GetBufferPaddingBytes(VideoCodecType codec_type); | 31 static size_t GetBufferPaddingBytes(VideoCodecType codec_type); |
| 32 | 32 |
| 33 EncodedImage() : EncodedImage(nullptr, 0, 0) {} | 33 EncodedImage() : EncodedImage(nullptr, 0, 0) {} |
| 34 | 34 |
| 35 EncodedImage(uint8_t* buffer, size_t length, size_t size) | 35 EncodedImage(uint8_t* buffer, size_t length, size_t size) |
| 36 : _buffer(buffer), _length(length), _size(size) {} | 36 : _buffer(buffer), _length(length), _size(size) {} |
| 37 | 37 |
| 38 void SetEncodeTime(int64_t encode_start_ms, int64_t encode_finish_ms) const { | 38 void SetEncodeTime(int64_t encode_start_ms, int64_t encode_finish_ms) const { |
| 39 timing_.is_timing_frame = true; | |
| 40 timing_.encode_start_ms = encode_start_ms; | 39 timing_.encode_start_ms = encode_start_ms; |
| 41 timing_.encode_finish_ms = encode_finish_ms; | 40 timing_.encode_finish_ms = encode_finish_ms; |
| 42 } | 41 } |
| 43 | 42 |
| 44 // TODO(kthelgason): get rid of this struct as it only has a single member | 43 // TODO(kthelgason): get rid of this struct as it only has a single member |
| 45 // remaining. | 44 // remaining. |
| 46 struct AdaptReason { | 45 struct AdaptReason { |
| 47 AdaptReason() : bw_resolutions_disabled(-1) {} | 46 AdaptReason() : bw_resolutions_disabled(-1) {} |
| 48 int bw_resolutions_disabled; // Number of resolutions that are not sent | 47 int bw_resolutions_disabled; // Number of resolutions that are not sent |
| 49 // due to bandwidth for this frame. | 48 // due to bandwidth for this frame. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 65 AdaptReason adapt_reason_; | 64 AdaptReason adapt_reason_; |
| 66 int qp_ = -1; // Quantizer value. | 65 int qp_ = -1; // Quantizer value. |
| 67 | 66 |
| 68 // When an application indicates non-zero values here, it is taken as an | 67 // When an application indicates non-zero values here, it is taken as an |
| 69 // indication that all future frames will be constrained with those limits | 68 // indication that all future frames will be constrained with those limits |
| 70 // until the application indicates a change again. | 69 // until the application indicates a change again. |
| 71 PlayoutDelay playout_delay_ = {-1, -1}; | 70 PlayoutDelay playout_delay_ = {-1, -1}; |
| 72 | 71 |
| 73 // Timing information should be updatable on const instances. | 72 // Timing information should be updatable on const instances. |
| 74 mutable struct Timing { | 73 mutable struct Timing { |
| 75 bool is_timing_frame = false; | 74 uint8_t flags = TimingFrameFlags::kInvalid; |
| 76 int64_t encode_start_ms = 0; | 75 int64_t encode_start_ms = 0; |
| 77 int64_t encode_finish_ms = 0; | 76 int64_t encode_finish_ms = 0; |
| 78 int64_t packetization_finish_ms = 0; | 77 int64_t packetization_finish_ms = 0; |
| 79 int64_t pacer_exit_ms = 0; | 78 int64_t pacer_exit_ms = 0; |
| 80 int64_t network_timestamp_ms = 0; | 79 int64_t network_timestamp_ms = 0; |
| 81 int64_t network2_timestamp_ms = 0; | 80 int64_t network2_timestamp_ms = 0; |
| 82 int64_t receive_start_ms = 0; | 81 int64_t receive_start_ms = 0; |
| 83 int64_t receive_finish_ms = 0; | 82 int64_t receive_finish_ms = 0; |
| 84 } timing_; | 83 } timing_; |
| 85 }; | 84 }; |
| 86 | 85 |
| 87 } // namespace webrtc | 86 } // namespace webrtc |
| 88 | 87 |
| 89 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_H_ | 88 #endif // WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_H_ |
| OLD | NEW |