diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-06-15 17:05:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-06-15 17:05:58 +0100 |
| commit | a183c1776cfd020a37d028ebb0f641352f49697b (patch) | |
| tree | db2fdafe7fe071f2e50264317e2c4de6b6806f29 /src/lib/util.cc | |
| parent | 11d0d8d07917543d6c40a6bb1fe5581ae216f5aa (diff) | |
| parent | 4fe7c89e54205c56f0fba2da24db66734ce23674 (diff) | |
Merge master.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 71a21105b..eda0d0236 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -61,7 +61,7 @@ extern "C" { #include "sound_processor.h" #include "config.h" #include "ratio.h" -#ifdef DVDOMATIC_WINDOWS +#ifdef DCPOMATIC_WINDOWS #include "stack.hpp" #endif @@ -260,7 +260,7 @@ seconds (struct timeval t) return t.tv_sec + (double (t.tv_usec) / 1e6); } -#ifdef DVDOMATIC_WINDOWS +#ifdef DCPOMATIC_WINDOWS LONG WINAPI exception_handler(struct _EXCEPTION_POINTERS *) { dbg::stack s; @@ -276,7 +276,7 @@ LONG WINAPI exception_handler(struct _EXCEPTION_POINTERS *) void dcpomatic_setup () { -#ifdef DVDOMATIC_WINDOWS +#ifdef DCPOMATIC_WINDOWS backtrace_file /= g_get_user_config_dir (); backtrace_file /= "backtrace.txt"; SetUnhandledExceptionFilter(exception_handler); @@ -715,32 +715,6 @@ video_frames_to_audio_frames (ContentVideoFrame v, float audio_sample_rate, floa return ((int64_t) v * audio_sample_rate / frames_per_second); } -/** @return A pair containing CPU model name and the number of processors */ -pair<string, int> -cpu_info () -{ - pair<string, int> info; - info.second = 0; - -#ifdef DCPOMATIC_POSIX - ifstream f (N_("/proc/cpuinfo")); - while (f.good ()) { - string l; - getline (f, l); - if (boost::algorithm::starts_with (l, N_("model name"))) { - string::size_type const c = l.find (':'); - if (c != string::npos) { - info.first = l.substr (c + 2); - } - } else if (boost::algorithm::starts_with (l, N_("processor"))) { - ++info.second; - } - } -#endif - - return info; -} - string audio_channel_name (int c) { |
