Add our own raw_convert that uses SafeStringStream.
authorCarl Hetherington <cth@carlh.net>
Thu, 16 Apr 2015 22:10:28 +0000 (23:10 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 16 Apr 2015 22:10:28 +0000 (23:10 +0100)
34 files changed:
ChangeLog
src/lib/audio_content.cc
src/lib/audio_mapping.cc
src/lib/colour_conversion.cc
src/lib/config.cc
src/lib/content.cc
src/lib/dcp_subtitle_content.cc
src/lib/dcp_video.cc
src/lib/ffmpeg.cc
src/lib/ffmpeg_audio_stream.cc
src/lib/ffmpeg_content.cc
src/lib/ffmpeg_stream.cc
src/lib/film.cc
src/lib/image_filename_sorter.cc
src/lib/image_proxy.cc
src/lib/isdcf_metadata.cc
src/lib/j2k_image_proxy.cc
src/lib/player_video.cc
src/lib/raw_convert.h [new file with mode: 0644]
src/lib/raw_image_proxy.cc
src/lib/server.cc
src/lib/server_finder.cc
src/lib/single_stream_audio_content.cc
src/lib/sndfile_content.cc
src/lib/subrip_content.cc
src/lib/subtitle_content.cc
src/lib/types.cc
src/lib/update.cc
src/lib/util.cc
src/lib/video_content.cc
src/wx/audio_mapping_view.cc
src/wx/colour_conversion_editor.cc
src/wx/image_sequence_dialog.cc
src/wx/timing_panel.cc

index cc41dab424df21fc3d882e453acb9c2771428d57..1d659518d6f4238dc598a7b4e2759bc7546f6f51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-16  Carl Hetherington  <cth@carlh.net>
+
+       * Fix potential OS X crashes due to another incarnation
+       of the bizarre multi-thread stringstream bug.
+
 2015-04-15  c.hetherington  <cth@carlh.net>
 
        * Hand-apply 94998e12d117f3f1781dfb1318939debfbf34546 from master;
index 9909e3a08564552da416db3cfc9d6b60ebae9d1d..53160fdb0949b786cb99c2fdf8078cf8dd802839 100644 (file)
@@ -25,8 +25,8 @@
 #include "config.h"
 #include "frame_rate_change.h"
 #include "audio_processor.h"
+#include "raw_convert.h"
 #include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 
 #include "i18n.h"
 
@@ -38,7 +38,6 @@ using std::fixed;
 using std::setprecision;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
-using dcp::raw_convert;
 
 int const AudioContentProperty::AUDIO_CHANNELS = 200;
 int const AudioContentProperty::AUDIO_LENGTH = 201;
index 35e4c036cf6f8b6e72cf88a4b46ff34054a9628c..4e5a8afa20e6b890046e4f489be31545f0171a5b 100644 (file)
@@ -20,8 +20,8 @@
 #include "audio_mapping.h"
 #include "util.h"
 #include "md5_digester.h"
+#include "raw_convert.h"
 #include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include <libxml++/libxml++.h>
 
 using std::list;
@@ -33,7 +33,6 @@ using std::min;
 using std::vector;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
-using dcp::raw_convert;
 
 AudioMapping::AudioMapping ()
        : _content_channels (0)
index eea6f77cf8de904c25922746218c0b6384a29c03..4bf84281ddbf47dedd626e9cdfb589800a020c21 100644 (file)
@@ -21,8 +21,8 @@
 #include "colour_conversion.h"
 #include "util.h"
 #include "md5_digester.h"
+#include "raw_convert.h"
 #include <dcp/colour_matrix.h>
-#include <dcp/raw_convert.h>
 #include <dcp/gamma_transfer_function.h>
 #include <dcp/modified_gamma_transfer_function.h>
 #include <libcxml/cxml.h>
@@ -37,7 +37,6 @@ using std::vector;
 using boost::shared_ptr;
 using boost::optional;
 using boost::dynamic_pointer_cast;
-using dcp::raw_convert;
 
 ColourConversion::ColourConversion ()
        : dcp::ColourConversion (dcp::ColourConversion::srgb_to_xyz ())
index cc0edd4a5418a0d3d9be9b0f016e78cf573de009..c75eaa0f5dce59b23d2c535a97a56d9d1fc2a9e9 100644 (file)
@@ -27,8 +27,8 @@
 #include "cinema.h"
 #include "util.h"
 #include "cross.h"
+#include "raw_convert.h"
 #include <dcp/colour_matrix.h>
-#include <dcp/raw_convert.h>
 #include <dcp/signer.h>
 #include <dcp/certificate_chain.h>
 #include <libcxml/cxml.h>
@@ -52,7 +52,6 @@ using std::cerr;
 using boost::shared_ptr;
 using boost::optional;
 using boost::algorithm::trim;
-using dcp::raw_convert;
 
 Config* Config::_instance = 0;
 
index 550a8cd0577333d88844ea014d2f41b60299c7f7..fcc658717900eb8e4468883815332e5d3f40c72e 100644 (file)
@@ -29,8 +29,8 @@
 #include "film.h"
 #include "safe_stringstream.h"
 #include "job.h"
+#include "raw_convert.h"
 #include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include <libxml++/libxml++.h>
 #include <boost/thread/mutex.hpp>
 
@@ -42,7 +42,6 @@ using std::cout;
 using std::vector;
 using std::max;
 using boost::shared_ptr;
-using dcp::raw_convert;
 
 int const ContentProperty::PATH = 400;
 int const ContentProperty::POSITION = 401;
@@ -145,7 +144,7 @@ Content::examine (shared_ptr<Job> job)
           digest here: a MD5 of the first and last 1e6 bytes with the
           size of the first file tacked on the end as a string.
        */
-       string const d = md5_digest_head_tail (p, 1000000) + dcp::raw_convert<string> (boost::filesystem::file_size (p.front ()));
+       string const d = md5_digest_head_tail (p, 1000000) + raw_convert<string> (boost::filesystem::file_size (p.front ()));
 
        lm.lock ();
        _digest = d;
index 9f2ff61c5aea829be5d5331f2dd9b4126e9493a9..f3198c58d2b918adfd1c5f8d0282395579a6d5d7 100644 (file)
 
 #include "font.h"
 #include "dcp_subtitle_content.h"
+#include "raw_convert.h"
 #include <dcp/interop_subtitle_content.h>
 #include <dcp/smpte_subtitle_content.h>
 #include <dcp/interop_load_font.h>
-#include <dcp/raw_convert.h>
 
 #include "i18n.h"
 
 using std::string;
 using std::list;
 using boost::shared_ptr;
-using dcp::raw_convert;
 
 DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, boost::filesystem::path path)
        : Content (film, path)
