| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 |
| 11 | #ifndef MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
| 12 | #define MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
| 13 |
| 14 | #include "absl/types/optional.h" |
| 15 | #include "api/video/encoded_frame.h" |
| 16 |
| 17 | namespace webrtc { |
| 18 | namespace video_coding { |
| 19 |
| 20 | class RtpFrameObject : public EncodedFrame { |
| 21 | public: |
| 22 | RtpFrameObject(uint16_t first_seq_num, |
| 23 | uint16_t last_seq_num, |
| 24 | bool markerBit, |
| 25 | int times_nacked, |
| 26 | int64_t first_packet_received_time, |
| 27 | int64_t last_packet_received_time, |
| 28 | uint32_t rtp_timestamp, |
| 29 | int64_t ntp_time_ms, |
| 30 | const VideoSendTiming& timing, |
| 31 | uint8_t payload_type, |
| 32 | VideoCodecType codec, |
| 33 | VideoRotation rotation, |
| 34 | VideoContentType content_type, |
| 35 | const RTPVideoHeader& video_header, |
| 36 | const absl::optional<webrtc::ColorSpace>& color_space, |
| 37 | RtpPacketInfos packet_infos, |
| 38 | rtc::scoped_refptr<EncodedImageBuffer> image_buffer); |
| 39 |
| 40 | ~RtpFrameObject() override; |
| 41 | uint16_t first_seq_num() const; |
| 42 | uint16_t last_seq_num() const; |
| 43 | int times_nacked() const; |
| 44 | VideoFrameType frame_type() const; |
| 45 | VideoCodecType codec_type() const; |
| 46 | int64_t ReceivedTime() const override; |
| 47 | int64_t RenderTime() const override; |
| 48 | bool delayed_by_retransmission() const override; |
| 49 | const RTPVideoHeader& GetRtpVideoHeader() const; |
| 50 |
| 51 | private: |
| 52 | RTPVideoHeader rtp_video_header_; |
| 53 | VideoCodecType codec_type_; |
| 54 | uint16_t first_seq_num_; |
| 55 | uint16_t last_seq_num_; |
| 56 | int64_t last_packet_received_time_; |
| 57 |
| 58 | // Equal to times nacked of the packet with the highet times nacked |
| 59 | // belonging to this frame. |
| 60 | int times_nacked_; |
| 61 | }; |
| 62 |
| 63 | } // namespace video_coding |
| 64 | } // namespace webrtc |
| 65 |
| 66 | #endif // MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
| 67 |