Loading media/codec2/sfplugin/CCodec.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -1760,15 +1760,18 @@ void CCodec::onMessageReceived(const sp<AMessage> &msg) { // move all info into output-stream #0 domain updates.emplace_back(C2Param::CopyAsStream(*info, true /* output */, stream)); } for (const C2ConstGraphicBlock &block : buf->data().graphicBlocks()) { const std::vector<C2ConstGraphicBlock> blocks = buf->data().graphicBlocks(); // for now only do the first block if (!blocks.empty()) { // ALOGV("got output buffer with crop %u,%u+%u,%u and size %u,%u", // block.crop().left, block.crop().top, // block.crop().width, block.crop().height, // block.width(), block.height()); const C2ConstGraphicBlock &block = blocks[0]; updates.emplace_back(new C2StreamCropRectInfo::output(stream, block.crop())); updates.emplace_back(new C2StreamPictureSizeInfo::output( stream, block.crop().width, block.crop().height)); break; // for now only do the first block } ++stream; } Loading media/extractors/mkv/MatroskaExtractor.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -1879,13 +1879,12 @@ status_t MatroskaExtractor::initTrackInfo( for(size_t i = 0; i < track->GetContentEncodingCount(); i++) { const mkvparser::ContentEncoding *encoding = track->GetContentEncodingByIndex(i); for(size_t j = 0; j < encoding->GetEncryptionCount(); j++) { if (encoding->GetEncryptionCount() > 0) { const mkvparser::ContentEncoding::ContentEncryption *encryption; encryption = encoding->GetEncryptionByIndex(j); encryption = encoding->GetEncryptionByIndex(0); AMediaFormat_setBuffer(trackInfo->mMeta, AMEDIAFORMAT_KEY_CRYPTO_KEY, encryption->key_id, encryption->key_id_len); trackInfo->mEncrypted = true; break; } for(size_t j = 0; j < encoding->GetCompressionCount(); j++) { Loading Loading
media/codec2/sfplugin/CCodec.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -1760,15 +1760,18 @@ void CCodec::onMessageReceived(const sp<AMessage> &msg) { // move all info into output-stream #0 domain updates.emplace_back(C2Param::CopyAsStream(*info, true /* output */, stream)); } for (const C2ConstGraphicBlock &block : buf->data().graphicBlocks()) { const std::vector<C2ConstGraphicBlock> blocks = buf->data().graphicBlocks(); // for now only do the first block if (!blocks.empty()) { // ALOGV("got output buffer with crop %u,%u+%u,%u and size %u,%u", // block.crop().left, block.crop().top, // block.crop().width, block.crop().height, // block.width(), block.height()); const C2ConstGraphicBlock &block = blocks[0]; updates.emplace_back(new C2StreamCropRectInfo::output(stream, block.crop())); updates.emplace_back(new C2StreamPictureSizeInfo::output( stream, block.crop().width, block.crop().height)); break; // for now only do the first block } ++stream; } Loading
media/extractors/mkv/MatroskaExtractor.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -1879,13 +1879,12 @@ status_t MatroskaExtractor::initTrackInfo( for(size_t i = 0; i < track->GetContentEncodingCount(); i++) { const mkvparser::ContentEncoding *encoding = track->GetContentEncodingByIndex(i); for(size_t j = 0; j < encoding->GetEncryptionCount(); j++) { if (encoding->GetEncryptionCount() > 0) { const mkvparser::ContentEncoding::ContentEncryption *encryption; encryption = encoding->GetEncryptionByIndex(j); encryption = encoding->GetEncryptionByIndex(0); AMediaFormat_setBuffer(trackInfo->mMeta, AMEDIAFORMAT_KEY_CRYPTO_KEY, encryption->key_id, encryption->key_id_len); trackInfo->mEncrypted = true; break; } for(size_t j = 0; j < encoding->GetCompressionCount(); j++) { Loading