index a2668c4a767f60586b9c79bfbc4fd3da4bd1f625..f2d765f7d68ef61e3a53c0d09f4fa539e0e980b1 100644 (file)
 #include "log.h"
 #include "cross.h"
 #include "player_video.h"
+#include "raw_convert.h"
 #include "encoded_data.h"
 #include <libcxml/cxml.h>
 #include <dcp/xyz_image.h>
 #include <dcp/rgb_xyz.h>
 #include <dcp/colour_matrix.h>
-#include <dcp/raw_convert.h>
 #include <boost/array.hpp>
 #include <boost/asio.hpp>
 #include <boost/filesystem.hpp>
@@ -67,7 +67,6 @@ using std::cout;
 using boost::shared_ptr;
 using boost::lexical_cast;
 using dcp::Size;
-using dcp::raw_convert;
 
 #define DCI_COEFFICENT (48.0 / 52.37)
 
index c39ad8aabc4365131621e071d7aadace04e20764..08349fba40c0008f01c96461221249c8af07d7d3 100644 (file)
@@ -22,20 +22,19 @@ extern "C" {
 #include <libavformat/avformat.h>
 #include <libswscale/swscale.h>
 }
-#include <dcp/raw_convert.h>
 #include "ffmpeg.h"
 #include "ffmpeg_content.h"
 #include "ffmpeg_audio_stream.h"
 #include "ffmpeg_subtitle_stream.h"
 #include "exceptions.h"
 #include "util.h"
