| 1309 | } |
| 1310 | |
| 1311 | int RtmpStreamBase::SendMetaData(const RtmpMetaData& metadata, |
| 1312 | const butil::StringPiece& name) { |
| 1313 | butil::IOBuf req_buf; |
| 1314 | { |
| 1315 | butil::IOBufAsZeroCopyOutputStream zc_stream(&req_buf); |
| 1316 | AMFOutputStream ostream(&zc_stream); |
| 1317 | WriteAMFString(name, &ostream); |
| 1318 | WriteAMFObject(metadata.data, &ostream); |
| 1319 | if (!ostream.good()) { |
| 1320 | LOG(ERROR) << "Fail to serialize metadata"; |
| 1321 | return -1; |
| 1322 | } |
| 1323 | } |
| 1324 | return SendMessage(metadata.timestamp, policy::RTMP_MESSAGE_DATA_AMF0, req_buf); |
| 1325 | } |
| 1326 | |
| 1327 | int RtmpStreamBase::SendSharedObjectMessage(const RtmpSharedObjectMessage&) { |
| 1328 | CHECK(false) << "Not supported yet"; |
nothing calls this directly
no test coverage detected