Remove RefBase from plugin-side DataSource
Extractor plugins now use DataSourceBase, which is not refcounted.
Framework-side DataSource derives from DataSourceBase and RefBase.
Also remove MediaExtractor::release, because it is not needed
anymore due to the way the extractor/track/datasource lifecycle
is managed now.
Also add source and target pid to CallbackDataSource name, to
make the extractor dumpsys more useful.
Bug: 67908556
Test: build, boot, CTS, skia test app for heif
Change-Id: I6b9cbe903f76b0cf27ba87f4a456f424803efd08
diff --git a/media/extractors/mp4/SampleTable.h b/media/extractors/mp4/SampleTable.h
index 466e26b..e4e974b 100644
--- a/media/extractors/mp4/SampleTable.h
+++ b/media/extractors/mp4/SampleTable.h
@@ -27,12 +27,12 @@
namespace android {
-class DataSource;
+class DataSourceBase;
struct SampleIterator;
class SampleTable : public RefBase {
public:
- explicit SampleTable(const sp<DataSource> &source);
+ explicit SampleTable(DataSourceBase *source);
bool isValid() const;
@@ -99,7 +99,7 @@
// Limit the total size of all internal tables to 200MiB.
static const size_t kMaxTotalSize = 200 * (1 << 20);
- sp<DataSource> mDataSource;
+ DataSourceBase *mDataSource;
Mutex mLock;
off64_t mChunkOffsetOffset;