+#include "raw_convert.h"
 
 #include "i18n.h"
 
 using std::string;
 using std::cout;
 using boost::shared_ptr;
-using dcp::raw_convert;
 
 boost::mutex FFmpeg::_mutex;
 
index d8666e89e44416e611e693a273b2ce9884c2b296..6300958e094ec75d8ece6e4025f83ae274cd651d 100644 (file)
 
 */
 
+#include "ffmpeg_audio_stream.h"
+#include "raw_convert.h"
 #include <libxml++/libxml++.h>
 #include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
-#include "ffmpeg_audio_stream.h"
 
 using std::string;
-using dcp::raw_convert;
 
 FFmpegAudioStream::FFmpegAudioStream (cxml::ConstNodePtr node, int version)
        : FFmpegStream (node)
index 9e9473935d82810f88ca4a8bf445230504780629..3a42b169fd3000a3cce43fcd76b73f27177b4cb5 100644 (file)
 
 */
 
-extern "C" {
-#include <libavformat/avformat.h>
-}
-#include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include "ffmpeg_content.h"
 #include "ffmpeg_examiner.h"
 #include "ffmpeg_subtitle_stream.h"
@@ -35,6 +30,11 @@ extern "C" {
 #include "exceptions.h"
 #include "frame_rate_change.h"
 #include "safe_stringstream.h"
+#include "raw_convert.h"
+#include <libcxml/cxml.h>
+extern "C" {
+#include <libavformat/avformat.h>
+}
 
 #include "i18n.h"
 
@@ -47,7 +47,6 @@ using std::cout;
 using std::pair;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
-using dcp::raw_convert;
 
 int const FFmpegContentProperty::SUBTITLE_STREAMS = 100;
 int const FFmpegContentProperty::SUBTITLE_STREAM = 101;
index f28a2f14e7e7f78ccabe5815a43e539757c639f8..dfd6f718c60007a3e8e60e84f75d3833450dfe54 100644 (file)
 
 #include "ffmpeg_stream.h"
 #include "dcpomatic_assert.h"
-#include <dcp/raw_convert.h>
+#include "raw_convert.h"
 #include <libxml++/libxml++.h>
 extern "C" {
 #include <libavformat/avformat.h>
 }
 
 using std::string;
-using dcp::raw_convert;
 
 FFmpegStream::FFmpegStream (cxml::ConstNodePtr node)
        : name (node->string_child ("Name"))
index 297193f83e8ecd1669abadf668a3bd25da9396a0..a7be8aea7857265fb0b6b7aff82c9d8726075569 100644 (file)
 #include "cinema.h"
 #include "safe_stringstream.h"
 #include "environment_info.h"
+#include "raw_convert.h"
 #include <libcxml/cxml.h>
 #include <dcp/cpl.h>
 #include <dcp/signer.h>
 #include <dcp/util.h>
 #include <dcp/local_time.h>
-#include <dcp/raw_convert.h>
 #include <dcp/decrypted_kdm.h>
 #include <libxml++/libxml++.h>
 #include <boost/filesystem.hpp>
@@ -86,8 +86,6 @@ using boost::optional;
 using boost::is_any_of;
 using dcp::Size;
 using dcp::Signer;
-using dcp::raw_convert;
-using dcp::raw_convert;
 
 #define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), Log::TYPE_GENERAL);
 #define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, Log::TYPE_GENERAL);
index 7bb1b4c376bb24762a860b3990fb4b5acebc1087..805c469b03f14642218190511bada56aa4bc6500 100644 (file)
 
 */
 
-#include <iostream>
+#include "raw_convert.h"
 #include <boost/filesystem.hpp>
 #include <boost/optional.hpp>
-#include <dcp/raw_convert.h>
+#include <iostream>
 
 class ImageFilenameSorter
 {
@@ -57,6 +57,6 @@ private:
                        return boost::optional<int> ();
                }
 
-               return dcp::raw_convert<int> (number);
+               return raw_convert<int> (number);
        }
 };
