mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
添加媒体生成源信息
This commit is contained in:
@@ -194,6 +194,11 @@ public:
|
||||
}
|
||||
return Parent::getTracks(trackReady);
|
||||
}
|
||||
|
||||
std::shared_ptr<SockInfo> getSockInfo() const{
|
||||
return dynamic_pointer_cast<SockInfo>(_delegate);
|
||||
}
|
||||
|
||||
protected:
|
||||
void onShutdown(const SockException &ex) override {
|
||||
if (_shutdownCB) {
|
||||
|
||||
@@ -112,6 +112,7 @@ void PlayerProxy::play(const string &strUrlTmp) {
|
||||
}
|
||||
});
|
||||
MediaPlayer::play(strUrlTmp);
|
||||
_pull_url = strUrlTmp;
|
||||
|
||||
MediaSource::Ptr mediaSource;
|
||||
if(dynamic_pointer_cast<RtspPlayer>(_delegate)){
|
||||
@@ -180,6 +181,18 @@ int PlayerProxy::totalReaderCount(MediaSource &sender) {
|
||||
return totalReaderCount();
|
||||
}
|
||||
|
||||
MediaOriginType PlayerProxy::getOriginType(MediaSource &sender) const{
|
||||
return MediaOriginType::pull;
|
||||
}
|
||||
|
||||
string PlayerProxy::getOriginUrl(MediaSource &sender) const{
|
||||
return _pull_url;
|
||||
}
|
||||
|
||||
std::shared_ptr<SockInfo> PlayerProxy::getOriginSock(MediaSource &sender) const{
|
||||
return getSockInfo();
|
||||
}
|
||||
|
||||
class MuteAudioMaker : public FrameDispatcher{
|
||||
public:
|
||||
typedef std::shared_ptr<MuteAudioMaker> Ptr;
|
||||
|
||||
@@ -59,6 +59,10 @@ private:
|
||||
//MediaSourceEvent override
|
||||
bool close(MediaSource &sender,bool force) override;
|
||||
int totalReaderCount(MediaSource &sender) override;
|
||||
MediaOriginType getOriginType(MediaSource &sender) const override;
|
||||
string getOriginUrl(MediaSource &sender) const override;
|
||||
std::shared_ptr<SockInfo> getOriginSock(MediaSource &sender) const override;
|
||||
|
||||
void rePlay(const string &strUrl,int iFailedCnt);
|
||||
void onPlaySuccess();
|
||||
|
||||
@@ -69,6 +73,7 @@ private:
|
||||
string _vhost;
|
||||
string _app;
|
||||
string _stream_id;
|
||||
string _pull_url;
|
||||
Timer::Ptr _timer;
|
||||
function<void()> _on_close;
|
||||
function<void(const SockException &ex)> _on_play;
|
||||
|
||||
Reference in New Issue
Block a user