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

Method SendCuePoint

src/brpc/rtmp.cpp:1295–1309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1293}
1294
1295int RtmpStreamBase::SendCuePoint(const RtmpCuePoint& cuepoint) {
1296 butil::IOBuf req_buf;
1297 {
1298 butil::IOBufAsZeroCopyOutputStream zc_stream(&req_buf);
1299 AMFOutputStream ostream(&zc_stream);
1300 WriteAMFString(RTMP_AMF0_SET_DATAFRAME, &ostream);
1301 WriteAMFString(RTMP_AMF0_ON_CUE_POINT, &ostream);
1302 WriteAMFObject(cuepoint.data, &ostream);
1303 if (!ostream.good()) {
1304 LOG(ERROR) << "Fail to serialize cuepoint";
1305 return -1;
1306 }
1307 }
1308 return SendMessage(cuepoint.timestamp, policy::RTMP_MESSAGE_DATA_AMF0, req_buf);
1309}
1310
1311int RtmpStreamBase::SendMetaData(const RtmpMetaData& metadata,
1312 const butil::StringPiece& name) {

Callers

nothing calls this directly

Calls 3

WriteAMFStringFunction · 0.85
WriteAMFObjectFunction · 0.85
goodMethod · 0.45

Tested by

no test coverage detected