Blame gst/gstdebugutils.h

Packit Service 963350
/* GStreamer
Packit Service 963350
 * Copyright (C) 2007 Stefan Kost <ensonic@users.sf.net>
Packit Service 963350
 *
Packit Service 963350
 * gstdebugutils.h: debugging and analysis utillities
Packit Service 963350
 *
Packit Service 963350
 * This library is free software; you can redistribute it and/or
Packit Service 963350
 * modify it under the terms of the GNU Library General Public
Packit Service 963350
 * License as published by the Free Software Foundation; either
Packit Service 963350
 * version 2 of the License, or (at your option) any later version.
Packit Service 963350
 *
Packit Service 963350
 * This library is distributed in the hope that it will be useful,
Packit Service 963350
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 963350
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 963350
 * Library General Public License for more details.
Packit Service 963350
 *
Packit Service 963350
 * You should have received a copy of the GNU Library General Public
Packit Service 963350
 * License along with this library; if not, write to the
Packit Service 963350
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit Service 963350
 * Boston, MA 02110-1301, USA.
Packit Service 963350
 */
Packit Service 963350
Packit Service 963350
#ifndef __GSTDEBUGUTILS_H__
Packit Service 963350
#define __GSTDEBUGUTILS_H__
Packit Service 963350
Packit Service 963350
#include <glib.h>
Packit Service 963350
#include <glib-object.h>
Packit Service 963350
#include <gst/gstconfig.h>
Packit Service 963350
#include <gst/gstbin.h>
Packit Service 963350
Packit Service 963350
G_BEGIN_DECLS
Packit Service 963350
Packit Service 963350
/**
Packit Service 963350
 * GstDebugGraphDetails:
Packit Service 963350
 * @GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE: show caps-name on edges
Packit Service 963350
 * @GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS: show caps-details on edges
Packit Service 963350
 * @GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS: show modified parameters on
Packit Service 963350
 *                                           elements
Packit Service 963350
 * @GST_DEBUG_GRAPH_SHOW_STATES: show element states
Packit Service 963350
 * @GST_DEBUG_GRAPH_SHOW_FULL_PARAMS: show full element parameter values even
Packit Service 963350
 *                                    if they are very long
Packit Service 963350
 * @GST_DEBUG_GRAPH_SHOW_ALL: show all the typical details that one might want
Packit Service 963350
 * @GST_DEBUG_GRAPH_SHOW_VERBOSE: show all details regardless of how large or
Packit Service 963350
 *                                verbose they make the resulting output
Packit Service 963350
 *
Packit Service 963350
 * Available details for pipeline graphs produced by GST_DEBUG_BIN_TO_DOT_FILE()
Packit Service 963350
 * and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS().
Packit Service 963350
 */
Packit Service 963350
typedef enum {
Packit Service 963350
  GST_DEBUG_GRAPH_SHOW_MEDIA_TYPE         = (1<<0),
Packit Service 963350
  GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS       = (1<<1),
Packit Service 963350
  GST_DEBUG_GRAPH_SHOW_NON_DEFAULT_PARAMS = (1<<2),
Packit Service 963350
  GST_DEBUG_GRAPH_SHOW_STATES             = (1<<3),
Packit Service 963350
  GST_DEBUG_GRAPH_SHOW_FULL_PARAMS        = (1<<4),
Packit Service 963350
  GST_DEBUG_GRAPH_SHOW_ALL                = ((1<<4)-1),
Packit Service 963350
  GST_DEBUG_GRAPH_SHOW_VERBOSE            = (-1)
Packit Service 963350
} GstDebugGraphDetails;
Packit Service 963350
Packit Service 963350
Packit Service 963350
/********** pipeline graphs **********/
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
gchar * gst_debug_bin_to_dot_data (GstBin *bin, GstDebugGraphDetails details);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
void gst_debug_bin_to_dot_file (GstBin *bin, GstDebugGraphDetails details, const gchar *file_name);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
void gst_debug_bin_to_dot_file_with_ts (GstBin *bin, GstDebugGraphDetails details, const gchar *file_name);
Packit Service 963350
Packit Service 963350
#ifndef GST_DISABLE_GST_DEBUG
Packit Service 963350
Packit Service 963350
/**
Packit Service 963350
 * GST_DEBUG_BIN_TO_DOT_FILE:
Packit Service 963350
 * @bin: the top-level pipeline that should be analyzed
Packit Service 963350
 * @details: details to show in the graph, e.g. #GST_DEBUG_GRAPH_SHOW_ALL or
Packit Service 963350
 *    one or more other #GstDebugGraphDetails flags.
Packit Service 963350
 * @file_name: output base filename (e.g. "myplayer")
Packit Service 963350
 *
Packit Service 963350
 * To aid debugging applications one can use this method to write out the whole
Packit Service 963350
 * network of gstreamer elements that form the pipeline into an dot file.
Packit Service 963350
 * This file can be processed with graphviz to get an image, like this:
Packit Service 963350
 * |[
Packit Service 963350
 *  dot -Tpng -oimage.png graph_lowlevel.dot
Packit Service 963350
 * ]|
Packit Service 963350
 * There is also a utility called xdot which allows you to view the dot file
Packit Service 963350
 * directly without converting it first.
Packit Service 963350
 *
Packit Service 963350
 * The macro is only active if gstreamer is configured with
Packit Service 963350
 * "--gst-enable-gst-debug" and the environment variable
Packit Service 963350
 * GST_DEBUG_DUMP_DOT_DIR is set to a basepath (e.g. /tmp).
Packit Service 963350
 */
Packit Service 963350
#define GST_DEBUG_BIN_TO_DOT_FILE(bin, details, file_name) gst_debug_bin_to_dot_file (bin, details, file_name)
Packit Service 963350
Packit Service 963350
/**
Packit Service 963350
 * GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS:
Packit Service 963350
 * @bin: the top-level pipeline that should be analyzed
Packit Service 963350
 * @details: details to show in the graph, e.g. #GST_DEBUG_GRAPH_SHOW_ALL or
Packit Service 963350
 *    one or more other #GstDebugGraphDetails flags.
Packit Service 963350
 * @file_name: output base filename (e.g. "myplayer")
Packit Service 963350
 *
Packit Service 963350
 * This works like GST_DEBUG_BIN_TO_DOT_FILE(), but adds the current timestamp
Packit Service 963350
 * to the filename, so that it can be used to take multiple snapshots.
Packit Service 963350
 */
Packit Service 963350
#define GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(bin, details, file_name) gst_debug_bin_to_dot_file_with_ts (bin, details, file_name)
Packit Service 963350
Packit Service 963350
Packit Service 963350
#else /* GST_DISABLE_GST_DEBUG */
Packit Service 963350
Packit Service 963350
Packit Service 963350
#define GST_DEBUG_BIN_TO_DOT_FILE(bin, details, file_name)
Packit Service 963350
#define GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(bin, details, file_name)
Packit Service 963350
Packit Service 963350
#endif /* GST_DISABLE_GST_DEBUG */
Packit Service 963350
Packit Service 963350
G_END_DECLS
Packit Service 963350
Packit Service 963350
#endif /* __GSTDEBUGUTILS_H__ */
Packit Service 963350