| 1974 | } |
| 1975 | |
| 1976 | int 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 | |
| 1994 | const char* RtmpPublishType2Str(RtmpPublishType type) { |
| 1995 | switch (type) { |
nothing calls this directly
no test coverage detected