Add a new public method for initializing SEncParamExt to default values
This simplifies forward source compatibility when new fields are added to SEncParamExt - when new fields are added to SEncParamExt, this method makes sure those fields are initialized to the default value - otherwise all API users would have to manually check SEncParamExt every time it is updated to make sure there's no new fields that should be set to a nonzero value by default (e.g. like bEnableFrameSkip).
This commit is contained in:
@@ -59,6 +59,8 @@ class ISVCEncoder {
|
||||
virtual int EXTAPI Initialize (const SEncParamBase* pParam) = 0;
|
||||
virtual int EXTAPI InitializeExt (const SEncParamExt* pParam) = 0;
|
||||
|
||||
virtual int EXTAPI GetDefaultParams (SEncParamExt* pParam) = 0;
|
||||
|
||||
virtual int EXTAPI Uninitialize() = 0;
|
||||
|
||||
/*
|
||||
@@ -142,6 +144,8 @@ struct ISVCEncoderVtbl {
|
||||
int (*Initialize) (ISVCEncoder*, const SEncParamBase* pParam);
|
||||
int (*InitializeExt) (ISVCEncoder*, const SEncParamExt* pParam);
|
||||
|
||||
int (*GetDefaultParams) (ISVCEncoder*, SEncParamExt* pParam);
|
||||
|
||||
int (*Uninitialize) (ISVCEncoder*);
|
||||
|
||||
int (*EncodeFrame) (ISVCEncoder*, const SSourcePicture* kpSrcPic, SFrameBSInfo* pBsInfo);
|
||||
|
||||
Reference in New Issue
Block a user