You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
2.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
  3. *
  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
  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. #ifndef MODULES_VIDEO_CODING_FRAME_OBJECT_H_
  11. #define MODULES_VIDEO_CODING_FRAME_OBJECT_H_
  12. #include "absl/types/optional.h"
  13. #include "api/video/encoded_frame.h"
  14. #include "modules/rtp_rtcp/source/rtp_generic_frame_descriptor.h"
  15. namespace webrtc {
  16. namespace video_coding {
  17. class RtpFrameObject : public EncodedFrame {
  18. public:
  19. RtpFrameObject(
  20. uint16_t first_seq_num,
  21. uint16_t last_seq_num,
  22. bool markerBit,
  23. int times_nacked,
  24. int64_t first_packet_received_time,
  25. int64_t last_packet_received_time,
  26. uint32_t rtp_timestamp,
  27. int64_t ntp_time_ms,
  28. const VideoSendTiming& timing,
  29. uint8_t payload_type,
  30. VideoCodecType codec,
  31. VideoRotation rotation,
  32. VideoContentType content_type,
  33. const RTPVideoHeader& video_header,
  34. const absl::optional<webrtc::ColorSpace>& color_space,
  35. const absl::optional<RtpGenericFrameDescriptor>& generic_descriptor,
  36. RtpPacketInfos packet_infos,
  37. rtc::scoped_refptr<EncodedImageBuffer> image_buffer);
  38. ~RtpFrameObject() override;
  39. uint16_t first_seq_num() const;
  40. uint16_t last_seq_num() const;
  41. int times_nacked() const;
  42. VideoFrameType frame_type() const;
  43. VideoCodecType codec_type() const;
  44. int64_t ReceivedTime() const override;
  45. int64_t RenderTime() const override;
  46. bool delayed_by_retransmission() const override;
  47. const RTPVideoHeader& GetRtpVideoHeader() const;
  48. const absl::optional<RtpGenericFrameDescriptor>& GetGenericFrameDescriptor()
  49. const;
  50. const FrameMarking& GetFrameMarking() const;
  51. private:
  52. RTPVideoHeader rtp_video_header_;
  53. absl::optional<RtpGenericFrameDescriptor> rtp_generic_frame_descriptor_;
  54. VideoCodecType codec_type_;
  55. uint16_t first_seq_num_;
  56. uint16_t last_seq_num_;
  57. int64_t last_packet_received_time_;
  58. // Equal to times nacked of the packet with the highet times nacked
  59. // belonging to this frame.
  60. int times_nacked_;
  61. };
  62. } // namespace video_coding
  63. } // namespace webrtc
  64. #endif // MODULES_VIDEO_CODING_FRAME_OBJECT_H_