/**
* gst_element_query_position:
* @element: a #GstElement to invoke the position query on.
- * @format: (inout): a pointer to the #GstFormat asked for.
- * On return contains the #GstFormat used.
+ * @format: the #GstFormat requested
* @cur: (out) (allow-none): a location in which to store the current
* position, or NULL.
*
* Returns: TRUE if the query could be performed.
*/
gboolean
-gst_element_query_position (GstElement * element, GstFormat * format,
+gst_element_query_position (GstElement * element, GstFormat format,
gint64 * cur)
{
GstQuery *query;
gboolean ret;
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- g_return_val_if_fail (format != NULL, FALSE);
+ g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
- query = gst_query_new_position (*format);
+ query = gst_query_new_position (format);
ret = gst_element_query (element, query);
if (ret)
- gst_query_parse_position (query, format, cur);
+ gst_query_parse_position (query, NULL, cur);
gst_query_unref (query);
/**
* gst_element_query_duration:
* @element: a #GstElement to invoke the duration query on.
- * @format: (inout): a pointer to the #GstFormat asked for.
- * On return contains the #GstFormat used.
+ * @format: the #GstFormat requested
* @duration: (out): A location in which to store the total duration, or NULL.
*
* Queries an element for the total stream duration.
* Returns: TRUE if the query could be performed.
*/
gboolean
-gst_element_query_duration (GstElement * element, GstFormat * format,
+gst_element_query_duration (GstElement * element, GstFormat format,
gint64 * duration)
{
GstQuery *query;
gboolean ret;
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- g_return_val_if_fail (format != NULL, FALSE);
+ g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
- query = gst_query_new_duration (*format);
+ query = gst_query_new_duration (format);
ret = gst_element_query (element, query);
if (ret)
- gst_query_parse_duration (query, format, duration);
+ gst_query_parse_duration (query, NULL, duration);
gst_query_unref (query);
* @element: a #GstElement to invoke the convert query on.
* @src_format: (inout): a #GstFormat to convert from.
* @src_val: a value to convert.
- * @dest_format: (inout): a pointer to the #GstFormat to convert to.
+ * @dest_format: the #GstFormat to convert to.
* @dest_val: (out): a pointer to the result.
*
* Queries an element to convert @src_val in @src_format to @dest_format.
*/
gboolean
gst_element_query_convert (GstElement * element, GstFormat src_format,
- gint64 src_val, GstFormat * dest_format, gint64 * dest_val)
+ gint64 src_val, GstFormat dest_format, gint64 * dest_val)
{
GstQuery *query;
gboolean ret;
g_return_val_if_fail (GST_IS_ELEMENT (element), FALSE);
- g_return_val_if_fail (dest_format != NULL, FALSE);
+ g_return_val_if_fail (dest_format != GST_FORMAT_UNDEFINED, FALSE);
g_return_val_if_fail (dest_val != NULL, FALSE);
- if (*dest_format == src_format || src_val == -1) {
+ if (dest_format == src_format || src_val == -1) {
*dest_val = src_val;
return TRUE;
}
- query = gst_query_new_convert (src_format, src_val, *dest_format);
+ query = gst_query_new_convert (src_format, src_val, dest_format);
ret = gst_element_query (element, query);
if (ret)
- gst_query_parse_convert (query, NULL, NULL, dest_format, dest_val);
+ gst_query_parse_convert (query, NULL, NULL, NULL, dest_val);
gst_query_unref (query);
/**
* gst_pad_query_position:
* @pad: a #GstPad to invoke the position query on.
- * @format: (inout): a pointer to the #GstFormat asked for.
- * On return contains the #GstFormat used.
+ * @format: the #GstFormat requested
* @cur: (out): A location in which to store the current position, or NULL.
*
* Queries a pad for the stream position.
* Returns: TRUE if the query could be performed.
*/
gboolean
-gst_pad_query_position (GstPad * pad, GstFormat * format, gint64 * cur)
+gst_pad_query_position (GstPad * pad, GstFormat format, gint64 * cur)
{
GstQuery *query;
gboolean ret;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
- g_return_val_if_fail (format != NULL, FALSE);
+ g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
- query = gst_query_new_position (*format);
+ query = gst_query_new_position (format);
ret = gst_pad_query (pad, query);
if (ret)
- gst_query_parse_position (query, format, cur);
+ gst_query_parse_position (query, NULL, cur);
gst_query_unref (query);
* gst_pad_query_peer_position:
* @pad: a #GstPad on whose peer to invoke the position query on.
* Must be a sink pad.
- * @format: (inout): a pointer to the #GstFormat asked for.
- * On return contains the #GstFormat used.
+ * @format: the #GstFormat requested
* @cur: (out) (allow-none): a location in which to store the current
* position, or NULL.
*
* Returns: TRUE if the query could be performed.
*/
gboolean
-gst_pad_query_peer_position (GstPad * pad, GstFormat * format, gint64 * cur)
+gst_pad_query_peer_position (GstPad * pad, GstFormat format, gint64 * cur)
{
gboolean ret = FALSE;
GstPad *peer;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (GST_PAD_IS_SINK (pad), FALSE);
- g_return_val_if_fail (format != NULL, FALSE);
+ g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
peer = gst_pad_get_peer (pad);
if (peer) {
/**
* gst_pad_query_duration:
* @pad: a #GstPad to invoke the duration query on.
- * @format: (inout): a pointer to the #GstFormat asked for.
- * On return contains the #GstFormat used.
+ * @format: the #GstFormat requested
* @duration: (out) (allow-none): a location in which to store the total
* duration, or NULL.
*
* Returns: TRUE if the query could be performed.
*/
gboolean
-gst_pad_query_duration (GstPad * pad, GstFormat * format, gint64 * duration)
+gst_pad_query_duration (GstPad * pad, GstFormat format, gint64 * duration)
{
GstQuery *query;
gboolean ret;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
- g_return_val_if_fail (format != NULL, FALSE);
+ g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
- query = gst_query_new_duration (*format);
+ query = gst_query_new_duration (format);
ret = gst_pad_query (pad, query);
if (ret)
- gst_query_parse_duration (query, format, duration);
+ gst_query_parse_duration (query, NULL, duration);
gst_query_unref (query);
* gst_pad_query_peer_duration:
* @pad: a #GstPad on whose peer pad to invoke the duration query on.
* Must be a sink pad.
- * @format: (inout) :a pointer to the #GstFormat asked for.
- * On return contains the #GstFormat used.
+ * @format: the #GstFormat requested
* @duration: (out) (allow-none): a location in which to store the total
* duration, or NULL.
*
* Returns: TRUE if the query could be performed.
*/
gboolean
-gst_pad_query_peer_duration (GstPad * pad, GstFormat * format,
- gint64 * duration)
+gst_pad_query_peer_duration (GstPad * pad, GstFormat format, gint64 * duration)
{
gboolean ret = FALSE;
GstPad *peer;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (GST_PAD_IS_SINK (pad), FALSE);
- g_return_val_if_fail (format != NULL, FALSE);
+ g_return_val_if_fail (format != GST_FORMAT_UNDEFINED, FALSE);
peer = gst_pad_get_peer (pad);
if (peer) {
* @pad: a #GstPad to invoke the convert query on.
* @src_format: a #GstFormat to convert from.
* @src_val: a value to convert.
- * @dest_format: (inout): a pointer to the #GstFormat to convert to.
+ * @dest_format: the #GstFormat to convert to.
* @dest_val: (out): a pointer to the result.
*
* Queries a pad to convert @src_val in @src_format to @dest_format.
*/
gboolean
gst_pad_query_convert (GstPad * pad, GstFormat src_format, gint64 src_val,
- GstFormat * dest_format, gint64 * dest_val)
+ GstFormat dest_format, gint64 * dest_val)
{
GstQuery *query;
gboolean ret;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
- g_return_val_if_fail (dest_format != NULL, FALSE);
+ g_return_val_if_fail (dest_format != GST_FORMAT_UNDEFINED, FALSE);
g_return_val_if_fail (dest_val != NULL, FALSE);
- if (*dest_format == src_format || src_val == -1) {
+ if (dest_format == src_format || src_val == -1) {
*dest_val = src_val;
return TRUE;
}
- query = gst_query_new_convert (src_format, src_val, *dest_format);
+ query = gst_query_new_convert (src_format, src_val, dest_format);
ret = gst_pad_query (pad, query);
if (ret)
- gst_query_parse_convert (query, NULL, NULL, dest_format, dest_val);
+ gst_query_parse_convert (query, NULL, NULL, NULL, dest_val);
gst_query_unref (query);
* Must be a sink pad.
* @src_format: a #GstFormat to convert from.
* @src_val: a value to convert.
- * @dest_format: (inout): a pointer to the #GstFormat to convert to.
+ * @dest_format: the #GstFormat to convert to.
* @dest_val: (out): a pointer to the result.
*
* Queries the peer pad of a given sink pad to convert @src_val in @src_format
*/
gboolean
gst_pad_query_peer_convert (GstPad * pad, GstFormat src_format, gint64 src_val,
- GstFormat * dest_format, gint64 * dest_val)
+ GstFormat dest_format, gint64 * dest_val)
{
gboolean ret = FALSE;
GstPad *peer;
g_return_val_if_fail (GST_IS_PAD (pad), FALSE);
g_return_val_if_fail (GST_PAD_IS_SINK (pad), FALSE);
- g_return_val_if_fail (dest_format != NULL, FALSE);
+ g_return_val_if_fail (dest_format != GST_FORMAT_UNDEFINED, FALSE);
g_return_val_if_fail (dest_val != NULL, FALSE);
peer = gst_pad_get_peer (pad);
gboolean gst_element_factory_can_src_any_caps (GstElementFactory *factory, const GstCaps *caps);
/* util query functions */
-gboolean gst_element_query_position (GstElement *element, GstFormat *format,
- gint64 *cur);
-gboolean gst_element_query_duration (GstElement *element, GstFormat *format,
- gint64 *duration);
+gboolean gst_element_query_position (GstElement *element, GstFormat format, gint64 *cur);
+gboolean gst_element_query_duration (GstElement *element, GstFormat format, gint64 *duration);
gboolean gst_element_query_convert (GstElement *element, GstFormat src_format, gint64 src_val,
- GstFormat *dest_format, gint64 *dest_val);
+ GstFormat dest_format, gint64 *dest_val);
/* element class functions */
void gst_element_class_install_std_props (GstElementClass * klass,
GstElement* gst_pad_get_parent_element (GstPad *pad);
/* util query functions */
-gboolean gst_pad_query_position (GstPad *pad, GstFormat *format,
- gint64 *cur);
-gboolean gst_pad_query_duration (GstPad *pad, GstFormat *format,
- gint64 *duration);
+gboolean gst_pad_query_position (GstPad *pad, GstFormat format, gint64 *cur);
+gboolean gst_pad_query_duration (GstPad *pad, GstFormat format, gint64 *duration);
gboolean gst_pad_query_convert (GstPad *pad, GstFormat src_format, gint64 src_val,
- GstFormat *dest_format, gint64 *dest_val);
+ GstFormat dest_format, gint64 *dest_val);
-gboolean gst_pad_query_peer_position (GstPad *pad, GstFormat *format,
- gint64 *cur);
-gboolean gst_pad_query_peer_duration (GstPad *pad, GstFormat *format,
- gint64 *duration);
+gboolean gst_pad_query_peer_position (GstPad *pad, GstFormat format, gint64 *cur);
+gboolean gst_pad_query_peer_duration (GstPad *pad, GstFormat format, gint64 *duration);
gboolean gst_pad_query_peer_convert (GstPad *pad, GstFormat src_format, gint64 src_val,
- GstFormat *dest_format, gint64 *dest_val);
+ GstFormat dest_format, gint64 *dest_val);
/* bin functions */
void gst_bin_add_many (GstBin *bin, GstElement *element_1, ...) G_GNUC_NULL_TERMINATED;