X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoder.h;h=72ccd2ec58622a9119f6e3f15ddbd2d1fa45e831;hb=ce94e4fd5d7ab666259231d21759613f1f2b93ee;hp=09002ac911153ed06901af6ab1ba3e0927b1f4c7;hpb=b6b267bba9d55d23fe5c3537e4785238d4377ad7;p=pulseview.git diff --git a/pv/data/decoder.h b/pv/data/decoder.h index 09002ac..72ccd2e 100644 --- a/pv/data/decoder.h +++ b/pv/data/decoder.h @@ -66,14 +66,20 @@ private: static const int64_t DecodeChunkLength; public: - Decoder(const srd_decoder *const decoder, - std::map > probes, - GHashTable *options); + Decoder(const srd_decoder *const decoder); virtual ~Decoder(); - const srd_decoder* get_decoder() const; + const srd_decoder* decoder() const; + + const std::map >& + probes() const; + void set_probes(std::map > probes); + + const GHashTable* options() const; + + void set_option(const char *id, GVariant *value); const std::vector< boost::shared_ptr > annotations() const; @@ -85,8 +91,6 @@ public: private: void begin_decode(); - void init_decoder(); - void decode_proc(boost::shared_ptr data); static void annotation_callback(srd_proto_data *pdata, @@ -96,6 +100,15 @@ signals: void new_decode_data(); private: + + /** + * This mutex prevents more than one decode operation occuring + * concurrently. + * @todo A proper solution should be implemented to allow multiple + * decode operations. + */ + static boost::mutex _global_decode_mutex; + const srd_decoder *const _decoder; std::map > _probes;