rtsp_streamer: Update to last codec kit API

* Fix build
This commit is contained in:
Barrett17
2019-02-17 14:10:28 +01:00
parent 7928a43a84
commit a06d611775
5 changed files with 28 additions and 15 deletions
@@ -1,8 +1,5 @@
SubDir HAIKU_TOP src add-ons media plugins rtsp_streamer ; SubDir HAIKU_TOP src add-ons media plugins rtsp_streamer ;
UsePrivateHeaders media shared ;
UsePrivateHeaders [ FDirName media experimental ] ;
# TODO: Investigate this # TODO: Investigate this
SubDirC++Flags -w ; SubDirC++Flags -w ;
@@ -24,7 +21,7 @@ for architectureObject in [ MultiArchSubDirSetup ] {
rtsp.cpp rtsp.cpp
: :
[ BuildFeatureAttribute live555 : libraries ] [ BuildFeatureAttribute live555 : libraries ]
be media network bnetapi shared be codec network bnetapi shared
[ TargetLibstdc++ ] [ TargetLibsupc++ ] [ TargetLibstdc++ ] [ TargetLibsupc++ ]
; ;
} }
@@ -10,6 +10,9 @@
#define LIVE555_VERBOSITY 1 #define LIVE555_VERBOSITY 1
using namespace BCodecKit;
RTSPMediaIO::RTSPMediaIO(BUrl ourUrl) RTSPMediaIO::RTSPMediaIO(BUrl ourUrl)
: :
BAdapterIO( BAdapterIO(
@@ -11,6 +11,8 @@
#include "rtsp.h" #include "rtsp.h"
using BCodecKit::BAdapterIO;
using BCodecKit::BInputAdapter;
class HaikuRTSPClient; class HaikuRTSPClient;
@@ -8,7 +8,16 @@
#include "RTSPMediaIO.h" #include "RTSPMediaIO.h"
B_DECLARE_CODEC_KIT_PLUGIN(
RTSPStreamerPlugin,
"rtsp_streamer",
B_CODEC_KIT_PLUGIN_VERSION
);
RTSPStreamer::RTSPStreamer() RTSPStreamer::RTSPStreamer()
:
BStreamer()
{ {
} }
@@ -32,14 +41,8 @@ RTSPStreamer::Sniff(const BUrl& url, BDataIO** source)
} }
Streamer* BStreamer*
RTSPStreamerPlugin::NewStreamer() RTSPStreamerPlugin::NewStreamer()
{ {
return new RTSPStreamer(); return new RTSPStreamer();
} }
MediaPlugin *instantiate_plugin()
{
return new RTSPStreamerPlugin();
}
@@ -1,9 +1,17 @@
/*
* Copyright 2016-2019, Dario Casalinuovo
* Distributed under the terms of the MIT License.
*/
#ifndef _RTSP_STREAMER_PLUGIN_H #ifndef _RTSP_STREAMER_PLUGIN_H
#define _RTSP_STREAMER_PLUGIN_H #define _RTSP_STREAMER_PLUGIN_H
#include "StreamerPlugin.h" #include <Streamer.h>
class RTSPStreamer : public Streamer using BCodecKit::BStreamer;
using BCodecKit::BStreamerPlugin;
class RTSPStreamer : public BStreamer
{ {
public: public:
RTSPStreamer(); RTSPStreamer();
@@ -13,9 +21,9 @@ public:
}; };
class RTSPStreamerPlugin : public StreamerPlugin { class RTSPStreamerPlugin : public BStreamerPlugin {
public: public:
virtual Streamer* NewStreamer(); virtual BStreamer* NewStreamer();
}; };
#endif // _RTSP_STREAMER_PLUGIN_H #endif // _RTSP_STREAMER_PLUGIN_H