mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
Add some functionality to libvlc player
This commit is contained in:
@ -97,9 +97,20 @@ void CVlcPlayer::setTime(qint64 nTime)
|
||||
libvlc_media_player_set_time(m_pVlcPlayer, nTime);
|
||||
}
|
||||
|
||||
qint64 CVlcPlayer::time()
|
||||
{
|
||||
return libvlc_media_player_get_time(m_pVlcPlayer);
|
||||
}
|
||||
|
||||
void CVlcPlayer::setPosition(float fPos)
|
||||
{
|
||||
libvlc_media_player_set_position(m_pVlcPlayer, fPos);
|
||||
emit positionChanged(libvlc_media_player_get_position(m_pVlcPlayer));
|
||||
}
|
||||
|
||||
float CVlcPlayer::position()
|
||||
{
|
||||
return libvlc_media_player_get_position(m_pVlcPlayer);
|
||||
}
|
||||
|
||||
bool CVlcPlayer::isAudio()
|
||||
|
||||
@ -24,12 +24,19 @@ public:
|
||||
public:
|
||||
void integrateIntoWidget(QWidget* pWidget);
|
||||
void open(CVlcMedia* pMedia);
|
||||
// control playback
|
||||
void pause();
|
||||
void play();
|
||||
void stop();
|
||||
// volume
|
||||
void setVolume(int nVolume);
|
||||
// time (in ms)
|
||||
void setTime(qint64 nTime);
|
||||
qint64 time();
|
||||
// position (in range 0.0...1.0)
|
||||
void setPosition(float fPos);
|
||||
float position();
|
||||
|
||||
bool isAudio();
|
||||
bool isPlaying();
|
||||
libvlc_state_t getState();
|
||||
|
||||
Reference in New Issue
Block a user