Add get_video_name

This commit is contained in:
John Zhao 2018-03-30 16:39:35 +08:00
parent 30b038a623
commit 2df1ab635a
3 changed files with 7 additions and 6 deletions

View File

@ -68,7 +68,7 @@ int main(int argc, char *argv[]) {
for (size_t i = 0; i < n; i++) { for (size_t i = 0; i < n; i++) {
auto device = mynteye_devices[i]; auto device = mynteye_devices[i];
auto name = uvc::get_name(*device); auto name = uvc::get_video_name(*device);
auto vid = uvc::get_vendor_id(*device); auto vid = uvc::get_vendor_id(*device);
auto pid = uvc::get_product_id(*device); auto pid = uvc::get_product_id(*device);
LOG(INFO) << "index: " << i << ", name: " << name << ", vid: " << vid LOG(INFO) << "index: " << i << ", name: " << name << ", vid: " << vid

View File

@ -426,10 +426,6 @@ std::vector<std::shared_ptr<device>> query_devices(
return devices; return devices;
} }
std::string get_name(const device &device) {
return device.dev_name;
}
int get_vendor_id(const device &device) { int get_vendor_id(const device &device) {
return device.vid; return device.vid;
} }
@ -438,6 +434,10 @@ int get_product_id(const device &device) {
return device.pid; return device.pid;
} }
std::string get_video_name(const device &device) {
return device.dev_name;
}
void get_control( void get_control(
const device &device, const extension_unit &xu, uint8_t ctrl, void *data, const device &device, const extension_unit &xu, uint8_t ctrl, void *data,
int len) { int len) {

View File

@ -30,10 +30,11 @@ std::vector<std::shared_ptr<device>> query_devices(
std::shared_ptr<context> context); std::shared_ptr<context> context);
// Static device properties // Static device properties
std::string get_name(const device &device);
int get_vendor_id(const device &device); int get_vendor_id(const device &device);
int get_product_id(const device &device); int get_product_id(const device &device);
std::string get_video_name(const device &device);
// Access XU controls // Access XU controls
void get_control( void get_control(
const device &device, const extension_unit &xu, uint8_t ctrl, void *data, const device &device, const extension_unit &xu, uint8_t ctrl, void *data,