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

refine code, fix bug of hls, following jetbrains clion code-inspector. 0.9.215

This commit is contained in:
winlin 2014-09-26 16:34:13 +08:00
parent 4a323e64c4
commit 002facb85b
21 changed files with 73 additions and 84 deletions

View file

@ -177,7 +177,7 @@ int SrsAvcAacCodec::audio_aac_demux(char* data, int size, SrsCodecSample* sample
return ret; return ret;
} }
if ((ret = stream->initialize((char*)data, size)) != ERROR_SUCCESS) { if ((ret = stream->initialize(data, size)) != ERROR_SUCCESS) {
return ret; return ret;
} }
@ -300,6 +300,8 @@ int SrsAvcAacCodec::audio_aac_demux(char* data, int size, SrsCodecSample* sample
case 44100: case 44100:
sample->sound_rate = SrsCodecAudioSampleRate44100; sample->sound_rate = SrsCodecAudioSampleRate44100;
break; break;
default:
break;
}; };
} }
@ -320,7 +322,7 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample
return ret; return ret;
} }
if ((ret = stream->initialize((char*)data, size)) != ERROR_SUCCESS) { if ((ret = stream->initialize(data, size)) != ERROR_SUCCESS) {
return ret; return ret;
} }
@ -467,9 +469,9 @@ int SrsAvcAacCodec::video_avc_demux(char* data, int size, SrsCodecSample* sample
int32_t NALUnitLength = 0; int32_t NALUnitLength = 0;
if (NAL_unit_length == 3) { if (NAL_unit_length == 3) {
NALUnitLength = stream->read_4bytes(); NALUnitLength = stream->read_4bytes();
} else if (NALUnitLength == 2) { } else if (NAL_unit_length == 2) {
NALUnitLength = stream->read_3bytes(); NALUnitLength = stream->read_3bytes();
} else if (NALUnitLength == 1) { } else if (NAL_unit_length == 1) {
NALUnitLength = stream->read_2bytes(); NALUnitLength = stream->read_2bytes();
} else { } else {
NALUnitLength = stream->read_1bytes(); NALUnitLength = stream->read_1bytes();

View file

@ -57,8 +57,8 @@ SrsBandwidthSample::~SrsBandwidthSample()
void SrsBandwidthSample::calc_kbps(int _bytes, int _duration) void SrsBandwidthSample::calc_kbps(int _bytes, int _duration)
{ {
bytes = (int)_bytes; bytes = _bytes;
actual_duration_ms = (int)_duration; actual_duration_ms = _duration;
if (actual_duration_ms <= 0) { if (actual_duration_ms <= 0) {
return; return;

View file

@ -21,8 +21,8 @@ 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_APP_CONIFG_HPP #ifndef SRS_APP_CONFIG_HPP
#define SRS_APP_CONIFG_HPP #define SRS_APP_CONFIG_HPP
/* /*
#include <srs_app_config.hpp> #include <srs_app_config.hpp>

View file

@ -214,8 +214,8 @@ int SrsDvrPlan::on_audio(SrsSharedPtrMessage* audio)
return ret; return ret;
} }
char* payload = (char*)audio->payload; char* payload = audio->payload;
int size = (int)audio->size; int size = audio->size;
int64_t timestamp = filter_timestamp(audio->header.timestamp); int64_t timestamp = filter_timestamp(audio->header.timestamp);
if ((ret = enc->write_audio(timestamp, payload, size)) != ERROR_SUCCESS) { if ((ret = enc->write_audio(timestamp, payload, size)) != ERROR_SUCCESS) {
return ret; return ret;
@ -236,8 +236,8 @@ int SrsDvrPlan::on_video(SrsSharedPtrMessage* video)
return ret; return ret;
} }
char* payload = (char*)video->payload; char* payload = video->payload;
int size = (int)video->size; int size = video->size;
#ifdef SRS_AUTO_HTTP_CALLBACK #ifdef SRS_AUTO_HTTP_CALLBACK
bool is_key_frame = SrsFlvCodec::video_is_h264(payload, size) bool is_key_frame = SrsFlvCodec::video_is_h264(payload, size)
@ -492,8 +492,8 @@ int SrsDvrSegmentPlan::update_duration(SrsSharedPtrMessage* msg)
return ret; return ret;
} }
char* payload = (char*)msg->payload; char* payload = msg->payload;
int size = (int)msg->size; int size = msg->size;
bool is_key_frame = SrsFlvCodec::video_is_h264(payload, size) bool is_key_frame = SrsFlvCodec::video_is_h264(payload, size)
&& SrsFlvCodec::video_is_keyframe(payload, size) && SrsFlvCodec::video_is_keyframe(payload, size)
&& !SrsFlvCodec::video_is_sequence_header(payload, size); && !SrsFlvCodec::video_is_sequence_header(payload, size);

View file

@ -21,8 +21,8 @@ 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_APP_EMPYTY_HPP #ifndef SRS_APP_EMPTY_HPP
#define SRS_APP_EMPYTY_HPP #define SRS_APP_EMPTY_HPP
/* /*
#include <srs_app_empty.hpp> #include <srs_app_empty.hpp>

View file

@ -141,10 +141,10 @@ void SrsEncoder::clear_engines()
std::string output = ffmpeg->output(); std::string output = ffmpeg->output();
std::vector<std::string>::iterator it; std::vector<std::string>::iterator tu_it;
it = std::find(_transcoded_url.begin(), _transcoded_url.end(), output); tu_it = std::find(_transcoded_url.begin(), _transcoded_url.end(), output);
if (it != _transcoded_url.end()) { if (tu_it != _transcoded_url.end()) {
_transcoded_url.erase(it); _transcoded_url.erase(tu_it);
} }
srs_freep(ffmpeg); srs_freep(ffmpeg);

View file

@ -42,8 +42,6 @@ public:
virtual ~SrsHttpHeartbeat(); virtual ~SrsHttpHeartbeat();
public: public:
virtual void heartbeat(); virtual void heartbeat();
public:
static void update_local_ipv4_ips();
}; };
#endif #endif

View file

@ -163,8 +163,6 @@ bool SrsHttpVhost::is_handler_valid(SrsHttpMessage* req, int& status_code, std::
int SrsHttpVhost::do_process_request(SrsStSocket* skt, SrsHttpMessage* req) int SrsHttpVhost::do_process_request(SrsStSocket* skt, SrsHttpMessage* req)
{ {
int ret = ERROR_SUCCESS;
std::string fullpath = get_request_file(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/winlinvip/simple-rtmp-server/issues/174
@ -182,11 +180,9 @@ int SrsHttpVhost::do_process_request(SrsStSocket* skt, SrsHttpMessage* req)
} }
return response_flv_file2(skt, req, fullpath, offset); return response_flv_file2(skt, req, fullpath, offset);
} else {
return response_regular_file(skt, req, fullpath);
} }
return ret; return response_regular_file(skt, req, fullpath);
} }
int SrsHttpVhost::response_regular_file(SrsStSocket* skt, SrsHttpMessage* req, string fullpath) int SrsHttpVhost::response_regular_file(SrsStSocket* skt, SrsHttpMessage* req, string fullpath)

View file

@ -302,8 +302,6 @@ int SrsRtmpConn::service_cycle()
srs_error("control message(%d) reject as error. ret=%d", ret, ret); srs_error("control message(%d) reject as error. ret=%d", ret, ret);
return ret; return ret;
} }
return ret;
} }
int SrsRtmpConn::stream_service_cycle() int SrsRtmpConn::stream_service_cycle()

View file

@ -851,8 +851,8 @@ int SrsSource::on_dvr_request_sh()
// when reload to start dvr, dvr will never get the sequence header in stream, // when reload to start dvr, dvr will never get the sequence header in stream,
// use the SrsSource.on_dvr_request_sh to push the sequence header to DVR. // use the SrsSource.on_dvr_request_sh to push the sequence header to DVR.
if (cache_metadata) { if (cache_metadata) {
char* payload = (char*)cache_metadata->payload; char* payload = cache_metadata->payload;
int size = (int)cache_metadata->size; int size = cache_metadata->size;
SrsStream stream; SrsStream stream;
if ((ret = stream.initialize(payload, size)) != ERROR_SUCCESS) { if ((ret = stream.initialize(payload, size)) != ERROR_SUCCESS) {
@ -1253,7 +1253,7 @@ int SrsSource::on_aggregate(SrsMessage* msg)
int ret = ERROR_SUCCESS; int ret = ERROR_SUCCESS;
SrsStream* stream = aggregate_stream; SrsStream* stream = aggregate_stream;
if ((ret = stream->initialize((char*)msg->payload, msg->size)) != ERROR_SUCCESS) { if ((ret = stream->initialize(msg->payload, msg->size)) != ERROR_SUCCESS) {
return ret; return ret;
} }

View file

@ -93,7 +93,7 @@ public:
// state %c One character from the string "RSDZTW" where R is running, S is sleeping in an interruptible wait, D // state %c One character from the string "RSDZTW" where R is running, S is sleeping in an interruptible wait, D
// is waiting in uninterruptible disk sleep, Z is zombie, T is traced or stopped (on a signal), and W is // is waiting in uninterruptible disk sleep, Z is zombie, T is traced or stopped (on a signal), and W is
// paging. // paging.
char state; unsigned char state;
// ppid %d The PID of the parent. // ppid %d The PID of the parent.
int ppid; int ppid;
// pgrp %d The process group ID of the process. // pgrp %d The process group ID of the process.
@ -455,12 +455,12 @@ public:
// = MemFree + Buffers + Cached // = MemFree + Buffers + Cached
u_int64_t NotInUse; u_int64_t NotInUse;
u_int64_t MemTotal; unsigned long MemTotal;
u_int64_t MemFree; unsigned long MemFree;
u_int64_t Buffers; unsigned long Buffers;
u_int64_t Cached; unsigned long Cached;
u_int64_t SwapTotal; unsigned long SwapTotal;
u_int64_t SwapFree; unsigned long SwapFree;
public: public:
SrsMemInfo(); SrsMemInfo();

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version // current release version
#define VERSION_MAJOR "0" #define VERSION_MAJOR "0"
#define VERSION_MINOR "9" #define VERSION_MINOR "9"
#define VERSION_REVISION "214" #define VERSION_REVISION "215"
#define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION
// server info. // server info.
#define RTMP_SIG_SRS_KEY "SRS" #define RTMP_SIG_SRS_KEY "SRS"

View file

@ -46,7 +46,7 @@ bool SrsFlvCodec::video_is_keyframe(char* data, int size)
return false; return false;
} }
char frame_type = *(char*)data; char frame_type = data[0];
frame_type = (frame_type >> 4) & 0x0F; frame_type = (frame_type >> 4) & 0x0F;
return frame_type == SrsCodecVideoAVCFrameKeyFrame; return frame_type == SrsCodecVideoAVCFrameKeyFrame;
@ -64,10 +64,10 @@ bool SrsFlvCodec::video_is_sequence_header(char* data, int size)
return false; return false;
} }
char frame_type = *(char*)data; char frame_type = data[0];
frame_type = (frame_type >> 4) & 0x0F; frame_type = (frame_type >> 4) & 0x0F;
char avc_packet_type = *(char*)(data + 1); char avc_packet_type = data[1];
return frame_type == SrsCodecVideoAVCFrameKeyFrame return frame_type == SrsCodecVideoAVCFrameKeyFrame
&& avc_packet_type == SrsCodecVideoAVCTypeSequenceHeader; && avc_packet_type == SrsCodecVideoAVCTypeSequenceHeader;
@ -85,7 +85,7 @@ bool SrsFlvCodec::audio_is_sequence_header(char* data, int size)
return false; return false;
} }
char aac_packet_type = *(char*)(data + 1); char aac_packet_type = data[1];
return aac_packet_type == SrsCodecAudioTypeSequenceHeader; return aac_packet_type == SrsCodecAudioTypeSequenceHeader;
} }
@ -97,7 +97,7 @@ bool SrsFlvCodec::video_is_h264(char* data, int size)
return false; return false;
} }
char codec_id = *(char*)data; char codec_id = data[0];
codec_id = codec_id & 0x0F; codec_id = codec_id & 0x0F;
return codec_id == SrsCodecVideoAVC; return codec_id == SrsCodecVideoAVC;
@ -110,7 +110,7 @@ bool SrsFlvCodec::audio_is_aac(char* data, int size)
return false; return false;
} }
char sound_format = *(char*)data; char sound_format = data[0];
sound_format = (sound_format >> 4) & 0x0F; sound_format = (sound_format >> 4) & 0x0F;
return sound_format == SrsCodecAudioAAC; return sound_format == SrsCodecAudioAAC;

View file

@ -310,7 +310,7 @@ int SrsFlvDecoder::read_tag_header(char* ptype, int32_t* pdata_size, u_int32_t*
// Reserved UB [2] // Reserved UB [2]
// Filter UB [1] // Filter UB [1]
// TagType UB [5] // TagType UB [5]
*ptype = (int)(th[0] & 0x1F); *ptype = (th[0] & 0x1F);
// DataSize UI24 // DataSize UI24
char* pp = (char*)pdata_size; char* pp = (char*)pdata_size;

View file

@ -222,7 +222,6 @@ int run()
} }
srs_trace("grandpa process exit."); srs_trace("grandpa process exit.");
exit(0); exit(0);
return 0;
} }
// father // father
@ -236,7 +235,6 @@ int run()
if(pid > 0) { if(pid > 0) {
srs_trace("father process exit. ret=0"); srs_trace("father process exit. ret=0");
exit(0); exit(0);
return 0;
} }
// son // son

View file

@ -367,8 +367,6 @@ int SrsAmf0Any::discovery(SrsStream* stream, SrsAmf0Any** ppvalue)
return ret; return ret;
} }
} }
return ret;
} }
SrsUnSortedHashtable::SrsUnSortedHashtable() SrsUnSortedHashtable::SrsUnSortedHashtable()
@ -1428,11 +1426,7 @@ int srs_amf0_read_boolean(SrsStream* stream, bool& value)
return ret; return ret;
} }
if (stream->read_1bytes() == 0) { value = (stream->read_1bytes() != 0);
value = false;
} else {
value = true;
}
srs_verbose("amf0 read bool value success. value=%d", value); srs_verbose("amf0 read bool value success. value=%d", value);

View file

@ -947,7 +947,7 @@ namespace _srs_internal
// directly generate the public key. // directly generate the public key.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/148 // @see: https://github.com/winlinvip/simple-rtmp-server/issues/148
int pkey_size = 128; int pkey_size = 128;
if ((ret = dh.copy_public_key((char*)block0.key.key, pkey_size)) != ERROR_SUCCESS) { if ((ret = dh.copy_public_key(block0.key.key, pkey_size)) != ERROR_SUCCESS) {
srs_error("calc s1 key failed. ret=%d", ret); srs_error("calc s1 key failed. ret=%d", ret);
return ret; return ret;
} }
@ -959,7 +959,7 @@ namespace _srs_internal
// directly generate the public key. // directly generate the public key.
// @see: https://github.com/winlinvip/simple-rtmp-server/issues/148 // @see: https://github.com/winlinvip/simple-rtmp-server/issues/148
int pkey_size = 128; int pkey_size = 128;
if ((ret = dh.copy_public_key((char*)block1.key.key, pkey_size)) != ERROR_SUCCESS) { if ((ret = dh.copy_public_key(block1.key.key, pkey_size)) != ERROR_SUCCESS) {
srs_error("calc s1 key failed. ret=%d", ret); srs_error("calc s1 key failed. ret=%d", ret);
return ret; return ret;
} }

View file

@ -172,7 +172,6 @@ string srs_client_type_string(SrsRtmpConnType type)
case SrsRtmpConnFMLEPublish: return "publish(FMLEPublish)"; case SrsRtmpConnFMLEPublish: return "publish(FMLEPublish)";
default: return "Unknown"; default: return "Unknown";
} }
return "Unknown";
} }
SrsHandshakeBytes::SrsHandshakeBytes() SrsHandshakeBytes::SrsHandshakeBytes()

View file

@ -517,7 +517,7 @@ int SrsProtocol::decode_message(SrsMessage* msg, SrsPacket** ppacket)
// initialize the decode stream for all message, // initialize the decode stream for all message,
// it's ok for the initialize if fast and without memory copy. // it's ok for the initialize if fast and without memory copy.
if ((ret = stream.initialize((char*)(msg->payload), msg->size)) != ERROR_SUCCESS) { if ((ret = stream.initialize(msg->payload, msg->size)) != ERROR_SUCCESS) {
srs_error("initialize stream failed. ret=%d", ret); srs_error("initialize stream failed. ret=%d", ret);
return ret; return ret;
} }
@ -552,7 +552,7 @@ int SrsProtocol::do_send_message(SrsMessage* msg, SrsPacket* packet)
// p set to current write position, // p set to current write position,
// it's ok when payload is NULL and size is 0. // it's ok when payload is NULL and size is 0.
char* p = (char*)msg->payload; char* p = msg->payload;
// to directly set the field. // to directly set the field.
char* pp = NULL; char* pp = NULL;
@ -561,7 +561,7 @@ int SrsProtocol::do_send_message(SrsMessage* msg, SrsPacket* packet)
// generate the header. // generate the header.
char* pheader = out_header_cache; char* pheader = out_header_cache;
if (p == (char*)msg->payload) { if (p == msg->payload) {
// write new chunk stream header, fmt is 0 // write new chunk stream header, fmt is 0
*pheader++ = 0x00 | (msg->header.perfer_cid & 0x3F); *pheader++ = 0x00 | (msg->header.perfer_cid & 0x3F);
@ -634,7 +634,7 @@ int SrsProtocol::do_send_message(SrsMessage* msg, SrsPacket* packet)
// sendout header and payload by writev. // sendout header and payload by writev.
// decrease the sys invoke count to get higher performance. // decrease the sys invoke count to get higher performance.
int payload_size = msg->size - (p - (char*)msg->payload); int payload_size = msg->size - (p - msg->payload);
payload_size = srs_min(payload_size, out_chunk_size); payload_size = srs_min(payload_size, out_chunk_size);
// always has header // always has header
@ -658,7 +658,7 @@ int SrsProtocol::do_send_message(SrsMessage* msg, SrsPacket* packet)
if (msg->payload && msg->size > 0) { if (msg->payload && msg->size > 0) {
p += payload_size; p += payload_size;
} }
} while (p < (char*)msg->payload + msg->size); } while (p < msg->payload + msg->size);
// only process the callback event when with packet // only process the callback event when with packet
if (packet && (ret = on_send_packet(msg, packet)) != ERROR_SUCCESS) { if (packet && (ret = on_send_packet(msg, packet)) != ERROR_SUCCESS) {
@ -878,7 +878,7 @@ int SrsProtocol::send_and_free_packet(SrsPacket* packet, int stream_id)
msg->header.payload_length = size; msg->header.payload_length = size;
msg->header.message_type = packet->get_message_type(); msg->header.message_type = packet->get_message_type();
msg->header.stream_id = stream_id; msg->header.stream_id = stream_id;
msg->header.perfer_cid = packet->get_perfer_cid(); msg->header.perfer_cid = packet->get_prefer_cid();
// donot use the auto free to free the msg, // donot use the auto free to free the msg,
// for performance issue. // for performance issue.
@ -1527,6 +1527,8 @@ int SrsProtocol::on_recv_message(SrsMessage* msg)
} }
break; break;
} }
default:
break;
} }
return ret; return ret;
@ -1574,6 +1576,8 @@ int SrsProtocol::on_send_packet(SrsMessage* msg, SrsPacket* packet)
} }
break; break;
} }
default:
break;
} }
return ret; return ret;
@ -1669,7 +1673,7 @@ int SrsSharedPtrMessage::create(SrsMessage* msg)
{ {
int ret = ERROR_SUCCESS; int ret = ERROR_SUCCESS;
if ((ret = create(&msg->header, (char*)msg->payload, msg->size)) != ERROR_SUCCESS) { if ((ret = create(&msg->header, msg->payload, msg->size)) != ERROR_SUCCESS) {
return ret; return ret;
} }
@ -1786,7 +1790,7 @@ int SrsPacket::decode(SrsStream* stream)
return ret; return ret;
} }
int SrsPacket::get_perfer_cid() int SrsPacket::get_prefer_cid()
{ {
return 0; return 0;
} }
@ -2914,7 +2918,7 @@ int SrsPlayPacket::decode(SrsStream* stream)
if (reset_value->is_boolean()) { if (reset_value->is_boolean()) {
reset = reset_value->to_boolean(); reset = reset_value->to_boolean();
} else if (reset_value->is_number()) { } else if (reset_value->is_number()) {
reset = (reset_value->to_number() == 0 ? false : true); reset = (reset_value->to_number() != 0);
} else { } else {
ret = ERROR_RTMP_AMF0_DECODE; ret = ERROR_RTMP_AMF0_DECODE;
srs_error("amf0 invalid type=%#x, requires number or bool, ret=%d", reset_value->marker, ret); srs_error("amf0 invalid type=%#x, requires number or bool, ret=%d", reset_value->marker, ret);
@ -3565,7 +3569,7 @@ int SrsOnMetaDataPacket::decode(SrsStream* stream)
return ret; return ret;
} }
int SrsOnMetaDataPacket::get_perfer_cid() int SrsOnMetaDataPacket::get_prefer_cid()
{ {
return RTMP_CID_OverConnection2; return RTMP_CID_OverConnection2;
} }
@ -3625,7 +3629,7 @@ int SrsSetWindowAckSizePacket::decode(SrsStream* stream)
return ret; return ret;
} }
int SrsSetWindowAckSizePacket::get_perfer_cid() int SrsSetWindowAckSizePacket::get_prefer_cid()
{ {
return RTMP_CID_ProtocolControl; return RTMP_CID_ProtocolControl;
} }
@ -3667,7 +3671,7 @@ SrsAcknowledgementPacket::~SrsAcknowledgementPacket()
{ {
} }
int SrsAcknowledgementPacket::get_perfer_cid() int SrsAcknowledgementPacket::get_prefer_cid()
{ {
return RTMP_CID_ProtocolControl; return RTMP_CID_ProtocolControl;
} }
@ -3725,7 +3729,7 @@ int SrsSetChunkSizePacket::decode(SrsStream* stream)
return ret; return ret;
} }
int SrsSetChunkSizePacket::get_perfer_cid() int SrsSetChunkSizePacket::get_prefer_cid()
{ {
return RTMP_CID_ProtocolControl; return RTMP_CID_ProtocolControl;
} }
@ -3767,7 +3771,7 @@ SrsSetPeerBandwidthPacket::~SrsSetPeerBandwidthPacket()
{ {
} }
int SrsSetPeerBandwidthPacket::get_perfer_cid() int SrsSetPeerBandwidthPacket::get_prefer_cid()
{ {
return RTMP_CID_ProtocolControl; return RTMP_CID_ProtocolControl;
} }
@ -3841,7 +3845,7 @@ int SrsUserControlPacket::decode(SrsStream* stream)
return ret; return ret;
} }
int SrsUserControlPacket::get_perfer_cid() int SrsUserControlPacket::get_prefer_cid()
{ {
return RTMP_CID_ProtocolControl; return RTMP_CID_ProtocolControl;
} }

View file

@ -534,7 +534,7 @@ public:
* all protocol control messages perfer RTMP_CID_ProtocolControl, * all protocol control messages perfer RTMP_CID_ProtocolControl,
* SrsSetWindowAckSizePacket is protocol control message. * SrsSetWindowAckSizePacket is protocol control message.
*/ */
virtual int get_perfer_cid(); virtual int get_prefer_cid();
/** /**
* subpacket must override to provide the right message type. * subpacket must override to provide the right message type.
* the message type set the RTMP message type in header. * the message type set the RTMP message type in header.
@ -1311,7 +1311,7 @@ public:
virtual int decode(SrsStream* stream); virtual int decode(SrsStream* stream);
// encode functions for concrete packet to override. // encode functions for concrete packet to override.
public: public:
virtual int get_perfer_cid(); virtual int get_prefer_cid();
virtual int get_message_type(); virtual int get_message_type();
protected: protected:
virtual int get_size(); virtual int get_size();
@ -1335,7 +1335,7 @@ public:
virtual int decode(SrsStream* stream); virtual int decode(SrsStream* stream);
// encode functions for concrete packet to override. // encode functions for concrete packet to override.
public: public:
virtual int get_perfer_cid(); virtual int get_prefer_cid();
virtual int get_message_type(); virtual int get_message_type();
protected: protected:
virtual int get_size(); virtual int get_size();
@ -1356,7 +1356,7 @@ public:
virtual ~SrsAcknowledgementPacket(); virtual ~SrsAcknowledgementPacket();
// encode functions for concrete packet to override. // encode functions for concrete packet to override.
public: public:
virtual int get_perfer_cid(); virtual int get_prefer_cid();
virtual int get_message_type(); virtual int get_message_type();
protected: protected:
virtual int get_size(); virtual int get_size();
@ -1384,7 +1384,7 @@ public:
virtual int decode(SrsStream* stream); virtual int decode(SrsStream* stream);
// encode functions for concrete packet to override. // encode functions for concrete packet to override.
public: public:
virtual int get_perfer_cid(); virtual int get_prefer_cid();
virtual int get_message_type(); virtual int get_message_type();
protected: protected:
virtual int get_size(); virtual int get_size();
@ -1417,7 +1417,7 @@ public:
virtual ~SrsSetPeerBandwidthPacket(); virtual ~SrsSetPeerBandwidthPacket();
// encode functions for concrete packet to override. // encode functions for concrete packet to override.
public: public:
virtual int get_perfer_cid(); virtual int get_prefer_cid();
virtual int get_message_type(); virtual int get_message_type();
protected: protected:
virtual int get_size(); virtual int get_size();
@ -1540,7 +1540,7 @@ public:
virtual int decode(SrsStream* stream); virtual int decode(SrsStream* stream);
// encode functions for concrete packet to override. // encode functions for concrete packet to override.
public: public:
virtual int get_perfer_cid(); virtual int get_prefer_cid();
virtual int get_message_type(); virtual int get_message_type();
protected: protected:
virtual int get_size(); virtual int get_size();