Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
tracepointgen.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef TRACEPOINTGEN_H
5#define TRACEPOINTGEN_H
6
7#include <cstdarg>
8#include <cstdio>
9#include <cstdlib>
10
11#define DEBUG_TRACEPOINTGEN 0
12
13#if DEBUG_TRACEPOINTGEN > 0
14 #define DEBUGPRINTF(x) x
15 #if (DEBUG_TRACEPOINTGEN > 1)
16 #define DEBUGPRINTF2(x) x
17 #else
18 #define DEBUGPRINTF2(x)
19 #endif
20#else
21 #define DEBUGPRINTF(x)
22 #define DEBUGPRINTF2(x)
23#endif
24
25
26
27inline void panic(const char *fmt, ...)
28{
29 va_list ap;
30
31 fprintf(stderr, "tracepointgen: fatal: ");
32
33 va_start(ap, fmt);
34 vfprintf(stderr, fmt, ap);
35 va_end(ap);
36
37 fputc('\n', stderr);
38
39 exit(EXIT_FAILURE);
40}
41
42#endif
QVideoFrameFormat::PixelFormat fmt
void panic(const char *fmt,...)