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


C++ scheduleDispatchEvent函数代码示例

本文整理汇总了C++中scheduleDispatchEvent函数的典型用法代码示例。如果您正苦于以下问题:C++ scheduleDispatchEvent函数的具体用法?C++ scheduleDispatchEvent怎么用?C++ scheduleDispatchEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: scheduleDispatchEvent

void MediaStream::setStreamIsActive(bool streamActive)
{
    if (streamActive)
        scheduleDispatchEvent(Event::create(eventNames().activeEvent, false, false));
    else
        scheduleDispatchEvent(Event::create(eventNames().inactiveEvent, false, false));
}
开发者ID:feel2d,项目名称:webkit,代码行数:7,代码来源:MediaStream.cpp

示例2: ASSERT

void RTCPeerConnection::didGenerateICECandidate(const blink::WebRTCICECandidate& webCandidate)
{
    ASSERT(executionContext()->isContextThread());
    if (webCandidate.isNull())
        scheduleDispatchEvent(RTCIceCandidateEvent::create(false, false, nullptr));
    else {
        RefPtr<RTCIceCandidate> iceCandidate = RTCIceCandidate::create(webCandidate);
        scheduleDispatchEvent(RTCIceCandidateEvent::create(false, false, iceCandidate.release()));
    }
}
开发者ID:junmin-zhu,项目名称:blink,代码行数:10,代码来源:RTCPeerConnection.cpp

示例3: scheduleDispatchEvent

void MediaStream::streamEnded()
{
    if (m_stopped || m_descriptor->ended())
        return;

    if (active()) {
        m_descriptor->setActive(false);
        scheduleDispatchEvent(Event::create(EventTypeNames::inactive));
    }
    m_descriptor->setEnded();
    scheduleDispatchEvent(Event::create(EventTypeNames::ended));
}
开发者ID:howardroark2018,项目名称:chromium,代码行数:12,代码来源:MediaStream.cpp

示例4: bufferedAmount

void RTCDataChannel::didDecreaseBufferedAmount(unsigned previousAmount)
{
    if (previousAmount > m_bufferedAmountLowThreshold
        && bufferedAmount() <= m_bufferedAmountLowThreshold) {
        scheduleDispatchEvent(Event::create(EventTypeNames::bufferedamountlow));
    }
}
开发者ID:shaoboyan,项目名称:chromium-crosswalk,代码行数:7,代码来源:RTCDataChannel.cpp

示例5: ASSERT

void MediaStream::addRemoteTrack(MediaStreamTrackPrivate* privateTrack)
{
    ASSERT(privateTrack);
    if (!active())
        return;

    RefPtr<MediaStreamTrack> track;
    switch (privateTrack->type()) {
    case RealtimeMediaSource::Audio:
        track = AudioStreamTrack::create(*scriptExecutionContext(), *privateTrack);
        break;
    case RealtimeMediaSource::Video:
        track = VideoStreamTrack::create(*scriptExecutionContext(), *privateTrack);
        break;
    case RealtimeMediaSource::None:
        ASSERT_NOT_REACHED();
        break;
    }

    if (!track)
        return;

    if (addTrack(track))
        scheduleDispatchEvent(MediaStreamTrackEvent::create(eventNames().addtrackEvent, false, false, track));
}
开发者ID:feel2d,项目名称:webkit,代码行数:25,代码来源:MediaStream.cpp

示例6: switch

void MediaStream::removeRemoteSource(MediaStreamSource* source)
{
    if (ended())
        return;

    MediaStreamTrackVector* tracks = 0;
    switch (source->type()) {
    case MediaStreamSource::Audio:
        tracks = &m_audioTracks;
        break;
    case MediaStreamSource::Video:
        tracks = &m_videoTracks;
        break;
    }

    size_t index = notFound;
    for (size_t i = 0; i < tracks->size(); ++i) {
        if ((*tracks)[i]->source() == source) {
            index = i;
            break;
        }
    }
    if (index == notFound)
        return;

    m_descriptor->removeSource(source);

    RefPtr<MediaStreamTrack> track = (*tracks)[index];
    tracks->remove(index);
    scheduleDispatchEvent(MediaStreamTrackEvent::create(eventNames().removetrackEvent, false, false, track));
}
开发者ID:webOS-ports,项目名称:webkit,代码行数:31,代码来源:MediaStream.cpp

示例7: scheduleDispatchEvent

