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

add dvr option. refine macros of auto headers

This commit is contained in:
winlin 2014-04-15 14:01:57 +08:00
parent 1ae9178605
commit 23a1b29935
34 changed files with 242 additions and 150 deletions

View file

@ -68,7 +68,7 @@ SrsRtmpConn::SrsRtmpConn(SrsServer* srs_server, st_netfd_t client_stfd)
skt = new SrsSocket(client_stfd);
rtmp = new SrsRtmpServer(skt);
refer = new SrsRefer();
#ifdef SRS_HTTP_CALLBACK
#ifdef SRS_AUTO_HTTP_CALLBACK
http_hooks = new SrsHttpHooks();
#endif
bandwidth = new SrsBandwidth();
@ -86,7 +86,7 @@ SrsRtmpConn::~SrsRtmpConn()
srs_freep(rtmp);
srs_freep(skt);
srs_freep(refer);
#ifdef SRS_HTTP_CALLBACK
#ifdef SRS_AUTO_HTTP_CALLBACK
srs_freep(http_hooks);
#endif
srs_freep(bandwidth);
@ -727,7 +727,7 @@ int SrsRtmpConn::on_connect()
{
int ret = ERROR_SUCCESS;
#ifdef SRS_HTTP_CALLBACK
#ifdef SRS_AUTO_HTTP_CALLBACK
// HTTP: on_connect
SrsConfDirective* on_connect = _srs_config->get_vhost_on_connect(req->vhost);
if (!on_connect) {
@ -749,7 +749,7 @@ int SrsRtmpConn::on_connect()
void SrsRtmpConn::on_close()
{
#ifdef SRS_HTTP_CALLBACK
#ifdef SRS_AUTO_HTTP_CALLBACK
// whatever the ret code, notify the api hooks.
// HTTP: on_close
SrsConfDirective* on_close = _srs_config->get_vhost_on_close(req->vhost);
@ -769,7 +769,7 @@ int SrsRtmpConn::on_publish()
{
int ret = ERROR_SUCCESS;
#ifdef SRS_HTTP_CALLBACK
#ifdef SRS_AUTO_HTTP_CALLBACK
// HTTP: on_publish
SrsConfDirective* on_publish = _srs_config->get_vhost_on_publish(req->vhost);
if (!on_publish) {
@ -791,7 +791,7 @@ int SrsRtmpConn::on_publish()
void SrsRtmpConn::on_unpublish()
{
#ifdef SRS_HTTP_CALLBACK
#ifdef SRS_AUTO_HTTP_CALLBACK
// whatever the ret code, notify the api hooks.
// HTTP: on_unpublish
SrsConfDirective* on_unpublish = _srs_config->get_vhost_on_unpublish(req->vhost);
@ -811,7 +811,7 @@ int SrsRtmpConn::on_play()
{
int ret = ERROR_SUCCESS;
#ifdef SRS_HTTP_CALLBACK
#ifdef SRS_AUTO_HTTP_CALLBACK
// HTTP: on_play
SrsConfDirective* on_play = _srs_config->get_vhost_on_play(req->vhost);
if (!on_play) {
@ -833,7 +833,7 @@ int SrsRtmpConn::on_play()
void SrsRtmpConn::on_stop()
{
#ifdef SRS_HTTP_CALLBACK
#ifdef SRS_AUTO_HTTP_CALLBACK
// whatever the ret code, notify the api hooks.
// HTTP: on_stop
SrsConfDirective* on_stop = _srs_config->get_vhost_on_stop(req->vhost);