Lines Matching refs:encoder

142  * Configures and starts the MediaCodec encoder.  Obtains an input surface
183 ALOGV("Creating encoder input surface");
188 "ERROR: unable to create encoder input surface (err=%d)\n", err);
306 * Runs the MediaCodec encoder, sending the output to the MediaMuxer. The
314 static status_t runEncoder(const sp<MediaCodec>& encoder,
328 err = encoder->getOutputBuffers(&buffers);
351 err = encoder->dequeueOutputBuffer(&bufIndex, &offset, &size, &ptsUsec,
423 err = encoder->releaseOutputBuffer(bufIndex);
443 encoder->getOutputFormat(&newFormat);
456 // Not expected for an encoder; handle it anyway.
458 err = encoder->getOutputBuffers(&buffers);
563 // Configure and start the encoder.
564 sp<MediaCodec> encoder;
568 err = prepareEncoder(mainDpyInfo.fps, &encoder, &encoderInputSurface);
581 err = prepareEncoder(mainDpyInfo.fps, &encoder,
587 // From here on, we must explicitly release() the encoder before it goes
591 // We're not using an encoder at all. The "encoder input surface" we hand to
601 // it directly to the encoder.
615 if (encoder != NULL) encoder->release();
622 // Use the encoder's input surface as the virtual display surface.
630 if (encoder != NULL) encoder->release();
638 // Configure muxer. We have to wait for the CSD blob from the encoder
651 if (encoder != NULL) encoder->release();
691 // Main encoder loop.
692 err = runEncoder(encoder, muxer, rawFp, mainDpy, dpy,
700 printf("Stopping encoder and muxer\n");
708 if (encoder != NULL) encoder->stop();
716 if (encoder != NULL) encoder->release();
848 " use a size supported by the AVC encoder.\n"