index f72a6c3e4b2cfae109eca26f30f0193241cc833d..c803e6bd06601e8cf7ab6b808a86acc3c27b88d2 100644 (file)
@@ -25,7 +25,6 @@
 #include "exceptions.h"
 #include "cross.h"
 #include <dcp/util.h>
-#include <dcp/raw_convert.h>
 #include <libcxml/cxml.h>
 
 #include "i18n.h"
index e9d2e313ebdbb326730b46fb7e016abc8c3375a0..a9d7d939e13f75eea807f32a8023581617220650 100644 (file)
 
 */
 
-#include <iostream>
-#include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include "isdcf_metadata.h"
+#include "raw_convert.h"
+#include <libcxml/cxml.h>
+#include <iostream>
 
 #include "i18n.h"
 
 using std::string;
 using boost::shared_ptr;
-using dcp::raw_convert;
 
 ISDCFMetadata::ISDCFMetadata (cxml::ConstNodePtr node)
        : content_version (node->number_child<int> ("ContentVersion"))
index 99e4dddab52dd6bbd59d3a10fca166e49d4f1cf7..16b88616946df8811b419aa94b88e42d22e1ebab 100644 (file)
@@ -21,7 +21,7 @@
 #include "dcpomatic_socket.h"
 #include "image.h"
 #include "encoded_data.h"
-#include <dcp/raw_convert.h>
+#include "raw_convert.h"
 #include <dcp/mono_picture_frame.h>
 #include <dcp/stereo_picture_frame.h>
 #include <dcp/colour_conversion.h>
@@ -94,14 +94,14 @@ void
 J2KImageProxy::add_metadata (xmlpp::Node* node) const
 {
        node->add_child("Type")->add_child_text (N_("J2K"));
-       node->add_child("Width")->add_child_text (dcp::raw_convert<string> (_size.width));
-       node->add_child("Height")->add_child_text (dcp::raw_convert<string> (_size.height));
+       node->add_child("Width")->add_child_text (raw_convert<string> (_size.width));
+       node->add_child("Height")->add_child_text (raw_convert<string> (_size.height));
        if (_stereo) {
-               node->add_child("Eye")->add_child_text (dcp::raw_convert<string> (_eye.get ()));
-               node->add_child("LeftSize")->add_child_text (dcp::raw_convert<string> (_stereo->left_j2k_size ()));
-               node->add_child("RightSize")->add_child_text (dcp::raw_convert<string> (_stereo->right_j2k_size ()));
+               node->add_child("Eye")->add_child_text (raw_convert<string> (_eye.get ()));
+               node->add_child("LeftSize")->add_child_text (raw_convert<string> (_stereo->left_j2k_size ()));
+               node->add_child("RightSize")->add_child_text (raw_convert<string> (_stereo->right_j2k_size ()));
        } else {
-               node->add_child("Size")->add_child_text (dcp::raw_convert<string> (_mono->j2k_size ()));
+               node->add_child("Size")->add_child_text (raw_convert<string> (_mono->j2k_size ()));
        }
 }
 
index f9f06f63aee7fb48743ad3fa457faca0f4ac9baa..aad75889fc6a4a4e9f0dedf339f4db88d9dfc012 100644 (file)
 
 */
 
-#include <dcp/raw_convert.h>
 #include "player_video.h"
 #include "image.h"
 #include "image_proxy.h"
 #include "j2k_image_proxy.h"
 #include "film.h"
+#include "raw_convert.h"
 
 using std::string;
 using std::cout;
