Move raw_convert into libdcp.
[dcpomatic.git] / src / lib / ffmpeg_content.cc
index 7416630c13799a47dd5ebeba7a90d4d9ad95c78d..d64c829711ee98729cdb6811a4a266f0b2545c82 100644 (file)
@@ -32,9 +32,8 @@
 #include "log.h"
 #include "exceptions.h"
 #include "frame_rate_change.h"
-#include "safe_stringstream.h"
-#include "raw_convert.h"
 #include "subtitle_content.h"
+#include <dcp/raw_convert.h>
 #include <libcxml/cxml.h>
 extern "C" {
 #include <libavformat/avformat.h>
@@ -58,6 +57,7 @@ using std::max;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 using boost::optional;
+using dcp::raw_convert;
 
 int const FFmpegContentProperty::SUBTITLE_STREAMS = 100;
 int const FFmpegContentProperty::SUBTITLE_STREAM = 101;
@@ -388,29 +388,27 @@ FFmpegContent::set_filters (vector<Filter const *> const & filters)
 string
 FFmpegContent::identifier () const
 {
-       SafeStringStream s;
-
-       s << Content::identifier();
+       string s = Content::identifier();
 
        if (video) {
-               s << "_" << video->identifier();
+               s += "_" + video->identifier();
        }
 
        if (subtitle) {
-               s << "_" << subtitle->identifier();
+               s += "_" + subtitle->identifier();
        }
 
        boost::mutex::scoped_lock lm (_mutex);
 
        if (_subtitle_stream) {
-               s << "_" << _subtitle_stream->identifier ();
+               s += "_" + _subtitle_stream->identifier ();
        }
 
        for (vector<Filter const *>::const_iterator i = _filters.begin(); i != _filters.end(); ++i) {
-               s << "_" << (*i)->id ();
+               s += "_" + (*i)->id ();
        }
 
-       return s.str ();
+       return s;
 }
 
 list<ContentTimePeriod>
@@ -543,10 +541,11 @@ FFmpegContent::add_properties (list<UserProperty>& p) const
                        _("BT2020 for a 10-bit system"),
                        _("BT2020 for a 12-bit system"),
                        _("SMPTE ST 2084 for 10, 12, 14 and 16 bit systems"),
-                       _("SMPTE ST 428-1")
+                       _("SMPTE ST 428-1"),
+                       _("ARIB STD-B67 ('Hybrid log-gamma')")
                };
 
-               DCPOMATIC_ASSERT (AVCOL_TRC_NB <= 18);
+               DCPOMATIC_ASSERT (AVCOL_TRC_NB <= 19);
                p.push_back (UserProperty (UserProperty::VIDEO, _("Colour transfer characteristic"), transfers[_color_trc]));
 
                char const * spaces[] = {