]> git.sesse.net Git - bmusb/commitdiff
Put everything in namespace bmusb; it was getting too generic with e.g. VideoFormat...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 25 Jul 2016 11:46:00 +0000 (13:46 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 25 Jul 2016 11:46:00 +0000 (13:46 +0200)
bmusb.cpp
bmusb.h
main.cpp

index d62cef90d3db567c4af368847649762b0c34bd6c..249722ee8b3202a5ab7fbb239a5eca95a455c2b6 100644 (file)
--- 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 38a7bfce9c351ef0f368bb4865331f17264af378..506685dc4c6a7401d17143cdb611315981c7b187 100644 (file)
--- a/bmusb.h
+++ b/bmusb.h
@@ -14,6 +14,8 @@
 #include <thread>
 #include <vector>
 
+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
index a7f63a12352bbab0fa39183ed8c1ad50432ba406..f1844cd2405b9ee6aeb58a592723a572dfceeefb 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -3,6 +3,7 @@
 #include "bmusb.h"
 
 using namespace std;
+using namespace bmusb;
        
 BMUSBCapture *usb;