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