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

migarate from winlinvip to srs org

This commit is contained in:
winlin 2015-04-29 17:02:39 +08:00
parent 9a61ddf6ed
commit 921a56db9d
77 changed files with 423 additions and 423 deletions

View file

@ -252,7 +252,7 @@ int SrsAvcAacCodec::audio_aac_demux(char* data, int size, SrsCodecSample* sample
// Table 1. A.9 ¨C MPEG-2 Audio profiles and MPEG-4 Audio object types
// so the aac_profile should plus 1, not minus 1, and nginx-rtmp used it to
// downcast aac SSR to LC.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/310
// @see https://github.com/simple-rtmp-server/srs/issues/310
// TODO: FIXME: fix the following in future version.
// aac_profile = audioObjectType - 1
aac_profile--;
@ -260,7 +260,7 @@ int SrsAvcAacCodec::audio_aac_demux(char* data, int size, SrsCodecSample* sample
// TODO: FIXME: to support aac he/he-v2, see: ngx_rtmp_codec_parse_aac_header
// @see: https://github.com/winlinvip/nginx-rtmp-module/commit/3a5f9eea78fc8d11e8be922aea9ac349b9dcbfc2
//
// donot force to LC, @see: https://github.com/winlinvip/simple-rtmp-server/issues/81
// donot force to LC, @see: https://github.com/simple-rtmp-server/srs/issues/81
// the source will print the sequence header info.
//if (aac_profile > 3) {
// Mark all extended profiles as LC
@ -345,7 +345,7 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample
sample->frame_type = (SrsCodecVideoAVCFrame)frame_type;
// ignore info frame without error,
// @see https://github.com/winlinvip/simple-rtmp-server/issues/288#issuecomment-69863909
// @see https://github.com/simple-rtmp-server/srs/issues/288#issuecomment-69863909
if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) {
srs_warn("hls igone the info frame, ret=%d", ret);
return ret;
@ -489,7 +489,7 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample
}
// maybe stream is AnnexB format.
// see: https://github.com/winlinvip/simple-rtmp-server/issues/183
// see: https://github.com/simple-rtmp-server/srs/issues/183
if (NALUnitLength < 0) {
ret = ERROR_HLS_DECODE_ERROR;
srs_error("maybe stream is AnnexB format. ret=%d", ret);

View file

@ -48,7 +48,7 @@ using namespace std;
using namespace _srs_internal;
#define SRS_WIKI_URL_LOG "https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SrsLog"
#define SRS_WIKI_URL_LOG "https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog"
// '\n'
#define __LF (char)0x0a

View file

@ -478,7 +478,7 @@ public:
* whether debug_srs_upnode is enabled of vhost.
* debug_srs_upnode is very important feature for tracable log,
* but some server, for instance, flussonic donot support it.
* @see https://github.com/winlinvip/simple-rtmp-server/issues/160
* @see https://github.com/simple-rtmp-server/srs/issues/160
* @return true when debug_srs_upnode is ok; otherwise, false.
* @remark, default true.
*/
@ -834,7 +834,7 @@ public:
* get the hls hls_on_error config.
* the ignore will ignore error and disable hls.
* the disconnect will disconnect publish connection.
* @see https://github.com/winlinvip/simple-rtmp-server/issues/264
* @see https://github.com/simple-rtmp-server/srs/issues/264
*/
virtual std::string get_hls_on_error(std::string vhost);
// dvr section

View file

@ -36,7 +36,7 @@ SrsConnection::SrsConnection(SrsServer* srs_server, st_netfd_t client_stfd)
// the client thread should reap itself,
// so we never use joinable.
// TODO: FIXME: maybe other thread need to stop it.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/78
// @see: https://github.com/simple-rtmp-server/srs/issues/78
pthread = new SrsThread(this, 0, false);
}

View file

@ -480,7 +480,7 @@ int SrsDvrSegmentPlan::update_duration(SrsSharedPtrMessage* msg)
}
// when wait keyframe, ignore if no frame arrived.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/177
// @see https://github.com/simple-rtmp-server/srs/issues/177
if (_srs_config->get_dvr_wait_keyframe(_req->vhost)) {
if (!msg->header.is_video()) {
return ret;

View file

@ -219,7 +219,7 @@ int SrsEdgeIngester::connect_app(string ep_server, string ep_port)
}
// notify server the edge identity,
// @see https://github.com/winlinvip/simple-rtmp-server/issues/147
// @see https://github.com/simple-rtmp-server/srs/issues/147
SrsAmf0Object* data = req->args;
data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY));
data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_SERVER));
@ -247,7 +247,7 @@ int SrsEdgeIngester::connect_app(string ep_server, string ep_port)
std::string tc_url = srs_generate_tc_url(ep_server, req->vhost, req->app, ep_port, param);
// upnode server identity will show in the connect_app of client.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/160
// @see https://github.com/simple-rtmp-server/srs/issues/160
// the debug_srs_upnode is config in vhost and default to true.
bool debug_srs_upnode = _srs_config->get_debug_srs_upnode(req->vhost);
if ((ret = client->connect_app(req->app, tc_url, req, debug_srs_upnode)) != ERROR_SUCCESS) {
@ -330,7 +330,7 @@ int SrsEdgeIngester::connect_server(string& ep_server, string& ep_port)
SrsConfDirective* conf = _srs_config->get_vhost_edge_origin(_req->vhost);
// @see https://github.com/winlinvip/simple-rtmp-server/issues/79
// @see https://github.com/simple-rtmp-server/srs/issues/79
// when origin is error, for instance, server is shutdown,
// then user remove the vhost then reload, the conf is empty.
if (!conf) {
@ -651,7 +651,7 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port)
}
// notify server the edge identity,
// @see https://github.com/winlinvip/simple-rtmp-server/issues/147
// @see https://github.com/simple-rtmp-server/srs/issues/147
SrsAmf0Object* data = req->args;
data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY));
data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_SERVER));
@ -679,7 +679,7 @@ int SrsEdgeForwarder::connect_app(string ep_server, string ep_port)
std::string tc_url = srs_generate_tc_url(ep_server, req->vhost, req->app, ep_port, param);
// upnode server identity will show in the connect_app of client.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/160
// @see https://github.com/simple-rtmp-server/srs/issues/160
// the debug_srs_upnode is config in vhost and default to true.
bool debug_srs_upnode = _srs_config->get_debug_srs_upnode(req->vhost);
if ((ret = client->connect_app(req->app, tc_url, req, debug_srs_upnode)) != ERROR_SUCCESS) {
@ -816,7 +816,7 @@ int SrsPublishEdge::on_client_publish()
return ret;
}
// @see https://github.com/winlinvip/simple-rtmp-server/issues/180
// @see https://github.com/simple-rtmp-server/srs/issues/180
// to avoid multiple publish the same stream on the same edge,
// directly enter the publish stage.
if (true) {
@ -828,7 +828,7 @@ int SrsPublishEdge::on_client_publish()
// start to forward stream to origin.
ret = forwarder->start();
// @see https://github.com/winlinvip/simple-rtmp-server/issues/180
// @see https://github.com/simple-rtmp-server/srs/issues/180
// when failed, revert to init
if (ret != ERROR_SUCCESS) {
SrsEdgeState pstate = state;

View file

@ -171,7 +171,7 @@ int SrsFFMPEG::initialize_transcode(SrsConfDirective* engine)
}
}
// @see, https://github.com/winlinvip/simple-rtmp-server/issues/145
// @see, https://github.com/simple-rtmp-server/srs/issues/145
if (acodec == SRS_RTMP_ENCODER_LIBAACPLUS) {
if (abitrate < 16 || abitrate > 72) {
ret = ERROR_ENCODER_ABITRATE;
@ -211,7 +211,7 @@ int SrsFFMPEG::initialize_transcode(SrsConfDirective* engine)
// for not rtmp input, donot append the iformat,
// for example, "-f flv" before "-i udp://192.168.1.252:2222"
// @see https://github.com/winlinvip/simple-rtmp-server/issues/290
// @see https://github.com/simple-rtmp-server/srs/issues/290
if (input.find("rtmp://") != 0) {
iformat = "";
}

View file

@ -333,7 +333,7 @@ int SrsForwarder::connect_app(string ep_server, string ep_port)
}
// notify server the edge identity,
// @see https://github.com/winlinvip/simple-rtmp-server/issues/147
// @see https://github.com/simple-rtmp-server/srs/issues/147
SrsAmf0Object* data = req->args;
data->set("srs_sig", SrsAmf0Any::str(RTMP_SIG_SRS_KEY));
data->set("srs_server", SrsAmf0Any::str(RTMP_SIG_SRS_SERVER));
@ -361,7 +361,7 @@ int SrsForwarder::connect_app(string ep_server, string ep_port)
std::string tc_url = srs_generate_tc_url(ep_server, req->vhost, req->app, ep_port, param);
// upnode server identity will show in the connect_app of client.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/160
// @see https://github.com/simple-rtmp-server/srs/issues/160
// the debug_srs_upnode is config in vhost and default to true.
bool debug_srs_upnode = _srs_config->get_debug_srs_upnode(req->vhost);
if ((ret = client->connect_app(req->app, tc_url, req, debug_srs_upnode)) != ERROR_SUCCESS) {

View file

@ -67,7 +67,7 @@ private:
SrsMessageQueue* queue;
/**
* cache the sequence header for retry when slave is failed.
* @see https://github.com/winlinvip/simple-rtmp-server/issues/150
* @see https://github.com/simple-rtmp-server/srs/issues/150
*/
SrsSharedPtrMessage* sh_audio;
SrsSharedPtrMessage* sh_video;

View file

@ -79,7 +79,7 @@ using namespace std;
// @see: NGX_RTMP_HLS_DELAY,
// 63000: 700ms, ts_tbn=90000
// 72000: 800ms, ts_tbn=90000
// @see https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71352511
// @see https://github.com/simple-rtmp-server/srs/issues/151#issuecomment-71352511
#define SRS_AUTO_HLS_DELAY 72000
// the mpegts header specifed the video/audio pid.
@ -138,7 +138,7 @@ u_int8_t mpegts_header[] = {
0xe1, 0x00,
0xf0, 0x00,
// must generate header with/without video, @see:
// https://github.com/winlinvip/simple-rtmp-server/issues/40
// https://github.com/simple-rtmp-server/srs/issues/40
0x1b, 0xe1, 0x00, 0xf0, 0x00, /* h264, pid=0x100=256 */
0x0f, 0xe1, 0x01, 0xf0, 0x00, /* aac, pid=0x101=257 */
/*0x03, 0xe1, 0x01, 0xf0, 0x00,*/ /* mp3 */
@ -239,7 +239,7 @@ public:
p[-1] |= 0x20; // Both Adaption and Payload
*p++ = 7; // size
*p++ = 0x50; // random access + PCR
// about the pcr, read https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71352511
// about the pcr, read https://github.com/simple-rtmp-server/srs/issues/151#issuecomment-71352511
p = write_pcr(p, frame->dts);
}
@ -373,7 +373,7 @@ private:
{
// the pcr=dts-delay, where dts = frame->dts + delay
// and the pcr should never be negative
// @see https://github.com/winlinvip/simple-rtmp-server/issues/268
// @see https://github.com/simple-rtmp-server/srs/issues/268
srs_assert(pcr >= 0);
int64_t v = pcr;
@ -1099,9 +1099,9 @@ int SrsHlsCache::write_audio(SrsAvcAacCodec* codec, SrsHlsMuxer* muxer, int64_t
// for example, pure audio when start, audio/video when publishing,
// pure audio again for audio disabled.
// so we reap event when the audio incoming when segment overflow.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/151
// @see https://github.com/simple-rtmp-server/srs/issues/151
// we use absolutely overflow of segment to make jwplayer/ffplay happy
// @see https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71155184
// @see https://github.com/simple-rtmp-server/srs/issues/151#issuecomment-71155184
if (muxer->is_segment_absolutely_overflow()) {
if ((ret = reap_segment("audio", muxer, af->pts)) != ERROR_SUCCESS) {
return ret;
@ -1290,7 +1290,7 @@ int SrsHlsCache::cache_video(SrsAvcAacCodec* codec, SrsCodecSample* sample)
if (!aud_sent) {
// @remark, when got type 9, we donot send aud_nal, but it will make
// ios unhappy, so we remove it.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/281
// @see https://github.com/simple-rtmp-server/srs/issues/281
/*if (nal_unit_type == 9) {
aud_sent = true;
}*/
@ -1508,7 +1508,7 @@ int SrsHls::on_video(SrsSharedPtrMessage* video)
}
// ignore info frame,
// @see https://github.com/winlinvip/simple-rtmp-server/issues/288#issuecomment-69863909
// @see https://github.com/simple-rtmp-server/srs/issues/288#issuecomment-69863909
if (sample->frame_type == SrsCodecVideoAVCFrameVideoInfoFrame) {
return ret;
}
@ -1545,7 +1545,7 @@ void SrsHls::hls_mux()
// reportable
if (pithy_print->can_print()) {
// the run time is not equals to stream time,
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/81#issuecomment-48100994
// @see: https://github.com/simple-rtmp-server/srs/issues/81#issuecomment-48100994
// it's ok.
srs_trace("-> "SRS_CONSTS_LOG_HLS
" time=%"PRId64", stream dts=%"PRId64"(%"PRId64"ms), sequence_no=%d",

View file

@ -199,7 +199,7 @@ public:
/**
* whether segment absolutely overflow, for pure audio to reap segment,
* that is whether the current segment duration>=2*(the segment in config)
* @see https://github.com/winlinvip/simple-rtmp-server/issues/151#issuecomment-71155184
* @see https://github.com/simple-rtmp-server/srs/issues/151#issuecomment-71155184
*/
virtual bool is_segment_absolutely_overflow();
virtual int flush_audio(SrsMpegtsFrame* af, SrsBuffer* ab);

View file

@ -163,7 +163,7 @@ int SrsHttpVhost::do_process_request(SrsStSocket* skt, SrsHttpMessage* req)
{
std::string fullpath = get_request_file(req);
// TODO: FIXME: support mp4, @see https://github.com/winlinvip/simple-rtmp-server/issues/174
// TODO: FIXME: support mp4, @see https://github.com/simple-rtmp-server/srs/issues/174
if (srs_string_ends_with(fullpath, ".ts")) {
return response_ts_file(skt, req, fullpath);
} else if (srs_string_ends_with(fullpath, ".flv") || srs_string_ends_with(fullpath, ".fhv")) {

View file

@ -36,7 +36,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* when reload callback, the config is updated yet.
*
* features not support reload,
* @see: https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_Reload#notsupportedfeatures
* @see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_Reload#notsupportedfeatures
*/
class ISrsReloadHandler
{

View file

@ -245,7 +245,7 @@ int SrsRtmpConn::service_cycle()
}
// do token traverse before serve it.
// @see https://github.com/winlinvip/simple-rtmp-server/pull/239
// @see https://github.com/simple-rtmp-server/srs/pull/239
bool vhost_is_edge = _srs_config->get_vhost_is_edge(req->vhost);
bool edge_traverse = _srs_config->get_vhost_edge_token_traverse(req->vhost);
if (vhost_is_edge && edge_traverse) {
@ -296,7 +296,7 @@ int SrsRtmpConn::service_cycle()
// logical accept and retry stream service.
if (ret == ERROR_CONTROL_RTMP_CLOSE) {
// TODO: FIXME: use ping message to anti-death of socket.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/39
// @see: https://github.com/simple-rtmp-server/srs/issues/39
// set timeout to a larger value, for user paused.
rtmp->set_recv_timeout(SRS_PAUSED_RECV_TIMEOUT_US);
rtmp->set_send_timeout(SRS_PAUSED_SEND_TIMEOUT_US);
@ -604,7 +604,7 @@ int SrsRtmpConn::playing(SrsSource* source)
}
// if duration specified, and exceed it, stop play live.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/45
// @see: https://github.com/simple-rtmp-server/srs/issues/45
if (user_specified_duration_to_stop) {
if (duration >= (int64_t)req->duration) {
ret = ERROR_RTMP_DURATION_EXCEED;
@ -919,7 +919,7 @@ int SrsRtmpConn::process_play_control_msg(SrsConsumer* consumer, SrsMessage* msg
SrsAutoFree(SrsPacket, pkt);
// for jwplayer/flowplayer, which send close as pause message.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/6
// @see https://github.com/simple-rtmp-server/srs/issues/6
SrsCloseStreamPacket* close = dynamic_cast<SrsCloseStreamPacket*>(pkt);
if (close) {
ret = ERROR_CONTROL_RTMP_CLOSE;
@ -929,7 +929,7 @@ int SrsRtmpConn::process_play_control_msg(SrsConsumer* consumer, SrsMessage* msg
// call msg,
// support response null first,
// @see https://github.com/winlinvip/simple-rtmp-server/issues/106
// @see https://github.com/simple-rtmp-server/srs/issues/106
// TODO: FIXME: response in right way, or forward in edge mode.
SrsCallPacket* call = dynamic_cast<SrsCallPacket*>(pkt);
if (call) {

View file

@ -64,7 +64,7 @@ private:
SrsBandwidth* bandwidth;
// elapse duration in ms
// for live play duration, for instance, rtmpdump to record.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/47
// @see https://github.com/simple-rtmp-server/srs/issues/47
int64_t duration;
SrsKbps* kbps;
public:

View file

@ -252,7 +252,7 @@ void SrsMessageQueue::shrink()
// it is ok to clear for audio, for the shrink tell us the queue is full.
// for video, we clear util the I-Frame, for the decoding must start from I-frame,
// for audio, it's ok to clear any data, also we can clear the whole queue.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/134
// @see: https://github.com/simple-rtmp-server/srs/issues/134
if (iframe_index < 0) {
clear();
return;
@ -1057,7 +1057,7 @@ int SrsSource::on_audio(SrsMessage* __audio)
#ifdef SRS_AUTO_HLS
if ((ret = hls->on_audio(msg.copy())) != ERROR_SUCCESS) {
// apply the error strategy for hls.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/264
// @see https://github.com/simple-rtmp-server/srs/issues/264
std::string hls_error_strategy = _srs_config->get_hls_on_error(_req->vhost);
if (hls_error_strategy == SRS_CONF_DEFAULT_HLS_ON_ERROR_IGNORE) {
srs_warn("hls process audio message failed, ignore and disable hls. ret=%d", ret);
@ -1183,7 +1183,7 @@ int SrsSource::on_video(SrsMessage* __video)
#ifdef SRS_AUTO_HLS
if ((ret = hls->on_video(msg.copy())) != ERROR_SUCCESS) {
// apply the error strategy for hls.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/264
// @see https://github.com/simple-rtmp-server/srs/issues/264
std::string hls_error_strategy = _srs_config->get_hls_on_error(_req->vhost);
if (hls_error_strategy == SRS_CONF_DEFAULT_HLS_ON_ERROR_IGNORE) {
srs_warn("hls process video message failed, ignore and disable hls. ret=%d", ret);

View file

@ -222,7 +222,7 @@ private:
*
* @remark, it is ok for performance, for when we clear the gop cache,
* gop cache is disabled for pure audio stream.
* @see: https://github.com/winlinvip/simple-rtmp-server/issues/124
* @see: https://github.com/simple-rtmp-server/srs/issues/124
*/
int audio_after_last_video_count;
/**

View file

@ -44,7 +44,7 @@ int srs_init_st()
int ret = ERROR_SUCCESS;
// check epoll, some old linux donot support epoll.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/162
// @see https://github.com/simple-rtmp-server/srs/issues/162
if (!srs_st_epoll_is_supported()) {
ret = ERROR_ST_SET_EPOLL;
srs_error("epoll required. ret=%d", ret);

View file

@ -84,7 +84,7 @@ int SrsStSocket::read(void* buf, size_t size, ssize_t* nread)
// (a value of 0 means the network connection is closed or end of file is reached).
// Otherwise, a value of -1 is returned and errno is set to indicate the error.
if (nb_read <= 0) {
// @see https://github.com/winlinvip/simple-rtmp-server/issues/200
// @see https://github.com/simple-rtmp-server/srs/issues/200
if (nb_read < 0 && errno == ETIME) {
return ERROR_SOCKET_TIMEOUT;
}
@ -114,7 +114,7 @@ int SrsStSocket::read_fully(void* buf, size_t size, ssize_t* nread)
// (a value less than nbyte means the network connection is closed or end of file is reached)
// Otherwise, a value of -1 is returned and errno is set to indicate the error.
if (nb_read != (ssize_t)size) {
// @see https://github.com/winlinvip/simple-rtmp-server/issues/200
// @see https://github.com/simple-rtmp-server/srs/issues/200
if (nb_read < 0 && errno == ETIME) {
return ERROR_SOCKET_TIMEOUT;
}
@ -143,7 +143,7 @@ int SrsStSocket::write(void* buf, size_t size, ssize_t* nwrite)
// On success a non-negative integer equal to nbyte is returned.
// Otherwise, a value of -1 is returned and errno is set to indicate the error.
if (nb_write <= 0) {
// @see https://github.com/winlinvip/simple-rtmp-server/issues/200
// @see https://github.com/simple-rtmp-server/srs/issues/200
if (nb_write < 0 && errno == ETIME) {
return ERROR_SOCKET_TIMEOUT;
}
@ -168,7 +168,7 @@ int SrsStSocket::writev(const iovec *iov, int iov_size, ssize_t* nwrite)
// On success a non-negative integer equal to nbyte is returned.
// Otherwise, a value of -1 is returned and errno is set to indicate the error.
if (nb_write <= 0) {
// @see https://github.com/winlinvip/simple-rtmp-server/issues/200
// @see https://github.com/simple-rtmp-server/srs/issues/200
if (nb_write < 0 && errno == ETIME) {
return ERROR_SOCKET_TIMEOUT;
}

View file

@ -66,7 +66,7 @@ SrsThread::SrsThread(ISrsThreadHandler* thread_handler, int64_t interval_us, boo
// in start(), the thread cycle method maybe stop and remove the thread itself,
// and the thread start() is waiting for the _cid, and segment fault then.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/110
// @see https://github.com/simple-rtmp-server/srs/issues/110
// thread will set _cid, callback on_thread_start(), then wait for the can_run signal.
can_run = false;
}

View file

@ -100,11 +100,11 @@ public:
* @param interval_us, the sleep interval when cycle finished.
* @param joinable, if joinable, other thread must stop the thread.
* @remark if joinable, thread never quit itself, or memory leak.
* @see: https://github.com/winlinvip/simple-rtmp-server/issues/78
* @see: https://github.com/simple-rtmp-server/srs/issues/78
*/
/**
* TODO: FIXME: maybe all thread must be reap by others threads,
* @see: https://github.com/winlinvip/simple-rtmp-server/issues/77
* @see: https://github.com/simple-rtmp-server/srs/issues/77
*/
SrsThread(ISrsThreadHandler* thread_handler, int64_t interval_us, bool joinable);
virtual ~SrsThread();

View file

@ -931,7 +931,7 @@ void retrieve_local_ipv4_ips()
// retrieve ipv4 addr
// ignore the tun0 network device,
// which addr is NULL.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/141
// @see: https://github.com/simple-rtmp-server/srs/issues/141
if (addr && addr->sa_family == AF_INET) {
in_addr* inaddr = &((sockaddr_in*)addr)->sin_addr;

View file

@ -48,8 +48,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define RTMP_SIG_SRS_AUTHROS "wenjie.zhao"
#define RTMP_SIG_SRS_CONTRIBUTORS_URL RTMP_SIG_SRS_URL"/blob/master/AUTHORS.txt"
#define RTMP_SIG_SRS_HANDSHAKE RTMP_SIG_SRS_KEY"("RTMP_SIG_SRS_VERSION")"
#define RTMP_SIG_SRS_RELEASE "https://github.com/winlinvip/simple-rtmp-server/tree/1.0release"
#define RTMP_SIG_SRS_HTTP_SERVER "https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_HTTPServer#feature"
#define RTMP_SIG_SRS_RELEASE "https://github.com/simple-rtmp-server/srs/tree/1.0release"
#define RTMP_SIG_SRS_HTTP_SERVER "https://github.com/simple-rtmp-server/srs/wiki/v1_CN_HTTPServer#feature"
#define RTMP_SIG_SRS_VERSION __SRS_XSTR(VERSION_MAJOR)"."__SRS_XSTR(VERSION_MINOR)"."__SRS_XSTR(VERSION_REVISION)
#define RTMP_SIG_SRS_SERVER RTMP_SIG_SRS_KEY"/"RTMP_SIG_SRS_VERSION"("RTMP_SIG_SRS_CODE")"

View file

@ -66,7 +66,7 @@ void srs_update_system_time_ms()
return;
}
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/35
// @see: https://github.com/simple-rtmp-server/srs/issues/35
// we must convert the tv_sec/tv_usec to int64_t.
int64_t now_us = ((int64_t)now.tv_sec) * 1000 * 1000 + (int64_t)now.tv_usec;
@ -88,7 +88,7 @@ void srs_update_system_time_ms()
if (diff < 0 || diff > 1000 * SYS_TIME_RESOLUTION_US) {
srs_warn("system time jump, history=%"PRId64"us, now=%"PRId64"us, diff=%"PRId64"us",
_srs_system_time_us_cache, now_us, diff);
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/109
// @see: https://github.com/simple-rtmp-server/srs/issues/109
_srs_system_time_startup_time += diff;
}

View file

@ -153,7 +153,7 @@ int SimpleSocketStream::writev(const iovec *iov, int iov_size, ssize_t* nwrite)
// the writev() function returns the number of bytes written. On error, -1 is
// returned, and errno is set appropriately.
if (nb_write <= 0) {
// @see https://github.com/winlinvip/simple-rtmp-server/issues/200
// @see https://github.com/simple-rtmp-server/srs/issues/200
if (nb_write < 0 && errno == ETIME) {
return ERROR_SOCKET_TIMEOUT;
}
@ -210,7 +210,7 @@ int SimpleSocketStream::write(void* buf, size_t size, ssize_t* nwrite)
}
if (nb_write <= 0) {
// @see https://github.com/winlinvip/simple-rtmp-server/issues/200
// @see https://github.com/simple-rtmp-server/srs/issues/200
if (nb_write < 0 && errno == ETIME) {
return ERROR_SOCKET_TIMEOUT;
}

View file

@ -203,7 +203,7 @@ int main(int argc, char** argv)
// for special features.
#ifdef SRS_AUTO_HTTP_SERVER
srs_warn("http server is dev feature, "
"@see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_HTTPServer#feature");
"@see https://github.com/simple-rtmp-server/srs/wiki/v1_CN_HTTPServer#feature");
#endif
/**

View file

@ -201,12 +201,12 @@ namespace _srs_internal
// maybe the key_size is 127, but dh will write all 128bytes pkey,
// so, donot need to set/initialize the pkey.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/165
// @see https://github.com/simple-rtmp-server/srs/issues/165
key_size = BN_bn2bin(pdh->pub_key, (unsigned char*)pkey);
srs_assert(key_size > 0);
// output the size of public key.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/165
// @see https://github.com/simple-rtmp-server/srs/issues/165
srs_assert(key_size <= pkey_size);
pkey_size = key_size;
@ -226,7 +226,7 @@ namespace _srs_internal
// if failed, donot return, do cleanup, @see ./test/dhtest.c:168
// maybe the key_size is 127, but dh will write all 128bytes skey,
// so, donot need to set/initialize the skey.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/165
// @see https://github.com/simple-rtmp-server/srs/issues/165
int32_t key_size = DH_compute_key((unsigned char*)skey, ppk, pdh);
if (key_size < ppkey_size) {
@ -945,7 +945,7 @@ namespace _srs_internal
srs_digest_block_init(&block1.digest);
// directly generate the public key.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/148
// @see: https://github.com/simple-rtmp-server/srs/issues/148
int pkey_size = 128;
if ((ret = dh.copy_public_key(block0.key.key, pkey_size)) != ERROR_SUCCESS) {
srs_error("calc s1 key failed. ret=%d", ret);
@ -957,7 +957,7 @@ namespace _srs_internal
srs_key_block_init(&block1.key);
// directly generate the public key.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/148
// @see: https://github.com/simple-rtmp-server/srs/issues/148
int pkey_size = 128;
if ((ret = dh.copy_public_key(block1.key.key, pkey_size)) != ERROR_SUCCESS) {
srs_error("calc s1 key failed. ret=%d", ret);

View file

@ -290,7 +290,7 @@ int SrsHandshakeBytes::create_s0s1s2(const char* c1)
}
// if c1 specified, copy c1 to s2.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/46
// @see: https://github.com/simple-rtmp-server/srs/issues/46
if (c1) {
memcpy(s0s1s2 + 1537, c1, 1536);
}
@ -478,7 +478,7 @@ int SrsRtmpClient::connect_app2(
}
pkt->command_object->set("objectEncoding", SrsAmf0Any::number(0));
// @see https://github.com/winlinvip/simple-rtmp-server/issues/160
// @see https://github.com/simple-rtmp-server/srs/issues/160
// the debug_srs_upnode is config in vhost and default to true.
if (debug_srs_upnode && req && req->args) {
srs_freep(pkt->args);
@ -1013,7 +1013,7 @@ int SrsRtmpServer::identify_client(int stream_id, SrsRtmpConnType& type, string&
}
// call msg,
// support response null first,
// @see https://github.com/winlinvip/simple-rtmp-server/issues/106
// @see https://github.com/simple-rtmp-server/srs/issues/106
// TODO: FIXME: response in right way, or forward in edge mode.
SrsCallPacket* call = dynamic_cast<SrsCallPacket*>(pkt);
if (call) {
@ -1103,7 +1103,7 @@ int SrsRtmpServer::start_play(int stream_id)
SrsSampleAccessPacket* pkt = new SrsSampleAccessPacket();
// allow audio/video sample.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/49
// @see: https://github.com/simple-rtmp-server/srs/issues/49
pkt->audio_sample_access = true;
pkt->video_sample_access = true;

View file

@ -81,12 +81,12 @@ public:
std::string stream;
// for play live stream,
// used to specified the stop when exceed the duration.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/45
// @see https://github.com/simple-rtmp-server/srs/issues/45
// in ms.
double duration;
// the token in the connect request,
// used for edge traverse to origin authentication,
// @see https://github.com/winlinvip/simple-rtmp-server/issues/104
// @see https://github.com/simple-rtmp-server/srs/issues/104
SrsAmf0Object* args;
public:
SrsRequest();

View file

@ -1131,7 +1131,7 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz
// 0x04 where: message_type=4(protocol control user-control message)
// 0x00 0x06 where: event Ping(0x06)
// 0x00 0x00 0x0d 0x0f where: event data 4bytes ping timestamp.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/98
// @see: https://github.com/simple-rtmp-server/srs/issues/98
if (chunk->cid == RTMP_CID_ProtocolControl && fmt == RTMP_FMT_TYPE1) {
srs_warn("accept cid=2, fmt=1 to make librtmp happy.");
} else {
@ -1299,7 +1299,7 @@ int SrsProtocol::read_message_header(SrsChunkStream* chunk, char fmt, int bh_siz
pp[0] = *p++;
// always use 31bits timestamp, for some server may use 32bits extended timestamp.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/111
// @see https://github.com/simple-rtmp-server/srs/issues/111
timestamp &= 0x7fffffff;
/**
@ -1495,12 +1495,12 @@ int SrsProtocol::on_recv_message(SrsMessage* msg)
// for some server, the actual chunk size can greater than the max value(65536),
// so we just warning the invalid chunk size, and actually use it is ok,
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/160
// @see: https://github.com/simple-rtmp-server/srs/issues/160
if (pkt->chunk_size < SRS_CONSTS_RTMP_MIN_CHUNK_SIZE
|| pkt->chunk_size > SRS_CONSTS_RTMP_MAX_CHUNK_SIZE)
{
srs_warn("accept chunk size %d, but should in [%d, %d], "
"@see: https://github.com/winlinvip/simple-rtmp-server/issues/160",
"@see: https://github.com/simple-rtmp-server/srs/issues/160",
pkt->chunk_size, SRS_CONSTS_RTMP_MIN_CHUNK_SIZE,
SRS_CONSTS_RTMP_MAX_CHUNK_SIZE);
}
@ -1865,7 +1865,7 @@ int SrsConnectAppPacket::decode(SrsStream* stream)
if (!stream->empty()) {
srs_freep(args);
// see: https://github.com/winlinvip/simple-rtmp-server/issues/186
// see: https://github.com/simple-rtmp-server/srs/issues/186
// the args maybe any amf0, for instance, a string. we should drop if not object.
SrsAmf0Any* any = NULL;
if ((ret = SrsAmf0Any::discovery(stream, &any)) != ERROR_SUCCESS) {

View file

@ -1265,13 +1265,13 @@ public:
std::string command_name;
/**
* whether allow access the sample of video.
* @see: https://github.com/winlinvip/simple-rtmp-server/issues/49
* @see: https://github.com/simple-rtmp-server/srs/issues/49
* @see: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#videoSampleAccess
*/
bool video_sample_access;
/**
* whether allow access the sample of audio.
* @see: https://github.com/winlinvip/simple-rtmp-server/issues/49
* @see: https://github.com/simple-rtmp-server/srs/issues/49
* @see: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#audioSampleAccess
*/
bool audio_sample_access;

View file

@ -505,7 +505,7 @@ std::string __full_conf = ""
" # it's strongly recommend to open the debug_srs_upnode, \n"
" # when connect to upnode, it will take the debug info, \n"
" # for example, the id, source id, pid. \n"
" # please see: https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SrsLog \n"
" # please see: https://github.com/simple-rtmp-server/srs/wiki/v1_CN_SrsLog \n"
" # default: on \n"
" debug_srs_upnode on; \n"
"} \n"

View file

@ -653,7 +653,7 @@ VOID TEST(ProtocolStackTest, ProtocolRecvMessage)
// 0x04 where: message_type=4(protocol control user-control message)
// 0x00 0x06 where: event Ping(0x06)
// 0x00 0x00 0x0d 0x0f where: event data 4bytes ping timestamp.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/98
// @see: https://github.com/simple-rtmp-server/srs/issues/98
VOID TEST(ProtocolStackTest, ProtocolRecvMessageBug98)
{
MockBufferIO bio;
@ -3750,7 +3750,7 @@ VOID TEST(ProtocolStackTest, ProtocolRecvExtTimeMessage2)
* always use 31bits timestamp.
*/
// always use 31bits timestamp, for some server may use 32bits extended timestamp.
// @see https://github.com/winlinvip/simple-rtmp-server/issues/111
// @see https://github.com/simple-rtmp-server/srs/issues/111
VOID TEST(ProtocolStackTest, ProtocolRecvExtTimeMessage3)
{
MockBufferIO bio;