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

Method Play2

src/brpc/rtmp.cpp:1976–1992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1974}
1975
1976int RtmpClientStream::Play2(const RtmpPlay2Options& opt) {
1977 butil::IOBuf req_buf;
1978 {
1979 butil::IOBufAsZeroCopyOutputStream zc_stream(&req_buf);
1980 AMFOutputStream ostream(&zc_stream);
1981 WriteAMFString(RTMP_AMF0_COMMAND_PLAY2, &ostream);
1982 WriteAMFUint32(0, &ostream);
1983 WriteAMFNull(&ostream);
1984 WriteAMFObject(opt, &ostream);
1985 if (!ostream.good()) {
1986 LOG(ERROR) << "Fail to serialize play2 request";
1987 errno = EINVAL;
1988 return -1;
1989 }
1990 }
1991 return SendMessage(0, policy::RTMP_MESSAGE_COMMAND_AMF0, req_buf);
1992}
1993
1994const char* RtmpPublishType2Str(RtmpPublishType type) {
1995 switch (type) {

Callers

nothing calls this directly

Calls 5

WriteAMFStringFunction · 0.85
WriteAMFUint32Function · 0.85
WriteAMFNullFunction · 0.85
WriteAMFObjectFunction · 0.85
goodMethod · 0.45

Tested by

no test coverage detected