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 | |
Henrik Kjellander | ff761fb | 2015-11-04 08:31:52 +0100 | [diff] [blame] | 14 | #include "webrtc/modules/include/module_common_types.h" |
Henrik Kjellander | 2557b86 | 2015-11-18 22:00:21 +0100 | [diff] [blame] | 15 | #include "webrtc/modules/video_coding/jitter_buffer_common.h" |
pbos@webrtc.org | a440732 | 2013-07-16 12:32:05 +0000 | [diff] [blame] | 16 | #include "webrtc/typedefs.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 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 { |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 21 | public: |
| 22 | VCMPacket(); |
| 23 | VCMPacket(const uint8_t* ptr, |
| 24 | const size_t size, |
| 25 | const WebRtcRTPHeader& rtpHeader); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 26 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 27 | void Reset(); |
stefan@webrtc.org | c3d8910 | 2011-09-08 06:50:28 +0000 | [diff] [blame] | 28 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 29 | uint8_t payloadType; |
| 30 | uint32_t timestamp; |
| 31 | // NTP time of the capture time in local timebase in milliseconds. |
| 32 | int64_t ntp_time_ms_; |
| 33 | uint16_t seqNum; |
| 34 | const uint8_t* dataPtr; |
| 35 | size_t sizeBytes; |
| 36 | bool markerBit; |
philipel | 5ceaaae | 2016-05-24 10:20:47 +0200 | [diff] [blame] | 37 | int timesNacked; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 38 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 39 | FrameType frameType; |
| 40 | VideoCodecType codec; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 41 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 42 | bool isFirstPacket; // Is this first packet in a frame. |
| 43 | VCMNaluCompleteness completeNALU; // Default is kNaluIncomplete. |
| 44 | bool insertStartCode; // True if a start code should be inserted before this |
| 45 | // packet. |
| 46 | int width; |
| 47 | int height; |
isheriff | 6b4b5f3 | 2016-06-08 00:24:21 -0700 | [diff] [blame] | 48 | RTPVideoHeader video_header; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 49 | |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 50 | protected: |
| 51 | void CopyCodecSpecifics(const RTPVideoHeader& videoHeader); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 52 | }; |
| 53 | |
pbos@webrtc.org | d900e8b | 2013-07-03 15:12:26 +0000 | [diff] [blame] | 54 | } // namespace webrtc |
philipel | 9d3ab61 | 2015-12-21 04:12:39 -0800 | [diff] [blame] | 55 | #endif // WEBRTC_MODULES_VIDEO_CODING_PACKET_H_ |