mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-23 03:10:04 +08:00
关闭MediaPlayer的播放器复用功能
This commit is contained in:
parent
dd7c7375f4
commit
91d8888784
@ -38,14 +38,10 @@ MediaPlayer::MediaPlayer() {
|
|||||||
MediaPlayer::~MediaPlayer() {
|
MediaPlayer::~MediaPlayer() {
|
||||||
}
|
}
|
||||||
void MediaPlayer::play(const char* strUrl) {
|
void MediaPlayer::play(const char* strUrl) {
|
||||||
string strPrefix = FindField(strUrl, NULL, "://");
|
_parser = PlayerBase::createPlayer(strUrl);
|
||||||
if ((strcasecmp(_strPrefix.data(),strPrefix.data()) != 0) || strPrefix.empty()) {
|
|
||||||
//协议切换
|
|
||||||
_strPrefix = strPrefix;
|
|
||||||
_parser = PlayerBase::createPlayer(strUrl);
|
|
||||||
}
|
|
||||||
_parser->setOnShutdown(_shutdownCB);
|
_parser->setOnShutdown(_shutdownCB);
|
||||||
_parser->setOnPlayResult(_playResultCB);
|
_parser->setOnPlayResult(_playResultCB);
|
||||||
|
_parser->setMediaSouce(_pMediaSrc);
|
||||||
_parser->mINI::operator=(*this);
|
_parser->mINI::operator=(*this);
|
||||||
_parser->play(strUrl);
|
_parser->play(strUrl);
|
||||||
}
|
}
|
||||||
|
@ -47,8 +47,6 @@ public:
|
|||||||
void pause(bool bPause) override;
|
void pause(bool bPause) override;
|
||||||
void teardown() override;
|
void teardown() override;
|
||||||
TaskExecutor::Ptr getExecutor();
|
TaskExecutor::Ptr getExecutor();
|
||||||
private:
|
|
||||||
string _strPrefix;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user