-using dcp::raw_convert;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 using boost::optional;
diff --git a/src/lib/raw_convert.h b/src/lib/raw_convert.h
new file mode 100644 (file)
index 0000000..2e5d137
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+    Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <iomanip>
+#include "safe_stringstream.h"
+
+/** A sort-of version of boost::lexical_cast that does uses the "C"
+ *  locale (i.e. no thousands separators and a . for the decimal separator).
+ */
+template <typename P, typename Q>
+P
+raw_convert (Q v, int precision = 16)
+{
+       SafeStringStream s;
+       s.imbue (std::locale::classic ());
+       s << std::setprecision (precision);
+       s << v;
+       P r;
+       s >> r;
+       return r;
+}
index 8f05f54558301e45f895a338b5e74738e48e006e..e73a1543d34faabe40467f284065e00784bb09ca 100644 (file)
 
 */
 
+#include "raw_image_proxy.h"
+#include "image.h"
+#include "raw_convert.h"
+#include <dcp/util.h>
 extern "C" {
 #include <libavutil/pixfmt.h>
 }
 #include <libcxml/cxml.h>
-#include <dcp/util.h>
-#include <dcp/raw_convert.h>
-#include "raw_image_proxy.h"
-#include "image.h"
 
 #include "i18n.h"
 
@@ -58,9 +58,9 @@ void
 RawImageProxy::add_metadata (xmlpp::Node* node) const
 {
        node->add_child("Type")->add_child_text (N_("Raw"));
-       node->add_child("Width")->add_child_text (dcp::raw_convert<string> (_image->size().width));
-       node->add_child("Height")->add_child_text (dcp::raw_convert<string> (_image->size().height));
-       node->add_child("PixelFormat")->add_child_text (dcp::raw_convert<string> (_image->pixel_format ()));
+       node->add_child("Width")->add_child_text (raw_convert<string> (_image->size().width));
+       node->add_child("Height")->add_child_text (raw_convert<string> (_image->size().height));
+       node->add_child("PixelFormat")->add_child_text (raw_convert<string> (_image->pixel_format ()));
 }
 
 void
index ba8580732832a919b16b596b098f7bfc83d254fb..9b3b3808b3886eabd44f36d5db9176039bdb1763 100644 (file)
@@ -31,7 +31,7 @@
 #include "player_video.h"
 #include "encoded_data.h"
 #include "safe_stringstream.h"
-#include <dcp/raw_convert.h>
+#include "raw_convert.h"
 #include <libcxml/cxml.h>
 #include <boost/algorithm/string.hpp>
 #include <boost/scoped_array.hpp>
@@ -62,7 +62,6 @@ using boost::bind;
 using boost::scoped_array;
 using boost::optional;
 using dcp::Size;
-using dcp::raw_convert;
 
 Server::Server (shared_ptr<Log> log, bool verbose)
        : _terminate (false)
index d62531d9f7b634e6534033bb4bd426273ee32d4e..979046dabdd701829e176c86ddcc675eb860d9a9 100644 (file)
@@ -24,8 +24,8 @@
 #include "cross.h"
 #include "ui_signaller.h"
 #include "dcpomatic_socket.h"
+#include "raw_convert.h"
 #include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include <boost/lambda/lambda.hpp>
 
 #include "i18n.h"
@@ -37,7 +37,6 @@ using std::cout;
 using boost::shared_ptr;
 using boost::scoped_array;
 using boost::weak_ptr;
-using dcp::raw_convert;
 
 ServerFinder* ServerFinder::_instance = 0;
 
index 52159760645ce12a5b27fcea2c650a78ef21e29b..4547ae6001da608176286475bc401f7b3e84f1c9 100644 (file)
 
 */
 
-#include <dcp/raw_convert.h>
 #include "single_stream_audio_content.h"
 #include "audio_examiner.h"
 #include "film.h"
+#include "raw_convert.h"
 
 using std::string;
 using std::cout;
 using boost::shared_ptr;
-using dcp::raw_convert;
 
 SingleStreamAudioContent::SingleStreamAudioContent (shared_ptr<const Film> f)
        : Content (f)
index e757c77c5469704e48c386b81199b5532bfc91b2..9f9ea351e2a94e0f93a35d99c5075bf22c171b01 100644 (file)
@@ -18,7 +18,6 @@
 */
 
 #include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include "sndfile_content.h"
 #include "sndfile_decoder.h"
 #include "film.h"
