本文整理汇总了C++中Finish函数的典型用法代码示例。如果您正苦于以下问题:C++ Finish函数的具体用法?C++ Finish怎么用?C++ Finish使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Finish函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: Finish
void StreamRender::Update(){
// QTimer::singleShot(30, this, SLOT(render())); // el consumo de cpu es 0
if (isFinal())
{
// if(Timer->isActive ())
// {
Timer->stop();
emit Finish();
// }
}
render();
}
开发者ID:jfperini,项目名称:iradit,代码行数:21,代码来源:StreamRender.cpp
示例17: Get_L1
//---------------------------------------------------------------------------
void File_Ico::Data_Parse()
{
//Parsing
int32u Size, Offset;
int16u BitsPerPixel;
int8u Width, Height;
Get_L1 (Width, "Width");
Get_L1 (Height, "Height");
Skip_L1( "Colour count");
Skip_L1( "Reserved");
Skip_L2( Type==1?"Colour planes":"X hotspot");
Get_L2 (BitsPerPixel, Type==1?"Bits per pixel":"Y hotspot");
Get_L4 (Size, "Size of the bitmap data");
Get_L4 (Offset, "Offset of the bitmap data");
FILLING_BEGIN_PRECISE();
stream Stream;
Stream.Width=Width;
Stream.Height=Height;
Stream.BitsPerPixel=BitsPerPixel;
Stream.Size=Size;
Stream.Offset=Offset;
Streams.push_back(Stream);
IcoDataSize+=Size;
if (Offset>File_Size || File_Offset+Buffer_Offset+Element_Size+IcoDataSize>File_Size)
Reject("ICO");
Count--;
if (Count==0)
{
if (File_Offset+Buffer_Offset+Element_Size+IcoDataSize!=File_Size)
Reject("ICO");
else
{
Accept("ICO");
Finish("ICO");
}
}
FILLING_END();
}
开发者ID:asfdfdfd,项目名称:MediaInfoLib-Avdump2-Mac,代码行数:41,代码来源:File_Ico.cpp
示例18: switch
std::unique_ptr<PeerRequest> PeerRequest::Create(
const api::Wallet& wallet,
const ConstNym& nym,
const proto::PeerRequestType& type,
const Identifier& unitID,
const Identifier& serverID,
const std::uint64_t& amount,
const std::string& terms)
{
auto unit = wallet.UnitDefinition(unitID);
if (!unit) {
otErr << __FUNCTION__ << ": failed to load unit definition."
<< std::endl;
return nullptr;
}
std::unique_ptr<PeerRequest> contract;
switch (type) {
case (proto::PEERREQUEST_OUTBAILMENT): {
contract.reset(new OutBailmentRequest(
wallet,
nym,
unit->Nym()->ID(),
unitID,
serverID,
amount,
terms));
} break;
default: {
otErr << __FUNCTION__ << ": invalid request type." << std::endl;
return nullptr;
}
}
return Finish(contract);
}
开发者ID:Open-Transactions,项目名称:opentxs,代码行数:40,代码来源:PeerRequest.cpp
示例19: Get_UTF8
//---------------------------------------------------------------------------
void File_TimedText::Data_Parse()
{
//Parsing
Ztring Value;
Get_UTF8 (Element_Size, Value, "Value");
FILLING_BEGIN();
if (!Status[IsAccepted])
{
Accept();
#ifdef MEDIAINFO_MPEG4_YES
if (IsChapter)
{
Stream_Prepare(Stream_Menu);
}
else
#endif //MEDIAINFO_MPEG4_YES
{
Stream_Prepare(Stream_Text);
}
Fill(StreamKind_Last, 0, Fill_Parameter(StreamKind_Last, Generic_Format), "Timed Text");
}
#ifdef MEDIAINFO_MPEG4_YES
if (IsChapter)
{
}
else
#endif //MEDIAINFO_MPEG4_YES
{
Finish();
}
#ifdef MEDIAINFO_MPEG4_YES
if (IsChapter && FrameInfo.DTS!=(int64u)-1 && Buffer_Offset==2)
Fill(Stream_Menu, 0, Ztring().Duration_From_Milliseconds(FrameInfo.DTS/1000000).To_UTF8().c_str(), Value);
#endif //MEDIAINFO_MPEG4_YES
FILLING_END();
Element_Offset=Buffer_Size-Buffer_Offset; //Buffer can also contain atoms after the text, ignoring them
}
开发者ID:0vermind,项目名称:NeoLoader,代码行数:41,代码来源:File_TimedText.cpp
示例20: handle_signal
/*-
*-----------------------------------------------------------------------
* handle_signal --
* handle a signal for ourselves
*
*-----------------------------------------------------------------------
*/
static void
handle_signal(int signo)
{
if (DEBUG(JOB)) {
(void)fprintf(stdout, "handle_signal(%d) called.\n", signo);
(void)fflush(stdout);
}
/*
* Deal with proper cleanup based on the signal received. We only run
* the .INTERRUPT target if the signal was in fact an interrupt. The
* other three termination signals are more of a "get out *now*"
* command.
*/
if (signo == SIGINT)
JobInterrupt(true, signo);
else if (signo == SIGHUP || signo == SIGTERM || signo == SIGQUIT)
JobInterrupt(false, signo);
if (signo == SIGQUIT)
Finish(0);
}
开发者ID:UNGLinux,项目名称:Obase,代码行数:29,代码来源:job.c
注:本文中的Finish函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论