7eaa054b87
* There's no need to force the streamer plugin to use a BMediaIO. This class is supplied to accomodate more smart uses, but in certain cases it makes just things more complex. If a plugin doesn't need to have an internal caching method, then it will be simpler to implement a block-consuming BDataIO and let the internal BMediaIOWrapper to deal with caching.
48 lines
891 B
C++
48 lines
891 B
C++
#ifndef _STREAMER_PLUGIN_H
|
|
#define _STREAMER_PLUGIN_H
|
|
|
|
|
|
#include <MediaIO.h>
|
|
#include <MediaTrack.h>
|
|
#include <Url.h>
|
|
|
|
#include "MediaPlugin.h"
|
|
|
|
|
|
namespace BPrivate { namespace media {
|
|
|
|
class PluginManager;
|
|
|
|
class Streamer {
|
|
public:
|
|
Streamer();
|
|
virtual ~Streamer();
|
|
|
|
virtual status_t Sniff(BUrl* url, BDataIO** source) = 0;
|
|
private:
|
|
virtual void _ReservedStreamer1();
|
|
virtual void _ReservedStreamer2();
|
|
virtual void _ReservedStreamer3();
|
|
virtual void _ReservedStreamer4();
|
|
virtual void _ReservedStreamer5();
|
|
|
|
MediaPlugin* fMediaPlugin;
|
|
uint32 fReserved[5];
|
|
|
|
// needed for plug-in reference count management
|
|
friend class PluginManager;
|
|
};
|
|
|
|
|
|
class StreamerPlugin : public virtual MediaPlugin {
|
|
public:
|
|
virtual Streamer* NewStreamer() = 0;
|
|
};
|
|
|
|
} } // namespace BPrivate::media
|
|
|
|
using namespace BPrivate::media;
|
|
|
|
|
|
#endif // _STREAMER_PLUGIN_H
|