Navigation
API > API/Plugins > API/Plugins/AVCodecsCore
HOW TO USE
Allows compile-time extension of types without directly modifying them across modules.
1) Like any static function, declare (by specialization) the extension in a header:
template <> FAVResult FAVExtension::TransformConfig(FVideoConfigH264& OutConfig, FVideoConfigBitstream const& InConfig);
2) Then define the extension in the source:
template <> DLLEXPORT FAVResult FAVExtension::TransformConfig(FVideoConfigH264& OutConfig, FVideoConfigBitstream const& InConfig) { // do stuff }
Be sure to EXPORT the definition and it will be automatically linked by consumers. Static extension system for simple composition of different resource/config types, via exported specializations
| Name | FAVExtension |
| Type | struct |
| Header File | /Engine/Plugins/Experimental/AVCodecs/AVCodecsCore/Source/AVCodecsCore/Public/AVExtension.h |
| Include Path | #include "AVExtension.h" |
Syntax
struct FAVExtension
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FAVExtension() |
AVExtension.h |
Functions
Public
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool IsCompatible
(
TSharedPtr< class FAVDevice > const& Device |
Check if a type is compatible in a certain context, with a certain device. | AVExtension.h | |
static bool IsCompatible
(
TSharedPtr< class FAVInstance > const& Instance |
Check if a type is compatible in a certain context, with a certain instance. | AVExtension.h | |
static FAVResult TransformConfig
(
OutputType& OutConfig, |
Transform one configuration type into another. | AVExtension.h | |
static FAVResult TransformResource
(
TSharedPtr< TOutput >& OutResource, |
Shortcut case for above for when the input and output types match. This does NOT duplicate the resource. | AVExtension.h |