if (GST_IS_DISCOVERER_AUDIO_INFO (info))
return "audio";
if (GST_IS_DISCOVERER_VIDEO_INFO (info)) {
- if (gst_discoverer_video_info_get_is_image (info))
+ if (gst_discoverer_video_info_get_is_image ((GstDiscovererVideoInfo *)
+ info))
return "video(image)";
else
return "video";
/* ACCESSORS */
-#define GENERIC_ACCESSOR_CODE(parent, casttype, parenttype, parentgtype, fieldname, type, failval) \
+
+#define GENERIC_ACCESSOR_CODE(parent, parenttype, parentgtype, fieldname, type, failval) \
type parent##_get_##fieldname(parenttype info) { \
g_return_val_if_fail(G_TYPE_CHECK_INSTANCE_TYPE((info), parentgtype), failval); \
- return ((casttype)info)->fieldname; \
+ return (info)->fieldname; \
}
/**
#define AUDIO_INFO_ACCESSOR_CODE(fieldname, type, failval) \
GENERIC_ACCESSOR_CODE(gst_discoverer_audio_info, GstDiscovererAudioInfo*, \
- GstDiscovererStreamInfo*, \
GST_TYPE_DISCOVERER_AUDIO_INFO, \
fieldname, type, failval)
/**
* gst_discoverer_audio_info_get_channels:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererAudioInfo
*
* Returns: the number of channels in the stream.
*
/**
* gst_discoverer_audio_info_get_sample_rate:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererAudioInfo
*
* Returns: the sample rate of the stream in Hertz.
*
/**
* gst_discoverer_audio_info_get_depth:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererAudioInfo
*
* Returns: the number of bits used per sample in each channel.
*
/**
* gst_discoverer_audio_info_get_bitrate:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererAudioInfo
*
* Returns: the average or nominal bitrate of the stream in bits/second.
*
/**
* gst_discoverer_audio_info_get_max_bitrate:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererAudioInfo
*
* Returns: the maximum bitrate of the stream in bits/second.
*
#define VIDEO_INFO_ACCESSOR_CODE(fieldname, type, failval) \
GENERIC_ACCESSOR_CODE(gst_discoverer_video_info, GstDiscovererVideoInfo*, \
- GstDiscovererStreamInfo*, \
GST_TYPE_DISCOVERER_VIDEO_INFO, \
fieldname, type, failval)
/**
* gst_discoverer_video_info_get_width:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the width of the video stream in pixels.
*
/**
* gst_discoverer_video_info_get_height:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the height of the video stream in pixels.
*
/**
* gst_discoverer_video_info_get_depth:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the depth in bits of the video stream (only relevant for
* video streams).
/**
* gst_discoverer_video_info_get_framerate_num:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the framerate of the video stream (numerator).
*
/**
* gst_discoverer_video_info_get_framerate_denom:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the framerate of the video stream (denominator).
*
/**
* gst_discoverer_video_info_get_par_num:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the Pixel Aspect Ratio (PAR) of the video stream (numerator).
*
/**
* gst_discoverer_video_info_get_par_denom:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the Pixel Aspect Ratio (PAR) of the video stream (denominator).
*
/**
* gst_discoverer_video_info_get_interlaced:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: %TRUE if the stream is interlaced, else %FALSE.
*
/**
* gst_discoverer_video_info_get_bitrate:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the average or nominal bitrate of the video stream in bits/second.
*
/**
* gst_discoverer_video_info_get_max_bitrate:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: the maximum bitrate of the video stream in bits/second.
*
/**
* gst_discoverer_video_info_get_is_image:
- * @info: a #GstDiscovererStreamInfo
+ * @info: a #GstDiscovererVideoInfo
*
* Returns: #TRUE if the video stream corresponds to an image (i.e. only contains
* one frame).
#define DISCOVERER_INFO_ACCESSOR_CODE(fieldname, type, failval) \
GENERIC_ACCESSOR_CODE(gst_discoverer_info, GstDiscovererInfo*, \
- GstDiscovererInfo*, \
GST_TYPE_DISCOVERER_INFO, \
fieldname, type, failval)
GType gst_discoverer_audio_info_get_type (void);
-guint gst_discoverer_audio_info_get_channels(GstDiscovererStreamInfo* info);
-guint gst_discoverer_audio_info_get_sample_rate(GstDiscovererStreamInfo* info);
-guint gst_discoverer_audio_info_get_depth(GstDiscovererStreamInfo* info);
-guint gst_discoverer_audio_info_get_bitrate(GstDiscovererStreamInfo* info);
-guint gst_discoverer_audio_info_get_max_bitrate(GstDiscovererStreamInfo* info);
+guint gst_discoverer_audio_info_get_channels(GstDiscovererAudioInfo* info);
+guint gst_discoverer_audio_info_get_sample_rate(GstDiscovererAudioInfo* info);
+guint gst_discoverer_audio_info_get_depth(GstDiscovererAudioInfo* info);
+guint gst_discoverer_audio_info_get_bitrate(GstDiscovererAudioInfo* info);
+guint gst_discoverer_audio_info_get_max_bitrate(GstDiscovererAudioInfo* info);
/**
* GstDiscovererVideoInfo:
typedef GstMiniObjectClass GstDiscovererVideoInfoClass;
GType gst_discoverer_video_info_get_type (void);
-guint gst_discoverer_video_info_get_width(GstDiscovererStreamInfo* info);
-guint gst_discoverer_video_info_get_height(GstDiscovererStreamInfo* info);
-guint gst_discoverer_video_info_get_depth(GstDiscovererStreamInfo* info);
-guint gst_discoverer_video_info_get_framerate_num(GstDiscovererStreamInfo* info);
-guint gst_discoverer_video_info_get_framerate_denom(GstDiscovererStreamInfo* info);
-guint gst_discoverer_video_info_get_par_num(GstDiscovererStreamInfo* info);
-guint gst_discoverer_video_info_get_par_denom(GstDiscovererStreamInfo* info);
-gboolean gst_discoverer_video_info_get_interlaced(GstDiscovererStreamInfo* info);
-guint gst_discoverer_video_info_get_bitrate(GstDiscovererStreamInfo* info);
-guint gst_discoverer_video_info_get_max_bitrate(GstDiscovererStreamInfo* info);
-gboolean gst_discoverer_video_info_get_is_image(GstDiscovererStreamInfo* info);
+guint gst_discoverer_video_info_get_width(GstDiscovererVideoInfo* info);
+guint gst_discoverer_video_info_get_height(GstDiscovererVideoInfo* info);
+guint gst_discoverer_video_info_get_depth(GstDiscovererVideoInfo* info);
+guint gst_discoverer_video_info_get_framerate_num(GstDiscovererVideoInfo* info);
+guint gst_discoverer_video_info_get_framerate_denom(GstDiscovererVideoInfo* info);
+guint gst_discoverer_video_info_get_par_num(GstDiscovererVideoInfo* info);
+guint gst_discoverer_video_info_get_par_denom(GstDiscovererVideoInfo* info);
+gboolean gst_discoverer_video_info_get_interlaced(GstDiscovererVideoInfo* info);
+guint gst_discoverer_video_info_get_bitrate(GstDiscovererVideoInfo* info);
+guint gst_discoverer_video_info_get_max_bitrate(GstDiscovererVideoInfo* info);
+gboolean gst_discoverer_video_info_get_is_image(GstDiscovererVideoInfo* info);
/**
* GstDiscovererResult: