Lines Matching defs:encoder

145  * Configures and starts the MediaCodec encoder.  Obtains an input surface
186 ALOGV("Creating encoder input surface");
191 "ERROR: unable to create encoder input surface (err=%d)\n", err);
309 * Runs the MediaCodec encoder, sending the output to the MediaMuxer. The
317 static status_t runEncoder(const sp<MediaCodec>& encoder,
331 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
662 if (encoder != NULL) encoder->release();
702 // Main encoder loop.
703 err = runEncoder(encoder, muxer, rawFp, mainDpy, dpy,
711 printf("Stopping encoder and muxer\n");
719 if (encoder != NULL) encoder->stop();
727 if (encoder != NULL) encoder->release();
859 " use a size supported by the AVC encoder.\n"