Unverified Commit 022eaa79 authored by Wolle's avatar Wolle Committed by GitHub

AACDecoder_IsInit()

preparations for m3u8 streams, get AACDecoder init status
parent 9783563c
......@@ -3,7 +3,7 @@
* libhelix_HAACDECODER
*
* Created on: 26.10.2018
* Updated on: 10.04.2021
* Updated on: 10.09.2021
************************************************************************************/
#include "aac_decoder.h"
......@@ -1765,6 +1765,38 @@ void AACDecoder_FreeBuffers(void) {
// log_i("AACDecoder: %lu bytes memory was freed", ESP.getFreeHeap() - i);
}
/***********************************************************************************************************************
* Function: AACDecoder_IsInit
*
* Description: returns AAC decoder initialization status
*
* Inputs: none
*
* Outputs: none
*
* Return: true if buffers allocated, otherwise false
**********************************************************************************************************************/
bool AACDecoder_IsInit(void) {
if(m_AACDecInfo && m_PSInfoBase && m_pce[0]){
return true;
}
return false;
}
/***********************************************************************************************************************
* Function: AACDecoder_FreeBuffers
*
* Description: allocate all the memory needed for the AAC decoder
*
* Inputs: none
*
* Outputs: none
*
* Return: none
**********************************************************************************************************************/
/***********************************************************************************************************************
* Function: AACFindSyncWord
*
......
......@@ -431,6 +431,7 @@ typedef struct _PSInfoSBR {
bool AACDecoder_AllocateBuffers(void);
int AACFlushCodec();
void AACDecoder_FreeBuffers(void);
bool AACDecoder_IsInit(void);
int AACFindSyncWord(uint8_t *buf, int nBytes);
int AACSetRawBlockParams(int copyLast, int nChans, int sampRateCore, int profile);
int AACDecode(uint8_t *inbuf, int *bytesLeft, short *outbuf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment