2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
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.
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_CODEC_INTERFACE_H
12 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_CODEC_INTERFACE_H
16 #include "webrtc/common_types.h"
17 #include "webrtc/common_video/interface/i420_video_frame.h"
18 #include "webrtc/modules/interface/module_common_types.h"
19 #include "webrtc/modules/video_coding/codecs/interface/video_error_codes.h"
20 #include "webrtc/typedefs.h"
21 #include "webrtc/video_decoder.h"
22 #include "webrtc/video_encoder.h"
27 class RTPFragmentationHeader; // forward declaration
29 // Note: if any pointers are added to this struct, it must be fitted
30 // with a copy-constructor. See below.
31 struct CodecSpecificInfoVP8 {
35 uint64_t pictureIdRPSI;
36 int16_t pictureId; // Negative value to skip pictureId.
41 int tl0PicIdx; // Negative value to skip tl0PicIdx.
42 int8_t keyIdx; // Negative value to skip keyIdx.
45 struct CodecSpecificInfoVP9 {
49 uint64_t pictureIdRPSI;
50 int16_t pictureId; // Negative value to skip pictureId.
54 int tl0PicIdx; // Negative value to skip tl0PicIdx.
55 int8_t keyIdx; // Negative value to skip keyIdx.
58 struct CodecSpecificInfoGeneric {
59 uint8_t simulcast_idx;
62 struct CodecSpecificInfoH264 {};
64 union CodecSpecificInfoUnion {
65 CodecSpecificInfoGeneric generic;
66 CodecSpecificInfoVP8 VP8;
67 CodecSpecificInfoVP9 VP9;
68 CodecSpecificInfoH264 H264;
71 // Note: if any pointers are added to this struct or its sub-structs, it
72 // must be fitted with a copy-constructor. This is because it is copied
73 // in the copy-constructor of VCMEncodedFrame.
74 struct CodecSpecificInfo
76 VideoCodecType codecType;
77 CodecSpecificInfoUnion codecSpecific;
82 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_INTERFACE_VIDEO_CODEC_INTERFACE_H