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

support on_hls for http hooks. 2.0.152.

This commit is contained in:
winlin 2015-03-31 17:42:12 +08:00
parent 97442c56b6
commit c49bc0628e
15 changed files with 308 additions and 176 deletions

View file

@ -39,6 +39,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_kernel_codec.hpp>
#include <srs_kernel_file.hpp>
#include <srs_app_async_call.hpp>
class SrsSharedPtrMessage;
class SrsCodecSample;
@ -154,6 +155,23 @@ public:
virtual void update_duration(int64_t current_frame_dts);
};
/**
* the dvr async call.
*/
class SrsDvrAsyncCallOnHls : public ISrsDvrAsyncCall
{
private:
std::string path;
int seq_no;
SrsRequest* req;
public:
SrsDvrAsyncCallOnHls(SrsRequest* r, std::string p, int s);
virtual ~SrsDvrAsyncCallOnHls();
public:
virtual int call();
virtual std::string to_string();
};
/**
* muxer the HLS stream(m3u8 and ts files).
* generally, the m3u8 muxer only provides methods to open/close segments,
@ -174,6 +192,7 @@ private:
double hls_aof_ratio;
double hls_fragment;
double hls_window;
SrsDvrAsyncCallThread* async;
private:
// whether use floor algorithm for timestamp.
bool hls_ts_floor;