本文整理汇总了C++中Video::Start方法的典型用法代码示例。如果您正苦于以下问题:C++ Video::Start方法的具体用法?C++ Video::Start怎么用?C++ Video::Start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Video
的用法示例。
在下文中一共展示了Video::Start方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MotionSpecialTest
bool MotionSpecialTest()
{
Video video;
if (SOURCE.length() == 0)
{
TEST_LOG_SS(Error, "Video source is undefined (-s parameter)!");
return false;
}
if(!video.SetSource(SOURCE))
{
TEST_LOG_SS(Error, "Can't open video file '" << SOURCE << "'!");
return false;
}
Filter filter;
video.SetFilter(&filter);
video.Start();
#ifdef TEST_PERFORMANCE_TEST_ENABLE
TEST_LOG_SS(Info, PerformanceMeasurerStorage::s_storage.Report(false, true));
PerformanceMeasurerStorage::s_storage.Clear();
#endif
return true;
}
示例2: path
/* FUNCTION: ViewObject :: DragDrop
ARGUMENTS: none
RETURN: n/a
DESCRIPTION: Hook function called when user drops files in application window.
Essentially, determine if file is image or video.
*/
void ViewObject :: DragDrop(entry_ref *ref, float mouse_x, float mouse_y)
{
// Image file?
BPath path(ref);
BBitmap *bitmap = BTranslationUtils::GetBitmap(path.Path(), NULL);
if (bitmap)
{
MediaSource *media = new MediaSource(this);
GLCreateTexture(media, bitmap);
if (!SurfaceUpdate(media, mouse_x, mouse_y))
delete media;
delete bitmap;
return;
}
// Video file
Video *video = new Video(ref);
if (video->GetStatus() == B_OK)
{
MediaSource *media = new MediaSource(this);
GLCreateTexture(media, video->GetBitmap());
media->SetVideo(video);
if (SurfaceUpdate(media, mouse_x, mouse_y))
video->Start();
else
delete media;
return;
}
else
delete video;
printf("Unsupported file\n");
}