OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 */ | 89 */ |
90 uint8_t PayloadType() const { return _payloadType; } | 90 uint8_t PayloadType() const { return _payloadType; } |
91 /** | 91 /** |
92 * Get codec specific info. | 92 * Get codec specific info. |
93 * The returned pointer is only valid as long as the VCMEncodedFrame | 93 * The returned pointer is only valid as long as the VCMEncodedFrame |
94 * is valid. Also, VCMEncodedFrame owns the pointer and will delete | 94 * is valid. Also, VCMEncodedFrame owns the pointer and will delete |
95 * the object. | 95 * the object. |
96 */ | 96 */ |
97 const CodecSpecificInfo* CodecSpecific() const { return &_codecSpecificInfo; } | 97 const CodecSpecificInfo* CodecSpecific() const { return &_codecSpecificInfo; } |
98 | 98 |
99 const RTPFragmentationHeader* FragmentationHeader() const; | |
100 | |
101 protected: | 99 protected: |
102 /** | 100 /** |
103 * Verifies that current allocated buffer size is larger than or equal to the | 101 * Verifies that current allocated buffer size is larger than or equal to the |
104 * input size. | 102 * input size. |
105 * If the current buffer size is smaller, a new allocation is made and the old | 103 * If the current buffer size is smaller, a new allocation is made and the old |
106 * buffer data | 104 * buffer data |
107 * is copied to the new buffer. | 105 * is copied to the new buffer. |
108 * Buffer size is updated to minimumSize. | 106 * Buffer size is updated to minimumSize. |
109 */ | 107 */ |
110 void VerifyAndAllocate(size_t minimumSize); | 108 void VerifyAndAllocate(size_t minimumSize); |
111 | 109 |
112 void Reset(); | 110 void Reset(); |
113 | 111 |
114 void CopyCodecSpecific(const RTPVideoHeader* header); | 112 void CopyCodecSpecific(const RTPVideoHeader* header); |
115 | 113 |
116 int64_t _renderTimeMs; | 114 int64_t _renderTimeMs; |
117 uint8_t _payloadType; | 115 uint8_t _payloadType; |
118 bool _missingFrame; | 116 bool _missingFrame; |
119 CodecSpecificInfo _codecSpecificInfo; | 117 CodecSpecificInfo _codecSpecificInfo; |
120 webrtc::VideoCodecType _codec; | 118 webrtc::VideoCodecType _codec; |
121 RTPFragmentationHeader _fragmentation; | |
122 | 119 |
123 // Video rotation is only set along with the last packet for each frame | 120 // Video rotation is only set along with the last packet for each frame |
124 // (same as marker bit). This |_rotation_set| is only for debugging purpose | 121 // (same as marker bit). This |_rotation_set| is only for debugging purpose |
125 // to ensure we don't set it twice for a frame. | 122 // to ensure we don't set it twice for a frame. |
126 bool _rotation_set; | 123 bool _rotation_set; |
127 }; | 124 }; |
128 | 125 |
129 } // namespace webrtc | 126 } // namespace webrtc |
130 | 127 |
131 #endif // WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_ | 128 #endif // WEBRTC_MODULES_VIDEO_CODING_ENCODED_FRAME_H_ |
OLD | NEW |