From: Steinar H. Gunderson Date: Mon, 25 Jul 2016 11:46:00 +0000 (+0200) Subject: Put everything in namespace bmusb; it was getting too generic with e.g. VideoFormat... X-Git-Tag: 0.4~4 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c66728fa32fc79abd5c4fb9188750cccf9039dee;p=bmusb Put everything in namespace bmusb; it was getting too generic with e.g. VideoFormat as a global type. --- diff --git a/bmusb.cpp b/bmusb.cpp index d62cef9..249722e 100644 --- a/bmusb.cpp +++ b/bmusb.cpp @@ -48,6 +48,8 @@ using namespace std::placeholders; #define FRAME_SIZE (8 << 20) // 8 MB. #define USB_VIDEO_TRANSFER_SIZE (128 << 10) // 128 kB. +namespace bmusb { + card_connected_callback_t BMUSBCapture::card_connected_callback = nullptr; namespace { @@ -1426,3 +1428,5 @@ void BMUSBCapture::update_capture_mode() exit(1); } } + +} // namespace bmusb diff --git a/bmusb.h b/bmusb.h index 38a7bfc..506685d 100644 --- a/bmusb.h +++ b/bmusb.h @@ -14,6 +14,8 @@ #include #include +namespace bmusb { + class BMUSBCapture; // An interface for frame allocators; if you do not specify one @@ -326,4 +328,6 @@ class BMUSBCapture : public CaptureInterface { bool disconnected = false; }; +} // namespace bmusb + #endif diff --git a/main.cpp b/main.cpp index a7f63a1..f1844cd 100644 --- a/main.cpp +++ b/main.cpp @@ -3,6 +3,7 @@ #include "bmusb.h" using namespace std; +using namespace bmusb; BMUSBCapture *usb;