gstquery.h   gstquery.h 
skipping to change at line 63 skipping to change at line 63
* *
* Standard predefined Query types * Standard predefined Query types
*/ */
/* NOTE: don't forget to update the table in gstquery.c when changing /* NOTE: don't forget to update the table in gstquery.c when changing
* this enum */ * this enum */
typedef enum { typedef enum {
GST_QUERY_NONE = 0, GST_QUERY_NONE = 0,
GST_QUERY_POSITION, GST_QUERY_POSITION,
GST_QUERY_DURATION, GST_QUERY_DURATION,
GST_QUERY_LATENCY, GST_QUERY_LATENCY,
GST_QUERY_JITTER, /* not in draft-query, necessary? */ GST_QUERY_JITTER, /* not in draft-query, necessary? */
GST_QUERY_RATE, GST_QUERY_RATE,
GST_QUERY_SEEKING, GST_QUERY_SEEKING,
GST_QUERY_SEGMENT, GST_QUERY_SEGMENT,
GST_QUERY_CONVERT, GST_QUERY_CONVERT,
GST_QUERY_FORMATS, GST_QUERY_FORMATS,
GST_QUERY_BUFFERING, GST_QUERY_BUFFERING,
GST_QUERY_CUSTOM, GST_QUERY_CUSTOM,
GST_QUERY_URI GST_QUERY_URI
} GstQueryType; } GstQueryType;
skipping to change at line 106 skipping to change at line 106
* @value: the unique id of the Query type * @value: the unique id of the Query type
* @nick: a short nick * @nick: a short nick
* @description: a longer description of the query type * @description: a longer description of the query type
* @quark: the quark for the nick * @quark: the quark for the nick
* *
* A Query Type definition * A Query Type definition
*/ */
struct _GstQueryTypeDefinition struct _GstQueryTypeDefinition
{ {
GstQueryType value; GstQueryType value;
gchar *nick; const gchar *nick;
gchar *description; const gchar *description;
GQuark quark; GQuark quark;
}; };
#define GST_TYPE_QUERY (gst_query_get_type()) #define GST_TYPE_QUERY (gst_query_get_type())
#define GST_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_QUERY)) #define GST_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_QUERY))
#define GST_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((k lass), GST_TYPE_QUERY)) #define GST_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((k lass), GST_TYPE_QUERY))
#define GST_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ( (obj), GST_TYPE_QUERY, GstQueryClass)) #define GST_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ( (obj), GST_TYPE_QUERY, GstQueryClass))
#define GST_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_QUERY, GstQuery)) #define GST_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_QUERY, GstQuery))
#define GST_QUERY_CAST(obj) ((GstQuery*)(obj)) /* only s ince 0.10.23 */ #define GST_QUERY_CAST(obj) ((GstQuery*)(obj)) /* only s ince 0.10.23 */
#define GST_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((k lass), GST_TYPE_QUERY, GstQueryClass)) #define GST_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((k lass), GST_TYPE_QUERY, GstQueryClass))
/** /**
* GST_QUERY_TYPE: * GST_QUERY_TYPE:
* @query: the query to query * @query: the query to query
skipping to change at line 154 skipping to change at line 154
*/ */
struct _GstQuery struct _GstQuery
{ {
GstMiniObject mini_object; GstMiniObject mini_object;
/*< public > *//* with COW */ /*< public > *//* with COW */
GstQueryType type; GstQueryType type;
GstStructure *structure; GstStructure *structure;
/*< private > */ /*< private >*/
gpointer _gst_reserved; gpointer _gst_reserved;
}; };
struct _GstQueryClass { struct _GstQueryClass {
GstMiniObjectClass mini_object_class; GstMiniObjectClass mini_object_class;
/*< private > */ /*< private >*/
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
const gchar* gst_query_type_get_name (GstQueryType query); const gchar* gst_query_type_get_name (GstQueryType query);
GQuark gst_query_type_to_quark (GstQueryType query); GQuark gst_query_type_to_quark (GstQueryType query);
GType gst_query_get_type (void); GType gst_query_get_type (void);
/* register a new query */ /* register a new query */
GstQueryType gst_query_type_register (const gchar *nick, GstQueryType gst_query_type_register (const gchar *nick,
const gchar *description); const gchar *description);
GstQueryType gst_query_type_get_by_nick (const gchar *nick); GstQueryType gst_query_type_get_by_nick (const gchar *nick);
/* check if a query is in an array of querys */ /* check if a query is in an array of querys */
gboolean gst_query_types_contains (const GstQueryType *types, gboolean gst_query_types_contains (const GstQueryType *types,
GstQueryType type); GstQueryType type);
skipping to change at line 201 skipping to change at line 201
* *
* Returns: @q * Returns: @q
*/ */
#ifdef _FOOL_GTK_DOC_ #ifdef _FOOL_GTK_DOC_
G_INLINE_FUNC GstQuery * gst_query_ref (GstQuery * q); G_INLINE_FUNC GstQuery * gst_query_ref (GstQuery * q);
#endif #endif
static inline GstQuery * static inline GstQuery *
gst_query_ref (GstQuery * q) gst_query_ref (GstQuery * q)
{ {
return GST_QUERY (gst_mini_object_ref (GST_MINI_OBJECT_CAST (q))); return GST_QUERY_CAST (gst_mini_object_ref (GST_MINI_OBJECT_CAST (q)));
} }
/** /**
* gst_query_unref: * gst_query_unref:
* @q: a #GstQuery to decrease the refcount of. * @q: a #GstQuery to decrease the refcount of.
* *
* Decreases the refcount of the query. If the refcount reaches 0, the quer y * Decreases the refcount of the query. If the refcount reaches 0, the quer y
* will be freed. * will be freed.
*/ */
#ifdef _FOOL_GTK_DOC_ #ifdef _FOOL_GTK_DOC_
skipping to change at line 226 skipping to change at line 226
gst_query_unref (GstQuery * q) gst_query_unref (GstQuery * q)
{ {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (q)); gst_mini_object_unref (GST_MINI_OBJECT_CAST (q));
} }
/* copy query */ /* copy query */
/** /**
* gst_query_copy: * gst_query_copy:
* @q: a #GstQuery to copy. * @q: a #GstQuery to copy.
* *
* Copies the given query using the copy function of the parent #GstData * Copies the given query using the copy function of the parent #GstStructu
* structure. re.
* *
* Returns: a new copy of @q. * Free-function: gst_query_unref
*
* Returns: (transfer full): a new copy of @q.
*/ */
#ifdef _FOOL_GTK_DOC_ #ifdef _FOOL_GTK_DOC_
G_INLINE_FUNC GstQuery * gst_query_copy (const GstQuery * q); G_INLINE_FUNC GstQuery * gst_query_copy (const GstQuery * q);
#endif #endif
static inline GstQuery * static inline GstQuery *
gst_query_copy (const GstQuery * q) gst_query_copy (const GstQuery * q)
{ {
return GST_QUERY (gst_mini_object_copy (GST_MINI_OBJECT_CAST (q))); return GST_QUERY_CAST (gst_mini_object_copy (GST_MINI_OBJECT_CONST_CAST ( q)));
} }
/** /**
* gst_query_make_writable: * gst_query_make_writable:
* @q: a #GstQuery to make writable * @q: (transfer full): a #GstQuery to make writable
* *
* Makes a writable query from the given query. * Makes a writable query from the given query.
*
* Returns: (transfer full): a new writable query (possibly same as @q)
*/ */
#define gst_query_make_writable(q) GST_QUERY (gst_mini_object_m ake_writable (GST_MINI_OBJECT (q))) #define gst_query_make_writable(q) GST_QUERY_CAST (gst_mini_ob ject_make_writable (GST_MINI_OBJECT_CAST (q)))
/* position query */ /* position query */
GstQuery* gst_query_new_position (GstFormat format); GstQuery* gst_query_new_position (GstFormat format);
void gst_query_set_position (GstQuery *query, GstFormat void gst_query_set_position (GstQuery *query, GstFormat
format, gint64 cur); format, gint64 cur);
void gst_query_parse_position (GstQuery *query, GstFormat void gst_query_parse_position (GstQuery *query, GstFormat
*format, gint64 *cur); *format, gint64 *cur);
/* duration query */ /* duration query */
GstQuery* gst_query_new_duration (GstFormat format); GstQuery* gst_query_new_duration (GstFormat format);
void gst_query_set_duration (GstQuery *query, GstFormat void gst_query_set_duration (GstQuery *query, GstFormat
format, gint64 duration); format, gint64 duration);
void gst_query_parse_duration (GstQuery *query, GstFormat void gst_query_parse_duration (GstQuery *query, GstFormat
*format, gint64 *duration); *format, gint64 *duration);
/* latency query */ /* latency query */
GstQuery* gst_query_new_latency (void); GstQuery* gst_query_new_latency (void);
void gst_query_set_latency (GstQuery *query, gboolean l void gst_query_set_latency (GstQuery *query, gboolean
ive, GstClockTime min_latency, live, GstClockTime min_latency,
GstClockTime max_latency); GstClockTime max_latency);
void gst_query_parse_latency (GstQuery *query, gboolean * void gst_query_parse_latency (GstQuery *query, gboolean
live, GstClockTime *min_latency, *live, GstClockTime *min_latency,
GstClockTime *max_latency); GstClockTime *max_latency)
;
/* convert query */ /* convert query */
GstQuery* gst_query_new_convert (GstFormat src_format, gint6 GstQuery* gst_query_new_convert (GstFormat src_format, gint
4 value, GstFormat dest_format); 64 value, GstFormat dest_format);
void gst_query_set_convert (GstQuery *query, GstFormat void gst_query_set_convert (GstQuery *query, GstFormat
src_format, gint64 src_value, src_format, gint64 src_value,
GstFormat dest_format, gint GstFormat dest_format, gin
64 dest_value); t64 dest_value);
void gst_query_parse_convert (GstQuery *query, GstFormat void gst_query_parse_convert (GstQuery *query, GstFormat
*src_format, gint64 *src_value, *src_format, gint64 *src_value,
GstFormat *dest_format, gin GstFormat *dest_format, gi
t64 *dest_value); nt64 *dest_value);
/* segment query */ /* segment query */
GstQuery* gst_query_new_segment (GstFormat format); GstQuery* gst_query_new_segment (GstFormat format);
void gst_query_set_segment (GstQuery *query, gdouble r ate, GstFormat format, void gst_query_set_segment (GstQuery *query, gdouble r ate, GstFormat format,
gint64 start_value, gint64 stop_value); gint64 start_value, gint64 stop_value);
void gst_query_parse_segment (GstQuery *query, gdouble * rate, GstFormat *format, void gst_query_parse_segment (GstQuery *query, gdouble * rate, GstFormat *format,
gint64 *start_value, gint6 4 *stop_value); gint64 *start_value, gint6 4 *stop_value);
/* application specific query */ /* application specific query */
GstQuery * gst_query_new_application (GstQueryType type, GstQuery * gst_query_new_application (GstQueryType type,
GstStructure *structure); GstStructure *structure);
GstStructure * gst_query_get_structure (GstQuery *query); GstStructure * gst_query_get_structure (GstQuery *query);
/* seeking query */ /* seeking query */
GstQuery* gst_query_new_seeking (GstFormat format); GstQuery* gst_query_new_seeking (GstFormat format);
void gst_query_set_seeking (GstQuery *query, GstFormat format, void gst_query_set_seeking (GstQuery *query, GstFormat format,
gboolean seekable, gboolean seekable,
gint64 segment_start, gint64 segment_start,
gint64 segment_end); gint64 segment_end);
void gst_query_parse_seeking (GstQuery *query, GstFormat *format, void gst_query_parse_seeking (GstQuery *query, GstFormat *format,
gboolean *seekable, gboolean *seekable,
gint64 *segment_start, gint64 *segment_start,
skipping to change at line 308 skipping to change at line 311
void gst_query_parse_formats_length (GstQuery *query, guint *n_ formats); void gst_query_parse_formats_length (GstQuery *query, guint *n_ formats);
void gst_query_parse_formats_nth (GstQuery *query, guint nth , GstFormat *format); void gst_query_parse_formats_nth (GstQuery *query, guint nth , GstFormat *format);
/* buffering query */ /* buffering query */
GstQuery* gst_query_new_buffering (GstFormat format); GstQuery* gst_query_new_buffering (GstFormat format);
void gst_query_set_buffering_percent (GstQuery *query, gboolea n busy, gint percent); void gst_query_set_buffering_percent (GstQuery *query, gboolea n busy, gint percent);
void gst_query_parse_buffering_percent (GstQuery *query, gboolea n *busy, gint *percent); void gst_query_parse_buffering_percent (GstQuery *query, gboolea n *busy, gint *percent);
void gst_query_set_buffering_stats (GstQuery *query, GstBuff eringMode mode, void gst_query_set_buffering_stats (GstQuery *query, GstBuff eringMode mode,
gint avg_in, gint avg_ou t, gint avg_in, gint avg_ou t,
gint64 buffering_left); gint64 buffering_left);
void gst_query_parse_buffering_stats (GstQuery *query, GstBuf feringMode *mode, void gst_query_parse_buffering_stats (GstQuery *query, GstBuf feringMode *mode,
gint *avg_in, gint *avg_ out, gint *avg_in, gint *avg_ out,
gint64 *buffering_left); gint64 *buffering_left);
void gst_query_set_buffering_range (GstQuery *query, GstForm at format, void gst_query_set_buffering_range (GstQuery *query, GstForm at format,
gint64 start, gint64 sto p, gint64 start, gint64 sto p,
gint64 estimated_total); gint64 estimated_total);
void gst_query_parse_buffering_range (GstQuery *query, GstForm at *format, void gst_query_parse_buffering_range (GstQuery *query, GstForm at *format,
gint64 *start, gint64 *s top, gint64 *start, gint64 *s top,
gint64 *estimated_total); gint64 *estimated_total)
;
gboolean gst_query_add_buffering_range (GstQuery *query,
gint64 start, gint64 sto
p);
guint gst_query_get_n_buffering_ranges (GstQuery *query);
gboolean gst_query_parse_nth_buffering_range (GstQuery *query,
guint index, gint64 *s
tart,
gint64 *stop);
/* URI query */ /* URI query */
GstQuery * gst_query_new_uri (void); GstQuery * gst_query_new_uri (void);
void gst_query_parse_uri (GstQuery *query, gchar * *uri); void gst_query_parse_uri (GstQuery *query, gchar * *uri);
void gst_query_set_uri (GstQuery *query, const g char *uri); void gst_query_set_uri (GstQuery *query, const g char *uri);
G_END_DECLS G_END_DECLS
#endif /* __GST_QUERY_H__ */ #endif /* __GST_QUERY_H__ */
 End of changes. 23 change blocks. 
47 lines changed or deleted 64 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/