niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 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 | |
| 11 | #ifndef WEBRTC_MODULES_VIDEO_CODING_PACKET_H_ |
| 12 | #define WEBRTC_MODULES_VIDEO_CODING_PACKET_H_ |
| 13 | |
| 14 | #include "typedefs.h" |
| 15 | #include "module_common_types.h" |
| 16 | #include "jitter_buffer_common.h" |
| 17 | |
| 18 | namespace webrtc |
| 19 | { |
| 20 | |
| 21 | class VCMPacket |
| 22 | { |
| 23 | public: |
stefan@webrtc.org | c3d8910 | 2011-09-08 06:50:28 +0000 | [diff] [blame] | 24 | VCMPacket(); |
pbos@webrtc.org | 7b859cc | 2013-04-02 15:54:38 +0000 | [diff] [blame] | 25 | VCMPacket(const uint8_t* ptr, |
| 26 | const uint32_t size, |
pwestin@webrtc.org | 5621057 | 2012-01-17 12:45:47 +0000 | [diff] [blame] | 27 | const WebRtcRTPHeader& rtpHeader); |
pbos@webrtc.org | 7b859cc | 2013-04-02 15:54:38 +0000 | [diff] [blame] | 28 | VCMPacket(const uint8_t* ptr, |
| 29 | uint32_t size, |
| 30 | uint16_t seqNum, |
| 31 | uint32_t timestamp, |
pwestin@webrtc.org | 5621057 | 2012-01-17 12:45:47 +0000 | [diff] [blame] | 32 | bool markerBit); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 33 | |
stefan@webrtc.org | c3d8910 | 2011-09-08 06:50:28 +0000 | [diff] [blame] | 34 | void Reset(); |
| 35 | |
pbos@webrtc.org | 7b859cc | 2013-04-02 15:54:38 +0000 | [diff] [blame] | 36 | uint8_t payloadType; |
| 37 | uint32_t timestamp; |
| 38 | uint16_t seqNum; |
| 39 | const uint8_t* dataPtr; |
| 40 | uint32_t sizeBytes; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 41 | bool markerBit; |
| 42 | |
| 43 | FrameType frameType; |
| 44 | webrtc::VideoCodecType codec; |
| 45 | |
| 46 | bool isFirstPacket; // Is this first packet in a frame. |
| 47 | VCMNaluCompleteness completeNALU; // Default is kNaluIncomplete. |
| 48 | bool insertStartCode; // True if a start code should be inserted before this |
| 49 | // packet. |
stefan@webrtc.org | c3d8910 | 2011-09-08 06:50:28 +0000 | [diff] [blame] | 50 | RTPVideoHeader codecSpecificHeader; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 51 | |
| 52 | protected: |
| 53 | void CopyCodecSpecifics(const RTPVideoHeader& videoHeader); |
| 54 | }; |
| 55 | |
| 56 | } // namespace webrtc |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 57 | #endif // WEBRTC_MODULES_VIDEO_CODING_PACKET_H_ |