Port gtk-doc comments to their equivalent markdown syntax
[platform/upstream/gstreamer.git] / plugins / elements / gstfilesink.c
index eb5c768..4ce527e 100644 (file)
  */
 /**
  * SECTION:element-filesink
+ * @title: filesink
  * @see_also: #GstFileSrc
  *
  * Write incoming data to a file in the local file system.
  *
- * <refsect2>
- * <title>Example launch line</title>
+ * ## Example launch line
  * |[
  * gst-launch-1.0 v4l2src num-buffers=1 ! jpegenc ! filesink location=capture1.jpeg
  * ]| Capture one frame from a v4l2 camera and save as jpeg image.
- * </refsect2>
+ *
  */
 
 #ifdef HAVE_CONFIG_H
 #include <unistd.h>
 #endif
 
+#ifdef __BIONIC__               /* Android */
+#undef lseek
+#define lseek lseek64
+#undef off_t
+#define off_t guint64
+#endif
+
 #include "gstelements_private.h"
 #include "gstfilesink.h"
 
@@ -219,7 +226,7 @@ gst_file_sink_class_init (GstFileSinkClass * klass)
 
   /**
    * GstFileSink:append
-   * 
+   *
    * Append to an already existing file.
    */
   g_object_class_install_property (gobject_class, PROP_APPEND,
@@ -231,8 +238,7 @@ gst_file_sink_class_init (GstFileSinkClass * klass)
       "File Sink",
       "Sink/File", "Write stream to a file",
       "Thomas Vander Stichele <thomas at apestaart dot org>");
-  gst_element_class_add_pad_template (gstelement_class,
-      gst_static_pad_template_get (&sinktemplate));
+  gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate);
 
   gstbasesink_class->start = GST_DEBUG_FUNCPTR (gst_file_sink_start);
   gstbasesink_class->stop = GST_DEBUG_FUNCPTR (gst_file_sink_stop);
@@ -439,7 +445,8 @@ gst_file_sink_close_file (GstFileSink * sink)
 {
   if (sink->file) {
     if (fclose (sink->file) != 0)
-      goto close_failed;
+      GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
+          (_("Error closing file \"%s\"."), sink->filename), GST_ERROR_SYSTEM);
 
     GST_DEBUG_OBJECT (sink, "closed file");
     sink->file = NULL;
@@ -447,15 +454,6 @@ gst_file_sink_close_file (GstFileSink * sink)
     g_free (sink->buffer);
     sink->buffer = NULL;
   }
-  return;
-
-  /* ERRORS */
-close_failed:
-  {
-    GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
-        (_("Error closing file \"%s\"."), sink->filename), GST_ERROR_SYSTEM);
-    return;
-  }
 }
 
 static gboolean
@@ -664,7 +662,7 @@ gst_file_sink_render_buffers (GstFileSink * sink, GstBuffer ** buffers,
       num_buffers, total_mems, sink->current_pos);
 
   return gst_writev_buffers (GST_OBJECT_CAST (sink), fileno (sink->file), NULL,
-      buffers, num_buffers, mem_nums, total_mems, NULL, &sink->current_pos);
+      buffers, num_buffers, mem_nums, total_mems, &sink->current_pos, 0);
 }
 
 static GstFlowReturn