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

Function Str2RtmpPublishType

src/brpc/rtmp.cpp:2003–2015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2001}
2002
2003bool Str2RtmpPublishType(const butil::StringPiece& str, RtmpPublishType* type) {
2004 if (str == "record") {
2005 *type = RTMP_PUBLISH_RECORD;
2006 return true;
2007 } else if (str == "append") {
2008 *type = RTMP_PUBLISH_APPEND;
2009 return true;
2010 } else if (str == "live") {
2011 *type = RTMP_PUBLISH_LIVE;
2012 return true;
2013 }
2014 return false;
2015}
2016
2017int RtmpClientStream::Publish(const butil::StringPiece& name,
2018 RtmpPublishType type) {

Callers 2

OnCreateStreamMethod · 0.85
OnPublishMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected