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


C++ IsPaused函数代码示例

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


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

示例1: locker

bool V4L2encRecorder::PauseAndWait(int timeout)
{
    QMutexLocker locker(&m_pauseLock);
    if (m_request_pause)
    {
        if (!IsPaused(true))
        {
            LOG(VB_RECORD, LOG_INFO, LOC + "PauseAndWait() -- pause");

            StopEncoding();

            m_paused = true;
            m_pauseWait.wakeAll();

            if (m_tvrec)
                m_tvrec->RecorderPaused();
        }
    }
    else if (IsPaused(true))
    {
        LOG(VB_RECORD, LOG_INFO, LOC + "PauseAndWait() -- unpause");
        StartEncoding();

        if (m_stream_data)
            m_stream_data->Reset(m_stream_data->DesiredProgram());

        m_paused = false;
    }

    // Always wait a little bit, unless woken up
    m_unpauseWait.wait(&m_pauseLock, timeout);

    return IsPaused(true);
}
开发者ID:tomhughes,项目名称:mythtv,代码行数:34,代码来源:v4l2encrecorder.cpp

示例2: locker

bool IPTVRecorder::PauseAndWait(int timeout)
{
    QMutexLocker locker(&pauseLock);
    if (request_pause)
    {
        if (!IsPaused(true))
        {
            _channel->GetFeeder()->Stop();
            _channel->GetFeeder()->Close();

            paused = true;
            pauseWait.wakeAll();
            if (tvrec)
                tvrec->RecorderPaused();
        }

        unpauseWait.wait(&pauseLock, timeout);
    }

    if (!request_pause && IsPaused(true))
    {
        paused = false;

        if (recording && !_channel->GetFeeder()->IsOpen())
            Open();

        if (_stream_data)
            _stream_data->Reset(_stream_data->DesiredProgram());

        unpauseWait.wakeAll();
    }

    return IsPaused(true);
}
开发者ID:StefanRoss,项目名称:mythtv,代码行数:34,代码来源:iptvrecorder.cpp

示例3: locker

// documented in recorderbase.cpp
bool FirewireRecorder::PauseAndWait(int timeout)
{
    QMutexLocker locker(&pauseLock);
    if (request_pause)
    {
        LOG(VB_RECORD, LOG_INFO, LOC +
            QString("PauseAndWait(%1) -- pause").arg(timeout));
        if (!IsPaused(true))
        {
            StopStreaming();
            paused = true;
            pauseWait.wakeAll();
            if (tvrec)
                tvrec->RecorderPaused();
        }
        unpauseWait.wait(&pauseLock, timeout);
    }

    if (!request_pause && IsPaused(true))
    {
        LOG(VB_RECORD, LOG_INFO, LOC +
            QString("PauseAndWait(%1) -- unpause").arg(timeout));
        paused = false;
        StartStreaming();
        unpauseWait.wakeAll();
    }

    return IsPaused(true);
}
开发者ID:DaveDaCoda,项目名称:mythtv,代码行数:30,代码来源:firewirerecorder.cpp

示例4: SetPause

void byoSnake::OnKeyDown(wxKeyEvent& event)
{
    if ( event.GetKeyCode() == 'p' || event.GetKeyCode() == 'P' )
    {
        SetPause(!IsPaused());
        Refresh();
    }

    if ( IsPaused() ) return;

    if ( event.GetKeyCode() == WXK_LEFT )
    {
        m_Direction = dLeft;
        Move();
    }

    if ( event.GetKeyCode() == WXK_RIGHT )
    {
        m_Direction = dRight;
        Move();
    }

    if ( event.GetKeyCode() == WXK_UP )
    {
        m_Direction = dUp;
        Move();
    }

    if ( event.GetKeyCode() == WXK_DOWN )
    {
        m_Direction = dDown;
        Move();
    }
}
开发者ID:stahta01,项目名称:codeAdapt_IDE,代码行数:34,代码来源:byosnake.cpp

示例5: locker

bool DVBRecorder::PauseAndWait(int timeout)
{
    QMutexLocker locker(&pauseLock);
    if (request_pause)
    {
        if (!IsPaused(true))
        {
            _stream_handler->RemoveListener(_stream_data);

            paused = true;
            pauseWait.wakeAll();
            if (tvrec)
                tvrec->RecorderPaused();
        }

        unpauseWait.wait(&pauseLock, timeout);
    }

    if (!request_pause && IsPaused(true))
    {
        paused = false;
        _stream_handler->AddListener(_stream_data, false, true);
        unpauseWait.wakeAll();
    }

    return IsPaused(true);
}
开发者ID:Olti,项目名称:mythtv,代码行数:27,代码来源:dvbrecorder.cpp

