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

for #179, enable http api crossdomain for dvr api.

This commit is contained in:
winlin 2015-02-21 21:17:59 +08:00
parent 1445086451
commit c67a4fdf97
11 changed files with 267 additions and 3 deletions

View file

@ -30,6 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_core.hpp>
#include <string>
#include <sstream>
#ifdef SRS_AUTO_DVR
@ -223,6 +224,19 @@ public:
virtual void on_unpublish();
};
/**
* api plan: reap flv by api.
*/
class SrsDvrApiPlan : public SrsDvrPlan
{
public:
SrsDvrApiPlan();
virtual ~SrsDvrApiPlan();
public:
virtual int on_publish();
virtual void on_unpublish();
};
/**
* always append to flv file, never reap it.
*/
@ -282,6 +296,22 @@ private:
virtual int update_duration(SrsSharedPtrMessage* msg);
};
/**
* the api dvr pool.
*/
class SrsApiDvrPool
{
private:
static SrsApiDvrPool* _instance;
private:
SrsApiDvrPool();
public:
static SrsApiDvrPool* instance();
virtual ~SrsApiDvrPool();
public:
virtual int dumps(std::stringstream& ss);
};
/**
* dvr(digital video recorder) to record RTMP stream to flv file.
* TODO: FIXME: add utest for it.