mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
6a096813d4
Original commit message from CVS: * configure.ac: Add detection for HAVE_PRINTF_EXTENSION and GST_PRINTF_EXTENSION_FORMAT_DEFINE. * docs/random/ds/0.9-suggested-changes: Notes from Company. * gst/gstcaps.c: (gst_caps_to_string): Add comment. * gst/gstconfig.h.in: Add define for GST_PTR_FORMAT * gst/gstinfo.c: (_gst_debug_init), (gst_debug_print_object), (gst_debug_log_default), (_gst_info_printf_extension), (_gst_info_printf_extension_arginfo): Add printf extension. * gst/gstinfo.h: remove G_GNUC_PRINTF, because it doesn't work with %P * gst/gststructure.c: (gst_structure_to_string), (_gst_structure_parse_value): Use gst_value_deserialize() and remove old code. * gst/gstvalue.c: (gst_value_deserialize_fourcc), (gst_value_deserialize_boolean), (gst_strtoi), (gst_value_deserialize_int), (gst_value_deserialize_double), (gst_value_deserialize_string), (gst_value_deserialize): Implement a bunch of deserialize functions and gst_value_deserialize. * gst/gstvalue.h: er, _de_serialize, not unserialize * testsuite/caps/string-conversions.c: (main): We don't currently handle (float) in caps, so convert these to (double). * testsuite/debug/Makefile.am: Add new test for the printf extension * testsuite/debug/printf_extension.c: (main): same
41 lines
1.4 KiB
C
41 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2004 David A. Schleef <ds@schleef.org>
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public
|
|
* License along with this library; if not, write to the Free
|
|
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
*/
|
|
|
|
#include <gst/gst.h>
|
|
|
|
gint
|
|
main (gint argc, gchar *argv[])
|
|
{
|
|
GstCaps *caps;
|
|
GstElement *element;
|
|
int zero = 0;
|
|
|
|
gst_init (&argc, &argv);
|
|
|
|
caps = gst_caps_from_string ("audio/x-raw-int, rate=44100");
|
|
|
|
element = gst_element_factory_make ("identity", NULL);
|
|
|
|
GST_ERROR ("This should print caps: %" GST_PTR_FORMAT, caps);
|
|
GST_ERROR ("This should print an object: %" GST_PTR_FORMAT, element);
|
|
GST_ERROR ("This should print null: %" GST_PTR_FORMAT, NULL);
|
|
GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, &zero);
|
|
//GST_ERROR ("This should print a pointer: %" GST_PTR_FORMAT, (void *)1);
|
|
|
|
return 0;
|
|
}
|