示例6: locker

// documented in recorderbase.cpp
bool FirewireRecorder::PauseAndWait(int timeout)
{
    QMutexLocker locker(&pauseLock);
    if (request_pause)
    {
        VERBOSE(VB_RECORD, LOC + "PauseAndWait("<<timeout<<") -- pause");
        if (!IsPaused(true))
        {
            StopStreaming();
            paused = true;
            pauseWait.wakeAll();
            if (tvrec)
                tvrec->RecorderPaused();
        }
        unpauseWait.wait(&pauseLock, timeout);
    }

    if (!request_pause && IsPaused(true))
    {
        paused = false;
        VERBOSE(VB_RECORD, LOC + "PauseAndWait("<<timeout<<") -- unpause");
        StartStreaming();
        unpauseWait.wakeAll();
    }

    return IsPaused(true);
}
开发者ID:bwarden,项目名称:mythtv,代码行数:28,代码来源:firewirerecorder.cpp

示例7: UE_VLOG

bool UPawnAction::Activate()
{
	bool bResult = false; 

	UE_VLOG(GetPawn(), LogPawnAction, Log, TEXT("%s> Activating at priority %s! First start? %s Paused? %s")
		, *GetName()
		, *GetPriorityName()
		, HasBeenStarted() ? TEXT("NO") : TEXT("YES")
		, IsPaused() ? TEXT("YES") : TEXT("NO"));

	if (HasBeenStarted() && IsPaused())
	{
		bResult = Resume();
	}
	else 
	{
		bResult = Start();
		if (bResult == false)
		{
			UE_VLOG(GetPawn(), LogPawnAction, Log, TEXT("%s> Failed to start.")
				, *GetName());
			bFailedToStart = true;
			SetFinishResult(EPawnActionResult::Failed);
			SendEvent(EPawnActionEventType::FailedToStart);
		}
	}

	return bResult;
}
开发者ID:1vanK,项目名称:AHRUnrealEngine,代码行数:29,代码来源:PawnAction.cpp

示例8: Play

void FSoundSource::UpdatePause()
{
	if (IsPaused() && !bIsPausedByGame && !bIsManuallyPaused)
	{
		Play();
	}
	else if (!IsPaused() && (bIsManuallyPaused || bIsPausedByGame))
	{
		Pause();
	}
}
开发者ID:zhaoyizheng0930,项目名称:UnrealEngine,代码行数:11,代码来源:Audio.cpp

示例9: ASSERT

void CDownload::StartTrying()
{
	ASSERT( ! IsCompleted() || IsSeeding() );
	ASSERT( ! IsPaused() );
	if ( IsTrying() || IsPaused() || ( IsCompleted() && ! IsSeeding() ) )
		return;

	if ( ! Network.IsConnected() && ! Network.Connect( TRUE ) )
		return;

	m_tBegan = GetTickCount();
}
开发者ID:GetEnvy,项目名称:Envy,代码行数:12,代码来源:Download.cpp

示例10: IsPaused

// ----------------------------------------------------------------------------
void CMannequinAGState::Pause( bool pause, EAnimationGraphPauser pauser, float fOverrideTransTime /*= -1.0f */ )
{
	bool bWasPaused = IsPaused();

	if (pause)
		m_pauseState |= (1<<pauser);
	else
		m_pauseState &= ~(1<<pauser);

	if (bWasPaused != IsPaused())
	{
		// TODO: do something here?
	}
}
开发者ID:aronarts,项目名称:FireNET,代码行数:15,代码来源:MannequinAGState.cpp

示例11: GetParentTime

void
nsSMILTimeContainer::SetCurrentTime(nsSMILTime aSeekTo)
{
  // SVG 1.1 doesn't specify what to do for negative times so we adopt SVGT1.2's
  // behaviour of clamping negative times to 0.
  aSeekTo = NS_MAX<nsSMILTime>(0, aSeekTo);

  // The following behaviour is consistent with:
  // http://www.w3.org/2003/01/REC-SVG11-20030114-errata
  //  #getCurrentTime_setCurrentTime_undefined_before_document_timeline_begin
  // which says that if SetCurrentTime is called before the document timeline
  // has begun we should still adjust the offset.
  nsSMILTime parentTime = GetParentTime();
  mParentOffset = parentTime - aSeekTo;
  mIsSeeking = PR_TRUE;

  if (IsPaused()) {
    mNeedsPauseSample = PR_TRUE;
    mPauseStart = parentTime;
  }

  if (aSeekTo < mCurrentTime) {
    // Backwards seek
    mNeedsRewind = PR_TRUE;
    ClearMilestones();
  }

  // Force an update to the current time in case we get a call to GetCurrentTime
  // before another call to Sample().
  UpdateCurrentTime();

  NotifyTimeChange();
}
开发者ID:harthur,项目名称:mozilla-central,代码行数:33,代码来源:nsSMILTimeContainer.cpp