@@ -32,7 +31,6 @@
 using std::string;
 using std::cout;
 using boost::shared_ptr;
-using dcp::raw_convert;
 
 SndfileContent::SndfileContent (shared_ptr<const Film> f, boost::filesystem::path p)
        : Content (f, p)
index fc0637bfd89d523140c60ea7ca58f8b0bee9d150..f9d184b9d965f6c6a725ec523c44da813946105b 100644 (file)
 #include "subrip.h"
 #include "film.h"
 #include "font.h"
-#include <dcp/raw_convert.h>
+#include "raw_convert.h"
 
 #include "i18n.h"
 
 using std::string;
 using std::cout;
-using dcp::raw_convert;
 using boost::shared_ptr;
 using boost::lexical_cast;
 
index 2bed5413c61d2b8797cae544a3a995440a5ef4c1..f42f3db370049ec394932e9310d3d75c485d40be 100644 (file)
 
 */
 
-#include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include "subtitle_content.h"
 #include "util.h"
 #include "exceptions.h"
 #include "safe_stringstream.h"
 #include "font.h"
+#include "raw_convert.h"
+#include <libcxml/cxml.h>
 
 #include "i18n.h"
 
@@ -33,7 +33,6 @@ using std::cout;
 using std::list;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
-using dcp::raw_convert;
 
 int const SubtitleContentProperty::SUBTITLE_X_OFFSET = 500;
 int const SubtitleContentProperty::SUBTITLE_Y_OFFSET = 501;
index 54a8cb49202c97c93f85d5d8570cd5722eceecb2..6ab4d56f2e09776743d56354838a231c71eedfad 100644 (file)
 
 */
 
+#include "types.h"
+#include "raw_convert.h"
 #include <libxml++/libxml++.h>
 #include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
-#include "types.h"
 
 using std::max;
 using std::min;
 using std::string;
 using boost::shared_ptr;
-using dcp::raw_convert;
 
 bool operator== (Crop const & a, Crop const & b)
 {
index b41d8bb66d1dfb7e47b74a5bbc7a15eb988614ce..a05df8ef304dae26ee0d4b509113b3d8502198c0 100644 (file)
 
 */
 
-#include <string>
-#include <boost/algorithm/string.hpp>
-#include <curl/curl.h>
-#include <libcxml/cxml.h>
-#include <dcp/raw_convert.h>
 #include "update.h"
 #include "version.h"
 #include "ui_signaller.h"
 #include "safe_stringstream.h"
 #include "config.h"
 #include "util.h"
+#include "raw_convert.h"
+#include <libcxml/cxml.h>
+#include <curl/curl.h>
+#include <boost/algorithm/string.hpp>
+#include <string>
 
 #define BUFFER_SIZE 1024
 
@@ -35,7 +35,6 @@ using std::cout;
 using std::min;
 using std::string;
 using std::vector;
-using dcp::raw_convert;
 using boost::is_any_of;
 using boost::ends_with;
 
index 6ebdc85d41777971492697a254393883e159ca4e..ab991e76b19e58b28bd06373a2ae61673f73e8fa 100644 (file)
@@ -37,7 +37,6 @@
 #include "safe_stringstream.h"
 #include <dcp/util.h>
 #include <dcp/signer.h>
-#include <dcp/raw_convert.h>
 #include <glib.h>
 #include <pangomm/init.h>
 #include <boost/algorithm/string.hpp>
@@ -81,7 +80,6 @@ using boost::shared_ptr;
 using boost::thread;
 using boost::optional;
 using dcp::Size;
-using dcp::raw_convert;
 
 /** Path to our executable, required by the stacktrace stuff and filled
  *  in during App::onInit().
index 64c51be99f7bd65de0f2560700c0cf9ba58e91bf..bfbcef9bf9cea42a170244239d40827208521a43 100644 (file)
@@ -29,9 +29,9 @@
 #include "frame_rate_change.h"
 #include "log.h"
 #include "safe_stringstream.h"
+#include "raw_convert.h"
 #include <libcxml/cxml.h>
 #include <dcp/colour_matrix.h>
-#include <dcp/raw_convert.h>
 #include <iomanip>
 
 #include "i18n.h"
@@ -59,7 +59,6 @@ using std::setprecision;
 using boost::shared_ptr;
 using boost::optional;
 using boost::dynamic_pointer_cast;
-using dcp::raw_convert;
 
 VideoContent::VideoContent (shared_ptr<const Film> f)
        : Content (f)
index 8e92400bdb956ffd7b58205dccf5626bf9015be7..c61ce7f06fdb6e1c003c80b002adb4f79eedc0d8 100644 (file)
  *  @brief AudioMappingView class and helpers.
  */
 
-#include <wx/wx.h>
-#include <wx/renderer.h>
-#include <wx/grid.h>
-#include <dcp/types.h>
-#include <dcp/raw_convert.h>
 #include "lib/audio_mapping.h"
 #include "lib/util.h"
+#include "lib/raw_convert.h"
 #include "audio_mapping_view.h"
 #include "wx_util.h"
 #include "audio_gain_dialog.h"
+#include <dcp/types.h>
+#include <wx/wx.h>
+#include <wx/renderer.h>
+#include <wx/grid.h>
 #include <boost/lexical_cast.hpp>
 
 using std::cout;
@@ -247,7 +247,7 @@ AudioMappingView::update_cells ()
                _grid->SetCellValue (i, 0, wxString::Format (wxT("%d"), i + 1));
 
                for (int j = 1; j < _grid->GetNumberCols(); ++j) {
-                       _grid->SetCellValue (i, j, std_to_wx (dcp::raw_convert<string> (_map.get (i, static_cast<dcp::Channel> (j - 1)))));
+                       _grid->SetCellValue (i, j, std_to_wx (raw_convert<string> (_map.get (i, static_cast<dcp::Channel> (j - 1)))));
                }
        }
 
