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 <cstddef> |
stefan-webrtc
2016/04/19 10:38:19
stddef.h is used 65 times in webrtc, cstddef is us
philipel
2016/04/19 11:52:07
Done.
| |
15 #include <cstdint> | |
15 | 16 |
16 namespace webrtc { | 17 namespace webrtc { |
17 namespace video_coding { | 18 namespace video_coding { |
18 | 19 |
19 class FrameObject { | 20 class FrameObject { |
20 public: | 21 public: |
21 virtual uint16_t picture_id() const = 0; | 22 static const uint8_t kMaxFrameReferences = 5; |
23 | |
22 virtual bool GetBitstream(uint8_t* destination) const = 0; | 24 virtual bool GetBitstream(uint8_t* destination) const = 0; |
23 virtual ~FrameObject() {} | 25 virtual ~FrameObject() {} |
26 | |
27 uint16_t picture_id; | |
28 size_t num_references; | |
29 uint16_t references[kMaxFrameReferences]; | |
stefan-webrtc
2016/04/19 10:38:19
Maybe use a vector instead of a size_t and an arra
| |
24 }; | 30 }; |
25 | 31 |
26 class PacketBuffer; | 32 class PacketBuffer; |
27 | 33 |
28 class RtpFrameObject : public FrameObject { | 34 class RtpFrameObject : public FrameObject { |
29 public: | 35 public: |
30 RtpFrameObject(PacketBuffer* packet_buffer, | 36 RtpFrameObject(PacketBuffer* packet_buffer, |
31 uint16_t picture_id, | |
32 uint16_t first_packet, | 37 uint16_t first_packet, |
33 uint16_t last_packet); | 38 uint16_t last_packet); |
39 | |
34 ~RtpFrameObject(); | 40 ~RtpFrameObject(); |
35 uint16_t first_packet() const; | 41 uint16_t first_packet() const; |
36 uint16_t last_packet() const; | 42 uint16_t last_packet() const; |
37 uint16_t picture_id() const override; | |
38 bool GetBitstream(uint8_t* destination) const override; | 43 bool GetBitstream(uint8_t* destination) const override; |
39 | 44 |
40 private: | 45 private: |
41 PacketBuffer* packet_buffer_; | 46 PacketBuffer* packet_buffer_; |
42 uint16_t picture_id_; | |
43 uint16_t first_packet_; | 47 uint16_t first_packet_; |
44 uint16_t last_packet_; | 48 uint16_t last_packet_; |
45 }; | 49 }; |
46 | 50 |
47 } // namespace video_coding | 51 } // namespace video_coding |
48 } // namespace webrtc | 52 } // namespace webrtc |
49 | 53 |
50 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ | 54 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
OLD | NEW |