blob: 2035653e90a5eaf82ef464c421fed383edabcce1 [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
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
18namespace webrtc
19{
20
21class VCMPacket
22{
23public:
stefan@webrtc.orgc3d89102011-09-08 06:50:28 +000024 VCMPacket();
niklase@google.com470e71d2011-07-07 08:21:25 +000025 VCMPacket(const WebRtc_UWord8* ptr,
pwestin@webrtc.org56210572012-01-17 12:45:47 +000026 const WebRtc_UWord32 size,
27 const WebRtcRTPHeader& rtpHeader);
niklase@google.com470e71d2011-07-07 08:21:25 +000028 VCMPacket(const WebRtc_UWord8* ptr,
pwestin@webrtc.org56210572012-01-17 12:45:47 +000029 WebRtc_UWord32 size,
30 WebRtc_UWord16 seqNum,
31 WebRtc_UWord32 timestamp,
32 bool markerBit);
niklase@google.com470e71d2011-07-07 08:21:25 +000033
stefan@webrtc.orgc3d89102011-09-08 06:50:28 +000034 void Reset();
35
niklase@google.com470e71d2011-07-07 08:21:25 +000036 WebRtc_UWord8 payloadType;
37 WebRtc_UWord32 timestamp;
38 WebRtc_UWord16 seqNum;
39 const WebRtc_UWord8* dataPtr;
40 WebRtc_UWord32 sizeBytes;
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.orgc3d89102011-09-08 06:50:28 +000050 RTPVideoHeader codecSpecificHeader;
niklase@google.com470e71d2011-07-07 08:21:25 +000051
52protected:
53 void CopyCodecSpecifics(const RTPVideoHeader& videoHeader);
54};
55
56} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000057#endif // WEBRTC_MODULES_VIDEO_CODING_PACKET_H_