Loading include/media/stagefright/MetaData.h +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ enum { kKeyOpusHeader = 'ohdr', // raw data kKeyOpusCodecDelay = 'ocod', // uint64_t (codec delay in ns) kKeyOpusSeekPreRoll = 'ospr', // uint64_t (seek preroll in ns) kKeyVp9CodecPrivate = 'vp9p', // raw data (vp9 csd information) kKeyWantsNALFragments = 'NALf', kKeyIsSyncFrame = 'sync', // int32_t (bool) kKeyIsCodecConfig = 'conf', // int32_t (bool) Loading media/libstagefright/Utils.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -527,6 +527,16 @@ status_t convertMetaDataToMessage( buffer->meta()->setInt32("csd", true); buffer->meta()->setInt64("timeUs", 0); msg->setBuffer("csd-2", buffer); } else if (meta->findData(kKeyVp9CodecPrivate, &type, &data, &size)) { sp<ABuffer> buffer = new (std::nothrow) ABuffer(size); if (buffer.get() == NULL || buffer->base() == NULL) { return NO_MEMORY; } memcpy(buffer->data(), data, size); buffer->meta()->setInt32("csd", true); buffer->meta()->setInt64("timeUs", 0); msg->setBuffer("csd-0", buffer); } // TODO expose "crypto-key"/kKeyCryptoKey through public api Loading media/libstagefright/codecs/on2/dec/SoftVPX.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,17 @@ void SoftVPX::onQueueFilled(OMX_U32 /* portIndex */) { BufferInfo *inInfo = *inQueue.begin(); OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader; // Software VP9 Decoder does not need the Codec Specific Data (CSD) // (specified in http://www.webmproject.org/vp9/profiles/). Ignore it if // it was passed. if (inHeader->nFlags & OMX_BUFFERFLAG_CODECCONFIG) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); continue; } mTimeStamps[mTimeStampIdx] = inHeader->nTimeStamp; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { Loading media/libstagefright/matroska/MatroskaExtractor.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -1113,6 +1113,13 @@ void MatroskaExtractor::addTracks() { meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_VP8); } else if (!strcmp("V_VP9", codecID)) { meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_VP9); if (codecPrivateSize > 0) { // 'csd-0' for VP9 is the Blob of Codec Private data as // specified in http://www.webmproject.org/vp9/profiles/. meta->setData( kKeyVp9CodecPrivate, 0, codecPrivate, codecPrivateSize); } } else { ALOGW("%s is not supported.", codecID); continue; Loading Loading
include/media/stagefright/MetaData.h +1 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,7 @@ enum { kKeyOpusHeader = 'ohdr', // raw data kKeyOpusCodecDelay = 'ocod', // uint64_t (codec delay in ns) kKeyOpusSeekPreRoll = 'ospr', // uint64_t (seek preroll in ns) kKeyVp9CodecPrivate = 'vp9p', // raw data (vp9 csd information) kKeyWantsNALFragments = 'NALf', kKeyIsSyncFrame = 'sync', // int32_t (bool) kKeyIsCodecConfig = 'conf', // int32_t (bool) Loading
media/libstagefright/Utils.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -527,6 +527,16 @@ status_t convertMetaDataToMessage( buffer->meta()->setInt32("csd", true); buffer->meta()->setInt64("timeUs", 0); msg->setBuffer("csd-2", buffer); } else if (meta->findData(kKeyVp9CodecPrivate, &type, &data, &size)) { sp<ABuffer> buffer = new (std::nothrow) ABuffer(size); if (buffer.get() == NULL || buffer->base() == NULL) { return NO_MEMORY; } memcpy(buffer->data(), data, size); buffer->meta()->setInt32("csd", true); buffer->meta()->setInt64("timeUs", 0); msg->setBuffer("csd-0", buffer); } // TODO expose "crypto-key"/kKeyCryptoKey through public api Loading
media/libstagefright/codecs/on2/dec/SoftVPX.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -228,6 +228,17 @@ void SoftVPX::onQueueFilled(OMX_U32 /* portIndex */) { BufferInfo *inInfo = *inQueue.begin(); OMX_BUFFERHEADERTYPE *inHeader = inInfo->mHeader; // Software VP9 Decoder does not need the Codec Specific Data (CSD) // (specified in http://www.webmproject.org/vp9/profiles/). Ignore it if // it was passed. if (inHeader->nFlags & OMX_BUFFERFLAG_CODECCONFIG) { inQueue.erase(inQueue.begin()); inInfo->mOwnedByUs = false; notifyEmptyBufferDone(inHeader); continue; } mTimeStamps[mTimeStampIdx] = inHeader->nTimeStamp; if (inHeader->nFlags & OMX_BUFFERFLAG_EOS) { Loading
media/libstagefright/matroska/MatroskaExtractor.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -1113,6 +1113,13 @@ void MatroskaExtractor::addTracks() { meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_VP8); } else if (!strcmp("V_VP9", codecID)) { meta->setCString(kKeyMIMEType, MEDIA_MIMETYPE_VIDEO_VP9); if (codecPrivateSize > 0) { // 'csd-0' for VP9 is the Blob of Codec Private data as // specified in http://www.webmproject.org/vp9/profiles/. meta->setData( kKeyVp9CodecPrivate, 0, codecPrivate, codecPrivateSize); } } else { ALOGW("%s is not supported.", codecID); continue; Loading