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

Method SendMetaData

src/brpc/rtmp.cpp:1311–1325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1309}
1310
1311int RtmpStreamBase::SendMetaData(const RtmpMetaData& metadata,
1312 const butil::StringPiece& name) {
1313 butil::IOBuf req_buf;
1314 {
1315 butil::IOBufAsZeroCopyOutputStream zc_stream(&req_buf);
1316 AMFOutputStream ostream(&zc_stream);
1317 WriteAMFString(name, &ostream);
1318 WriteAMFObject(metadata.data, &ostream);
1319 if (!ostream.good()) {
1320 LOG(ERROR) << "Fail to serialize metadata";
1321 return -1;
1322 }
1323 }
1324 return SendMessage(metadata.timestamp, policy::RTMP_MESSAGE_DATA_AMF0, req_buf);
1325}
1326
1327int RtmpStreamBase::SendSharedObjectMessage(const RtmpSharedObjectMessage&) {
1328 CHECK(false) << "Not supported yet";

Callers

nothing calls this directly

Calls 3

WriteAMFStringFunction · 0.85
WriteAMFObjectFunction · 0.85
goodMethod · 0.45

Tested by

no test coverage detected