]> sigrok.org Git - pulseview.git/blobdiff - pv/data/snapshot.h
Use libsigrok C++ bindings (patch version 7).
[pulseview.git] / pv / data / snapshot.h
index 1f1ca3cf0b8539e7387c5211434123ce98ee42f4..48879991fbbcc7d4af1d197ea68accba72512699 100644 (file)
@@ -21,9 +21,9 @@
 #ifndef PULSEVIEW_PV_DATA_SNAPSHOT_H
 #define PULSEVIEW_PV_DATA_SNAPSHOT_H
 
-#include <libsigrok/libsigrok.h>
-
-#include <boost/thread.hpp>
+#include <thread>
+#include <mutex>
+#include <vector>
 
 namespace pv {
 namespace data {
@@ -31,13 +31,13 @@ namespace data {
 class Snapshot
 {
 public:
-       Snapshot(int unit_size);
+       Snapshot(unsigned int unit_size);
 
        virtual ~Snapshot();
 
        uint64_t get_sample_count() const;
 
-       int unit_size() const;
+       unsigned int unit_size() const;
 
        /**
         * @brief Increase the capacity of the snapshot.
@@ -70,11 +70,11 @@ protected:
        void append_data(void *data, uint64_t samples);
 
 protected:
-       mutable boost::recursive_mutex _mutex;
-       void *_data;
+       mutable std::recursive_mutex _mutex;
+       std::vector<uint8_t> _data;
        uint64_t _sample_count;
        uint64_t _capacity;
-       int _unit_size;
+       unsigned int _unit_size;
 };
 
 } // namespace data