winlin

add srs publish/play demo use srs-librtmp

1 -.PHONY: clean 1 +.PHONY: default clean
  2 +
  3 +default: srs_publish srs_play
  4 +
  5 +clean:
  6 + @rm -f srs_publish srs_play
2 7
3 srs_publish: srs_publish.c Makefile ../../objs/include/srs_librtmp.h ../../objs/lib/srs_librtmp.a 8 srs_publish: srs_publish.c Makefile ../../objs/include/srs_librtmp.h ../../objs/lib/srs_librtmp.a
4 gcc srs_publish.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_publish 9 gcc srs_publish.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_publish
5 10
6 -clean:  
7 - @rm -f srs_publish 11 +srs_play: srs_play.c Makefile ../../objs/include/srs_librtmp.h ../../objs/lib/srs_librtmp.a
  12 + gcc srs_play.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_play
  1 +/*
  2 +The MIT License (MIT)
  3 +
  4 +Copyright (c) 2013-2014 winlin
  5 +
  6 +Permission is hereby granted, free of charge, to any person obtaining a copy of
  7 +this software and associated documentation files (the "Software"), to deal in
  8 +the Software without restriction, including without limitation the rights to
  9 +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  10 +the Software, and to permit persons to whom the Software is furnished to do so,
  11 +subject to the following conditions:
  12 +
  13 +The above copyright notice and this permission notice shall be included in all
  14 +copies or substantial portions of the Software.
  15 +
  16 +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17 +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  18 +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  19 +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  20 +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21 +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  22 +*/
  23 +/**
  24 +gcc srs_play.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_play
  25 +*/
  26 +
  27 +#include <stdio.h>
  28 +#include "../../objs/include/srs_librtmp.h"
  29 +
  30 +int main(int argc, char** argv)
  31 +{
  32 + printf("suck rtmp stream like rtmpdump\n");
  33 + printf("srs(simple-rtmp-server) client librtmp library.\n");
  34 + printf("version: %d.%d.%d\n", srs_version_major(), srs_version_minor(), srs_version_revision());
  35 +
  36 + return 0;
  37 +}
@@ -29,6 +29,7 @@ gcc srs_publish.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_publish @@ -29,6 +29,7 @@ gcc srs_publish.c ../../objs/lib/srs_librtmp.a -g -O0 -lstdc++ -o srs_publish
29 29
30 int main(int argc, char** argv) 30 int main(int argc, char** argv)
31 { 31 {
  32 + printf("publish rtmp stream to server like FMLE/FFMPEG/Encoder\n");
32 printf("srs(simple-rtmp-server) client librtmp library.\n"); 33 printf("srs(simple-rtmp-server) client librtmp library.\n");
33 printf("version: %d.%d.%d\n", srs_version_major(), srs_version_minor(), srs_version_revision()); 34 printf("version: %d.%d.%d\n", srs_version_major(), srs_version_minor(), srs_version_revision());
34 35
@@ -72,6 +72,7 @@ file @@ -72,6 +72,7 @@ file
72 ..\app\srs_core_source.hpp, 72 ..\app\srs_core_source.hpp,
73 ..\app\srs_core_source.cpp, 73 ..\app\srs_core_source.cpp,
74 research readonly separator, 74 research readonly separator,
  75 + ..\..\research\librtmp\srs_play.c,
75 ..\..\research\librtmp\srs_publish.c, 76 ..\..\research\librtmp\srs_publish.c,
76 ..\..\research\hls\ts_info.cc; 77 ..\..\research\hls\ts_info.cc;
77 78