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

Method AcquireStreamToSend

src/brpc/rtmp.cpp:2452–2471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2450}
2451
2452int RtmpRetryingClientStream::AcquireStreamToSend(
2453 butil::intrusive_ptr<RtmpStreamBase>* ptr) {
2454 BAIDU_SCOPED_LOCK(_stream_mutex);
2455 if (!_using_sub_stream) {
2456 errno = EPERM;
2457 return -1;
2458 }
2459 if (!_using_sub_stream->is_server_accepted()) {
2460 // not published yet.
2461 errno = EPERM;
2462 return -1;
2463 }
2464 if (_changed_stream) {
2465 _changed_stream = false;
2466 errno = ERTMPPUBLISHABLE;
2467 return -1;
2468 }
2469 *ptr = _using_sub_stream;
2470 return 0;
2471}
2472
2473int RtmpRetryingClientStream::SendCuePoint(const RtmpCuePoint& obj) {
2474 butil::intrusive_ptr<RtmpStreamBase> ptr;

Callers

nothing calls this directly

Calls 1

is_server_acceptedMethod · 0.80

Tested by

no test coverage detected