refactor(*): change stream request and params interfaces

This commit is contained in:
John Zhao
2018-12-20 17:10:18 +08:00
parent 098b307260
commit d2a32e0ec1
37 changed files with 491 additions and 375 deletions

View File

@@ -24,10 +24,13 @@ MYNTEYE_USE_NAMESPACE
int main(int argc, char *argv[]) {
auto &&api = API::Create(argc, argv);
if (!api)
return 1;
api->InitResolution(Resolution::RES_1280x400);
api->SetStreamRequest(Format::BGR888, FrameRate::RATE_30_FPS);
if (!api) return 1;
bool ok;
auto &&request = api->SelectStreamRequest(&ok);
if (!ok) return 1;
api->ConfigStreamRequest(request);
api->LogOptionInfos();
// Enable this will cache the motion datas until you get them.

View File

@@ -27,10 +27,13 @@ int main(int argc, char *argv[]) {
glog_init _(argc, argv);
auto &&device = device::select();
if (!device)
return 1;
device->InitResolution(Resolution::RES_1280x400);
device->SetStreamRequest(Format::BGR888, FrameRate::RATE_30_FPS);
if (!device) return 1;
bool ok;
auto &&request = device::select_request(device, &ok);
if (!ok) return 1;
device->ConfigStreamRequest(request);
device->LogOptionInfos();
// Enable this will cache the motion datas until you get them.