index 4658716c6bb091bb500ce1bbf368db965a39fb9c..3ea144e1de5acd784d5d56ba3283e5abe1214e01 100644 (file)
 
 #include "lib/colour_conversion.h"
 #include "lib/safe_stringstream.h"
+#include "lib/raw_convert.h"
 #include "wx_util.h"
 #include "colour_conversion_editor.h"
 #include <dcp/gamma_transfer_function.h>
 #include <dcp/modified_gamma_transfer_function.h>
-#include <dcp/raw_convert.h>
 #include <wx/spinctrl.h>
 #include <wx/gbsizer.h>
 #include <boost/lexical_cast.hpp>
@@ -33,7 +33,6 @@ using std::cout;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 using boost::lexical_cast;
-using dcp::raw_convert;
 
 ColourConversionEditor::ColourConversionEditor (wxWindow* parent)
        : wxPanel (parent, wxID_ANY)
index 02602267c6eb9cebad968c14ed0a8d1786d87cba..48af6afa1198bbee816c6638454426bdfd22f722 100644 (file)
 
 */
 
-#include <dcp/raw_convert.h>
 #include "wx_util.h"
 #include "image_sequence_dialog.h"
-
-using dcp::raw_convert;
+#include "lib/raw_convert.h"
 
 ImageSequenceDialog::ImageSequenceDialog (wxWindow* parent)
        : TableDialog (parent, _("Add image sequence"), 2, true)
index b466da8427aeefe539eb604f8eb4cd4aa225911c..55c53e79d2924cc4889c86ec61ea910443eb9431 100644 (file)
 
 #include "lib/content.h"
 #include "lib/image_content.h"
+#include "lib/raw_convert.h"
 #include "timing_panel.h"
 #include "wx_util.h"
 #include "timecode.h"
 #include "content_panel.h"
-#include <dcp/raw_convert.h>
 #include <set>
 
 using std::cout;
@@ -31,7 +31,6 @@ using std::string;
 using std::set;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
-using dcp::raw_convert;
 
 TimingPanel::TimingPanel (ContentPanel* p)
        /* horrid hack for apparent lack of context support with wxWidgets i18n code */