Remove some unused methods.
authorCarl Hetherington <cth@carlh.net>
Wed, 1 Jul 2015 16:25:48 +0000 (17:25 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 1 Jul 2015 16:25:48 +0000 (17:25 +0100)
src/lib/audio_stream.cc
src/lib/audio_stream.h
src/lib/film.cc
src/lib/film.h
src/lib/util.cc
src/lib/util.h

index bf55e025502aeac06d9fefeff44c438d9a23f598..2119d08344566ef48e9f6a9186079035abd7b1ca 100644 (file)
@@ -41,13 +41,6 @@ AudioStream::set_mapping (AudioMapping mapping)
        _mapping = mapping;
 }
 
        _mapping = mapping;
 }
 
-void
-AudioStream::set_frame_rate (int frame_rate)
-{
-       boost::mutex::scoped_lock lm (_mutex);
-       _frame_rate = frame_rate;
-}
-
 int
 AudioStream::channels () const
 {
 int
 AudioStream::channels () const
 {
index 80ccc4cdba0935c138820fef3cc9aad87044235a..3b236542c704d3c9d59a644b01d2fc0b324e3251 100644 (file)
@@ -32,7 +32,6 @@ public:
        AudioStream (int frame_rate, AudioMapping mapping);
 
        void set_mapping (AudioMapping mapping);
        AudioStream (int frame_rate, AudioMapping mapping);
 
        void set_mapping (AudioMapping mapping);
-       void set_frame_rate (int frame_rate);
 
        AudioMapping mapping () const {
                boost::mutex::scoped_lock lm (_mutex);
 
        AudioMapping mapping () const {
                boost::mutex::scoped_lock lm (_mutex);
index 51f4c7156cb087fbc65240718375c80e9a9a5cfa..dbb73303c853b9b38a20e16b6cd1f06146b2fc74 100644 (file)
@@ -227,22 +227,6 @@ Film::internal_video_asset_filename () const
        return video_identifier() + ".mxf";
 }
 
        return video_identifier() + ".mxf";
 }
 
-string
-Film::filename_safe_name () const
-{
-       string const n = name ();
-       string o;
-       for (size_t i = 0; i < n.length(); ++i) {
-               if (isalnum (n[i])) {
-                       o += n[i];
-               } else {
-                       o += "_";
-               }
-       }
-
-       return o;
-}
-
 boost::filesystem::path
 Film::audio_analysis_path () const
 {
 boost::filesystem::path
 Film::audio_analysis_path () const
 {
index 6c7333ec1507042d3c0b4abb1815f98ab8a5c394..fe1795bd0d2d2b4da589647ccb83c3d622612e18 100644 (file)
@@ -286,7 +286,6 @@ private:
        std::string video_identifier () const;
        void playlist_changed ();
        void playlist_content_changed (boost::weak_ptr<Content>, int, bool frequent);
        std::string video_identifier () const;
        void playlist_changed ();
        void playlist_content_changed (boost::weak_ptr<Content>, int, bool frequent);
-       std::string filename_safe_name () const;
        void maybe_add_content (boost::weak_ptr<Job>, boost::weak_ptr<Content>);
 
        /** Log to write to */
        void maybe_add_content (boost::weak_ptr<Job>, boost::weak_ptr<Content>);
 
        /** Log to write to */
index 05eb3121ebe3946927e1b484b51ee2d748a0c065..3837aacc7ba0ace7314c30758bfb24be1d710626 100644 (file)
@@ -440,19 +440,6 @@ md5_digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t si
        return digester.get ();
 }
 
        return digester.get ();
 }
 
-/** @param An arbitrary audio frame rate.
- *  @return The appropriate DCP-approved frame rate (48kHz or 96kHz).
- */
-int
-dcp_audio_frame_rate (int fs)
-{
-       if (fs <= 48000) {
-               return 48000;
-       }
-
-       return 96000;
-}
-
 /** Round a number up to the nearest multiple of another number.
  *  @param c Index.
  *  @param s Array of numbers to round, indexed by c.
 /** Round a number up to the nearest multiple of another number.
  *  @param c Index.
  *  @param s Array of numbers to round, indexed by c.
@@ -466,17 +453,6 @@ stride_round_up (int c, int const * stride, int t)
        return a - (a % t);
 }
 
        return a - (a % t);
 }
 
-/** @param n A number.
- *  @param r Rounding `boundary' (must be a power of 2)
- *  @return n rounded to the nearest r
- */
-int
-round_to (float n, int r)
-{
-       DCPOMATIC_ASSERT (r == 1 || r == 2 || r == 4);
-       return int (n + float(r) / 2) &~ (r - 1);
-}
-
 /** Trip an assert if the caller is not in the UI thread */
 void
 ensure_ui_thread ()
 /** Trip an assert if the caller is not in the UI thread */
 void
 ensure_ui_thread ()
index da6f660a7f559ec0f61aa34cde3fb49627e6ed9e..836823607e519128440f2265b6f7c2839cc8890a 100644 (file)
@@ -76,9 +76,7 @@ extern boost::filesystem::path mo_path ();
 #endif
 extern std::string tidy_for_filename (std::string);
 extern dcp::Size fit_ratio_within (float ratio, dcp::Size);
 #endif
 extern std::string tidy_for_filename (std::string);
 extern dcp::Size fit_ratio_within (float ratio, dcp::Size);
-extern int dcp_audio_frame_rate (int);
 extern int stride_round_up (int, int const *, int);
 extern int stride_round_up (int, int const *, int);
-extern int round_to (float n, int r);
 extern void* wrapped_av_malloc (size_t);
 
 class FFmpegSubtitlePeriod
 extern void* wrapped_av_malloc (size_t);
 
 class FFmpegSubtitlePeriod
@@ -104,4 +102,3 @@ extern std::string video_asset_filename (boost::shared_ptr<dcp::PictureAsset> as
 extern std::string audio_asset_filename (boost::shared_ptr<dcp::SoundAsset> asset);
 
 #endif
 extern std::string audio_asset_filename (boost::shared_ptr<dcp::SoundAsset> asset);
 
 #endif
-