| 2015 | } |
| 2016 | |
| 2017 | int RtmpClientStream::Publish(const butil::StringPiece& name, |
| 2018 | RtmpPublishType type) { |
| 2019 | butil::IOBuf req_buf; |
| 2020 | { |
| 2021 | butil::IOBufAsZeroCopyOutputStream zc_stream(&req_buf); |
| 2022 | AMFOutputStream ostream(&zc_stream); |
| 2023 | WriteAMFString(RTMP_AMF0_COMMAND_PUBLISH, &ostream); |
| 2024 | WriteAMFUint32(0, &ostream); |
| 2025 | WriteAMFNull(&ostream); |
| 2026 | WriteAMFString(name, &ostream); |
| 2027 | WriteAMFString(RtmpPublishType2Str(type), &ostream); |
| 2028 | CHECK(ostream.good()); |
| 2029 | } |
| 2030 | return SendMessage(0, policy::RTMP_MESSAGE_COMMAND_AMF0, req_buf); |
| 2031 | } |
| 2032 | |
| 2033 | int RtmpClientStream::Seek(double offset_ms) { |
| 2034 | butil::IOBuf req_buf; |
no test coverage detected