After receiving the 34bytes sent by the client, remove the 12bytes header and then use 22bytesDeserialize to decode [cpp] <span style = "font-size: 18px;"> switch (H_MT (header )) {... case when: {message [RM_INVOKE] [RM_INVOKE_IS_FLEX] = (bool) (H_MT (header) = RM_HEADER_MESSAGETYPE_FLEX); return DeserializeInvoke (buffer, message [RM_INVOKE]);} </span> [cpp] <span style = "font-size: 18px;"> bool RTMPProtocolSerializer: DeserializeInvoke (IOBuffer & Buffer, Variant & message) {if (message [RM_INVOKE_IS_FLEX]) {if (! Buffer. Ignore (1) {FATAL ("Unable to ignore 1 byte"); return false ;}} if (! _ Amf0.read1_string (buffer, message [RM_INVOKE_FUNCTION]) {FATAL ("Unable to read % s", STR (RM_INVOKE_FUNCTION); return false;} if (! _ Amf0.ReadDouble (buffer, message [RM_INVOKE_ID]) {FATAL ("Unable to read % s", STR (RM_INVOKE_ID); return false ;}for (uint32_t I = 0; GETAVAILABLEBYTESCOUNT (buffer)> 0; I ++) {if (! _ Amf0.Read (buffer, message [RM_INVOKE_PARAMS] [I]) {FATAL ("Unable to de-serialize invoke parameter % u", I); return false ;}} return true ;}</span> full data is consumed here in [cpp] <span style = "font-size: 18px;"> bool BaseRTMPAppProtocolHandler :: inboundMessageAvailable (BaseRTMPProtocol * pFrom, Variant & request) {switch (uint8_t) VH_MT (request) {case RM_HEADER_MESSAGETYPE_FLEX: {return ProcessInvoke (pFrom, re [Cpp] <span style = "font-size: 18px;"> bool BaseRTMPAppProtocolHandler: ProcessInvoke (BaseRTMPProtocol * pFrom, variant & request ){... else if (functionName = RM_INVOKE_FUNCTION_PLAY) {return ProcessInvokePlay (pFrom, request) ;}</span> here N more things [cpp] <span style = "font-size: 18px; "> bool BaseRTMPAppProtocolHandler: ProcessInvokePlay (BaseRTMPProtocol * pFrom, Variant & request) {... Generate the meta File here, generate the seek file} </span>, and then [cpp] www.2cto.com <span style = "font-size: 18px;"> void BaseOutNetRTMPStream:: SignalAttachedToInStream () {// 1. store the attached stream type to know how we shoshould proceed on detach... // 2. mirror the feeder chunk size... // 3. fix the time base... // 4. store the metadata... // 5. send abort messages on audio/video channels... // 6. stream is recorded. .. // 7. stream begin... if (_ sendOnStatusPlayMessages) {// 8. send NetStream. play. reset... // 9. netStream. play. start... // 10. Y | RtmpSampleAccess ...} // 11. Y onStatus code = "NetStream. data. start "... // 12. using Y onMetaData ...} </span> [cpp] <span style = "font-size: 18px;"> bool BaseInStream: Play (double absoluteTimestamp, double length) {if (! SignalPlay (absoluteTimestamp, length) {FATAL ("Unable to signal play"); return false;} define listnode <BaseOutStream *> * pTemp = _ pOutStreams; while (pTemp! = NULL) {if (! PTemp-> info-> SignalPlay (absoluteTimestamp, length) {WARN ("Unable to signal play on an outbound stream");} pTemp = pTemp-> pPrev ;} return true ;}</span>