Lines Matching defs:audio

99     ShutdownDecoderAction(bool audio, bool video)
100 : mAudio(audio),
531 false /* audio */, true /* video */));
541 if (mStarted && mSource->getFormat(false /* audio */) != NULL) {
544 // If the video decoder is not set (perhaps audio only in this case)
607 sp<MetaData> audioMeta = mSource->getFormatMeta(true /* audio */);
613 sp<AMessage> videoFormat = mSource->getFormat(false /* audio */);
660 // initialize video before audio because successful initialization of
661 // video may change deep buffer mode of audio.
668 // open audio sink early under offload mode.
669 sp<AMessage> format = mSource->getFormat(true /*audio*/);
687 // We're not currently decoding anything (no audio or
710 bool audio = msg->what() == kWhatAudioNotify;
713 (audio? mAudioDecoderGeneration : mVideoDecoderGeneration);
719 audio ? "audio" : "video", requesterGeneration,
736 audio, msg);
748 ALOGV("got %s decoder EOS", audio ? "audio" : "video");
751 audio ? "audio" : "video",
755 mRenderer->queueEOS(audio, err);
757 ALOGV("decoder %s flush completed", audio ? "audio" : "video");
759 handleFlushComplete(audio, true /* isDecoder */);
765 if (audio) {
770 mSource->getFormat(false /* audio */);
775 ALOGV("%s shutdown completed", audio ? "audio" : "video");
776 if (audio) {
807 FlushStatus *flushing = audio ? &mFlushingAudio : &mFlushingVideo;
809 err, audio ? "audio" : "video", *flushing);
814 new ShutdownDecoderAction(audio, !audio /* video */));
826 if (!audio && mSource != NULL && mSourceFlags & Source::FLAG_SECURE) {
829 getDecoder(audio)->initiateShutdown(); // In the middle of a seek.
838 renderBuffer(audio, msg);
865 int32_t audio;
866 CHECK(msg->findInt32("audio", &audio));
871 if (audio) {
878 ALOGV("reached %s EOS", audio ? "audio" : "video");
881 audio ? "audio" : "video", finalResult);
892 int32_t audio;
893 CHECK(msg->findInt32("audio", &audio));
895 ALOGV("renderer %s flush completed.", audio ? "audio" : "video");
896 handleFlushComplete(audio, false /* isDecoder */);
904 ALOGV("Tear down audio offload, fall back to s/w path");
912 mRenderer->flush(true /* audio */);
914 mRenderer->flush(false /* audio */);
921 instantiateDecoder(true /* audio */, &mAudioDecoder);
938 true /* audio */, true /* video */));
992 instantiateDecoder(true /* audio */, &mAudioDecoder);
1025 void NuPlayer::handleFlushComplete(bool audio, bool isDecoder) {
1029 mFlushComplete[audio][isDecoder] = true;
1030 if (!mFlushComplete[audio][!isDecoder]) {
1034 FlushStatus *state = audio ? &mFlushingAudio : &mFlushingVideo;
1046 ALOGV("initiating %s decoder shutdown", audio ? "audio" : "video");
1047 if (!audio) {
1053 getDecoder(audio)->initiateShutdown();
1075 ALOGV("both audio and video are flushed now.");
1136 mSource->getFormatMeta(true /* audio */);
1145 status_t NuPlayer::instantiateDecoder(bool audio, sp<Decoder> *decoder) {
1150 sp<AMessage> format = mSource->getFormat(audio);
1156 if (!audio) {
1169 if (audio) {
1190 if (!audio && (mSourceFlags & Source::FLAG_SECURE)) {
1201 status_t err = mSource->setBuffers(audio, mediaBufs);
1214 status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
1218 if ((audio && mFlushingAudio != NONE)
1219 || (!audio && mFlushingVideo != NONE)
1231 bool doBufferAggregation = (audio && mOffloadAudio);
1238 if (audio && (mPendingAudioAccessUnit != NULL)) {
1244 err = mSource->dequeueAccessUnit(audio, &accessUnit);
1263 (audio &&
1265 || (!audio &&
1271 audio ? "audio" : "video", formatChange, timeChange);
1273 if (audio) {
1287 audio ? "audio" : "video", resumeAtMediaTimeUs);
1289 if (audio) {
1304 sp<AMessage> newFormat = mSource->getFormat(audio);
1307 getDecoder(audio)->supportsSeamlessFormatChange(newFormat);
1314 // We control this by doing it only if neither audio nor video are
1330 flushDecoder(audio, /* needShutdown = */ true);
1333 flushDecoder(audio, /* needShutdown = */ false, newFormat);
1337 updateDecoderFormatWithoutFlush(audio, newFormat);
1350 if (!audio) {
1355 if (!audio
1409 // ALOGV("returned a valid buffer of %s data", audio ? "audio" : "video");
1415 audio ? "audio" : "video",
1419 if (!audio) {
1437 void NuPlayer::renderBuffer(bool audio, const sp<AMessage> &msg) {
1438 // ALOGV("renderBuffer %s", audio ? "audio" : "video");
1443 if ((audio && mFlushingAudio != NONE)
1444 || (!audio && mFlushingVideo != NONE)) {
1451 " right back.", audio ? "audio" : "video");
1464 audio
1472 audio ? "audio" : "video",
1482 if (!audio && mCCDecoder->isSelected()) {
1486 mRenderer->queueBuffer(audio, buffer, reply);
1570 bool audio, bool needShutdown, const sp<AMessage> &newFormat) {
1572 audio ? "audio" : "video", needShutdown);
1574 const sp<Decoder> &decoder = getDecoder(audio);
1577 audio ? "audio" : "video");
1586 mRenderer->flush(audio);
1591 mFlushComplete[audio][false /* isDecoder */] = false;
1592 mFlushComplete[audio][true /* isDecoder */] = false;
1593 if (audio) {
1595 "audio flushDecoder() is called in state %d", mFlushingAudio);
1609 bool audio, const sp<AMessage> &format) {
1610 ALOGV("[%s] updateDecoderFormatWithoutFlush", audio ? "audio" : "video");
1612 const sp<Decoder> &decoder = getDecoder(audio);
1615 audio ? "audio" : "video");
1623 bool audio, bool video, const sp<AMessage> &reply) {
1624 ALOGI("queueDecoderShutdown audio=%d, video=%d", audio, video);
1627 new ShutdownDecoderAction(audio, video));
1753 "mSource is NULL and decoders not NULL audio(%p) video(%p)",
1782 flushDecoder(true /* audio */, false /* needShutdown */);
1786 flushDecoder(false /* audio */, false /* needShutdown */);
1790 void NuPlayer::performDecoderShutdown(bool audio, bool video) {
1791 ALOGV("performDecoderShutdown audio=%d, video=%d", audio, video);
1793 if ((!audio || mAudioDecoder == NULL)
1800 if (audio && mAudioDecoder != NULL) {
1801 flushDecoder(true /* audio */, true /* needShutdown */);
1805 flushDecoder(false /* audio */, true /* needShutdown */);
2002 int32_t audio, video;
2003 CHECK(msg->findInt32("audio", &audio));
2009 queueDecoderShutdown(audio, video, reply);
2104 sp<AMessage> NuPlayer::Source::getFormat(bool audio) {
2105 sp<MetaData> meta = getFormatMeta(audio);