| 3122 | } |
| 3123 | |
| 3124 | static bool SendFMLEStartResponse(Socket* sock, double transaction_id) { |
| 3125 | butil::IOBuf req_buf; |
| 3126 | { |
| 3127 | butil::IOBufAsZeroCopyOutputStream zc_stream(&req_buf); |
| 3128 | AMFOutputStream ostream(&zc_stream); |
| 3129 | WriteAMFString(RTMP_AMF0_COMMAND_RESULT, &ostream); |
| 3130 | WriteAMFNumber(transaction_id, &ostream); |
| 3131 | WriteAMFNull(&ostream); |
| 3132 | WriteAMFUndefined(&ostream); |
| 3133 | CHECK(ostream.good()); |
| 3134 | } |
| 3135 | SocketMessagePtr<RtmpUnsentMessage> msg( |
| 3136 | MakeUnsentControlMessage(RTMP_MESSAGE_COMMAND_AMF0, req_buf)); |
| 3137 | if (sock->Write(msg) != 0) { |
| 3138 | PLOG(WARNING) << sock->remote_side() << ": Fail to respond FMLEStart"; |
| 3139 | return false; |
| 3140 | } |
| 3141 | return true; |
| 3142 | } |
| 3143 | |
| 3144 | bool RtmpChunkStream::OnReleaseStream( |
| 3145 | const RtmpMessageHeader& mh, AMFInputStream* istream, Socket* socket) { |
no test coverage detected