[Bug 747435] test: filesink: add test to verify append mode

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Apr 8 02:05:24 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=747435

Tim-Philipp Müller <t.i.m at zen.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #301045|none                        |reviewed
             status|                            |

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Comment on attachment 301045
  --> https://bugzilla.gnome.org/attachment.cgi?id=301045
test: filesink: added testcase to verify append property

>+  gst_segment_init (&segment, GST_FORMAT_BYTES);
> ...
>+  PUSH_BYTES (100);
>+  CHECK_QUERY_POSITION (filesink, GST_FORMAT_BYTES, 100);
>+  CHECK_WRITTEN_BYTES (0, 100, 100);
> ...
>+  /* Re-opening temp file in append mode and write 100 bytes */
>+  /* This seek operation should be successful for seekable files as we have
>+   * opened file in append mode */
>+  segment.start = 100;
>+  if (gst_pad_push_event (mysrcpad, gst_event_new_segment (&segment))) {
>+    GST_LOG ("seek ok");
>+    /* Should be successful as we have opened file in append mode which
>+     * already has 100 bytes*/
>+    CHECK_QUERY_POSITION (filesink, GST_FORMAT_BYTES, 100);
>+    PUSH_BYTES (100);
>+    CHECK_QUERY_POSITION (filesink, GST_FORMAT_BYTES, 200);

I'm not so sure about this, if this should be the behaviour, i.e. if a seek to
the end should be required. "append" to me sounds like it should just do that
automatically and if needed rebase everything on top of the existing data.

What are the use cases for "append" I wonder?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list