Streaming: Remove any pointer BUrl argument

* There's no need to pass BUrl by pointer, this is
potentially dangerous and leaky without any advantage,
copying is definitely safer.
This commit is contained in:
Dario Casalinuovo
2016-06-24 19:00:38 +02:00
parent 43a03ceb4a
commit 0ba82236bd
23 changed files with 44 additions and 43 deletions
+4 -4
View File
@@ -72,10 +72,10 @@ public:
// Additional constructors used to stream data from protocols
// supported by the Streamer API
BMediaFile(BUrl* url);
BMediaFile(BUrl* url, int32 flags);
BMediaFile(BUrl url);
BMediaFile(BUrl url, int32 flags);
// Read-Write streaming constructor
BMediaFile(BUrl* destination,
BMediaFile(BUrl destination,
const media_file_format* mfi,
int32 flags = 0);
@@ -84,7 +84,7 @@ public:
status_t SetTo(const entry_ref* ref);
status_t SetTo(BDataIO* destination);
// The streaming equivalent of SetTo
status_t SetTo(BUrl* url);
status_t SetTo(BUrl url);
status_t InitCheck() const;
+1 -1
View File
@@ -40,7 +40,7 @@ struct stream_info {
class MediaExtractor {
public:
MediaExtractor(BDataIO* source, int32 flags);
MediaExtractor(BUrl* url, int32 flags);
MediaExtractor(BUrl url, int32 flags);
~MediaExtractor();
+1 -1
View File
@@ -22,7 +22,7 @@ class MediaWriter {
public:
MediaWriter(BDataIO* target,
const media_file_format& fileFormat);
MediaWriter(BUrl* url,
MediaWriter(BUrl url,
const media_file_format& fileFormat);
~MediaWriter();
+1 -1
View File
@@ -61,7 +61,7 @@ public:
void DestroyEncoder(Encoder* encoder);
status_t CreateStreamer(Streamer** streamer,
BUrl* url, BDataIO** source);
BUrl url, BDataIO** source);
void DestroyStreamer(Streamer* streamer);
private:
+1 -1
View File
@@ -18,7 +18,7 @@ public:
Streamer();
virtual ~Streamer();
virtual status_t Sniff(BUrl* url, BDataIO** source) = 0;
virtual status_t Sniff(BUrl url, BDataIO** source) = 0;
private:
virtual void _ReservedStreamer1();
virtual void _ReservedStreamer2();