From c66728fa32fc79abd5c4fb9188750cccf9039dee Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 25 Jul 2016 13:46:00 +0200 Subject: [PATCH] Put everything in namespace bmusb; it was getting too generic with e.g. VideoFormat as a global type. --- bmusb.cpp | 4 ++++ bmusb.h | 4 ++++ main.cpp | 1 + 3 files changed, 9 insertions(+) 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; -- 2.39.2