Delete obsolete isac "assign" api
Bug: None Change-Id: I116e3f4b89e2c1e1f0d06e2ff5d58d2a50e2aadb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153665 Reviewed-by: Oskar Sundbom <ossu@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29239}
This commit is contained in:
@ -23,34 +23,6 @@ typedef struct {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
* WebRtcIsacfix_AssignSize(...)
|
||||
*
|
||||
* Functions used when malloc is not allowed
|
||||
* Output the number of bytes needed to allocate for iSAC struct.
|
||||
*
|
||||
*/
|
||||
|
||||
int16_t WebRtcIsacfix_AssignSize(int* sizeinbytes);
|
||||
|
||||
/**************************************************************************
|
||||
* WebRtcIsacfix_Assign(...)
|
||||
*
|
||||
* Functions used when malloc is not allowed, it
|
||||
* places a struct at the given address.
|
||||
*
|
||||
* Input:
|
||||
* - *ISAC_main_inst : a pointer to the coder instance.
|
||||
* - ISACFIX_inst_Addr : address of the memory where a space is
|
||||
* for iSAC structure.
|
||||
*
|
||||
* Return value : 0 - Ok
|
||||
* -1 - Error
|
||||
*/
|
||||
|
||||
int16_t WebRtcIsacfix_Assign(ISACFIX_MainStruct** inst,
|
||||
void* ISACFIX_inst_Addr);
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcIsacfix_Create(...)
|
||||
*
|
||||
|
||||
@ -48,45 +48,6 @@ static void InitializeDecoderBitstream(size_t stream_size_bytes,
|
||||
memset(bitstream->stream, 0, sizeof(bitstream->stream));
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* WebRtcIsacfix_AssignSize(...)
|
||||
*
|
||||
* Functions used when malloc is not allowed
|
||||
* Returns number of bytes needed to allocate for iSAC struct.
|
||||
*
|
||||
*/
|
||||
|
||||
int16_t WebRtcIsacfix_AssignSize(int *sizeinbytes) {
|
||||
*sizeinbytes=sizeof(ISACFIX_SubStruct)*2/sizeof(int16_t);
|
||||
return(0);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
* WebRtcIsacfix_Assign(...)
|
||||
*
|
||||
* Functions used when malloc is not allowed
|
||||
* Place struct at given address
|
||||
*
|
||||
* If successful, Return 0, else Return -1
|
||||
*/
|
||||
|
||||
int16_t WebRtcIsacfix_Assign(ISACFIX_MainStruct **inst, void *ISACFIX_inst_Addr) {
|
||||
if (ISACFIX_inst_Addr!=NULL) {
|
||||
ISACFIX_SubStruct* self = ISACFIX_inst_Addr;
|
||||
*inst = (ISACFIX_MainStruct*)self;
|
||||
self->errorcode = 0;
|
||||
self->initflag = 0;
|
||||
self->ISACenc_obj.SaveEnc_ptr = NULL;
|
||||
WebRtcIsacfix_InitBandwidthEstimator(&self->bwestimator_obj);
|
||||
return(0);
|
||||
} else {
|
||||
return(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifndef ISACFIX_NO_DYNAMIC_MEM
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcIsacfix_Create(...)
|
||||
*
|
||||
@ -147,10 +108,6 @@ int16_t WebRtcIsacfix_CreateInternal(ISACFIX_MainStruct *ISAC_main_inst)
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* WebRtcIsacfix_Free(...)
|
||||
*
|
||||
|
||||
@ -538,16 +538,8 @@ TEST(IsacFixTest, Kenny) {
|
||||
|
||||
/* Initialize the ISAC and BN structs */
|
||||
if (testNum != 8) {
|
||||
if (1) {
|
||||
err = WebRtcIsacfix_Create(&ISAC_main_inst);
|
||||
} else {
|
||||
/* Test the Assign functions */
|
||||
int sss;
|
||||
void* ppp;
|
||||
err = WebRtcIsacfix_AssignSize(&sss);
|
||||
ppp = malloc(sss);
|
||||
err = WebRtcIsacfix_Assign(&ISAC_main_inst, ppp);
|
||||
}
|
||||
err = WebRtcIsacfix_Create(&ISAC_main_inst);
|
||||
|
||||
/* Error check */
|
||||
if (err < 0) {
|
||||
printf("\n\n Error in create.\n\n");
|
||||
|
||||
Reference in New Issue
Block a user