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/common_types.h" | 14 #include "webrtc/common_types.h" |
15 #include "webrtc/modules/include/module_common_types.h" | 15 #include "webrtc/modules/include/module_common_types.h" |
| 16 #include "webrtc/modules/video_coding/encoded_frame.h" |
16 | 17 |
17 namespace webrtc { | 18 namespace webrtc { |
18 namespace video_coding { | 19 namespace video_coding { |
19 | 20 |
20 class FrameObject { | 21 class FrameObject : public webrtc::VCMEncodedFrame { |
21 public: | 22 public: |
22 static const uint8_t kMaxFrameReferences = 5; | 23 static const uint8_t kMaxFrameReferences = 5; |
23 | 24 |
24 FrameObject(); | 25 FrameObject(); |
25 | 26 |
26 virtual bool GetBitstream(uint8_t* destination) const = 0; | 27 virtual bool GetBitstream(uint8_t* destination) const = 0; |
27 virtual ~FrameObject() {} | 28 virtual ~FrameObject() {} |
28 | 29 |
29 // The tuple (|picture_id|, |spatial_layer|) uniquely identifies a frame | 30 // The tuple (|picture_id|, |spatial_layer|) uniquely identifies a frame |
30 // object. For codec types that don't necessarily have picture ids they | 31 // object. For codec types that don't necessarily have picture ids they |
(...skipping 16 matching lines...) Expand all Loading... |
47 RtpFrameObject(PacketBuffer* packet_buffer, | 48 RtpFrameObject(PacketBuffer* packet_buffer, |
48 uint16_t first_seq_num, | 49 uint16_t first_seq_num, |
49 uint16_t last_seq_num, | 50 uint16_t last_seq_num, |
50 size_t frame_size, | 51 size_t frame_size, |
51 int times_nacked); | 52 int times_nacked); |
52 | 53 |
53 ~RtpFrameObject(); | 54 ~RtpFrameObject(); |
54 uint16_t first_seq_num() const; | 55 uint16_t first_seq_num() const; |
55 uint16_t last_seq_num() const; | 56 uint16_t last_seq_num() const; |
56 int times_nacked() const; | 57 int times_nacked() const; |
57 FrameType frame_type() const; | 58 enum FrameType frame_type() const; |
58 VideoCodecType codec_type() const; | 59 VideoCodecType codec_type() const; |
59 bool GetBitstream(uint8_t* destination) const override; | 60 bool GetBitstream(uint8_t* destination) const override; |
60 RTPVideoTypeHeader* GetCodecHeader() const; | 61 RTPVideoTypeHeader* GetCodecHeader() const; |
61 | 62 |
62 private: | 63 private: |
63 PacketBuffer* packet_buffer_; | 64 PacketBuffer* packet_buffer_; |
64 FrameType frame_type_; | 65 enum FrameType frame_type_; |
65 VideoCodecType codec_type_; | 66 VideoCodecType codec_type_; |
66 uint16_t first_seq_num_; | 67 uint16_t first_seq_num_; |
67 uint16_t last_seq_num_; | 68 uint16_t last_seq_num_; |
68 | 69 |
69 // Equal to times nacked of the packet with the highet times nacked | 70 // Equal to times nacked of the packet with the highet times nacked |
70 // belonging to this frame. | 71 // belonging to this frame. |
71 int times_nacked_; | 72 int times_nacked_; |
72 }; | 73 }; |
73 | 74 |
74 } // namespace video_coding | 75 } // namespace video_coding |
75 } // namespace webrtc | 76 } // namespace webrtc |
76 | 77 |
77 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ | 78 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ |
OLD | NEW |