View the specific rtmp protocol from the crtmpserver

Source: Internet
Author: User

Remove the 12bytes Header [cpp] bool RTMPProtocolSerializer: Deserialize (header & header, IOBuffer & buffer, Variant & message) {switch (H_MT (Header )) {case when: {return DeserializeUsrCtrl (buffer, message [RM_USRCTRL]) ;}} [cpp] bool RTMPProtocolSerializer: DeserializeUsrCtrl (IOBuffer & buffer, Variant & message ){... switch (uint16_t) message [RM_USRCTRL_TYPE]) {... case RM_USRCTRL_TYPE_STREAM_SET_BUFFER_LENGTH: {AMF_CHECK_BOUNDARIES (buffer, 8); message [RM_USRCTRL_STREAMID] = ENTOHLP (GETIBPOINTER (buffer); // ---- MARKED-LONG --- if (! Buffer. ignore (4) {FATAL ("Unable to ignore 4 bytes"); return false;} message [RM_USRCTRL_BUFFLEN] = ENTOHLP (GETIBPOINTER (buffer )); // ---- MARKED-LONG --- if (! Buffer. ignore (4) {FATAL ("Unable to ignore 4 bytes"); return false;} return true ;}}} responds to [cpp] bool BaseRTMPAppProtocolHandler in InboundMessageAvailable :: inboundMessageAvailable (BaseRTMPProtocol * pFrom, Variant & request ){... switch (uint8_t) VH_MT (request) {case RM_HEADER_MESSAGETYPE_USRCTRL: {return ProcessUsrCtrl (pFrom, request) ;}} [cpp] bool BaseRTMPAppProtocolHandler: ProcessUsrC Trl (BaseRTMPProtocol * pFrom, Variant & request) {switch (uint16_t) M_USRCTRL_TYPE (request) {case RM_USRCTRL_TYPE_PING_RESPONSE: {This function says he didn't do anything = return true ;}} still replied to the data of 468bytes, but it is unclear 6. directly sent audio and video 7. well, the blogger is ready to become eunuch. With a lot of vague concepts, the blogger is ready to complete a smaller rtmpserver (with limited code writing capability, it is estimated that this server will not exceed 1 K lines), and he is encountering difficulties, you can only extract code from crtmpserver ~~~~ (>_< )~~~~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.