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

for #179, dvr suport vhost/app/stream level control. 2.0.125.

This commit is contained in:
winlin 2015-02-25 09:20:11 +08:00
parent 1cb8e44b1b
commit b903a7b436
7 changed files with 72 additions and 15 deletions

View file

@ -293,19 +293,24 @@ vhost dvr.srs.com {
# http url to control dvr, for example, http://dev:1985/api/v1/dvrs
# method=GET
# to query dvrs of server.
# request params, for example ?vhost=__defaultVhost__, where:
# vhost, query all dvr of this vhost.
# request params, for example ?vhost=__defaultVhost__&&app=live&&stream=livestream, where:
# vhost, <required>, query all dvr of this vhost.
# app, [optinal], query all dvr of this app. query all app if not specified.
# stream, [optional], query specified dvr stream. query all stream if not specified.
# response in json, where:
# {code:0, dvrs: [{path_tmpl:"./[15].[04].[05].[999].flv", path_dvr:"./22.7.43.312.flv",
# wait_keyframe:true, vhost:"__defaultVhost", callback:"http://127.0.0.1:8085/api/v1/dvrs",
# vhost:"__defaultVhost", app:"live", stream:"livestream",
# wait_keyframe:true, callback:"http://127.0.0.1:8085/api/v1/dvrs",
# status:"stop"|"start"
# }]}
# method=POST
# to start dvr of specified vhost.
# request should encode in json, specifies the dvr to create, where:
# {path_tmpl:"./[15].[04].[05].[999].flv",
# wait_keyframe:true, vhost:"__defaultVhost", callback:"http://127.0.0.1:8085/api/v1/dvrs"
# vhost:"__defaultVhost", app:"live", stream:"livestream",
# wait_keyframe:true, callback:"http://127.0.0.1:8085/api/v1/dvrs"
# }
# @remark, the app and stream is optional.
# response in json, where:
# {code:0}
# method=DELETE, to stop dvr
@ -316,7 +321,10 @@ vhost dvr.srs.com {
# {code:0}
# method=PUT, use as RPC(remote process call).
# reap_segment, the request params in json, where:
# {action:"reap_segment", vhost:"__defaultVhost", path_tmpl:"./[15].[04].[05].[999].flv"}
# {action:"reap_segment", vhost:"__defaultVhost", app:"live", stream:"livestream",
# path_tmpl:"./[15].[04].[05].[999].flv"
# }
# @remark, the app and stream is optional.
# when reap segment, the callback POST request in json:
# {action:"on_dvr_reap_segment", client_id:100, vhost:"__defaultVhost__",
# app:"live", stream:"livestream", cwd:"/home/winlin/srs", file:"./dvr.flv"