X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdata%2Fdecoderstack.h;h=308dce6edde0ad8b480bf65beba7cc6b6ca7cac9;hb=28b9cc08aa62c02fd64dfb09eff4b9bfdb01f518;hp=339c1e0386daf3cd1b9421b67613956564444428;hpb=dd048a7ec035447c051c7937ce04aca5be065b4e;p=pulseview.git diff --git a/pv/data/decoderstack.h b/pv/data/decoderstack.h index 339c1e03..308dce6e 100644 --- a/pv/data/decoderstack.h +++ b/pv/data/decoderstack.h @@ -38,6 +38,7 @@ struct srd_decoder; struct srd_decoder_annotation_row; struct srd_probe; struct srd_proto_data; +struct srd_session; namespace DecoderStackTest { class TwoDecoderStack; @@ -45,12 +46,16 @@ class TwoDecoderStack; namespace pv { +class SigSession; + namespace view { class LogicSignal; } namespace data { +class LogicSnapshot; + namespace decode { class Annotation; class Decoder; @@ -68,7 +73,8 @@ private: static const int64_t DecodeChunkLength; public: - DecoderStack(const srd_decoder *const decoder); + DecoderStack(pv::SigSession &_session, + const srd_decoder *const decoder); virtual ~DecoderStack(); @@ -97,15 +103,23 @@ public: void begin_decode(); private: + void decode_data( + const boost::shared_ptr &snapshot, + srd_session *const session); + void decode_proc(boost::shared_ptr data); static void annotation_callback(srd_proto_data *pdata, void *decoder); +private slots: + void on_new_frame(); + signals: void new_decode_data(); private: + pv::SigSession &_session; /** * This mutex prevents more than one decode operation occuring @@ -117,7 +131,7 @@ private: std::list< boost::shared_ptr > _stack; - mutable boost::mutex _mutex; + mutable boost::mutex _output_mutex; int64_t _samples_decoded; std::map _rows;