BMediaFile: Set for deletion a source obtained from url

* Added some TODOs and comments for future things that
are not priority now.
This commit is contained in:
Dario Casalinuovo 2016-05-16 19:51:43 +02:00
parent 2583517316
commit dc94132564

View File

@ -85,6 +85,7 @@ BMediaFile::BMediaFile(const media_file_format* mfi, int32 flags)
BMediaFile::BMediaFile(BUrl* url) BMediaFile::BMediaFile(BUrl* url)
{ {
CALLED(); CALLED();
fDeleteSource = true;
_Init(); _Init();
_InitReader(NULL, url); _InitReader(NULL, url);
} }
@ -93,6 +94,7 @@ BMediaFile::BMediaFile(BUrl* url)
BMediaFile::BMediaFile(BUrl* url, int32 flags) BMediaFile::BMediaFile(BUrl* url, int32 flags)
{ {
CALLED(); CALLED();
fDeleteSource = true;
_Init(); _Init();
_InitReader(NULL, url, flags); _InitReader(NULL, url, flags);
} }
@ -102,8 +104,13 @@ BMediaFile::BMediaFile(BUrl* destination, const media_file_format* mfi,
int32 flags) int32 flags)
{ {
CALLED(); CALLED();
fDeleteSource = true;
_Init(); _Init();
_InitWriter(NULL, destination, mfi, flags); _InitWriter(NULL, destination, mfi, flags);
// TODO: Implement streaming server support, it's
// a pretty complex thing compared to client mode
// and will require to expand the current BMediaFile
// design to be aware of it.
} }
@ -128,6 +135,7 @@ BMediaFile::SetTo(BDataIO* destination)
{ {
CALLED(); CALLED();
// TODO: A BUrl SetTo should be provided
if (destination == NULL) if (destination == NULL)
return B_BAD_VALUE; return B_BAD_VALUE;