X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Futil.cc;h=2d2a63c35aaac629ab5496438180f7f4d6b81e25;hb=1a9554c281720d0bf54295ab16f593ccc0ef3b4e;hp=d3511e8c7e34e0b1c5f5744147b18d83fb944837;hpb=0aabb6497979e2df9731f8753645149d85c02bc8;p=dcpomatic.git diff --git a/src/lib/util.cc b/src/lib/util.cc index d3511e8c7..2d2a63c35 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -54,11 +54,13 @@ #include #include #include +DCPOMATIC_DISABLE_WARNINGS extern "C" { #include #include #include } +DCPOMATIC_ENABLE_WARNINGS #include #include #include @@ -595,7 +597,7 @@ short_audio_channel_name (int c) _("BsR"), _("DBP"), _("DBS"), - "", + _("Sign"), "" }; @@ -949,7 +951,7 @@ void emit_subtitle_image (ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, shared_ptr decoder) { /* XXX: this is rather inefficient; decoding the image just to get its size */ - FFmpegImageProxy proxy (sub.png_image(), VideoRange::FULL); + FFmpegImageProxy proxy (sub.png_image()); auto image = proxy.image().image; /* set up rect with height and width */ dcpomatic::Rect rect(0, 0, image->size().width / double(size.width), image->size().height / double(size.height)); @@ -1040,7 +1042,7 @@ show_jobs_on_console (bool progress) /** XXX: could use mmap? */ void -copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, boost::function progress) +copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, std::function progress) { auto f = fopen_boost (from, "rb"); if (!f) { @@ -1176,3 +1178,21 @@ to_upper (string s) return s; } + +/* Set to 1 to print the IDs of some of our threads to stdout on creation */ +#define DCPOMATIC_DEBUG_THREADS 0 + +#if DCPOMATIC_DEBUG_THREADS +void +start_of_thread (string name) +{ + std::cout << "THREAD:" << name << ":" << std::hex << pthread_self() << "\n"; +} +#else +void +start_of_thread (string) +{ + +} +#endif +