| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 |
| 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
| 12 #define WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ | 12 #define WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
| 13 | 13 |
| 14 #include "webrtc/modules/video_coding/packet.h" | 14 #include <stddef.h> |
| 15 #include <stdint.h> |
| 16 |
| 17 #include <array> |
| 15 | 18 |
| 16 namespace webrtc { | 19 namespace webrtc { |
| 17 namespace video_coding { | 20 namespace video_coding { |
| 18 | 21 |
| 19 class FrameObject { | 22 class FrameObject { |
| 20 public: | 23 public: |
| 21 virtual uint16_t picture_id() const = 0; | 24 static const uint8_t kMaxFrameReferences = 5; |
| 25 |
| 22 virtual bool GetBitstream(uint8_t* destination) const = 0; | 26 virtual bool GetBitstream(uint8_t* destination) const = 0; |
| 23 virtual ~FrameObject() {} | 27 virtual ~FrameObject() {} |
| 28 |
| 29 uint16_t picture_id; |
| 30 size_t num_references; |
| 31 std::array<uint16_t, kMaxFrameReferences> referencesr; |
| 32 uint16_t references[kMaxFrameReferences]; |
| 24 }; | 33 }; |
| 25 | 34 |
| 26 class PacketBuffer; | 35 class PacketBuffer; |
| 27 | 36 |
| 28 class RtpFrameObject : public FrameObject { | 37 class RtpFrameObject : public FrameObject { |
| 29 public: | 38 public: |
| 30 RtpFrameObject(PacketBuffer* packet_buffer, | 39 RtpFrameObject(PacketBuffer* packet_buffer, |
| 31 uint16_t picture_id, | |
| 32 uint16_t first_packet, | 40 uint16_t first_packet, |
| 33 uint16_t last_packet); | 41 uint16_t last_packet); |
| 42 |
| 34 ~RtpFrameObject(); | 43 ~RtpFrameObject(); |
| 35 uint16_t first_packet() const; | 44 uint16_t first_seq_num() const; |
| 36 uint16_t last_packet() const; | 45 uint16_t last_seq_num() const; |
| 37 uint16_t picture_id() const override; | |
| 38 bool GetBitstream(uint8_t* destination) const override; | 46 bool GetBitstream(uint8_t* destination) const override; |
| 39 | 47 |
| 40 private: | 48 private: |
| 41 PacketBuffer* packet_buffer_; | 49 PacketBuffer* packet_buffer_; |
| 42 uint16_t picture_id_; | |
| 43 uint16_t first_packet_; | 50 uint16_t first_packet_; |
| 44 uint16_t last_packet_; | 51 uint16_t last_packet_; |
| 45 }; | 52 }; |
| 46 | 53 |
| 47 } // namespace video_coding | 54 } // namespace video_coding |
| 48 } // namespace webrtc | 55 } // namespace webrtc |
| 49 | 56 |
| 50 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ | 57 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
| OLD | NEW |