Generic Frame Descriptor (GFD) VP8 templates.
In this CL:
- Updated Vp8TemporalLayers::OnEncodeDone to take a CodecSpecificInfo
instead of a CodecSpecificInfoVP8, so that both the VP8 specific and
generic information can be populated.
- Added structs to represent the GFD template structure.
- Added code to generate templates for video/screensharing.
Bug: webrtc:10342
Change-Id: I978f9d708597a6f86bbdc494e62acf7a7b400db3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123422
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26987}
diff --git a/modules/video_coding/include/video_codec_interface.h b/modules/video_coding/include/video_codec_interface.h
index cde5512..fb440be 100644
--- a/modules/video_coding/include/video_codec_interface.h
+++ b/modules/video_coding/include/video_codec_interface.h
@@ -13,10 +13,12 @@
#include <vector>
+#include "absl/types/optional.h"
#include "api/video/video_frame.h"
#include "api/video_codecs/video_decoder.h"
#include "api/video_codecs/video_encoder.h"
#include "common_types.h" // NOLINT(build/include)
+#include "common_video/generic_frame_descriptor/generic_frame_info.h"
#include "modules/include/module_common_types.h"
#include "modules/video_coding/include/video_error_codes.h"
@@ -96,16 +98,18 @@
};
static_assert(std::is_pod<CodecSpecificInfoUnion>::value, "");
-// Note: If any pointers are added to this struct or its sub-structs, it
+// Note: if any pointers are added to this struct or its sub-structs, it
// must be fitted with a copy-constructor. This is because it is copied
// in the copy-constructor of VCMEncodedFrame.
struct CodecSpecificInfo {
- CodecSpecificInfo() : codecType(kVideoCodecGeneric) {
- memset(&codecSpecific, 0, sizeof(codecSpecific));
- }
+ CodecSpecificInfo();
+ CodecSpecificInfo(const CodecSpecificInfo&);
+ ~CodecSpecificInfo();
VideoCodecType codecType;
CodecSpecificInfoUnion codecSpecific;
+ absl::optional<GenericFrameInfo> generic_frame_info;
+ absl::optional<TemplateStructure> template_structure;
};
} // namespace webrtc