mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add srs publish/play demo use srs-librtmp
This commit is contained in:
parent
713b05541b
commit
44375b9e6b
4 changed files with 128 additions and 84 deletions
13
trunk/research/librtmp/Makefile
Executable file → Normal file
13
trunk/research/librtmp/Makefile
Executable file → Normal file
|
@ -1,7 +1,12 @@
|
||||||
.PHONY: clean
|
.PHONY: default clean
|
||||||
|
|
||||||
|
default: srs_publish srs_play
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -f srs_publish srs_play
|
||||||
|
|
||||||
srs_publish: srs_publish.c Makefile ../../objs/include/srs_librtmp.h ../../objs/lib/srs_librtmp.a
|
srs_publish: srs_publish.c Makefile ../../objs/include/srs_librtmp.h ../../objs/lib/srs_librtmp.a
|
||||||
gcc srs_publish.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_publish
|
gcc srs_publish.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_publish
|
||||||
|
|
||||||
clean:
|
srs_play: srs_play.c Makefile ../../objs/include/srs_librtmp.h ../../objs/lib/srs_librtmp.a
|
||||||
@rm -f srs_publish
|
gcc srs_play.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_play
|
||||||
|
|
37
trunk/research/librtmp/srs_play.c
Normal file
37
trunk/research/librtmp/srs_play.c
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/*
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2013-2014 winlin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
|
this software and associated documentation files (the "Software"), to deal in
|
||||||
|
the Software without restriction, including without limitation the rights to
|
||||||
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||||
|
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||||
|
subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||||
|
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
gcc srs_play.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_play
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "../../objs/include/srs_librtmp.h"
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
printf("suck rtmp stream like rtmpdump\n");
|
||||||
|
printf("srs(simple-rtmp-server) client librtmp library.\n");
|
||||||
|
printf("version: %d.%d.%d\n", srs_version_major(), srs_version_minor(), srs_version_revision());
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
1
trunk/research/librtmp/srs_publish.c
Executable file → Normal file
1
trunk/research/librtmp/srs_publish.c
Executable file → Normal file
|
@ -29,6 +29,7 @@ gcc srs_publish.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_publish
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
printf("publish rtmp stream to server like FMLE/FFMPEG/Encoder\n");
|
||||||
printf("srs(simple-rtmp-server) client librtmp library.\n");
|
printf("srs(simple-rtmp-server) client librtmp library.\n");
|
||||||
printf("version: %d.%d.%d\n", srs_version_major(), srs_version_minor(), srs_version_revision());
|
printf("version: %d.%d.%d\n", srs_version_major(), srs_version_minor(), srs_version_revision());
|
||||||
|
|
||||||
|
|
161
trunk/src/srs/srs.upp
Executable file → Normal file
161
trunk/src/srs/srs.upp
Executable file → Normal file
|
@ -1,80 +1,81 @@
|
||||||
file
|
file
|
||||||
main readonly separator,
|
main readonly separator,
|
||||||
..\main\srs_main_server.cpp,
|
..\main\srs_main_server.cpp,
|
||||||
..\main\srs_main_bandcheck.cpp,
|
..\main\srs_main_bandcheck.cpp,
|
||||||
auto readonly separator,
|
auto readonly separator,
|
||||||
..\..\objs\srs_auto_headers.hpp,
|
..\..\objs\srs_auto_headers.hpp,
|
||||||
libs readonly separator,
|
libs readonly separator,
|
||||||
..\libs\srs_librtmp.hpp,
|
..\libs\srs_librtmp.hpp,
|
||||||
..\libs\srs_librtmp.cpp,
|
..\libs\srs_librtmp.cpp,
|
||||||
core readonly separator,
|
core readonly separator,
|
||||||
..\core\srs_core.hpp,
|
..\core\srs_core.hpp,
|
||||||
..\core\srs_core.cpp,
|
..\core\srs_core.cpp,
|
||||||
..\core\srs_core_autofree.hpp,
|
..\core\srs_core_autofree.hpp,
|
||||||
..\core\srs_core_autofree.cpp,
|
..\core\srs_core_autofree.cpp,
|
||||||
kernel readonly separator,
|
kernel readonly separator,
|
||||||
..\kernel\srs_kernel_buffer.hpp,
|
..\kernel\srs_kernel_buffer.hpp,
|
||||||
..\kernel\srs_kernel_buffer.cpp,
|
..\kernel\srs_kernel_buffer.cpp,
|
||||||
..\kernel\srs_kernel_error.hpp,
|
..\kernel\srs_kernel_error.hpp,
|
||||||
..\kernel\srs_kernel_error.cpp,
|
..\kernel\srs_kernel_error.cpp,
|
||||||
..\kernel\srs_kernel_log.hpp,
|
..\kernel\srs_kernel_log.hpp,
|
||||||
..\kernel\srs_kernel_log.cpp,
|
..\kernel\srs_kernel_log.cpp,
|
||||||
..\kernel\srs_kernel_reload.hpp,
|
..\kernel\srs_kernel_reload.hpp,
|
||||||
..\kernel\srs_kernel_reload.cpp,
|
..\kernel\srs_kernel_reload.cpp,
|
||||||
..\kernel\srs_kernel_stream.hpp,
|
..\kernel\srs_kernel_stream.hpp,
|
||||||
..\kernel\srs_kernel_stream.cpp,
|
..\kernel\srs_kernel_stream.cpp,
|
||||||
rtmp-protocol readonly separator,
|
rtmp-protocol readonly separator,
|
||||||
..\rtmp\srs_protocol_amf0.hpp,
|
..\rtmp\srs_protocol_amf0.hpp,
|
||||||
..\rtmp\srs_protocol_amf0.cpp,
|
..\rtmp\srs_protocol_amf0.cpp,
|
||||||
..\rtmp\srs_protocol_handshake.hpp,
|
..\rtmp\srs_protocol_handshake.hpp,
|
||||||
..\rtmp\srs_protocol_handshake.cpp,
|
..\rtmp\srs_protocol_handshake.cpp,
|
||||||
..\rtmp\srs_protocol_io.hpp,
|
..\rtmp\srs_protocol_io.hpp,
|
||||||
..\rtmp\srs_protocol_io.cpp,
|
..\rtmp\srs_protocol_io.cpp,
|
||||||
..\rtmp\srs_protocol_rtmp.hpp,
|
..\rtmp\srs_protocol_rtmp.hpp,
|
||||||
..\rtmp\srs_protocol_rtmp.cpp,
|
..\rtmp\srs_protocol_rtmp.cpp,
|
||||||
..\rtmp\srs_protocol_rtmp_stack.hpp,
|
..\rtmp\srs_protocol_rtmp_stack.hpp,
|
||||||
..\rtmp\srs_protocol_rtmp_stack.cpp,
|
..\rtmp\srs_protocol_rtmp_stack.cpp,
|
||||||
..\rtmp\srs_protocol_utility.hpp,
|
..\rtmp\srs_protocol_utility.hpp,
|
||||||
..\rtmp\srs_protocol_utility.cpp,
|
..\rtmp\srs_protocol_utility.cpp,
|
||||||
app readonly separator,
|
app readonly separator,
|
||||||
..\app\srs_core_bandwidth.hpp,
|
..\app\srs_core_bandwidth.hpp,
|
||||||
..\app\srs_core_bandwidth.cpp,
|
..\app\srs_core_bandwidth.cpp,
|
||||||
..\app\srs_core_client.hpp,
|
..\app\srs_core_client.hpp,
|
||||||
..\app\srs_core_client.cpp,
|
..\app\srs_core_client.cpp,
|
||||||
..\app\srs_core_codec.hpp,
|
..\app\srs_core_codec.hpp,
|
||||||
..\app\srs_core_codec.cpp,
|
..\app\srs_core_codec.cpp,
|
||||||
..\app\srs_core_conn.hpp,
|
..\app\srs_core_conn.hpp,
|
||||||
..\app\srs_core_conn.cpp,
|
..\app\srs_core_conn.cpp,
|
||||||
..\app\srs_core_config.hpp,
|
..\app\srs_core_config.hpp,
|
||||||
..\app\srs_core_config.cpp,
|
..\app\srs_core_config.cpp,
|
||||||
..\app\srs_core_encoder.hpp,
|
..\app\srs_core_encoder.hpp,
|
||||||
..\app\srs_core_encoder.cpp,
|
..\app\srs_core_encoder.cpp,
|
||||||
..\app\srs_core_forward.hpp,
|
..\app\srs_core_forward.hpp,
|
||||||
..\app\srs_core_forward.cpp,
|
..\app\srs_core_forward.cpp,
|
||||||
..\app\srs_core_hls.hpp,
|
..\app\srs_core_hls.hpp,
|
||||||
..\app\srs_core_hls.cpp,
|
..\app\srs_core_hls.cpp,
|
||||||
..\app\srs_core_http.hpp,
|
..\app\srs_core_http.hpp,
|
||||||
..\app\srs_core_http.cpp,
|
..\app\srs_core_http.cpp,
|
||||||
..\app\srs_core_log.hpp,
|
..\app\srs_core_log.hpp,
|
||||||
..\app\srs_core_log.cpp,
|
..\app\srs_core_log.cpp,
|
||||||
..\app\srs_core_refer.hpp,
|
..\app\srs_core_refer.hpp,
|
||||||
..\app\srs_core_refer.cpp,
|
..\app\srs_core_refer.cpp,
|
||||||
..\app\srs_core_pithy_print.hpp,
|
..\app\srs_core_pithy_print.hpp,
|
||||||
..\app\srs_core_pithy_print.cpp,
|
..\app\srs_core_pithy_print.cpp,
|
||||||
..\app\srs_core_thread.hpp,
|
..\app\srs_core_thread.hpp,
|
||||||
..\app\srs_core_thread.cpp,
|
..\app\srs_core_thread.cpp,
|
||||||
..\app\srs_core_server.hpp,
|
..\app\srs_core_server.hpp,
|
||||||
..\app\srs_core_server.cpp,
|
..\app\srs_core_server.cpp,
|
||||||
..\app\srs_core_st.hpp,
|
..\app\srs_core_st.hpp,
|
||||||
..\app\srs_core_st.cpp,
|
..\app\srs_core_st.cpp,
|
||||||
..\app\srs_core_socket.hpp,
|
..\app\srs_core_socket.hpp,
|
||||||
..\app\srs_core_socket.cpp,
|
..\app\srs_core_socket.cpp,
|
||||||
..\app\srs_core_source.hpp,
|
..\app\srs_core_source.hpp,
|
||||||
..\app\srs_core_source.cpp,
|
..\app\srs_core_source.cpp,
|
||||||
research readonly separator,
|
research readonly separator,
|
||||||
..\..\research\librtmp\srs_publish.c,
|
..\..\research\librtmp\srs_play.c,
|
||||||
..\..\research\hls\ts_info.cc;
|
..\..\research\librtmp\srs_publish.c,
|
||||||
|
..\..\research\hls\ts_info.cc;
|
||||||
mainconfig
|
|
||||||
"" = "MAIN";
|
mainconfig
|
||||||
|
"" = "MAIN";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue