+2005-11-22 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * gst/elements/Makefile.am:
+ * gst/elements/gstfakesink.c: (gst_fake_sink_state_error_get_type):
+ * gst/elements/gstfakesrc.c: (gst_fake_src_data_get_type),
+ (gst_fake_src_sizetype_get_type), (gst_fake_src_filltype_get_type),
+ (gst_fake_src_init), (gst_fake_src_prepare_buffer),
+ (gst_fake_src_alloc_buffer), (gst_fake_src_get_size):
+ * gst/elements/gstfakesrc.h:
+ * gst/gstqueue.c: (queue_leaky_get_type):
+ correctly fix GEnumValues so that nick is the short lowercase
+ dashed tag
+ * tools/gst-inspect.c: (print_element_properties_info):
+ also show the nick, since it's useful to use from parse_launch
+ syntax
+ Fixes #322139
+
2005-11-22 Michael Smith <msmith@fluendo.com>
* gst/gstutils.c: (gst_util_clocktime_scale):
# FIXME:
# need to get gstbufferstore.[ch] into its own lib, preferrably
-# libs/gst/buifferstore
+# libs/gst/bufferstore
# This requires building libs/gst before this dir, which we currently don't
# do.
{
static GType fakesink_state_error_type = 0;
static GEnumValue fakesink_state_error[] = {
- {FAKE_SINK_STATE_ERROR_NONE, "0", "No state change errors"},
- {FAKE_SINK_STATE_ERROR_NULL_READY, "1",
- "Fail state change from NULL to READY"},
- {FAKE_SINK_STATE_ERROR_READY_PAUSED, "2",
- "Fail state change from READY to PAUSED"},
- {FAKE_SINK_STATE_ERROR_PAUSED_PLAYING, "3",
- "Fail state change from PAUSED to PLAYING"},
- {FAKE_SINK_STATE_ERROR_PLAYING_PAUSED, "4",
- "Fail state change from PLAYING to PAUSED"},
- {FAKE_SINK_STATE_ERROR_PAUSED_READY, "5",
- "Fail state change from PAUSED to READY"},
- {FAKE_SINK_STATE_ERROR_READY_NULL, "6",
- "Fail state change from READY to NULL"},
+ {FAKE_SINK_STATE_ERROR_NONE, "No state change errors", "none"},
+ {FAKE_SINK_STATE_ERROR_NULL_READY,
+ "Fail state change from NULL to READY", "null-to-ready"},
+ {FAKE_SINK_STATE_ERROR_READY_PAUSED,
+ "Fail state change from READY to PAUSED", "ready-to-paused"},
+ {FAKE_SINK_STATE_ERROR_PAUSED_PLAYING,
+ "Fail state change from PAUSED to PLAYING", "paused-to-playing"},
+ {FAKE_SINK_STATE_ERROR_PLAYING_PAUSED,
+ "Fail state change from PLAYING to PAUSED", "playing-to-paused"},
+ {FAKE_SINK_STATE_ERROR_PAUSED_READY,
+ "Fail state change from PAUSED to READY", "paused-to-ready"},
+ {FAKE_SINK_STATE_ERROR_READY_NULL,
+ "Fail state change from READY to NULL", "ready-to-null"},
{0, NULL, NULL},
};
#define DEFAULT_OUTPUT FAKE_SRC_FIRST_LAST_LOOP
#define DEFAULT_DATA FAKE_SRC_DATA_ALLOCATE
-#define DEFAULT_SIZETYPE FAKE_SRC_SIZETYPE_NULL
+#define DEFAULT_SIZETYPE FAKE_SRC_SIZETYPE_EMPTY
#define DEFAULT_SIZEMIN 0
#define DEFAULT_SIZEMAX 4096
-#define DEFAULT_FILLTYPE FAKE_SRC_FILLTYPE_NULL
+#define DEFAULT_FILLTYPE FAKE_SRC_FILLTYPE_ZERO
#define DEFAULT_DATARATE 0
#define DEFAULT_SYNC FALSE
#define DEFAULT_PATTERN NULL
{
static GType fakesrc_data_type = 0;
static GEnumValue fakesrc_data[] = {
- {FAKE_SRC_DATA_ALLOCATE, "1", "Allocate data"},
- {FAKE_SRC_DATA_SUBBUFFER, "2", "Subbuffer data"},
+ {FAKE_SRC_DATA_ALLOCATE, "Allocate data", "allocate"},
+ {FAKE_SRC_DATA_SUBBUFFER, "Subbuffer data", "subbuffer"},
{0, NULL, NULL},
};
{
static GType fakesrc_sizetype_type = 0;
static GEnumValue fakesrc_sizetype[] = {
- {FAKE_SRC_SIZETYPE_NULL, "1", "Send empty buffers"},
- {FAKE_SRC_SIZETYPE_FIXED, "2", "Fixed size buffers (sizemax sized)"},
- {FAKE_SRC_SIZETYPE_RANDOM, "3",
- "Random sized buffers (sizemin <= size <= sizemax)"},
+ {FAKE_SRC_SIZETYPE_EMPTY, "Send empty buffers", "empty"},
+ {FAKE_SRC_SIZETYPE_FIXED, "Fixed size buffers (sizemax sized)", "fixed"},
+ {FAKE_SRC_SIZETYPE_RANDOM,
+ "Random sized buffers (sizemin <= size <= sizemax)", "random"},
{0, NULL, NULL},
};
{
static GType fakesrc_filltype_type = 0;
static GEnumValue fakesrc_filltype[] = {
- {FAKE_SRC_FILLTYPE_NOTHING, "1", "Leave data as malloced"},
- {FAKE_SRC_FILLTYPE_NULL, "2", "Fill buffers with zeros"},
- {FAKE_SRC_FILLTYPE_RANDOM, "3", "Fill buffers with random crap"},
- {FAKE_SRC_FILLTYPE_PATTERN, "4", "Fill buffers with pattern 0x00 -> 0xff"},
- {FAKE_SRC_FILLTYPE_PATTERN_CONT, "5",
- "Fill buffers with pattern 0x00 -> 0xff that spans buffers"},
+ {FAKE_SRC_FILLTYPE_NOTHING, "Leave data as malloced", "nothing"},
+ {FAKE_SRC_FILLTYPE_ZERO, "Fill buffers with zeros", "zero"},
+ {FAKE_SRC_FILLTYPE_RANDOM, "Fill buffers with random crap", "random"},
+ {FAKE_SRC_FILLTYPE_PATTERN, "Fill buffers with pattern 0x00 -> 0xff",
+ "pattern"},
+ {FAKE_SRC_FILLTYPE_PATTERN_CONT,
+ "Fill buffers with pattern 0x00 -> 0xff that spans buffers",
+ "pattern-span"},
{0, NULL, NULL},
};
fakesrc->dump = DEFAULT_DUMP;
fakesrc->pattern_byte = 0x00;
fakesrc->data = FAKE_SRC_DATA_ALLOCATE;
- fakesrc->sizetype = FAKE_SRC_SIZETYPE_NULL;
+ fakesrc->sizetype = FAKE_SRC_SIZETYPE_EMPTY;
fakesrc->filltype = FAKE_SRC_FILLTYPE_NOTHING;
fakesrc->sizemin = DEFAULT_SIZEMIN;
fakesrc->sizemax = DEFAULT_SIZEMAX;
return;
switch (src->filltype) {
- case FAKE_SRC_FILLTYPE_NULL:
+ case FAKE_SRC_FILLTYPE_ZERO:
memset (GST_BUFFER_DATA (buf), 0, GST_BUFFER_SIZE (buf));
break;
case FAKE_SRC_FILLTYPE_RANDOM:
GST_BUFFER_DATA (buf) = g_malloc (size);
GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf);
break;
- case FAKE_SRC_FILLTYPE_NULL:
+ case FAKE_SRC_FILLTYPE_ZERO:
GST_BUFFER_DATA (buf) = g_malloc0 (size);
GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf);
break;
(guint8) (((gfloat) src->sizemax) * rand () / (RAND_MAX +
(gfloat) src->sizemin));
break;
- case FAKE_SRC_SIZETYPE_NULL:
+ case FAKE_SRC_SIZETYPE_EMPTY:
default:
size = 0;
break;
} GstFakeSrcDataType;
typedef enum {
- FAKE_SRC_SIZETYPE_NULL = 1,
+ FAKE_SRC_SIZETYPE_EMPTY = 1,
FAKE_SRC_SIZETYPE_FIXED,
FAKE_SRC_SIZETYPE_RANDOM
} GstFakeSrcSizeType;
typedef enum {
FAKE_SRC_FILLTYPE_NOTHING = 1,
- FAKE_SRC_FILLTYPE_NULL,
+ FAKE_SRC_FILLTYPE_ZERO,
FAKE_SRC_FILLTYPE_RANDOM,
FAKE_SRC_FILLTYPE_PATTERN,
FAKE_SRC_FILLTYPE_PATTERN_CONT
{
static GType queue_leaky_type = 0;
static GEnumValue queue_leaky[] = {
- {GST_QUEUE_NO_LEAK, "0", "Not Leaky"},
- {GST_QUEUE_LEAK_UPSTREAM, "1", "Leaky on Upstream"},
- {GST_QUEUE_LEAK_DOWNSTREAM, "2", "Leaky on Downstream"},
+ {GST_QUEUE_NO_LEAK, "Not Leaky", "no"},
+ {GST_QUEUE_LEAK_UPSTREAM, "Leaky on Upstream", "upstream"},
+ {GST_QUEUE_LEAK_DOWNSTREAM, "Leaky on Downstream", "downstream"},
{0, NULL, NULL},
};
# FIXME:
# need to get gstbufferstore.[ch] into its own lib, preferrably
-# libs/gst/buifferstore
+# libs/gst/bufferstore
# This requires building libs/gst before this dir, which we currently don't
# do.
{
static GType fakesink_state_error_type = 0;
static GEnumValue fakesink_state_error[] = {
- {FAKE_SINK_STATE_ERROR_NONE, "0", "No state change errors"},
- {FAKE_SINK_STATE_ERROR_NULL_READY, "1",
- "Fail state change from NULL to READY"},
- {FAKE_SINK_STATE_ERROR_READY_PAUSED, "2",
- "Fail state change from READY to PAUSED"},
- {FAKE_SINK_STATE_ERROR_PAUSED_PLAYING, "3",
- "Fail state change from PAUSED to PLAYING"},
- {FAKE_SINK_STATE_ERROR_PLAYING_PAUSED, "4",
- "Fail state change from PLAYING to PAUSED"},
- {FAKE_SINK_STATE_ERROR_PAUSED_READY, "5",
- "Fail state change from PAUSED to READY"},
- {FAKE_SINK_STATE_ERROR_READY_NULL, "6",
- "Fail state change from READY to NULL"},
+ {FAKE_SINK_STATE_ERROR_NONE, "No state change errors", "none"},
+ {FAKE_SINK_STATE_ERROR_NULL_READY,
+ "Fail state change from NULL to READY", "null-to-ready"},
+ {FAKE_SINK_STATE_ERROR_READY_PAUSED,
+ "Fail state change from READY to PAUSED", "ready-to-paused"},
+ {FAKE_SINK_STATE_ERROR_PAUSED_PLAYING,
+ "Fail state change from PAUSED to PLAYING", "paused-to-playing"},
+ {FAKE_SINK_STATE_ERROR_PLAYING_PAUSED,
+ "Fail state change from PLAYING to PAUSED", "playing-to-paused"},
+ {FAKE_SINK_STATE_ERROR_PAUSED_READY,
+ "Fail state change from PAUSED to READY", "paused-to-ready"},
+ {FAKE_SINK_STATE_ERROR_READY_NULL,
+ "Fail state change from READY to NULL", "ready-to-null"},
{0, NULL, NULL},
};
#define DEFAULT_OUTPUT FAKE_SRC_FIRST_LAST_LOOP
#define DEFAULT_DATA FAKE_SRC_DATA_ALLOCATE
-#define DEFAULT_SIZETYPE FAKE_SRC_SIZETYPE_NULL
+#define DEFAULT_SIZETYPE FAKE_SRC_SIZETYPE_EMPTY
#define DEFAULT_SIZEMIN 0
#define DEFAULT_SIZEMAX 4096
-#define DEFAULT_FILLTYPE FAKE_SRC_FILLTYPE_NULL
+#define DEFAULT_FILLTYPE FAKE_SRC_FILLTYPE_ZERO
#define DEFAULT_DATARATE 0
#define DEFAULT_SYNC FALSE
#define DEFAULT_PATTERN NULL
{
static GType fakesrc_data_type = 0;
static GEnumValue fakesrc_data[] = {
- {FAKE_SRC_DATA_ALLOCATE, "1", "Allocate data"},
- {FAKE_SRC_DATA_SUBBUFFER, "2", "Subbuffer data"},
+ {FAKE_SRC_DATA_ALLOCATE, "Allocate data", "allocate"},
+ {FAKE_SRC_DATA_SUBBUFFER, "Subbuffer data", "subbuffer"},
{0, NULL, NULL},
};
{
static GType fakesrc_sizetype_type = 0;
static GEnumValue fakesrc_sizetype[] = {
- {FAKE_SRC_SIZETYPE_NULL, "1", "Send empty buffers"},
- {FAKE_SRC_SIZETYPE_FIXED, "2", "Fixed size buffers (sizemax sized)"},
- {FAKE_SRC_SIZETYPE_RANDOM, "3",
- "Random sized buffers (sizemin <= size <= sizemax)"},
+ {FAKE_SRC_SIZETYPE_EMPTY, "Send empty buffers", "empty"},
+ {FAKE_SRC_SIZETYPE_FIXED, "Fixed size buffers (sizemax sized)", "fixed"},
+ {FAKE_SRC_SIZETYPE_RANDOM,
+ "Random sized buffers (sizemin <= size <= sizemax)", "random"},
{0, NULL, NULL},
};
{
static GType fakesrc_filltype_type = 0;
static GEnumValue fakesrc_filltype[] = {
- {FAKE_SRC_FILLTYPE_NOTHING, "1", "Leave data as malloced"},
- {FAKE_SRC_FILLTYPE_NULL, "2", "Fill buffers with zeros"},
- {FAKE_SRC_FILLTYPE_RANDOM, "3", "Fill buffers with random crap"},
- {FAKE_SRC_FILLTYPE_PATTERN, "4", "Fill buffers with pattern 0x00 -> 0xff"},
- {FAKE_SRC_FILLTYPE_PATTERN_CONT, "5",
- "Fill buffers with pattern 0x00 -> 0xff that spans buffers"},
+ {FAKE_SRC_FILLTYPE_NOTHING, "Leave data as malloced", "nothing"},
+ {FAKE_SRC_FILLTYPE_ZERO, "Fill buffers with zeros", "zero"},
+ {FAKE_SRC_FILLTYPE_RANDOM, "Fill buffers with random crap", "random"},
+ {FAKE_SRC_FILLTYPE_PATTERN, "Fill buffers with pattern 0x00 -> 0xff",
+ "pattern"},
+ {FAKE_SRC_FILLTYPE_PATTERN_CONT,
+ "Fill buffers with pattern 0x00 -> 0xff that spans buffers",
+ "pattern-span"},
{0, NULL, NULL},
};
fakesrc->dump = DEFAULT_DUMP;
fakesrc->pattern_byte = 0x00;
fakesrc->data = FAKE_SRC_DATA_ALLOCATE;
- fakesrc->sizetype = FAKE_SRC_SIZETYPE_NULL;
+ fakesrc->sizetype = FAKE_SRC_SIZETYPE_EMPTY;
fakesrc->filltype = FAKE_SRC_FILLTYPE_NOTHING;
fakesrc->sizemin = DEFAULT_SIZEMIN;
fakesrc->sizemax = DEFAULT_SIZEMAX;
return;
switch (src->filltype) {
- case FAKE_SRC_FILLTYPE_NULL:
+ case FAKE_SRC_FILLTYPE_ZERO:
memset (GST_BUFFER_DATA (buf), 0, GST_BUFFER_SIZE (buf));
break;
case FAKE_SRC_FILLTYPE_RANDOM:
GST_BUFFER_DATA (buf) = g_malloc (size);
GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf);
break;
- case FAKE_SRC_FILLTYPE_NULL:
+ case FAKE_SRC_FILLTYPE_ZERO:
GST_BUFFER_DATA (buf) = g_malloc0 (size);
GST_BUFFER_MALLOCDATA (buf) = GST_BUFFER_DATA (buf);
break;
(guint8) (((gfloat) src->sizemax) * rand () / (RAND_MAX +
(gfloat) src->sizemin));
break;
- case FAKE_SRC_SIZETYPE_NULL:
+ case FAKE_SRC_SIZETYPE_EMPTY:
default:
size = 0;
break;
} GstFakeSrcDataType;
typedef enum {
- FAKE_SRC_SIZETYPE_NULL = 1,
+ FAKE_SRC_SIZETYPE_EMPTY = 1,
FAKE_SRC_SIZETYPE_FIXED,
FAKE_SRC_SIZETYPE_RANDOM
} GstFakeSrcSizeType;
typedef enum {
FAKE_SRC_FILLTYPE_NOTHING = 1,
- FAKE_SRC_FILLTYPE_NULL,
+ FAKE_SRC_FILLTYPE_ZERO,
FAKE_SRC_FILLTYPE_RANDOM,
FAKE_SRC_FILLTYPE_PATTERN,
FAKE_SRC_FILLTYPE_PATTERN_CONT
{
static GType queue_leaky_type = 0;
static GEnumValue queue_leaky[] = {
- {GST_QUEUE_NO_LEAK, "0", "Not Leaky"},
- {GST_QUEUE_LEAK_UPSTREAM, "1", "Leaky on Upstream"},
- {GST_QUEUE_LEAK_DOWNSTREAM, "2", "Leaky on Downstream"},
+ {GST_QUEUE_NO_LEAK, "Not Leaky", "no"},
+ {GST_QUEUE_LEAK_UPSTREAM, "Leaky on Upstream", "upstream"},
+ {GST_QUEUE_LEAK_DOWNSTREAM, "Leaky on Downstream", "downstream"},
{0, NULL, NULL},
};
j = 0;
while (values[j].value_name) {
- g_print ("\n%s%-23.23s (%d): \t%s", "",
- _name, values[j].value, values[j].value_nick);
+ g_print ("\n%s%-23.23s %d) %-16s - %s", "",
+ _name, values[j].value, values[j].value_nick,
+ values[j].value_name);
j++;
}
/* g_type_class_unref (ec); */