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

Method Pause

src/brpc/rtmp.cpp:2047–2060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2045}
2046
2047int RtmpClientStream::Pause(bool pause_or_unpause, double offset_ms) {
2048 butil::IOBuf req_buf;
2049 {
2050 butil::IOBufAsZeroCopyOutputStream zc_stream(&req_buf);
2051 AMFOutputStream ostream(&zc_stream);
2052 WriteAMFString(RTMP_AMF0_COMMAND_PAUSE, &ostream);
2053 WriteAMFUint32(0, &ostream);
2054 WriteAMFNull(&ostream);
2055 WriteAMFBool(pause_or_unpause, &ostream);
2056 WriteAMFNumber(offset_ms, &ostream);
2057 CHECK(ostream.good());
2058 }
2059 return SendMessage(0, policy::RTMP_MESSAGE_COMMAND_AMF0, req_buf);
2060}
2061
2062void RtmpClientStream::OnStatus(const RtmpInfo& info) {
2063 if (info.level() == RTMP_INFO_LEVEL_ERROR) {

Callers

nothing calls this directly

Calls 6

WriteAMFStringFunction · 0.85
WriteAMFUint32Function · 0.85
WriteAMFNullFunction · 0.85
WriteAMFBoolFunction · 0.85
WriteAMFNumberFunction · 0.85
goodMethod · 0.45

Tested by

no test coverage detected