summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-29 08:31:23 +0200
committerCarl Hetherington <cth@carlh.net>2021-04-29 08:31:23 +0200
commitb249700e1da7dd6631a8b4440587f4093a2bdef1 (patch)
tree71f88855e72b11f927d194f0676bac93845d26be /src/lib
parent94695fc3214917ad7310af36270ce1e0b88cdfa3 (diff)
Remove use of boost::noncopyable.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/active_text.h8
-rw-r--r--src/lib/butler.h5
-rw-r--r--src/lib/dcp_content_type.h10
-rw-r--r--src/lib/dcp_video.h5
-rw-r--r--src/lib/dcpomatic_socket.h8
-rw-r--r--src/lib/film.h5
-rw-r--r--src/lib/filter.h11
-rw-r--r--src/lib/filter_graph.h5
-rw-r--r--src/lib/image_proxy.h6
-rw-r--r--src/lib/j2k_encoder.h5
-rw-r--r--src/lib/job.h5
-rw-r--r--src/lib/resampler.h9
-rw-r--r--src/lib/scoped_temporary.h8
-rw-r--r--src/lib/signal_manager.h1
-rw-r--r--src/lib/subtitle_analysis.h6
-rw-r--r--src/lib/video_ring_buffers.h8
-rw-r--r--src/lib/zipper.h6
17 files changed, 84 insertions, 27 deletions
diff --git a/src/lib/active_text.h b/src/lib/active_text.h
index f5211ae7f..b54957b3f 100644
--- a/src/lib/active_text.h
+++ b/src/lib/active_text.h
@@ -24,7 +24,6 @@
#include "dcpomatic_time.h"
#include "player_text.h"
-#include <boost/noncopyable.hpp>
#include <boost/thread/mutex.hpp>
#include <list>
#include <map>
@@ -34,9 +33,14 @@ class TextContent;
/** @class ActiveText
* @brief A class to maintain information on active subtitles for Player.
*/
-class ActiveText : public boost::noncopyable
+class ActiveText
{
public:
+ ActiveText () {}
+
+ ActiveText (ActiveText const&) = delete;
+ ActiveText& operator= (ActiveText const&) = delete;
+
std::list<PlayerText> get_burnt (dcpomatic::DCPTimePeriod period, bool always_burn_captions) const;
void clear_before (dcpomatic::DCPTime time);
void clear ();
diff --git a/src/lib/butler.h b/src/lib/butler.h
index 8c7f554cb..ac83cecec 100644
--- a/src/lib/butler.h
+++ b/src/lib/butler.h
@@ -32,7 +32,7 @@
class Player;
class PlayerVideo;
-class Butler : public ExceptionStore, public boost::noncopyable
+class Butler : public ExceptionStore
{
public:
Butler (
@@ -48,6 +48,9 @@ public:
~Butler ();
+ Butler (Butler const&) = delete;
+ Butler& operator= (Butler const&) = delete;
+
void seek (dcpomatic::DCPTime position, bool accurate);
class Error {
diff --git a/src/lib/dcp_content_type.h b/src/lib/dcp_content_type.h
index eea698217..f45bbb9f8 100644
--- a/src/lib/dcp_content_type.h
+++ b/src/lib/dcp_content_type.h
@@ -18,25 +18,32 @@
*/
+
#ifndef DCPOMATIC_DCP_CONTENT_TYPE_H
#define DCPOMATIC_DCP_CONTENT_TYPE_H
+
/** @file src/dcp_content_type.h
* @brief DCPContentType class.
*/
+
#include <dcp/dcp.h>
#include <string>
#include <vector>
+
/** @class DCPContentType
* @brief A description of the type of content for a DCP (e.g. feature, trailer etc.)
*/
-class DCPContentType : public boost::noncopyable
+class DCPContentType
{
public:
DCPContentType (std::string, dcp::ContentKind, std::string);
+ DCPContentType (DCPContentType const&) = delete;
+ DCPContentType& operator= (DCPContentType const&) = delete;
+
/** @return user-visible `pretty' name */
std::string pretty_name () const {
return _pretty_name;
@@ -66,4 +73,5 @@ private:
static std::vector<DCPContentType const *> _dcp_content_types;
};
+
#endif
diff --git a/src/lib/dcp_video.h b/src/lib/dcp_video.h
index 8efd680a2..0bb583c57 100644
--- a/src/lib/dcp_video.h
+++ b/src/lib/dcp_video.h
@@ -39,12 +39,15 @@ class PlayerVideo;
* Objects of this class are used for the queue that we keep
* of images that require encoding.
*/
-class DCPVideo : public boost::noncopyable
+class DCPVideo
{
public:
DCPVideo (std::shared_ptr<const PlayerVideo>, int index, int dcp_fps, int bandwidth, Resolution r);
DCPVideo (std::shared_ptr<const PlayerVideo>, cxml::ConstNodePtr);
+ DCPVideo (DCPVideo const&) = delete;
+ DCPVideo& operator= (DCPVideo const&) = delete;
+
dcp::ArrayData encode_locally ();
dcp::ArrayData encode_remotely (EncodeServerDescription, int timeout = 30);
diff --git a/src/lib/dcpomatic_socket.h b/src/lib/dcpomatic_socket.h
index 49a278588..f4520e5cf 100644
--- a/src/lib/dcpomatic_socket.h
+++ b/src/lib/dcpomatic_socket.h
@@ -20,7 +20,6 @@
#include "digester.h"
#include <boost/asio.hpp>
-#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
/** @class Socket
@@ -30,11 +29,14 @@
* This class wraps some things that I could not work out how to do easily with boost;
* most notably, sync read/write calls with timeouts.
*/
-class Socket : public boost::noncopyable
+class Socket
{
public:
explicit Socket (int timeout = 30);
+ Socket (Socket const&) = delete;
+ Socket& operator= (Socket const&) = delete;
+
/** @return Our underlying socket */
boost::asio::ip::tcp::socket& socket () {
return _socket;
@@ -79,8 +81,6 @@ private:
void start_write_digest ();
void finish_write_digest ();
- Socket (Socket const &);
-
boost::asio::io_service _io_service;
boost::asio::deadline_timer _deadline;
boost::asio::ip::tcp::socket _socket;
diff --git a/src/lib/film.h b/src/lib/film.h
index 00c3f71c5..bb868ffad 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -93,12 +93,15 @@ private:
*
* The content of a Film is held in a Playlist (created and managed by the Film).
*/
-class Film : public std::enable_shared_from_this<Film>, public Signaller, public boost::noncopyable
+class Film : public std::enable_shared_from_this<Film>, public Signaller
{
public:
explicit Film (boost::optional<boost::filesystem::path> dir);
~Film ();
+ Film (Film const&) = delete;
+ Film& operator= (Film const&) = delete;
+
std::shared_ptr<InfoFileHandle> info_file_handle (dcpomatic::DCPTimePeriod period, bool read) const;
boost::filesystem::path j2c_path (int, Frame, Eyes, bool) const;
boost::filesystem::path internal_video_asset_dir () const;
diff --git a/src/lib/filter.h b/src/lib/filter.h
index 455b271a2..5fbfd9c23 100644
--- a/src/lib/filter.h
+++ b/src/lib/filter.h
@@ -18,17 +18,20 @@
*/
+
/** @file src/filter.h
* @brief A class to describe one of FFmpeg's video or audio filters.
*/
+
#ifndef DCPOMATIC_FILTER_H
#define DCPOMATIC_FILTER_H
-#include <boost/utility.hpp>
+
#include <string>
#include <vector>
+
/** @class Filter
* @brief A class to describe one of FFmpeg's video or audio filters.
*
@@ -36,11 +39,14 @@
* 8bpp. FFmpeg quantizes e.g. yuv422p10le down to yuv422p before running such filters, which
* we don't really want to do.
*/
-class Filter : public boost::noncopyable
+class Filter
{
public:
Filter (std::string i, std::string n, std::string c, std::string f);
+ Filter (Filter const&) = delete;
+ Filter& operator= (Filter const&) = delete;
+
/** @return our id */
std::string id () const {
return _id;
@@ -80,4 +86,5 @@ private:
static void maybe_add (std::string, std::string, std::string, std::string);
};
+
#endif
diff --git a/src/lib/filter_graph.h b/src/lib/filter_graph.h
index 10298cb74..2b54d7829 100644
--- a/src/lib/filter_graph.h
+++ b/src/lib/filter_graph.h
@@ -38,12 +38,15 @@ class Filter;
/** @class FilterGraph
* @brief A graph of FFmpeg filters.
*/
-class FilterGraph : public boost::noncopyable
+class FilterGraph
{
public:
FilterGraph ();
virtual ~FilterGraph ();
+ FilterGraph (FilterGraph const&) = delete;
+ FilterGraph& operator== (FilterGraph const&) = delete;
+
void setup (std::vector<Filter const *>);
AVFilterContext* get (std::string name);
diff --git a/src/lib/image_proxy.h b/src/lib/image_proxy.h
index b279e6344..22946ed98 100644
--- a/src/lib/image_proxy.h
+++ b/src/lib/image_proxy.h
@@ -54,11 +54,15 @@ namespace cxml {
* the TIFF data compressed until the decompressed image is needed.
* At this point, the class decodes the TIFF to an Image.
*/
-class ImageProxy : public boost::noncopyable
+class ImageProxy
{
public:
+ ImageProxy () {}
virtual ~ImageProxy () {}
+ ImageProxy (ImageProxy const&) = delete;
+ ImageProxy& operator= (ImageProxy const&) = delete;
+
struct Result {
Result (std::shared_ptr<Image> image_, int log2_scaling_)
: image (image_)
diff --git a/src/lib/j2k_encoder.h b/src/lib/j2k_encoder.h
index 06b4d429c..cea965309 100644
--- a/src/lib/j2k_encoder.h
+++ b/src/lib/j2k_encoder.h
@@ -55,12 +55,15 @@ class PlayerVideo;
* This class keeps a queue of frames to be encoded and distributes
* the work around threads and encoding servers.
*/
-class J2KEncoder : public boost::noncopyable, public ExceptionStore, public std::enable_shared_from_this<J2KEncoder>
+class J2KEncoder : public ExceptionStore, public std::enable_shared_from_this<J2KEncoder>
{
public:
J2KEncoder (std::shared_ptr<const Film> film, std::shared_ptr<Writer> writer);
~J2KEncoder ();
+ J2KEncoder (J2KEncoder const&) = delete;
+ J2KEncoder& operator= (J2KEncoder const&) = delete;
+
/** Called to indicate that a processing run is about to begin */
void begin ();
diff --git a/src/lib/job.h b/src/lib/job.h
index d047913a0..6d8435c60 100644
--- a/src/lib/job.h
+++ b/src/lib/job.h
@@ -36,12 +36,15 @@ class Film;
/** @class Job
* @brief A parent class to represent long-running tasks which are run in their own thread.
*/
-class Job : public std::enable_shared_from_this<Job>, public Signaller, public boost::noncopyable
+class Job : public std::enable_shared_from_this<Job>, public Signaller
{
public:
explicit Job (std::shared_ptr<const Film> film);
virtual ~Job ();
+ Job (Job const&) = delete;
+ Job& operator= (Job const&) = delete;
+
/** @return user-readable name of this job */
virtual std::string name () const = 0;
virtual std::string json_name () const = 0;
diff --git a/src/lib/resampler.h b/src/lib/resampler.h
index 1f8200c69..5a3a7fa40 100644
--- a/src/lib/resampler.h
+++ b/src/lib/resampler.h
@@ -18,18 +18,23 @@
*/
+
#include "types.h"
#include <samplerate.h>
-#include <boost/utility.hpp>
+
class AudioBuffers;
-class Resampler : public boost::noncopyable
+
+class Resampler
{
public:
Resampler (int, int, int);
~Resampler ();
+ Resampler (Resampler const&) = delete;
+ Resampler& operator= (Resampler const&) = delete;
+
std::shared_ptr<const AudioBuffers> run (std::shared_ptr<const AudioBuffers>);
std::shared_ptr<const AudioBuffers> flush ();
void reset ();
diff --git a/src/lib/scoped_temporary.h b/src/lib/scoped_temporary.h
index 986f565a0..8f7416093 100644
--- a/src/lib/scoped_temporary.h
+++ b/src/lib/scoped_temporary.h
@@ -18,19 +18,23 @@
*/
+
#include <boost/filesystem.hpp>
-#include <boost/noncopyable.hpp>
#include <cstdio>
+
/** @class ScopedTemporary
* @brief A temporary file which is deleted when the ScopedTemporary object goes out of scope.
*/
-class ScopedTemporary : public boost::noncopyable
+class ScopedTemporary
{
public:
ScopedTemporary ();
~ScopedTemporary ();
+ ScopedTemporary (ScopedTemporary const&) = delete;
+ ScopedTemporary& operator= (ScopedTemporary const&) = delete;
+
/** @return temporary filename */
boost::filesystem::path file () const {
return _file;
diff --git a/src/lib/signal_manager.h b/src/lib/signal_manager.h
index 78e936ea2..99e3b5c52 100644
--- a/src/lib/signal_manager.h
+++ b/src/lib/signal_manager.h
@@ -26,7 +26,6 @@
#include "exception_store.h"
#include <boost/asio.hpp>
#include <boost/thread.hpp>
-#include <boost/noncopyable.hpp>
class Signaller;
diff --git a/src/lib/subtitle_analysis.h b/src/lib/subtitle_analysis.h
index 0a9dc6dca..04dcc9501 100644
--- a/src/lib/subtitle_analysis.h
+++ b/src/lib/subtitle_analysis.h
@@ -20,14 +20,13 @@
#include "rect.h"
-#include <boost/noncopyable.hpp>
#include <boost/filesystem.hpp>
/** @class SubtitleAnalysis
* @brief Class to store the results of a SubtitleAnalysisJob.
*/
-class SubtitleAnalysis : public boost::noncopyable
+class SubtitleAnalysis
{
public:
explicit SubtitleAnalysis (boost::filesystem::path path);
@@ -42,6 +41,9 @@ public:
, _analysis_y_offset (analysis_y_offset_)
{}
+ SubtitleAnalysis (SubtitleAnalysis const&) = delete;
+ SubtitleAnalysis& operator= (SubtitleAnalysis const&) = delete;
+
void write (boost::filesystem::path path) const;
boost::optional<dcpomatic::Rect<double>> bounding_box () const {
diff --git a/src/lib/video_ring_buffers.h b/src/lib/video_ring_buffers.h
index 444a49ea7..47fda01f7 100644
--- a/src/lib/video_ring_buffers.h
+++ b/src/lib/video_ring_buffers.h
@@ -22,7 +22,6 @@
#include "dcpomatic_time.h"
#include "player_video.h"
#include "types.h"
-#include <boost/noncopyable.hpp>
#include <boost/thread/mutex.hpp>
#include <utility>
@@ -31,9 +30,14 @@ class Film;
class PlayerVideo;
-class VideoRingBuffers : public boost::noncopyable
+class VideoRingBuffers
{
public:
+ VideoRingBuffers () {}
+
+ VideoRingBuffers (VideoRingBuffers const&) = delete;
+ VideoRingBuffers& operator= (VideoRingBuffers const&) = delete;
+
void put (std::shared_ptr<PlayerVideo> frame, dcpomatic::DCPTime time);
std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get ();
diff --git a/src/lib/zipper.h b/src/lib/zipper.h
index 62a6af5b9..9f3e867c7 100644
--- a/src/lib/zipper.h
+++ b/src/lib/zipper.h
@@ -19,17 +19,19 @@
*/
-#include <boost/noncopyable.hpp>
#include <boost/filesystem.hpp>
#include <vector>
-class Zipper : public boost::noncopyable
+class Zipper
{
public:
Zipper (boost::filesystem::path file);
~Zipper ();
+ Zipper (Zipper const&) = delete;
+ Zipper& operator= (Zipper const&) = delete;
+
void add (std::string name, std::string content);
void close ();