Пример #1
0
void PlayerController::GetState()
{
    if (playerLaunched){
        TMPXPlaybackState state=iPlayer->iPlaybackUtility->StateL();
        PlayerStateChanged(state);
    }
}
Пример #2
0
bool AudioInterface::InitialisePlayer(void)
{
    m_player = TorcPlayer::Create(this, TorcPlayer::UserFacing, TorcDecoder::DecodeAudio);

    if (m_player)
    {
        connect(m_player, SIGNAL(StateChanged(TorcPlayer::PlayerState)),
                this, SLOT(PlayerStateChanged(TorcPlayer::PlayerState)));
    }

    return m_player;
}
Пример #3
0
void EC_VideoSource::InitializePhonon()
{
    try
    {
        LogDebug("Initializing phonon components");

        player_ = new Phonon::VideoPlayer(Phonon::VideoCategory);
        player_->setAttribute(Qt::WA_ForceUpdatesDisabled, true);
        media_object_ = player_->mediaObject();
        video_widget_ = player_->videoWidget();
        video_widget_->setAttribute(Qt::WA_ForceUpdatesDisabled, true);

        video_widget_->setAspectRatio(Phonon::VideoWidget::AspectRatioWidget);
        video_widget_->setScaleMode(Phonon::VideoWidget::FitInView);    

        connect(media_object_, SIGNAL(stateChanged(Phonon::State, Phonon::State)), SLOT(PlayerStateChanged(Phonon::State, Phonon::State)), Qt::QueuedConnection);
        connect(media_object_, SIGNAL(bufferStatus(int)), SLOT(BufferStatus(int)), Qt::QueuedConnection);
        connect(media_object_, SIGNAL(finished()), SLOT(PlaybackFinished()), Qt::QueuedConnection);
        connect(media_object_, SIGNAL(hasVideoChanged(bool)), this, SLOT(StartVideoPlayback(bool)), Qt::QueuedConnection);

        playbackState.Set(PS_Stop, AttributeChange::LocalOnly);
    }
    catch(std::exception e)
    {
        LogDebug("Failed to initialize all the mumble components. Exception occurred: " + std::string(e.what()));
    }
}