1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix bug of build script

This commit is contained in:
winlin 2014-04-15 14:24:03 +08:00
parent 23a1b29935
commit 90dee0924d
6 changed files with 96 additions and 4 deletions

View file

@ -25,5 +25,44 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef SRS_AUTO_DVR
#include <srs_kernel_error.hpp>
SrsDvr::SrsDvr(SrsSource* source)
{
_source = source;
}
SrsDvr::~SrsDvr()
{
}
int SrsDvr::on_publish(SrsRequest* req)
{
int ret = ERROR_SUCCESS;
return ret;
}
void SrsDvr::on_unpublish()
{
}
int SrsDvr::on_meta_data(SrsAmf0Object* metadata)
{
int ret = ERROR_SUCCESS;
return ret;
}
int SrsDvr::on_audio(SrsSharedPtrMessage* audio)
{
int ret = ERROR_SUCCESS;
return ret;
}
int SrsDvr::on_video(SrsSharedPtrMessage* video)
{
int ret = ERROR_SUCCESS;
return ret;
}
#endif

View file

@ -31,6 +31,47 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifdef SRS_AUTO_DVR
class SrsSource;
class SrsRequest;
class SrsAmf0Object;
class SrsSharedPtrMessage;
/**
* dvr(digital video recorder) to record RTMP stream to flv file.
* TODO: FIXME: add utest for it.
*/
class SrsDvr
{
private:
SrsSource* _source;
public:
SrsDvr(SrsSource* source);
virtual ~SrsDvr();
public:
/**
* publish stream event, continue to write the m3u8,
* for the muxer object not destroyed.
*/
virtual int on_publish(SrsRequest* req);
/**
* the unpublish event, only close the muxer, donot destroy the
* muxer, for when we continue to publish, the m3u8 will continue.
*/
virtual void on_unpublish();
/**
* get some information from metadata, it's optinal.
*/
virtual int on_meta_data(SrsAmf0Object* metadata);
/**
* mux the audio packets to ts.
*/
virtual int on_audio(SrsSharedPtrMessage* audio);
/**
* mux the video packets to ts.
*/
virtual int on_video(SrsSharedPtrMessage* video);
};
#endif
#endif

View file

@ -494,15 +494,19 @@ int SrsHttpHandler::res_error(SrsSocket* skt, SrsHttpMessage* req, int code, str
return res_flush(skt, ss);
}
#ifdef SRS_AUTO_HTTP_API
SrsHttpHandler* SrsHttpHandler::create_http_api()
{
return new SrsApiRoot();
}
#endif
#ifdef SRS_AUTO_HTTP_SERVER
SrsHttpHandler* SrsHttpHandler::create_http_stream()
{
return new SrsHttpRoot();
}
#endif
SrsHttpMessage::SrsHttpMessage()
{

View file

@ -263,11 +263,15 @@ public:
/**
* create http api resource handler.
*/
#ifdef SRS_AUTO_HTTP_API
static SrsHttpHandler* create_http_api();
#endif
/**
* create http stream resource handler.
*/
#ifdef SRS_AUTO_HTTP_SERVER
static SrsHttpHandler* create_http_stream();
#endif
};
/**