]> git.sesse.net Git - casparcg/blobdiff - core/diagnostics/call_context.cpp
[ffmpeg_producer] Moved negation from method to operator ! for clarity.
[casparcg] / core / diagnostics / call_context.cpp
index b5cc0dbe97182a6a3d75bf4c6b63c45ffa92c27e..d68912bbf12f675598bb97608f99d4213d17a103 100644 (file)
@@ -24,6 +24,7 @@
 #include "call_context.h"
 
 #include <boost/thread/tss.hpp>
+#include <boost/lexical_cast.hpp>
 
 namespace caspar { namespace core { namespace diagnostics {
 
@@ -42,4 +43,14 @@ call_context& call_context::for_thread()
        return *local;
 }
 
+std::wstring call_context::to_string() const
+{
+       if (video_channel == -1)
+               return L"[]";
+       else if (layer == -1)
+               return L"[ch=" + boost::lexical_cast<std::wstring>(video_channel) + L"]";
+       else
+               return L"[ch=" + boost::lexical_cast<std::wstring>(video_channel) + L"; layer=" + boost::lexical_cast<std::wstring>(layer) + L"]";
+}
+
 }}}