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:
Martin Storsjö
2014-02-26 22:08:41 +02:00
parent 6021ff3908
commit c7ff8876bb
5 changed files with 16 additions and 0 deletions

View File

@@ -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);