* @format1: The format of the discont value
* @...: more discont values and formats
*
- * Allocate a new discontinuous event with the geven format/value pairs.
+ * Allocate a new discontinuous event with the given format/value pairs. Note
+ * that the values are of type gint64 - you may not use simple integers such
+ * as "0" when calling this function, always cast them like "(gint64) 0".
+ * Terminate the list with #GST_FORMAT_UNDEFINED.
*
* Returns: A new discontinuous event.
*/
va_start (var_args, format1);
- while (format1) {
+ while (format1 >= GST_FORMAT_UNDEFINED && count < 8) {
GST_EVENT_DISCONT_OFFSET (event, count).format = format1 & GST_SEEK_FORMAT_MASK;
GST_EVENT_DISCONT_OFFSET (event, count).value = va_arg (var_args, gint64);
- format1 = va_arg (var_args, GstSeekType);
+ format1 = va_arg (var_args, GstFormat);
count++;
}
return event;
}
-
G_BEGIN_DECLS
typedef enum {
- GST_FORMAT_UNDEFINED = 0,
+ GST_FORMAT_UNDEFINED = 0, /* must be first in list */
GST_FORMAT_DEFAULT = 1,
GST_FORMAT_BYTES = 2,
GST_FORMAT_TIME = 3,