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


C++ Finish函数代码示例

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


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

示例1: Stream_Prepare

//---------------------------------------------------------------------------
void File_Aac::From_Codec()
{
    //Filling
    Stream_Prepare(Stream_General);
    Fill(Stream_General, 0, General_Format, "AAC");
    Stream_Prepare(Stream_Audio);
    Fill(Stream_Audio, 0, Audio_Format, "AAC");
    Fill(Stream_Audio, 0, Audio_Codec, Codec);
    Ztring Profile;
    int8u Version=0, SBR=2, PS=2;
         if (0);
    else if (Codec==_T("A_AAC/MPEG2/MAIN"))     {Version=2; Profile=_T("Main");}
    else if (Codec==_T("A_AAC/MPEG2/LC"))       {Version=2; Profile=_T("LC");   SBR=0;}
    else if (Codec==_T("A_AAC/MPEG2/LC/SBR"))   {Version=2; Profile=_T("LC");   SBR=1;}
    else if (Codec==_T("A_AAC/MPEG2/SSR"))      {Version=2; Profile=_T("SSR");}
    else if (Codec==_T("A_AAC/MPEG4/MAIN"))     {Version=4; Profile=_T("Main");}
    else if (Codec==_T("A_AAC/MPEG4/LC"))       {Version=4; Profile=_T("LC");   SBR=0;}
    else if (Codec==_T("A_AAC/MPEG4/LC/SBR"))   {Version=4; Profile=_T("LC");   SBR=1; PS=0;}
    else if (Codec==_T("A_AAC/MPEG4/LC/SBR/PS")){Version=4; Profile=_T("LC");   SBR=1; PS=1;}
    else if (Codec==_T("A_AAC/MPEG4/SSR"))      {Version=4; Profile=_T("SSR");}
    else if (Codec==_T("A_AAC/MPEG4/LTP"))      {Version=4; Profile=_T("LTP");}
    else if (Codec==_T("raac"))                 {           Profile=_T("LC");}
    else if (Codec==_T("racp"))                 {           Profile=_T("LC");   SBR=1; PS=0;}

    if (Version>0)
        Fill(Stream_Audio, 0, Audio_Format_Version, Version==2?"Version 2":"Version 4");
    Fill(Stream_Audio, 0, Audio_Format_Profile, Profile);
    if (SBR!=2)
    {
        if (SBR)
            Fill(Stream_Audio, 0, Audio_Format_Settings, "SBR");
        Fill(Stream_Audio, 0, Audio_Format_Settings_SBR, SBR?"Yes":"No");
    }
    if (PS!=2)
    {
        if (PS)
            Fill(Stream_Audio, 0, Audio_Format_Settings, "PS");
        Fill(Stream_Audio, 0, Audio_Format_Settings_PS, PS?"Yes":"No");
    }

    Accept("AAC");
    Finish("AAC");
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:44,代码来源:File_Aac.cpp

示例2: Skip_C4

//---------------------------------------------------------------------------
void File_Dpg::FileHeader_Parse()
{
    //Parsing
    int32u  FrameCount, FrameRate, SamplingRate;
    Skip_C4(                                                    "Signature");
    Get_L4 (FrameCount,                                         "Frame count");
    Get_L4 (FrameRate,                                          "Frame rate"); Param_Info(FrameRate/0x100, " fps");
    Get_L4 (SamplingRate,                                       "Sampling rate");
    Skip_L4(                                                    "0x00000000");
    Get_L4 (Audio_Offset,                                       "Audio Offset");
    Get_L4 (Audio_Size,                                         "Audio Size");
    Get_L4 (Video_Offset,                                       "Video Offset");
    Get_L4 (Video_Size,                                         "Video Size");

    FILLING_BEGIN();
        Accept("DPG");

        Fill(Stream_General, 0, General_Format, "DPG");

        Stream_Prepare(Stream_Video);
        Fill(Stream_Video, 0, Video_FrameRate, (float)(FrameRate/0x100), 3);
        Fill(Stream_Video, 0, Video_FrameCount, FrameCount);
        Fill(Stream_Video, 0, Video_StreamSize, Video_Size);

        Stream_Prepare(Stream_Audio);
        Fill(Stream_Audio, 0, Audio_SamplingRate, SamplingRate);
        Fill(Stream_Audio, 0, Audio_StreamSize, Audio_Size);

        //Positionning
        #if defined(MEDIAINFO_MPEGA_YES)
            Parser=new File_Mpega();
            Open_Buffer_Init(Parser);
            GoTo(Audio_Offset, "DPG");
        #elif defined(MEDIAINFO_MPEGV_YES)
            Audio_Size=0;
            Parser=new File_Mpegv();
            Open_Buffer_Init(Parser);
            GoTo(Video_Offset, "DPG");
        #else
            Finish("DPG");
        #endif
    FILLING_END();
}
开发者ID:asfdfdfd,项目名称:MediaInfoLib-Avdump2-Mac,代码行数:44,代码来源:File_Dpg.cpp

示例3: Element_Name

//---------------------------------------------------------------------------
void File_Speex::Comment()
{
    Element_Name("Comment?");

    while (Element_Offset<Element_Size)
    {
        Ztring value;
        int32u size;
        Get_L4(size,                                            "size");
        if (size)
            Get_Local(size, value,                              "value");

        //Filling
        if (!value.empty())
            Fill(Stream_Audio, 0, "Comment", value);
    }

    Finish("Speex");
}
开发者ID:AeonAxan,项目名称:mpc-hc,代码行数:20,代码来源:File_Speex.cpp

示例4: PushNextActionCopy

void UPawnAction_Sequence::OnChildFinished(UPawnAction& Action, EPawnActionResult::Type WithResult)
{
	if (RecentActionCopy == &Action)
	{
		if (WithResult == EPawnActionResult::Success || (WithResult == EPawnActionResult::Failed && ChildFailureHandlingMode == EPawnActionFailHandling::IgnoreFailure))
		{
			if (GetAbortState() == EPawnActionAbortState::NotBeingAborted)
			{
				PushNextActionCopy();
			}
		}
		else
		{
			Finish(EPawnActionResult::Failed);
		}
	}

	Super::OnChildFinished(Action, WithResult);
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:19,代码来源:PawnAction_Sequence.cpp

示例5: Finish

bool UPawnAction_Sequence::PushNextActionCopy()
{
	if (CurrentActionIndex >= uint32(ActionSequence.Num()))
	{
		Finish(EPawnActionResult::Success);
		return true;
	}

	UPawnAction* ActionCopy = SubActionTriggeringPolicy == EPawnSubActionTriggeringPolicy::CopyBeforeTriggering
		? Cast<UPawnAction>(StaticDuplicateObject(ActionSequence[CurrentActionIndex], this, NULL))
		: ActionSequence[CurrentActionIndex];

	UE_VLOG(GetPawn(), LogPawnAction, Log, TEXT("%s> pushing action %s")
		, *GetName(), *GetNameSafe(ActionCopy));
	++CurrentActionIndex;	
	check(ActionCopy);
	RecentActionCopy = ActionCopy;
	return PushChildAction(*ActionCopy);
}
开发者ID:frobro98,项目名称:UnrealSource,代码行数:19,代码来源:PawnAction_Sequence.cpp

示例6: NS_ASSERTION

NS_IMETHODIMP
FileHelper::OnStopRequest(nsIRequest* aRequest, nsISupports* aCtxt,
                          nsresult aStatus)
{
  NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");

  if (NS_FAILED(aStatus)) {
    if (aStatus == NS_ERROR_FILE_NO_DEVICE_SPACE) {
      mResultCode = NS_ERROR_DOM_FILEHANDLE_QUOTA_ERR;
    }
    else {
      mResultCode = NS_ERROR_DOM_FILEHANDLE_UNKNOWN_ERR;
    }
  }

  Finish();

  return NS_OK;
}
开发者ID:JuannyWang,项目名称:gecko-dev,代码行数:19,代码来源:FileHelper.cpp

示例7: get_wait_to_play_devices

	bool get_wait_to_play_devices() {
		alarm_center_video::request request;
		alarm_center_video::alarm_info alarm_info;
		grpc::ClientContext context;

		auto mgr = video::video_manager::get_instance();
		auto reader = stub_->get_alarming_devs(&context, request);
		while (reader->Read(&alarm_info)) {
			video::video_device_identifier id;
			id.dev_id = alarm_info.devinfo().dev_id();
			id.productor_type = video::Integer2ProductorType(alarm_info.devinfo().productor_type());
			video::device_ptr device = mgr->GetVideoDeviceInfo(&id);
			int speed = util::CConfigHelper::get_instance()->get_default_video_level();

			if (device && g_videoPlayerDlg) {
				//if (alarm_info.alarm_msg_size() == 0) {
				//	g_videoPlayerDlg->PlayVideoByDevice(device, speed);
				//} else {
				//	for (auto txt : alarm_info.alarm_msg()) {
				//		//g_videoPlayerDlg->PlayVideoByDevice(device, speed, )
				//	}
				//}

				//video::zone_uuid_ptr zone = nullptr;
				if (alarm_info.has_zone_uuid()) {
					auto zone = std::make_shared<video::zone_uuid>();
					zone->_ademco_id = alarm_info.zone_uuid().ademco_id();
					zone->_zone_value = alarm_info.zone_uuid().zone_value();
					zone->_gg = alarm_info.zone_uuid().gg();

					g_videoPlayerDlg->PlayVideo(zone, nullptr);
				} else {
					g_videoPlayerDlg->PlayVideo(device);
				}

				
			}
		}

		auto status = reader->Finish();
		return status.ok();
	}
开发者ID:cr1549802355,项目名称:AlarmCenter,代码行数:42,代码来源:alarm_center_video_client.cpp

示例8: TEST_F

TEST_F(TeeHistorian, Auth)
{
	const unsigned char EXPECTED[] = {
		// EX uuid=60daba5c-52c4-3aeb-b8ba-b2953fb55a17 data_len=16
		0x4a,
		0x60, 0xda, 0xba, 0x5c, 0x52, 0xc4, 0x3a, 0xeb,
		0xb8, 0xba, 0xb2, 0x95, 0x3f, 0xb5, 0x5a, 0x17,
		0x10,
		// (AUTH_INIT) cid=0 level=3 auth_name="default_admin"
		0x00, 0x03, 'd',  'e',  'f',  'a',  'u',  'l',
		't',  '_',  'a',  'd',  'm',  'i',  'n',  0x00,
		// EX uuid=37ecd3b8-9218-3bb9-a71b-a935b86f6a81 data_len=9
		0x4a,
		0x37, 0xec, 0xd3, 0xb8, 0x92, 0x18, 0x3b, 0xb9,
		0xa7, 0x1b, 0xa9, 0x35, 0xb8, 0x6f, 0x6a, 0x81,
		0x09,
		// (AUTH_LOGIN) cid=1 level=2 auth_name="foobar"
		0x01, 0x02, 'f',  'o',  'o',  'b',  'a',  'r',
		0x00,
		// EX uuid=37ecd3b8-9218-3bb9-a71b-a935b86f6a81 data_len=7
		0x4a,
		0x37, 0xec, 0xd3, 0xb8, 0x92, 0x18, 0x3b, 0xb9,
		0xa7, 0x1b, 0xa9, 0x35, 0xb8, 0x6f, 0x6a, 0x81,
		0x07,
		// (AUTH_LOGIN) cid=1 level=2 auth_name="foobar"
		0x02, 0x01, 'h',  'e',  'l',  'p',  0x00,
		// EX uuid=d4f5abe8-edd2-3fb9-abd8-1c8bb84f4a63 data_len=7
		0x4a,
		0xd4, 0xf5, 0xab, 0xe8, 0xed, 0xd2, 0x3f, 0xb9,
		0xab, 0xd8, 0x1c, 0x8b, 0xb8, 0x4f, 0x4a, 0x63,
		0x01,
		// (AUTH_LOGOUT) cid=1
		0x01,
		0x40, // FINISH
	};
	m_TH.RecordAuthInitial(0, IServer::AUTHED_ADMIN, "default_admin");
	m_TH.RecordAuthLogin(1, IServer::AUTHED_MOD, "foobar");
	m_TH.RecordAuthLogin(2, IServer::AUTHED_HELPER, "help");
	m_TH.RecordAuthLogout(1);
	Finish();
	Expect(EXPECTED, sizeof(EXPECTED));
}
开发者ID:Laxa,项目名称:ddnet,代码行数:42,代码来源:teehistorian.cpp

示例9: if

void Arena::UpdatePlayerCounts()
{
	if(m_ended)
		return;

	m_mapMgr->GetStateManager().UpdateWorldState(m_pcWorldStates[GOLD_TEAM], m_playersCount[GOLD_TEAM]);
	m_mapMgr->GetStateManager().UpdateWorldState(m_pcWorldStates[GREEN_TEAM], m_playersCount[GREEN_TEAM]);

	if(!m_started)
		return;

	if(m_playersCount[GOLD_TEAM] == 0)
		m_losingteam = GOLD_TEAM;
	else if(m_playersCount[GREEN_TEAM] == 0)
		m_losingteam = GREEN_TEAM;
	else
		return;

	Finish();
}
开发者ID:Ballwinkle,项目名称:Ascent_NG,代码行数:20,代码来源:Arenas.cpp

示例10: Skip_C4

//---------------------------------------------------------------------------
void File_ArriRaw::Read_Buffer_Continue()
{
    //Parsing
    Skip_C4(                                                    "Signature");
    Skip_C1(                                                    "Signature");
    Skip_C3(                                                    "Signature");
    Skip_XX(File_Size-8,                                        "Data");

    FILLING_BEGIN();
        Frame_Count++;
        if (Frame_Count_NotParsedIncluded!=(int64u)-1)
            Frame_Count_NotParsedIncluded++;
        if (!Status[IsFilled])
        {
            Fill();
            if (Config->ParseSpeed<1.0)
                Finish();
        }
    FILLING_END();
}
开发者ID:0vermind,项目名称:NeoLoader,代码行数:21,代码来源:File_ArriRaw.cpp

示例11: Skip_B2

//---------------------------------------------------------------------------
void File_Gzip::Read_Buffer_Continue()
{
    //Parsing
    int8u CM;
    Skip_B2(                                                    "IDentification");
    Get_B1 (CM,                                                 "Compression Method");
    Skip_B1(                                                    "FLaGs");
    Skip_B4(                                                    "Modified TIME");
    Skip_XX(File_Size-10,                                       "Data");

    FILLING_BEGIN();
        //Filling
        Accept("Gzip");

        Fill(Stream_General, 0, General_Format, "GZip");
        Fill(Stream_General, 0, General_Format_Profile, "deflate");

        Finish("Gzip");
    FILLING_END();
}
开发者ID:Armada651,项目名称:mpc-hc,代码行数:21,代码来源:File_Gzip.cpp

示例12: Demux_UnpacketizeContainer_Demux

//---------------------------------------------------------------------------
void File_Pcm::Data_Parse()
{
    #if MEDIAINFO_DEMUX
        if (Demux_UnpacketizeContainer)
        {
            Demux_Offset=(size_t)Element_Size;
            Demux_UnpacketizeContainer_Demux();
        }
    #endif //MEDIAINFO_DEMUX

    //Parsing
    Skip_XX(Element_Size,                                       "Data"); //It is impossible to detect... Default is no detection, only filling

    Frame_Count++;
    if (!Status[IsAccepted] && Frame_Count>=2)
    {
        Accept();
        Finish();
    }
}
开发者ID:github188,项目名称:BasicFunctionCodeBase,代码行数:21,代码来源:File_Pcm.cpp

示例13: SetMessage

BOOL CDialog::Uninstall()
{
	BOOL result = TRUE;
	TCHAR szPath[MAX_PATH] = {0};
	TCHAR szMessage[MAX_PATH] = {0};

	SetMessage( TEXT("") );

	int msg = IDS_UNINSTALL_RESTART;

	lstrcpy(szPath, m_szDestinationPath);
	lstrcat(szPath, "\\");
	lstrcat(szPath, FILENAME_DLL);

	if( UnRegisterActiveX(szPath) )
	{
		RegDeleteKey( HKEY_LOCAL_MACHINE, UNINSTALL_KEY);
		if( ::DeleteFile(szPath) )
		{
			m_bCleanup = true; // Tell main to call CleanUp()
			msg = IDS_UNINSTALL_SUCCESS;
		}
		else
		{
			// Write something to RunOnce registry key
		}
	}
	else
	{
		msg = IDS_UNREGISTERACTIVEXFAILED;
		result = FALSE;
	}

	m_bUnInstall = false;

	AppendMessage( msg, NULL, true );

	Finish();

	return result;
}
开发者ID:sqba,项目名称:zenfolders,代码行数:41,代码来源:Dialog.cpp

示例14: Element_Info

//---------------------------------------------------------------------------
void File_Vc3::Data_Parse()
{
    //Parsing
    Element_Info(Frame_Count+1);
    HeaderPrefix();
    CodingControlA();
    Skip_XX(16,                                                 "Reserved");
    ImageGeometry();
    Skip_XX( 5,                                                 "Reserved");
    CompressionID();

    Skip_XX(640-Element_Offset,                                 "ToDo");
    Skip_XX(Element_Size-Element_Offset,                        "Data");

    FILLING_BEGIN();
        Data_ToParse-=Buffer_Size-(size_t)Buffer_Offset;
        Frame_Count++;
        if (!Status[IsFinished] && Frame_Count>=Frame_Count_Valid)
            Finish("VC-3");
    FILLING_END();
}
开发者ID:eagleatustb,项目名称:p2pdown,代码行数:22,代码来源:File_Vc3.cpp

示例15: AssertIsOnBackgroundThread

void
DeleteFilesRunnable::DirectoryLockAcquired(DirectoryLock* aLock)
{
  AssertIsOnBackgroundThread();
  MOZ_ASSERT(mState == State_DirectoryOpenPending);
  MOZ_ASSERT(!mDirectoryLock);

  mDirectoryLock = aLock;

  QuotaManager* quotaManager = QuotaManager::Get();
  MOZ_ASSERT(quotaManager);

  // Must set this before dispatching otherwise we will race with the IO thread
  mState = State_DatabaseWorkOpen;

  nsresult rv = quotaManager->IOThread()->Dispatch(this, NS_DISPATCH_NORMAL);
  if (NS_WARN_IF(NS_FAILED(rv))) {
    Finish();
    return;
  }
}
开发者ID:pkdevboxy,项目名称:gecko-dev,代码行数:21,代码来源:IndexedDatabaseManager.cpp


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