void RTCPeerConnection::changeSignalingState(SignalingState signalingState)
{
    if (m_signalingState != SignalingStateClosed && m_signalingState != signalingState) {
        m_signalingState = signalingState;
        scheduleDispatchEvent(Event::create(EventTypeNames::signalingstatechange));
    }
}
开发者ID:junmin-zhu,项目名称:blink,代码行数:7,代码来源:RTCPeerConnection.cpp

示例8: scheduleDispatchEvent

void RTCDataChannel::didReceiveStringData(const String& text)
{
    if (m_stopped)
        return;

    scheduleDispatchEvent(MessageEvent::create(text));
}
开发者ID:cheekiatng,项目名称:webkit,代码行数:7,代码来源:RTCDataChannel.cpp

示例9: scheduleDispatchEvent

void RTCPeerConnection::changeIceGatheringState(IceGatheringState iceGatheringState)
{
    if (m_iceGatheringState != iceGatheringState) {
        m_iceGatheringState = iceGatheringState;
        scheduleDispatchEvent(Event::create(eventNames().gatheringchangeEvent, false, false));
    }
}
开发者ID:ragner,项目名称:webkit,代码行数:7,代码来源:RTCPeerConnection.cpp

示例10: scheduleDispatchEvent

void RTCDataChannel::didDetectError()
{
    if (m_stopped)
        return;

    scheduleDispatchEvent(Event::create(EventTypeNames::error));
}
开发者ID:ewilligers,项目名称:blink,代码行数:7,代码来源:RTCDataChannel.cpp

示例11: switch

void MediaStream::removeRemoteTrack(MediaStreamComponent* component)
{
    if (ended())
        return;

    MediaStreamTrackVector* tracks = 0;
    switch (component->source()->type()) {
    case MediaStreamSource::TypeAudio:
        tracks = &m_audioTracks;
        break;
    case MediaStreamSource::TypeVideo:
        tracks = &m_videoTracks;
        break;
    }

    size_t index = notFound;
    for (size_t i = 0; i < tracks->size(); ++i) {
        if ((*tracks)[i]->component() == component) {
            index = i;
            break;
        }
    }
    if (index == notFound)
        return;

    RefPtr<MediaStreamTrack> track = (*tracks)[index];
    tracks->remove(index);
    scheduleDispatchEvent(MediaStreamTrackEvent::create(eventNames().removetrackEvent, false, false, track));
}
开发者ID:fatman2021,项目名称:webkitgtk,代码行数:29,代码来源:MediaStream.cpp

示例12: scheduleDispatchEvent

void MediaStream::streamDidEnd()
{
    if (ended())
        return;

    scheduleDispatchEvent(Event::create(eventNames().endedEvent, false, false));
}
开发者ID:webOS-ports,项目名称:webkit,代码行数:7,代码来源:MediaStream.cpp

示例13: scheduleDispatchEvent

void MediaRecorder::writeData(const char* data,
                              size_t length,
                              bool lastInSlice) {
  if (m_stopped && !lastInSlice) {
    m_stopped = false;
    scheduleDispatchEvent(Event::create(EventTypeNames::start));
  }
  if (m_stream && m_streamAmountOfTracks != m_stream->getTracks().size()) {
    m_streamAmountOfTracks = m_stream->getTracks().size();
    onError("Amount of tracks in MediaStream has changed.");
  }

  // TODO(mcasas): Act as |m_ignoredMutedMedia| instructs if |m_stream| track(s)
  // is in muted() state.

  if (!m_blobData) {
    m_blobData = BlobData::create();
    m_blobData->setContentType(m_mimeType);
  }
  if (data)
    m_blobData->appendBytes(data, length);

  if (!lastInSlice)
    return;

  // Cache |m_blobData->length()| before release()ng it.
  const long long blobDataLength = m_blobData->length();
  createBlobEvent(Blob::create(
      BlobDataHandle::create(std::move(m_blobData), blobDataLength)));
}
开发者ID:ollie314,项目名称:chromium,代码行数:30,代码来源:MediaRecorder.cpp

示例14: scheduleDispatchEvent

void MediaStream::streamEnded()
{
    if (ended())
        return;

    m_descriptor->setEnded();
    scheduleDispatchEvent(Event::create(eventNames().endedEvent, false, false));
}
开发者ID:fatman2021,项目名称:webkitgtk,代码行数:8,代码来源:MediaStream.cpp

示例15: scheduleDispatchEvent

void MediaStream::streamEnded()
{
    if (ended())
        return;

    m_descriptor->setEnded();
    scheduleDispatchEvent(Event::create(EventTypeNames::ended));
}
开发者ID:rzr,项目名称:Tizen_Crosswalk,代码行数:8,代码来源:MediaStream.cpp


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