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

move json from app to protocol

This commit is contained in:
winlin 2015-08-21 16:20:19 +08:00
parent a7589b9ad3
commit 66a26bdce8
12 changed files with 26 additions and 22 deletions

View file

@ -40,7 +40,7 @@ using namespace std;
#include <srs_kernel_file.hpp>
#include <srs_rtmp_amf0.hpp>
#include <srs_kernel_stream.hpp>
#include <srs_app_json.hpp>
#include <srs_protocol_json.hpp>
#include <srs_app_utility.hpp>
// update the flv duration and filesize every this interval in ms.

View file

@ -32,7 +32,7 @@ using namespace std;
#include <srs_kernel_log.hpp>
#include <srs_app_config.hpp>
#include <srs_app_http_client.hpp>
#include <srs_app_json.hpp>
#include <srs_protocol_json.hpp>
#include <srs_app_utility.hpp>
#include <srs_core_autofree.hpp>
#include <srs_app_http_conn.hpp>

View file

@ -33,7 +33,7 @@ using namespace std;
#include <srs_kernel_error.hpp>
#include <srs_app_st.hpp>
#include <srs_core_autofree.hpp>
#include <srs_app_json.hpp>
#include <srs_protocol_json.hpp>
#include <srs_kernel_utility.hpp>
#include <srs_app_utility.hpp>
#include <srs_app_statistic.hpp>

View file

@ -31,7 +31,7 @@ using namespace std;
#include <srs_kernel_error.hpp>
#include <srs_rtmp_stack.hpp>
#include <srs_app_st.hpp>
#include <srs_app_json.hpp>
#include <srs_protocol_json.hpp>
#include <srs_app_dvr.hpp>
#include <srs_app_http_client.hpp>
#include <srs_core_autofree.hpp>

View file

@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
using namespace std;
#include <srs_rtmp_stack.hpp>
#include <srs_app_json.hpp>
#include <srs_protocol_json.hpp>
#include <srs_protocol_kbps.hpp>
#include <srs_app_conn.hpp>
#include <srs_app_config.hpp>

View file

@ -43,7 +43,7 @@ using namespace std;
#include <srs_kernel_utility.hpp>
#include <srs_kernel_error.hpp>
#include <srs_protocol_kbps.hpp>
#include <srs_app_json.hpp>
#include <srs_protocol_json.hpp>
#include <srs_kernel_stream.hpp>
// the longest time to wait for a process to quit.

View file

@ -32,6 +32,7 @@ using namespace std;
#include <srs_kernel_log.hpp>
#include <srs_kernel_utility.hpp>
#include <srs_kernel_file.hpp>
#include <srs_protocol_json.hpp>
#define SRS_HTTP_DEFAULT_PAGE "index.html"
@ -146,8 +147,11 @@ int srs_http_response_json(ISrsHttpResponseWriter* w, string data)
int srs_http_response_code(ISrsHttpResponseWriter* w, int code)
{
std::stringstream ss;
// TODO: FIXME: implements it.
//ss << SRS_JOBJECT_START << SRS_JFIELD_ERROR(code) << SRS_JOBJECT_END;
ss << SRS_JOBJECT_START
<< SRS_JFIELD_ERROR(code)
<< SRS_JOBJECT_END;
return srs_http_response_json(w, ss.str());
}

View file

@ -21,7 +21,7 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include <srs_app_json.hpp>
#include <srs_protocol_json.hpp>
using namespace std;

View file

@ -21,11 +21,11 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef SRS_APP_JSON_HPP
#define SRS_APP_JSON_HPP
#ifndef SRS_PROTOCOL_JSON_HPP
#define SRS_PROTOCOL_JSON_HPP
/*
#include <srs_app_json.hpp>
#include <srs_protocol_json.hpp>
*/
#include <srs_core.hpp>