Media Kit: remove MediaExtractor::Source

The idea was that the Media Extractor could wrap the original source
given by BMediaTrack, but all operations on the data go through
MediaExtractor anyway.
We could probably move ownership of the BDataIO completely into
MediaExtractor instead.

Change-Id: I846b34b543fb983e60f6adf86cb17e835303267b
Reviewed-on: https://review.haiku-os.org/c/1587
Reviewed-by: Stephan Aßmus <[email protected]>
This commit is contained in:
Adrien Destugues
2019-07-13 16:14:01 +00:00
committed by waddlesplash
parent 9b3aa126ba
commit 727e49c611
3 changed files with 2 additions and 12 deletions
-2
View File
@@ -42,8 +42,6 @@ public:
status_t InitCheck();
BDataIO* Source() const;
void GetFileFormatInfo(
media_file_format* fileFormat) const;
status_t GetMetaData(BMessage* _data) const;
-7
View File
@@ -173,13 +173,6 @@ MediaExtractor::InitCheck()
}
BDataIO*
MediaExtractor::Source() const
{
return fSource;
}
void
MediaExtractor::GetFileFormatInfo(media_file_format* fileFormat) const
{
+2 -3
View File
@@ -479,9 +479,9 @@ BMediaFile::_UnInit()
if (fDeleteSource) {
delete fSource;
fSource = NULL;
fDeleteSource = false;
}
fSource = NULL;
// Deleting the extractor or writer can cause unloading of the plugins.
// The source must be deleted before that, because it can come from a
@@ -523,8 +523,7 @@ BMediaFile::_InitReader(BDataIO* source, const BUrl* url, int32 flags)
if (fErr != B_OK)
return;
// Get the actual source from the extractor
fSource = fExtractor->Source();
fSource = source;
fExtractor->GetFileFormatInfo(&fMFI);
fTrackNum = fExtractor->StreamCount();