コード例 #1
0
void QGstreamerPlayerSession::setMuted(bool muted)
{
    if (m_muted != muted) {
        m_muted = muted;

#ifdef USE_PLAYBIN2
        g_object_set(G_OBJECT(m_playbin), "mute", m_muted, NULL);
#else
        g_object_set(G_OBJECT(m_playbin), "volume", (m_muted ? 0 : m_volume/100.0), NULL);
#endif
        emit mutedStateChanged(m_muted);
    }
}
コード例 #2
0
void QGstreamerPlayerSession::setMuted(bool muted)
{
    if (m_muted != muted) {
        m_muted = muted;

        if (m_usePlaybin2)
            g_object_set(G_OBJECT(m_playbin), "mute", m_muted, NULL);
        else
            g_object_set(G_OBJECT(m_playbin), "volume", (m_muted ? 0 : m_volume/100.0), NULL);

        emit mutedStateChanged(m_muted);
    }
}
コード例 #3
0
void QAndroidPlayerSession::setMuted(bool muted)
{
    if (m_muted != muted) {
        m_muted = muted;
        if(m_muted)
        {
            m_saveVolume = m_volume;
            setVolume(0);
        }
        else
        {
            setVolume(m_saveVolume);
        }

        emit mutedStateChanged(m_muted);
    }
}