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

change copyright from 2013 to 2013-2014.

This commit is contained in:
winlin 2014-01-01 10:37:12 +08:00
parent 649419c1aa
commit bb3c88fef7
57 changed files with 1120 additions and 1120 deletions

View file

@ -2,7 +2,7 @@
''' '''
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in
@ -463,7 +463,7 @@ if __name__ != "__main__":
# check the user options # check the user options
if len(sys.argv) <= 1: if len(sys.argv) <= 1:
print "SRS api callback server, Copyright (c) 2013 winlin" print "SRS api callback server, Copyright (c) 2013-2014 winlin"
print "Usage: python %s <port>"%(sys.argv[0]) print "Usage: python %s <port>"%(sys.argv[0])
print " port: the port to listen at." print " port: the port to listen at."
print "For example:" print "For example:"

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in
@ -78,7 +78,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define RTMP_SIG_SRS_WEB "http://blog.csdn.net/win_lin" #define RTMP_SIG_SRS_WEB "http://blog.csdn.net/win_lin"
#define RTMP_SIG_SRS_EMAIL "winterserver@126.com" #define RTMP_SIG_SRS_EMAIL "winterserver@126.com"
#define RTMP_SIG_SRS_LICENSE "The MIT License (MIT)" #define RTMP_SIG_SRS_LICENSE "The MIT License (MIT)"
#define RTMP_SIG_SRS_COPYRIGHT "Copyright (c) 2013 winlin" #define RTMP_SIG_SRS_COPYRIGHT "Copyright (c) 2013-2014 winlin"
#define RTMP_SIG_SRS_CONTRIBUTOR "winlin,wenjiegit" #define RTMP_SIG_SRS_CONTRIBUTOR "winlin,wenjiegit"
// compare // compare

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

