Lines Matching defs:encoder

147  * Configures and starts the MediaCodec encoder.  Obtains an input surface
188 ALOGV("Creating encoder input surface");
193 "ERROR: unable to create encoder input surface (err=%d)\n", err);
310 * Runs the MediaCodec encoder, sending the output to the MediaMuxer. The
318 static status_t runEncoder(const sp<MediaCodec>& encoder,
332 err = encoder->getOutputBuffers(&buffers);
352 err = encoder->dequeueOutputBuffer(&bufIndex, &offset, &size, &ptsUsec,
427 err = encoder->releaseOutputBuffer(bufIndex);
447 encoder->getOutputFormat(&newFormat);
460 // Not expected for an encoder; handle it anyway.
462 err = encoder->getOutputBuffers(&buffers);
567 // Configure and start the encoder.
568 sp<MediaCodec> encoder;
572 err = prepareEncoder(mainDpyInfo.fps, &encoder, &encoderInputSurface);
585 err = prepareEncoder(mainDpyInfo.fps, &encoder,
591 // From here on, we must explicitly release() the encoder before it goes
595 // We're not using an encoder at all. The "encoder input surface" we hand to
605 // it directly to the encoder.
619 if (encoder != NULL) encoder->release();
626 // Use the encoder's input surface as the virtual display surface.
634 if (encoder != NULL) encoder->release();
642 // Configure muxer. We have to wait for the CSD blob from the encoder
666 if (encoder != NULL) encoder->release();
706 // Main encoder loop.
707 err = runEncoder(encoder, muxer, rawFp, mainDpy, dpy,
715 printf("Stopping encoder and muxer\n");
723 if (encoder != NULL) encoder->stop();
731 if (encoder != NULL) encoder->release();
863 " use a size supported by the AVC encoder.\n"