Revert "Move MediaBufferXXX from foundation to libmediaextractor"
This reverts commit f03606d9034730bea1a394e6803f9ebc36f3d2eb.
Test: build and plays the file attached in the bug.
Bug: 72479511
Change-Id: Ifdb8225a7140480649cecd52668ac7dcdd489252
diff --git a/media/libmedia/nuplayer2/GenericSource.cpp b/media/libmedia/nuplayer2/GenericSource.cpp
index 6d5b14d..c0b81fb 100644
--- a/media/libmedia/nuplayer2/GenericSource.cpp
+++ b/media/libmedia/nuplayer2/GenericSource.cpp
@@ -24,7 +24,6 @@
#include <binder/IServiceManager.h>
#include <cutils/properties.h>
#include <media/DataSource.h>
-#include <media/MediaBufferHolder.h>
#include <media/IMediaExtractorService.h>
#include <media/MediaHTTPService.h>
#include <media/MediaExtractor.h>
@@ -1168,7 +1167,8 @@
// data is already provided in the buffer
ab = new ABuffer(NULL, mb->range_length());
- ab->meta()->setObject("mediaBufferHolder", new MediaBufferHolder(mb));
+ mb->add_ref();
+ ab->setMediaBufferBase(mb);
// Modular DRM: Required b/c of the above add_ref.
// If ref>0, there must be an observer, or it'll crash at release().