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