Lines Matching refs:hTpEnc
153 HANDLE_TRANSPORTENC hTpEnc; in transportEnc_Open() local
159 hTpEnc = GetRam_TransportEncoder(0); in transportEnc_Open()
161 if ( hTpEnc == NULL ) { in transportEnc_Open()
165 *phTpEnc = hTpEnc; in transportEnc_Open()
241 HANDLE_TRANSPORTENC hTpEnc, in transportEnc_Init() argument
250 FDKmemcpy(&hTpEnc->config, cconfig, sizeof(CODER_CONFIG)); in transportEnc_Init()
253 hTpEnc->transportFmt = transportFmt; in transportEnc_Init()
255 hTpEnc->bsBuffer = bsBuffer; in transportEnc_Init()
256 hTpEnc->bsBufferSize = bsBufferSize; in transportEnc_Init()
258 FDKinitBitStream(&hTpEnc->bitStream, hTpEnc->bsBuffer, hTpEnc->bsBufferSize, 0, BS_WRITER); in transportEnc_Init()
264 if ( (hTpEnc->config.aot != AOT_AAC_LC) in transportEnc_Init()
265 ||(hTpEnc->config.samplesPerFrame != 1024)) in transportEnc_Init()
269 hTpEnc->writer.adif.headerWritten = 0; in transportEnc_Init()
270 hTpEnc->writer.adif.samplingRate = hTpEnc->config.samplingRate; in transportEnc_Init()
271 hTpEnc->writer.adif.bitRate = hTpEnc->config.bitRate; in transportEnc_Init()
272 hTpEnc->writer.adif.profile = ((int)hTpEnc->config.aot) - 1; in transportEnc_Init()
273 hTpEnc->writer.adif.cm = hTpEnc->config.channelMode; in transportEnc_Init()
274 hTpEnc->writer.adif.bVariableRate = 0; in transportEnc_Init()
275 hTpEnc->writer.adif.instanceTag = 0; in transportEnc_Init()
280 if ( ( hTpEnc->config.aot != AOT_AAC_LC) in transportEnc_Init()
281 ||(hTpEnc->config.samplesPerFrame != 1024) ) in transportEnc_Init()
285 if ( adtsWrite_Init(&hTpEnc->writer.adts, &hTpEnc->config) != 0) { in transportEnc_Init()
297 &hTpEnc->writer.latm, in transportEnc_Init()
298 &hTpEnc->bitStream, in transportEnc_Init()
299 &hTpEnc->config, in transportEnc_Init()
302 &hTpEnc->callbacks in transportEnc_Init()
311 hTpEnc->writer.raw.curSubFrame = 0; in transportEnc_Init()
312 hTpEnc->writer.raw.nSubFrames = hTpEnc->config.nSubFrames; in transportEnc_Init()
322 hTpEnc->pceFrameCounter = getPceRepetitionRate( in transportEnc_Init()
323 getChannelConfig(hTpEnc->config.channelMode), in transportEnc_Init()
325 hTpEnc->config.headerPeriod, in transportEnc_Init()
326 hTpEnc->config.matrixMixdownA); in transportEnc_Init()
336 int transportEnc_RegisterSbrCallback( HANDLE_TRANSPORTENC hTpEnc, const cbSbr_t cbSbr, void* user_d… in transportEnc_RegisterSbrCallback() argument
338 if (hTpEnc == NULL) { in transportEnc_RegisterSbrCallback()
341 hTpEnc->callbacks.cbSbr = cbSbr; in transportEnc_RegisterSbrCallback()
342 hTpEnc->callbacks.cbSbrData = user_data; in transportEnc_RegisterSbrCallback()
468 TRANSPORTENC_ERROR transportEnc_GetFrame(HANDLE_TRANSPORTENC hTpEnc, int *nbytes) in transportEnc_GetFrame() argument
470 HANDLE_FDK_BITSTREAM hBs = &hTpEnc->bitStream; in transportEnc_GetFrame()
472 switch (hTpEnc->transportFmt) { in transportEnc_GetFrame()
476 *nbytes = hTpEnc->bsBufferSize; in transportEnc_GetFrame()
477 transportEnc_LatmGetFrame(&hTpEnc->writer.latm, hBs, nbytes); in transportEnc_GetFrame()
480 if (hTpEnc->writer.adts.currentBlock >= hTpEnc->writer.adts.num_raw_blocks+1) { in transportEnc_GetFrame()
482 hTpEnc->writer.adts.currentBlock = 0; in transportEnc_GetFrame()
493 hTpEnc->writer.raw.curSubFrame++; in transportEnc_GetFrame()
494 *nbytes = ((FDKgetValidBits(hBs)-hTpEnc->writer.raw.prevBits) + 7)>>3; in transportEnc_GetFrame()
547 int transportEnc_CrcStartReg(HANDLE_TRANSPORTENC hTpEnc, int mBits) in transportEnc_CrcStartReg() argument
551 switch (hTpEnc->transportFmt) { in transportEnc_CrcStartReg()
553 crcReg = adtsWrite_CrcStartReg(&hTpEnc->writer.adts, &hTpEnc->bitStream, mBits); in transportEnc_CrcStartReg()
562 void transportEnc_CrcEndReg(HANDLE_TRANSPORTENC hTpEnc, int reg) in transportEnc_CrcEndReg() argument
564 switch (hTpEnc->transportFmt) { in transportEnc_CrcEndReg()
566 adtsWrite_CrcEndReg(&hTpEnc->writer.adts, &hTpEnc->bitStream, reg); in transportEnc_CrcEndReg()
574 TRANSPORTENC_ERROR transportEnc_GetConf(HANDLE_TRANSPORTENC hTpEnc, in transportEnc_GetConf() argument
580 HANDLE_LATM_STREAM hLatmConfig = &hTpEnc->writer.latm; in transportEnc_GetConf()
585 switch (hTpEnc->transportFmt) in transportEnc_GetConf()
590 tpErr = CreateStreamMuxConfig(hLatmConfig, dataBuffer, 0, &hTpEnc->callbacks); in transportEnc_GetConf()
594 if (transportEnc_writeASC(dataBuffer, cc, &hTpEnc->callbacks) != 0) { in transportEnc_GetConf()