MCPcopy Create free account
hub / github.com/apache/brpc / OnReleaseStream

Method OnReleaseStream

src/brpc/policy/rtmp_protocol.cpp:3144–3166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3142}
3143
3144bool RtmpChunkStream::OnReleaseStream(
3145 const RtmpMessageHeader& mh, AMFInputStream* istream, Socket* socket) {
3146 if (!connection_context()->is_server_side()) {
3147 RTMP_ERROR(socket, mh) << "Client should not receive `releaseStream'";
3148 return false;
3149 }
3150 double transaction_id = 0;
3151 if (!ReadAMFNumber(&transaction_id, istream)) {
3152 RTMP_ERROR(socket, mh) << "Fail to read releaseStream.TransactionId";
3153 return false;
3154 }
3155 if (!ReadAMFNull(istream)) { // command object
3156 RTMP_ERROR(socket, mh) << "Fail to read releaseStream.CommandObject";
3157 return false;
3158 }
3159 std::string stream_name;
3160 if (!ReadAMFString(&stream_name, istream)) {
3161 RTMP_ERROR(socket, mh) << "Fail to read releaseStream.StreamName";
3162 return false;
3163 }
3164 RTMP_WARNING(socket, mh) << "Ignored releaseStream(" << stream_name << ')';
3165 return SendFMLEStartResponse(socket, transaction_id);
3166}
3167
3168bool RtmpChunkStream::OnFCPublish(
3169 const RtmpMessageHeader& mh, AMFInputStream* istream, Socket* socket) {

Callers

nothing calls this directly

Calls 5

ReadAMFNumberFunction · 0.85
ReadAMFNullFunction · 0.85
ReadAMFStringFunction · 0.85
SendFMLEStartResponseFunction · 0.85
is_server_sideMethod · 0.45

Tested by

no test coverage detected