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}
This commit is contained in:
philipel
2019-03-04 16:37:50 +01:00
committed by Commit Bot
parent 8fb1a6ad27
commit 9df335374a
17 changed files with 441 additions and 150 deletions

View File

@ -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 @@ union CodecSpecificInfoUnion {
};
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