示例12: Load

void Emulator::Run()
{
	if (!IsReady())
	{
		Load();
		if(!IsReady()) return;
	}

	if (IsRunning()) Stop();

	if (IsPaused())
	{
		Resume();
		return;
	}

	rpcs3::on_run()();

	SendDbgCommand(DID_START_EMU);

	m_pause_start_time = 0;
	m_pause_amend_time = 0;
	m_status = Running;

	idm::select<ppu_thread, SPUThread, RawSPUThread, ARMv7Thread>([](u32, cpu_thread& cpu)
	{
		cpu.run();
	});

	SendDbgCommand(DID_STARTED_EMU);
}
开发者ID:4iDragon,项目名称:rpcs3,代码行数:31,代码来源:System.cpp

示例13: CloseFileInternal

bool PAPlayer::CloseFileInternal(bool bAudioDevice /*= true*/)
{
  if (IsPaused())
    Pause();

  m_bStopPlaying = true;
  m_bStop = true;

  m_visBufferLength = 0;
  StopThread();

  // kill both our streams if we need to
  for (int i = 0; i < 2; i++)
  {
    m_decoder[i].Destroy();
    if (bAudioDevice)
      FreeStream(i);
  }

  m_currentFile->Reset();
  m_nextFile->Reset();

  if(bAudioDevice)
    g_audioContext.SetActiveDevice(CAudioContext::DEFAULT_DEVICE);
  else
    FlushStreams();

  return true;
}
开发者ID:mbolhuis,项目名称:xbmc,代码行数:29,代码来源:PAPlayer.cpp

示例14: time

void csMovieRecorder::ClockAdvance ()
{
  csTicks lastFakeClockTicks = fakeClockTicks;
  realVirtualClock->Advance();
  csTicks realTicksPerFrame = realVirtualClock->GetElapsedTicks();

  /*
    To avoid 'jumps' in time when the clock is throttled/unthrottled
    we keep our own tick counter, which is either increased by the
    real elapsed time (normal mode) or the required frame time (recording).
   */
  if (!IsRecording() || IsPaused()) {
    fakeClockElapsed = realTicksPerFrame;
    fakeClockTicks += realTicksPerFrame;
  }
  else {
    ffakeClockTicks += fakeTicksPerFrame;
    fakeClockTicks = (csTicks)ffakeClockTicks;

    fakeClockElapsed = fakeClockTicks - 
      lastFakeClockTicks;
    // If we're rendering slower than real time, there's nothing we can do about it.
    // If we're rendering faster, put in a little delay here.
    if (throttle && ((fakeClockElapsed > realTicksPerFrame)))
    {
      csSleep(fakeClockElapsed - realTicksPerFrame);
    }
  } 
}
开发者ID:Tank-D,项目名称:Shards,代码行数:29,代码来源:movierecorder.cpp

示例15: SetupPlugin

bool csMovieRecorder::EatKey (iEvent& event)
{
  SetupPlugin();
  bool down = csKeyEventHelper::GetEventType (&event) == csKeyEventTypeDown;
  csKeyModifiers m;
  csKeyEventHelper::GetModifiers (&event, m);
  bool alt = m.modifiers[csKeyModifierTypeAlt] != 0;
  bool ctrl = m.modifiers[csKeyModifierTypeCtrl] != 0;
  bool shift = m.modifiers[csKeyModifierTypeShift] != 0;
  utf32_char key = csKeyEventHelper::GetCookedCode (&event);

  if (down && (key == keyRecord.code) && (alt == keyRecord.alt) && 
      (ctrl == keyRecord.ctrl) && (shift == keyRecord.shift)) 
  {
    if (IsRecording())
	Stop();
    else
	Start();
    return true;
  }

  if (down && key==keyPause.code && alt==keyPause.alt && 
      ctrl==keyPause.ctrl && shift==keyPause.shift) 
  {
    if (IsPaused())
	UnPause();
    else
	Pause();
    return true;
  }

  return false;
}
开发者ID:Tank-D,项目名称:Shards,代码行数:33,代码来源:movierecorder.cpp


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