Move grok headers into src/lib/grok
[dcpomatic.git] / src / lib / j2k_encoder.h
index ef925b8de5a7344f7aefe1e46871f173a6315553..a3ea9f3e8684bd52c46a65c5b39024b74b206fca 100644 (file)
  *  @brief J2KEncoder class.
  */
 
+#include "grok/context.h"
 
 #include "cross.h"
+#include "dcp_video.h"
 #include "enum_indexed_vector.h"
 #include "event_history.h"
 #include "exception_store.h"
-#include "util.h"
 #include "writer.h"
 #include <boost/optional.hpp>
 #include <boost/signals2.hpp>
@@ -42,8 +43,6 @@
 #include <list>
 #include <stdint.h>
 
-
-class DCPVideo;
 class EncodeServerDescription;
 class Film;
 class Job;
@@ -71,8 +70,11 @@ public:
        /** Called to pass a bit of video to be encoded as the next DCP frame */
        void encode (std::shared_ptr<PlayerVideo> pv, dcpomatic::DCPTime time);
 
+       void pause(void);
+       void resume(void);
+
        /** Called when a processing run has finished */
-       void end ();
+       void end (bool isFinal);
 
        boost::optional<float> current_encoding_rate () const;
        int video_frames_enqueued () const;
@@ -108,6 +110,9 @@ private:
        boost::optional<dcpomatic::DCPTime> _last_player_video_time;
 
        boost::signals2::scoped_connection _server_found_connection;
+
+       grk_plugin::DcpomaticContext dcpomaticContext_;
+       grk_plugin::GrokContext *context_;
 };