}
/*
+ * Output string to debugger [debug only]
+ */
+void x264_dbg_output_string(const char* format, ...)
+{
+#if X264_DEBUG
+ char buffer[256];
+ va_list args;
+ va_start (args, format);
+ vsnprintf_s(buffer, 256, _TRUNCATE, format, args);
+ OutputDebugStringA(buffer);
+ va_end(args);
+#else
+ THROW("Cannot call this function in a non-debug build!");
+#endif //LAMEXP_DEBUG
+}
+
+/*
* Entry point checks
*/
static DWORD x264_entry_check(void);
bool x264_change_process_priority(void *hProcess, const int priority);
QDate x264_current_date_safe(void);
const QString &x264_data_path(void);
+void x264_dbg_output_string(const char* format, ...);
size_t x264_dbg_private_bytes(void);
x264_cpu_t x264_detect_cpu_features(const int argc, char **argv);
bool x264_enable_close_button(const QWidget *win, const bool bEnable);
RETV = FUNC(__VA_ARGS__); \
size_t _privateBytesLeak = (x264_dbg_private_bytes() - _privateBytesBefore) / 1024; \
if(_privateBytesLeak > 0) { \
- x264_dbg_dbg_output_string("\nMemory leak: Lost %u KiloBytes of PrivateUsage memory!\n\n", _privateBytesLeak); \
+ x264_dbg_output_string("\nMemory leak: Lost %u KiloBytes of PrivateUsage memory!\n\n", _privateBytesLeak); \
} \
} \
while(0)