[Bug 783354] Alternative RTMP implementation

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Aug 30 11:56:49 UTC 2017


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

--- Comment #4 from luckychou <luckychsj at gmail.com> ---
A bit of progress:
rtmp2src.c gst_rtmp2_src_task_func() L565
----
...
context = self->context = g_main_context_new ();
...
----

If I replace g_main_context_new() with g_main_context_default(),above results
are completely reversed --):
 * Use gst_parse_launch() to load pipeline,it's OK,such as,

    pipeline = gst_parse_launch ("rtmp2src location=rtmp://v1.one-
    tv.com/live/mpegts.stream ! decodebin ! autovideosink", NULL);
  * Use gst-lauch-1.0 to  load pipeline with terminal,it's NG,such as,
    gst-launch-1.0 rtmp2src location=rtmp://v1.one-tv.com/live/mpegts.stream ! 
    decodebin ! autovideosink ,
    Also, terminal output the following assertion error:
       -----
        **
        GStreamer:ERROR:gstbus.c:1349:gst_bus_add_signal_watch_full: assertion 
          failed: (!bus->priv->signal_watch)
       -----

I debugged rtmp2src's codes, which was normal until '<=' mark line,
----
static void
start_play_done (GObject * source, GAsyncResult * result, gpointer user_data)
{
  GTask *task = G_TASK (user_data);
  ....

  if (gst_rtmp_client_start_play_finish (connection, result,
          &self->stream_id, &error)) {
    g_task_return_pointer (task, g_object_ref (connection),    <=
        gst_rtmp_connection_close_and_unref);
  ....

  The task is marked as completed, in theory should call GAsyncReadyCallback
(connect_task_done)...
  GIO Reference Manual tell us:
   ----
   void
    g_task_return_pointer (GTask *task,
                       gpointer result,
                       GDestroyNotify result_destroy);
    Sets task 's result to result and completes the task. If result is not 
    NULL, then result_destroy will be used to free result if the caller does 
    not take ownership of it with g_task_propagate_pointer().
    "Completes the task" means that for an ordinary asynchronous task it will 
    either invoke the task's callback, or else queue that callback to be 
    invoked in the proper GMainContext, or in the next iteration of the current 
    GMainContext
   ----
  So,it seems to be related to gtask/GMainContext, but where exactly is it? a 
   little confused -(
----

-- 
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