Make available the media_info variable for the class inherited from WebRtcSession and HttpSession. (#2505 #2461)

This commit is contained in:
a-ucontrol 2023-05-29 09:48:13 +03:00 committed by GitHub
parent 18dbbc8d19
commit 51e9313275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View File

@ -124,6 +124,9 @@ private:
//设置socket标志
void setSocketFlags();
protected:
MediaInfo _mediaInfo;
private:
bool _is_live_stream = false;
bool _live_over_websocket = false;
@ -132,7 +135,6 @@ private:
std::string _origin;
Parser _parser;
toolkit::Ticker _ticker;
MediaInfo _mediaInfo;
TSMediaSource::RingType::RingReader::Ptr _ts_reader;
FMP4MediaSource::RingType::RingReader::Ptr _fmp4_reader;
//处理content数据的callback

View File

@ -21,6 +21,7 @@ public:
using Ptr = std::shared_ptr<WebRtcPlayer>;
~WebRtcPlayer() override = default;
static Ptr create(const EventPoller::Ptr &poller, const RtspMediaSource::Ptr &src, const MediaInfo &info, bool preferred_tcp = false);
MediaInfo getMediaInfo() { return _media_info; }
protected:
///////WebRtcTransportImp override///////

View File

@ -35,6 +35,9 @@ public:
void onManager() override;
static EventPoller::Ptr queryPoller(const Buffer::Ptr &buffer);
protected:
WebRtcTransportImp::Ptr _transport;
private:
//// HttpRequestSplitter override ////
ssize_t onRecvHeader(const char *data, size_t len) override;
@ -47,7 +50,6 @@ private:
bool _find_transport = true;
Ticker _ticker;
std::weak_ptr<toolkit::TcpServer> _server;
WebRtcTransportImp::Ptr _transport;
};
}// namespace mediakit