BMediaFile: Add BUrl SetTo
* Also fix the server version of BUrl constructor to use a const reference.
This commit is contained in:
@@ -75,7 +75,7 @@ public:
|
|||||||
BMediaFile(const BUrl& url);
|
BMediaFile(const BUrl& url);
|
||||||
BMediaFile(const BUrl& url, int32 flags);
|
BMediaFile(const BUrl& url, int32 flags);
|
||||||
// Read-Write streaming constructor
|
// Read-Write streaming constructor
|
||||||
BMediaFile(BUrl destination,
|
BMediaFile(const BUrl& destination,
|
||||||
const media_file_format* mfi,
|
const media_file_format* mfi,
|
||||||
int32 flags = 0);
|
int32 flags = 0);
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ BMediaFile::BMediaFile(const BUrl& url, int32 flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BMediaFile::BMediaFile(BUrl destination, const media_file_format* mfi,
|
BMediaFile::BMediaFile(const BUrl& destination, const media_file_format* mfi,
|
||||||
int32 flags)
|
int32 flags)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
@@ -135,7 +135,6 @@ 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;
|
||||||
|
|
||||||
@@ -146,6 +145,18 @@ BMediaFile::SetTo(BDataIO* destination)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
BMediaFile::SetTo(const BUrl& url)
|
||||||
|
{
|
||||||
|
CALLED();
|
||||||
|
|
||||||
|
_UnInit();
|
||||||
|
_InitReader(NULL, &url);
|
||||||
|
|
||||||
|
return fErr;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BMediaFile::~BMediaFile()
|
BMediaFile::~BMediaFile()
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|||||||
Reference in New Issue
Block a user