2
trunk/src/core/srs_core_bandwidth.cpp Executable file → Normal file
View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 wenjiegit Copyright (c) 2013-2014 wenjiegit
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 wenjiegit Copyright (c) 2013-2014 wenjiegit
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in
@ -736,7 +736,7 @@ int SrsConfig::parse_argv(int& i, char** argv)
void SrsConfig::print_help(char** argv) void SrsConfig::print_help(char** argv)
{ {
printf(RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION printf(RTMP_SIG_SRS_NAME" "RTMP_SIG_SRS_VERSION
" Copyright (c) 2013 winlin\n" " Copyright (c) 2013-2014 winlin\n"
"Contributors: "RTMP_SIG_SRS_CONTRIBUTOR"\n" "Contributors: "RTMP_SIG_SRS_CONTRIBUTOR"\n"
"Build: "SRS_BUILD_DATE" Configuration: "SRS_CONFIGURE"\n" "Build: "SRS_BUILD_DATE" Configuration: "SRS_CONFIGURE"\n"
"Usage: %s [-h?vV] [-c <filename>]\n" "Usage: %s [-h?vV] [-c <filename>]\n"

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

2
trunk/src/core/srs_core_protocol.cpp Executable file → Normal file
View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

460
trunk/src/core/srs_core_rtmp.hpp Executable file → Normal file
View file

@ -1,231 +1,231 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 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, the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions: subject to the following conditions:
The above copyright notice and this permission notice shall be included in all The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 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 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 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. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#ifndef SRS_CORE_RTMP_HPP #ifndef SRS_CORE_RTMP_HPP
#define SRS_CORE_RTMP_HPP #define SRS_CORE_RTMP_HPP
/* /*
#include <srs_core_rtmp.hpp> #include <srs_core_rtmp.hpp>
*/ */
#include <srs_core.hpp> #include <srs_core.hpp>
#include <string> #include <string>
class SrsProtocol; class SrsProtocol;
class ISrsMessage; class ISrsMessage;
class SrsCommonMessage; class SrsCommonMessage;
class SrsCreateStreamPacket; class SrsCreateStreamPacket;
class SrsFMLEStartPacket; class SrsFMLEStartPacket;
class SrsPublishPacket; class SrsPublishPacket;
class SrsSharedPtrMessage; class SrsSharedPtrMessage;
class SrsOnMetaDataPacket; class SrsOnMetaDataPacket;
/** /**
* the original request from client. * the original request from client.
*/ */
struct SrsRequest struct SrsRequest
{ {
/** /**
* tcUrl: rtmp://request_vhost:port/app/stream * tcUrl: rtmp://request_vhost:port/app/stream
* support pass vhost in query string, such as: * support pass vhost in query string, such as:
* rtmp://ip:port/app?vhost=request_vhost/stream * rtmp://ip:port/app?vhost=request_vhost/stream
* rtmp://ip:port/app...vhost...request_vhost/stream * rtmp://ip:port/app...vhost...request_vhost/stream
*/ */
std::string tcUrl; std::string tcUrl;
std::string pageUrl; std::string pageUrl;
std::string swfUrl; std::string swfUrl;
double objectEncoding; double objectEncoding;
std::string schema; std::string schema;
std::string vhost; std::string vhost;
std::string port; std::string port;
std::string app; std::string app;
std::string stream; std::string stream;
SrsRequest(); SrsRequest();
virtual ~SrsRequest(); virtual ~SrsRequest();
/** /**
* deep copy the request, for source to use it to support reload, * deep copy the request, for source to use it to support reload,
* for when initialize the source, the request is valid, * for when initialize the source, the request is valid,
* when reload it, the request maybe invalid, so need to copy it. * when reload it, the request maybe invalid, so need to copy it.
*/ */
virtual SrsRequest* copy(); virtual SrsRequest* copy();
/** /**
* disconvery vhost/app from tcUrl. * disconvery vhost/app from tcUrl.
*/ */
virtual int discovery_app(); virtual int discovery_app();
virtual std::string get_stream_url(); virtual std::string get_stream_url();
virtual void strip(); virtual void strip();
private: private:
std::string& trim(std::string& str, std::string chs); std::string& trim(std::string& str, std::string chs);
}; };
/** /**
* the response to client. * the response to client.
*/ */
struct SrsResponse struct SrsResponse
{ {
int stream_id; int stream_id;
SrsResponse(); SrsResponse();
virtual ~SrsResponse(); virtual ~SrsResponse();
}; };
/** /**
* the rtmp client type. * the rtmp client type.
*/ */
enum SrsClientType enum SrsClientType
{ {
SrsClientUnknown, SrsClientUnknown,
SrsClientPlay, SrsClientPlay,
SrsClientFMLEPublish, SrsClientFMLEPublish,
SrsClientFlashPublish, SrsClientFlashPublish,
}; };
/** /**
* implements the client role protocol. * implements the client role protocol.
*/ */
class SrsRtmpClient class SrsRtmpClient
{ {
protected: protected:
SrsProtocol* protocol; SrsProtocol* protocol;
st_netfd_t stfd; st_netfd_t stfd;
public: public:
SrsRtmpClient(st_netfd_t _stfd); SrsRtmpClient(st_netfd_t _stfd);
virtual ~SrsRtmpClient(); virtual ~SrsRtmpClient();
public: public:
virtual void set_recv_timeout(int64_t timeout_us); virtual void set_recv_timeout(int64_t timeout_us);
virtual void set_send_timeout(int64_t timeout_us); virtual void set_send_timeout(int64_t timeout_us);
virtual int64_t get_recv_bytes(); virtual int64_t get_recv_bytes();
virtual int64_t get_send_bytes(); virtual int64_t get_send_bytes();
virtual int get_recv_kbps(); virtual int get_recv_kbps();
virtual int get_send_kbps(); virtual int get_send_kbps();
virtual int recv_message(SrsCommonMessage** pmsg); virtual int recv_message(SrsCommonMessage** pmsg);
virtual int send_message(ISrsMessage* msg); virtual int send_message(ISrsMessage* msg);
public: public:
virtual int handshake(); virtual int handshake();
virtual int connect_app(std::string app, std::string tc_url); virtual int connect_app(std::string app, std::string tc_url);
virtual int create_stream(int& stream_id); virtual int create_stream(int& stream_id);
virtual int play(std::string stream, int stream_id); virtual int play(std::string stream, int stream_id);
virtual int publish(std::string stream, int stream_id); virtual int publish(std::string stream, int stream_id);
}; };
/** /**
* the rtmp provices rtmp-command-protocol services, * the rtmp provices rtmp-command-protocol services,
* a high level protocol, media stream oriented services, * a high level protocol, media stream oriented services,
* such as connect to vhost/app, play stream, get audio/video data. * such as connect to vhost/app, play stream, get audio/video data.
*/ */
class SrsRtmp class SrsRtmp
{ {
private: private:
SrsProtocol* protocol; SrsProtocol* protocol;
st_netfd_t stfd; st_netfd_t stfd;
public: public:
SrsRtmp(st_netfd_t client_stfd); SrsRtmp(st_netfd_t client_stfd);
virtual ~SrsRtmp(); virtual ~SrsRtmp();
public: public:
virtual SrsProtocol* get_protocol(); virtual SrsProtocol* get_protocol();
virtual void set_recv_timeout(int64_t timeout_us); virtual void set_recv_timeout(int64_t timeout_us);
virtual int64_t get_recv_timeout(); virtual int64_t get_recv_timeout();
virtual void set_send_timeout(int64_t timeout_us); virtual void set_send_timeout(int64_t timeout_us);
virtual int64_t get_send_timeout(); virtual int64_t get_send_timeout();
virtual int64_t get_recv_bytes(); virtual int64_t get_recv_bytes();
virtual int64_t get_send_bytes(); virtual int64_t get_send_bytes();
virtual int get_recv_kbps(); virtual int get_recv_kbps();
virtual int get_send_kbps(); virtual int get_send_kbps();
virtual int recv_message(SrsCommonMessage** pmsg); virtual int recv_message(SrsCommonMessage** pmsg);
virtual int send_message(ISrsMessage* msg); virtual int send_message(ISrsMessage* msg);
public: public:
virtual int handshake(); virtual int handshake();
virtual int connect_app(SrsRequest* req); virtual int connect_app(SrsRequest* req);
virtual int set_window_ack_size(int ack_size); virtual int set_window_ack_size(int ack_size);
/** /**
* @type: The sender can mark this message hard (0), soft (1), or dynamic (2) * @type: The sender can mark this message hard (0), soft (1), or dynamic (2)
* using the Limit type field. * using the Limit type field.
*/ */
virtual int set_peer_bandwidth(int bandwidth, int type); virtual int set_peer_bandwidth(int bandwidth, int type);
/** /**
* @param server_ip the ip of server. * @param server_ip the ip of server.
*/ */
virtual int response_connect_app(SrsRequest* req, const char* server_ip = NULL); virtual int response_connect_app(SrsRequest* req, const char* server_ip = NULL);
virtual void response_connect_reject(SrsRequest* req, const char* desc); virtual void response_connect_reject(SrsRequest* req, const char* desc);
virtual int on_bw_done(); virtual int on_bw_done();
/** /**
* recv some message to identify the client. * recv some message to identify the client.
* @stream_id, client will createStream to play or publish by flash, * @stream_id, client will createStream to play or publish by flash,
* the stream_id used to response the createStream request. * the stream_id used to response the createStream request.
* @type, output the client type. * @type, output the client type.
*/ */
virtual int identify_client(int stream_id, SrsClientType& type, std::string& stream_name); virtual int identify_client(int stream_id, SrsClientType& type, std::string& stream_name);
/** /**
* set the chunk size when client type identified. * set the chunk size when client type identified.
*/ */
virtual int set_chunk_size(int chunk_size); virtual int set_chunk_size(int chunk_size);
/** /**
* when client type is play, response with packets: * when client type is play, response with packets:
* StreamBegin, * StreamBegin,
* onStatus(NetStream.Play.Reset), onStatus(NetStream.Play.Start)., * onStatus(NetStream.Play.Reset), onStatus(NetStream.Play.Start).,
* |RtmpSampleAccess(false, false), * |RtmpSampleAccess(false, false),
* onStatus(NetStream.Data.Start). * onStatus(NetStream.Data.Start).
*/ */
virtual int start_play(int stream_id); virtual int start_play(int stream_id);
/** /**
* when client(type is play) send pause message, * when client(type is play) send pause message,
* if is_pause, response the following packets: * if is_pause, response the following packets:
* onStatus(NetStream.Pause.Notify) * onStatus(NetStream.Pause.Notify)
* StreamEOF * StreamEOF
* if not is_pause, response the following packets: * if not is_pause, response the following packets:
* onStatus(NetStream.Unpause.Notify) * onStatus(NetStream.Unpause.Notify)
* StreamBegin * StreamBegin
*/ */
virtual int on_play_client_pause(int stream_id, bool is_pause); virtual int on_play_client_pause(int stream_id, bool is_pause);
/** /**
* when client type is publish, response with packets: * when client type is publish, response with packets:
* releaseStream response * releaseStream response
* FCPublish * FCPublish
* FCPublish response * FCPublish response
* createStream response * createStream response
* onFCPublish(NetStream.Publish.Start) * onFCPublish(NetStream.Publish.Start)
* onStatus(NetStream.Publish.Start) * onStatus(NetStream.Publish.Start)
*/ */
virtual int start_fmle_publish(int stream_id); virtual int start_fmle_publish(int stream_id);
/** /**
* process the FMLE unpublish event. * process the FMLE unpublish event.
* @unpublish_tid the unpublish request transaction id. * @unpublish_tid the unpublish request transaction id.
*/ */
virtual int fmle_unpublish(int stream_id, double unpublish_tid); virtual int fmle_unpublish(int stream_id, double unpublish_tid);
/** /**
* when client type is publish, response with packets: * when client type is publish, response with packets:
* onStatus(NetStream.Publish.Start) * onStatus(NetStream.Publish.Start)
*/ */
virtual int start_flash_publish(int stream_id); virtual int start_flash_publish(int stream_id);
private: private:
virtual int identify_create_stream_client(SrsCreateStreamPacket* req, int stream_id, SrsClientType& type, std::string& stream_name); virtual int identify_create_stream_client(SrsCreateStreamPacket* req, int stream_id, SrsClientType& type, std::string& stream_name);
virtual int identify_fmle_publish_client(SrsFMLEStartPacket* req, SrsClientType& type, std::string& stream_name); virtual int identify_fmle_publish_client(SrsFMLEStartPacket* req, SrsClientType& type, std::string& stream_name);
virtual int identify_flash_publish_client(SrsPublishPacket* req, SrsClientType& type, std::string& stream_name); virtual int identify_flash_publish_client(SrsPublishPacket* req, SrsClientType& type, std::string& stream_name);
}; };
#endif #endif

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in

1664
trunk/src/main/srs_main_bandcheck.cpp Executable file → Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2013 winlin Copyright (c) 2013-2014 winlin
Permission is hereby granted, free of charge, to any person obtaining a copy of 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 this software and associated documentation files (the "Software"), to deal in