diff options
author | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-01-06 11:30:26 +0100 |
---|---|---|
committer | Edward Hervey <edward.hervey@collabora.co.uk> | 2011-01-06 11:30:26 +0100 |
commit | fec797f2984e98359632a8603bcd4389baa208f9 (patch) | |
tree | 6fbc080d8e449ee4bbaa5acf32e60ec9d8c4af4d | |
parent | 2d9f03fde0eb9291ea0a30e20c4c1b14ddb0dfa4 (diff) |
TimelinePipeline: Fix thumbnail method docs and arguments
The provided gchar* aren't modified
-rw-r--r-- | ges/ges-timeline-pipeline.c | 27 | ||||
-rw-r--r-- | ges/ges-timeline-pipeline.h | 2 |
2 files changed, 12 insertions, 17 deletions
diff --git a/ges/ges-timeline-pipeline.c b/ges/ges-timeline-pipeline.c index 3807368a..57f41127 100644 --- a/ges/ges-timeline-pipeline.c +++ b/ges/ges-timeline-pipeline.c @@ -740,9 +740,10 @@ ges_timeline_pipeline_set_mode (GESTimelinePipeline * pipeline, } /** - * ges_timeline_pipeline_get_thumbnail + * ges_timeline_pipeline_get_thumbnail_buffer: * @self: a #GESTimelinePipeline in %GST_STATE_PLAYING or %GST_STATE_PAUSED - * @caps: caps specifying current format. Use %GST_CAPS_ANY for native size. + * @caps: (transfer none): caps specifying current format. Use %GST_CAPS_ANY + * for native size. * * Returns a #GstBuffer with the currently playing in the format specified by * caps. The caller should unref the #gst_buffer_unref when finished. If %ANY @@ -750,7 +751,7 @@ ges_timeline_pipeline_set_mode (GESTimelinePipeline * pipeline, * is currently used by the sink. This information can be retrieve from caps * associated with the buffer. * - * Returns: a #GstBuffer or %NULL + * Returns: (transfer full): a #GstBuffer or %NULL */ GstBuffer * @@ -772,7 +773,7 @@ ges_timeline_pipeline_get_thumbnail_buffer (GESTimelinePipeline * self, } /** - * ges_timeline_pipeline_save_thumbnail + * ges_timeline_pipeline_save_thumbnail: * @self: a #GESTimelinePipeline in %GST_STATE_PLAYING or %GST_STATE_PAUSED * @width: the requested width or -1 for native size * @height: the requested height or -1 for native size @@ -780,21 +781,14 @@ ges_timeline_pipeline_get_thumbnail_buffer (GESTimelinePipeline * self, * image/jpeg) * @location: the path to save the thumbnail * - * A convenience method for ges_timeline_pipeline_get_thumbnail_raw which - * returns a buffer in 24-bit RGB, optionally scaled to the specified width - * and height. If -1 is specified for either dimension, it will be left at - * native size. You can retreive this information from the caps associated - * with the buffer. + * Saves the current frame to the specified @location. * - * The caller is responsible for unreffing the returned buffer with - * #gst_buffer_unref. - * - * Returns: a #GstBuffer or %NULL + * Returns: %TRUE if the thumbnail was properly save, else %FALSE. */ gboolean ges_timeline_pipeline_save_thumbnail (GESTimelinePipeline * self, int width, int - height, gchar * format, gchar * location) + height, const gchar * format, const gchar * location) { GstBuffer *b; FILE *fp; @@ -814,6 +808,7 @@ ges_timeline_pipeline_save_thumbnail (GESTimelinePipeline * self, int width, int return res; } + /* FIXME : Use standard glib methods */ fp = fopen (location, "w+"); if (!fwrite (GST_BUFFER_DATA (b), GST_BUFFER_SIZE (b), 1, fp) || ferror (fp)) { res = FALSE; @@ -826,7 +821,7 @@ ges_timeline_pipeline_save_thumbnail (GESTimelinePipeline * self, int width, int } /** - * ges_timeline_pipeline_get_thumbnail_rgb24 + * ges_timeline_pipeline_get_thumbnail_rgb24: * @self: a #GESTimelinePipeline in %GST_STATE_PLAYING or %GST_STATE_PAUSED * @width: the requested width or -1 for native size * @height: the requested height or -1 for native size @@ -840,7 +835,7 @@ ges_timeline_pipeline_save_thumbnail (GESTimelinePipeline * self, int width, int * The caller is responsible for unreffing the returned buffer with * #gst_buffer_unref. * - * Returns: a #GstBuffer or %NULL + * Returns: (transfer full): a #GstBuffer or %NULL */ GstBuffer * diff --git a/ges/ges-timeline-pipeline.h b/ges/ges-timeline-pipeline.h index 49b99ac2..510344af 100644 --- a/ges/ges-timeline-pipeline.h +++ b/ges/ges-timeline-pipeline.h @@ -115,7 +115,7 @@ ges_timeline_pipeline_get_thumbnail_rgb24(GESTimelinePipeline *self, gboolean ges_timeline_pipeline_save_thumbnail(GESTimelinePipeline *self, - int width, int height, gchar *format, gchar *location); + int width, int height, const gchar *format, const gchar *location); G_END_DECLS |