[Bug 688487] screen recording not properly ended

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Nov 19 08:17:51 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=688487
  GStreamer | common | 1.0.1

--- Comment #5 from drago01 at gmail.com 2012-11-19 16:17:48 UTC ---
(In reply to comment #4)
> Do you have a gst-launch-1.0 command line that reproduces the problem by any
> chance? (It works fine for me with v4l2src ! vp8enc ! webmux ! fdsink, fwiw).

No.

> Can you reproduce the problem with a different source, such as v4l2src or
> videotestsrc ?

No ... when I do:

diff --git a/src/shell-recorder.c b/src/shell-recorder.c
index 0f6a6fb..d5f330a 100644
--- a/src/shell-recorder.c
+++ b/src/shell-recorder.c
@@ -1098,7 +1098,8 @@ recorder_pipeline_add_source (RecorderPipeline *pipeline)
       goto out;
     }

-  pipeline->src = gst_element_factory_make ("shellrecordersrc", NULL);
+  pipeline->src = gst_element_factory_make ("videotestsrc", NULL);
+  gst_base_src_set_live (pipeline->src);
   if (pipeline->src == NULL)
     {
       g_warning ("Can't create recorder source element");
@@ -1525,10 +1526,10 @@ recorder_open_pipeline (ShellRecorder *recorder)
   bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline->pipeline));
   gst_bus_add_watch (bus, recorder_pipeline_bus_watch, pipeline);
   gst_object_unref (bus);
-
+/*
   g_signal_connect (pipeline->src, "notify::memory-used",
                     G_CALLBACK (recorder_pipeline_on_memory_used_changed),
pipeline);
-
+*/
   recorder->current_pipeline = pipeline;
   recorder->pipelines = g_slist_prepend (recorder->pipelines, pipeline);

@@ -1549,7 +1550,8 @@ recorder_close_pipeline (ShellRecorder *recorder)
        * is written. The bus watch for the pipeline will get it and do
        * final cleanup
        */
-      shell_recorder_src_close (SHELL_RECORDER_SRC
(recorder->current_pipeline->src));
+      /*shell_recorder_src_close (SHELL_RECORDER_SRC
(recorder->current_pipeline->src)); */
+      gst_element_send_event (recorder->current_pipeline->src,
gst_event_new_eos());

       recorder->current_pipeline = NULL;
     }

i.e use a live videotestsrc instead of shellrecordersrc the video created by
test-recorder has the correct length (4 seconds). 

So something must be wrong with the shellrecordersrc. I have no idea what
though ... it returns GST_FLOW_EOS from its create() implementation which
should be enough according to the docs.

Here is a test case that you can try to reproduce with without having to
compile the shell:

http://94.247.144.115/test-recorder.tar.bz2

Just compile with:

gcc `pkg-config --cflags gstreamer-base-1.0 clutter-1.0 cogl-1.0 gtk+-3.0` *.c
`pkg-config --libs gstreamer-base-1.0 clutter-1.0 cogl-1.0 gtk+-3.0` -o
test-recorder

test-recorder should record a 4 seconds long video and put it into
~/Videos/test-recorder.webm

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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