当前位置: 首页>>代码示例>>C++>>正文


C++ IWMPMedia::Release方法代码示例

本文整理汇总了C++中IWMPMedia::Release方法的典型用法代码示例。如果您正苦于以下问题:C++ IWMPMedia::Release方法的具体用法?C++ IWMPMedia::Release怎么用?C++ IWMPMedia::Release使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IWMPMedia的用法示例。


在下文中一共展示了IWMPMedia::Release方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: mediaChangeEvent

void QWmpPlayerControl::mediaChangeEvent(IDispatch *dispatch)
{
    IWMPMedia *media = 0;
    if (dispatch &&  dispatch->QueryInterface(
            __uuidof(IWMPMedia), reinterpret_cast<void **>(&media)) == S_OK) {
        IWMPMedia *currentMedia = 0;
        if (m_controls && m_controls->get_currentItem(&currentMedia) == S_OK) {
            VARIANT_BOOL isEqual = VARIANT_FALSE;
            if (media->get_isIdentical(currentMedia, &isEqual) == S_OK && isEqual)
                scheduleUpdate(DurationChanged);

            currentMedia->Release();
        }
        media->Release();
    }
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例2: lsm

void CWmp2mirc::OnPlay()
{
  // if we are locked (property page could be doing stuff, or the timer proc), then just ignore the request.
  if(!m_cs.TryEnter())
  {
    LibCC::g_pLog->Message(_T("WMircP is busy; ignoring the play event."));
    return;
  }

  IWMPMedia* pMedia = 0;
  m_spCore->get_currentMedia(&pMedia);

  if(!pMedia)
  {
    LibCC::g_pLog->Message(_T("WMircP could not get a pointer to the current media."));
  }
  else
  {
    CComBSTR url;
    pMedia->get_sourceURL(&url);

		LibCC::LogScopeMessage lsm(LibCC::Format("OnPlay %").qs((BSTR)url).Str());
    m.OnPlay(pMedia, (PCWSTR)url);
    pMedia->Release();
  }

  m_cs.Leave();
}
开发者ID:thenfour,项目名称:WMircP,代码行数:28,代码来源:0811+wmp2mircevents.cpp

示例3: duration

qint64 QWmpPlayerControl::duration() const
{
    double duration = 0.;

    IWMPMedia *media = 0;
    if (m_controls && m_controls->get_currentItem(&media) == S_OK) {
        media->get_duration(&duration);
        media->Release();
    }

    return duration * 1000;
}
开发者ID:,项目名称:,代码行数:12,代码来源:

示例4: value

QVariant QWmpPlaylist::value(int index, const QString &key) const
{
    QVariant v;
    
    IWMPMedia *media = 0;
    if (m_playlist && m_playlist->get_item(index, &media) == S_OK) {
        v = QWmpMetaData::value(media, QAutoBStr(key));

        media->Release();
    }

    return v;
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例5: keys

QStringList QWmpPlaylist::keys(int index) const
{
    QStringList keys;

    IWMPMedia *media = 0;
    if (m_playlist && m_playlist->get_item(index, &media) == S_OK) {
        keys = QWmpMetaData::keys(media);

        media->Release();
    }

    return keys;
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例6: removeMedia

bool QWmpPlaylist::removeMedia(int pos)
{
    IWMPMedia *media = 0;
    if (m_playlist->get_item(pos, &media) == S_OK) {
        bool removed = m_playlist->removeItem(media) == S_OK;

        media->Release();

        return removed;
    } else {
        return false;
    }
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例7: media

QMediaContent QWmpPlaylist::media(int pos) const
{
    QMediaContent content;

    IWMPMedia *media = 0;
    if (m_playlist && m_playlist->get_item(pos, &media) == S_OK) {
        content = QWmpMetaData::resources(media);

        media->Release();
    }

    return content;
}
开发者ID:,项目名称:,代码行数:13,代码来源:

示例8: currentIndex

int QWmpPlaylistControl::currentIndex() const
{
    int position = 0;

    IWMPMedia *media = 0;
    if (m_controls && m_player->get_currentMedia(&media) == S_OK) {
        position = QWmpMetaData::value(media, QAutoBStr(L"PlaylistIndex")).toInt();

        media->Release();
    }

    return position;
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:13,代码来源:qwmpplaylistcontrol.cpp

示例9: insertMedia

bool QWmpPlaylist::insertMedia(int pos, const QMediaContent &content)
{
    bool inserted = false;

    IWMPMedia *media = 0;
    if (m_playlist && m_player && m_player->newMedia(
            QAutoBStr(content.canonicalUrl()), &media) == S_OK) {
        inserted = m_playlist->insertItem(pos, media) == S_OK;

        media->Release();
    }

    return inserted;
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例10: addMedia

bool QWmpPlaylist::addMedia(const QMediaContent &content)
{
    bool appended = false;

    IWMPMedia *media = 0;
    if (!content.isNull() && m_playlist && m_player && m_player->newMedia(
            QAutoBStr(content.canonicalUrl()), &media) == S_OK) {
        appended = m_playlist->appendItem(media) == S_OK;

        media->Release();
    }

    return appended;
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例11: setCurrentIndex

void QWmpPlaylistControl::setCurrentIndex(int position)
{

    IWMPPlaylist *playlist = 0;
    if (m_player->get_currentPlaylist(&playlist) == S_OK) {
        IWMPMedia *media = 0;
        if (playlist->get_item(position, &media) == S_OK) {
            m_player->put_currentMedia(media);

            media->Release();
        }
        playlist->Release();
    }
}
开发者ID:kuailexs,项目名称:symbiandump-mw3,代码行数:14,代码来源:qwmpplaylistcontrol.cpp

示例12: availablePlaybackRanges

QMediaTimeRange QWmpPlayerControl::availablePlaybackRanges() const
{
    QMediaTimeRange ranges;

    IWMPMedia *media = 0;
    if (m_controls && m_controls->get_currentItem(&media) == S_OK) {
        double duration = 0;
        media->get_duration(&duration);
        media->Release();

        if(duration > 0)
            ranges.addInterval(0, duration * 1000);
    }

    return ranges;
}
开发者ID:,项目名称:,代码行数:16,代码来源:


注:本文中的IWMPMedia::Release方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。