http_streamer: API update
This commit is contained in:
@@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
#include "HTTPStreamerPlugin.h"
|
#include "HTTPStreamerPlugin.h"
|
||||||
|
|
||||||
#include "HTTPMediaIO.h"
|
|
||||||
|
|
||||||
#include "MediaDebug.h"
|
#include "MediaDebug.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -31,22 +29,29 @@ HTTPStreamer::~HTTPStreamer()
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
HTTPStreamer::Sniff(const BUrl& url, BDataIO** source)
|
HTTPStreamer::Sniff(const BUrl& url)
|
||||||
{
|
{
|
||||||
CALLED();
|
CALLED();
|
||||||
|
|
||||||
HTTPMediaIO* outSource = new HTTPMediaIO(url);
|
HTTPMediaIO* adapter = new HTTPMediaIO(url);
|
||||||
|
|
||||||
status_t ret = outSource->Open();
|
status_t ret = adapter->Open();
|
||||||
if (ret == B_OK) {
|
if (ret == B_OK) {
|
||||||
*source = outSource;
|
fAdapter = adapter;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
delete outSource;
|
delete adapter;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
BMediaIO*
|
||||||
|
HTTPStreamer::Adapter() const
|
||||||
|
{
|
||||||
|
return fAdapter;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BStreamer*
|
BStreamer*
|
||||||
HTTPStreamerPlugin::NewStreamer()
|
HTTPStreamerPlugin::NewStreamer()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,6 +8,9 @@
|
|||||||
|
|
||||||
#include <Streamer.h>
|
#include <Streamer.h>
|
||||||
|
|
||||||
|
#include "HTTPMediaIO.h"
|
||||||
|
|
||||||
|
using BCodecKit::BMediaIO;
|
||||||
using BCodecKit::BMediaPlugin;
|
using BCodecKit::BMediaPlugin;
|
||||||
using BCodecKit::BStreamer;
|
using BCodecKit::BStreamer;
|
||||||
using BCodecKit::BStreamerPlugin;
|
using BCodecKit::BStreamerPlugin;
|
||||||
@@ -19,7 +22,11 @@ public:
|
|||||||
HTTPStreamer();
|
HTTPStreamer();
|
||||||
virtual ~HTTPStreamer();
|
virtual ~HTTPStreamer();
|
||||||
|
|
||||||
virtual status_t Sniff(const BUrl& url, BDataIO** source);
|
virtual status_t Sniff(const BUrl& url);
|
||||||
|
virtual BMediaIO* Adapter() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
HTTPMediaIO* fAdapter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user