blob: 53b69a372dfb4d892013d8f2576c99f1bc5c6809 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
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
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_VIDEO_CODING_PACKET_H_
12#define MODULES_VIDEO_CODING_PACKET_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "modules/include/module_common_types.h"
Mirko Bonadei71207422017-09-15 13:58:09 +020015#include "typedefs.h" // NOLINT(build/include)
niklase@google.com470e71d2011-07-07 08:21:25 +000016
pbos@webrtc.org3004c792013-05-07 12:36:21 +000017namespace webrtc {
niklase@google.com470e71d2011-07-07 08:21:25 +000018
pbos@webrtc.org3004c792013-05-07 12:36:21 +000019class VCMPacket {
philipel9d3ab612015-12-21 04:12:39 -080020 public:
21 VCMPacket();
22 VCMPacket(const uint8_t* ptr,
23 const size_t size,
24 const WebRtcRTPHeader& rtpHeader);
niklase@google.com470e71d2011-07-07 08:21:25 +000025
philipel9d3ab612015-12-21 04:12:39 -080026 void Reset();
stefan@webrtc.orgc3d89102011-09-08 06:50:28 +000027
philipel9d3ab612015-12-21 04:12:39 -080028 uint8_t payloadType;
29 uint32_t timestamp;
30 // NTP time of the capture time in local timebase in milliseconds.
31 int64_t ntp_time_ms_;
32 uint16_t seqNum;
33 const uint8_t* dataPtr;
34 size_t sizeBytes;
35 bool markerBit;
philipel5ceaaae2016-05-24 10:20:47 +020036 int timesNacked;
niklase@google.com470e71d2011-07-07 08:21:25 +000037
philipel9d3ab612015-12-21 04:12:39 -080038 FrameType frameType;
39 VideoCodecType codec;
niklase@google.com470e71d2011-07-07 08:21:25 +000040
danilchapb34f6a82017-05-23 11:06:56 -070041 bool is_first_packet_in_frame;
philipel9d3ab612015-12-21 04:12:39 -080042 VCMNaluCompleteness completeNALU; // Default is kNaluIncomplete.
43 bool insertStartCode; // True if a start code should be inserted before this
44 // packet.
45 int width;
46 int height;
isheriff6b4b5f32016-06-08 00:24:21 -070047 RTPVideoHeader video_header;
niklase@google.com470e71d2011-07-07 08:21:25 +000048
ilnik04f4d122017-06-19 07:18:55 -070049 int64_t receive_time_ms;
50
philipel9d3ab612015-12-21 04:12:39 -080051 protected:
52 void CopyCodecSpecifics(const RTPVideoHeader& videoHeader);
niklase@google.com470e71d2011-07-07 08:21:25 +000053};
54
pbos@webrtc.orgd900e8b2013-07-03 15:12:26 +000055} // namespace webrtc
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020056#endif // MODULES_VIDEO_CODING_PACKET_H_