<div dir="ltr"><div><span style="font-size:9.6px">This is my source code for play file</span></div><div><span style="font-size:9.6px"><br></span></div><span style="font-size:9.6px">GstBus *bus;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    GSource *timeout_source;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    GSource *bus_source;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    GError *error = NULL;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    //GstElement *audio_sink;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    GstElement *decklink_video_sink;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    //GstElement *deinterlace, *interlace;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    //GstElement *tee, *queue, *video_sink, *queue1;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    GstElement *video_bin, *audio_bin;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    GstElement *video_filter_bin;</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    GST_DEBUG("Creating pipeline");</span><br style="font-size:9.6px"><span style="font-size:9.6px">    context = g_main_context_new();</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_main_context_push_thread_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">default(context);</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    video_bin = gst_parse_bin_from_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">description("tee name=t t. ! queue !</span><br style="font-size:9.6px"><span style="font-size:9.6px">autovideosink t. ! decklinkvideosink mode=3", TRUE, NULL);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    video_filter_bin = gst_parse_bin_from_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">description("capssetter</span><br style="font-size:9.6px"><span style="font-size:9.6px">caps=video/x-raw,interlace-</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">mode=interleaved", TRUE, NULL);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    audio_bin = gst_parse_bin_from_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">description("audioconvert !</span><br style="font-size:9.6px"><span style="font-size:9.6px">autoaudiosink", TRUE, NULL);</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    pipeline = gst_parse_launch("playbin", &error);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    const char *char_uri = [uri UTF8String];</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_object_set(pipeline, "uri", char_uri, NULL);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    GST_DEBUG("URI set to %s", char_uri);</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    g_object_set(pipeline, "video-sink", video_bin, NULL);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_object_set(pipeline, "video-filter", video_filter_bin, NULL);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_object_set(pipeline, "audio-sink", audio_bin, NULL);</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">   if(error){</span><br style="font-size:9.6px"><span style="font-size:9.6px">    gchar *message = g_strdup_printf("Unable to build pipeline: %s",</span><br style="font-size:9.6px"><span style="font-size:9.6px">error->message);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_clear_error(&error);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    NSLog(@"pipeline error %s",message);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    [self setUIMessage:message];</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_free(message);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    return;</span><br style="font-size:9.6px"><span style="font-size:9.6px">   }</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">   GstElement *videosink = gst_bin_get_by_interface(GST_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">BIN(pipeline),</span><br style="font-size:9.6px"><span style="font-size:9.6px">GST_TYPE_VIDEO_OVERLAY);</span><br style="font-size:9.6px"><span style="font-size:9.6px">   if(!videosink){</span><br style="font-size:9.6px"><span style="font-size:9.6px">       GST_ERROR("Could not retrieve video sink");</span><br style="font-size:9.6px"><span style="font-size:9.6px">       return;</span><br style="font-size:9.6px"><span style="font-size:9.6px">   }</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">   gst_video_overlay_set_window_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">handle(GST_VIDEO_OVERLAY(</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">videosink),</span><br style="font-size:9.6px"><span style="font-size:9.6px">(guintptr)(id)ui_video_view);</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    if (ret == GST_STATE_CHANGE_FAILURE) {</span><br style="font-size:9.6px"><span style="font-size:9.6px">        NSLog(@"Unable to set the pipeline to the playing state.\n");</span><br style="font-size:9.6px"><span style="font-size:9.6px">        gst_object_unref (pipeline);</span><br style="font-size:9.6px"><span style="font-size:9.6px">        return;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    }</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    bus = gst_element_get_bus(pipeline);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    bus_source = gst_bus_create_watch(bus);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_source_set_callback(bus_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">source,</span><br style="font-size:9.6px"><span style="font-size:9.6px">(GSourceFunc)gst_bus_async_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">signal_func, NULL, NULL);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_source_attach(bus_source, context);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_source_unref(bus_source);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_signal_connect (G_OBJECT(bus), "message::error", (GCallback)error_cb,</span><br style="font-size:9.6px"><span style="font-size:9.6px">(__bridge void *)self);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_signal_connect (G_OBJECT(bus), "message::eos", (GCallback)eos_cb,</span><br style="font-size:9.6px"><span style="font-size:9.6px">(__bridge void *)self);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_signal_connect (G_OBJECT(bus), "message::state-changed",</span><br style="font-size:9.6px"><span style="font-size:9.6px">(GCallback)state_changed_cb, (__bridge void *)self);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_signal_connect (G_OBJECT(bus), "message::duration",</span><br style="font-size:9.6px"><span style="font-size:9.6px">(GCallback)duration_cb, (__bridge void *)self);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_signal_connect (G_OBJECT(bus), "message::clock-lost",</span><br style="font-size:9.6px"><span style="font-size:9.6px">(GCallback)clock_lost_cb, (__bridge void *)self);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_signal_connect (pipeline, "about-to-finish",</span><br style="font-size:9.6px"><span style="font-size:9.6px">(GCallback)prepare_next_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">stream, (__bridge void *)self);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    timeout_source = g_timeout_source_new(1);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_source_set_callback(timeout_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">source, (GSourceFunc)refresh_ui, (__bridge</span><br style="font-size:9.6px"><span style="font-size:9.6px">void *)self,NULL);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_source_attach(timeout_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">source, context);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_source_unref(timeout_source)</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">;</span><br style="font-size:9.6px"><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    GST_DEBUG("Entering main loop...");</span><br style="font-size:9.6px"><span style="font-size:9.6px">    main_loop = g_main_loop_new(context, FALSE);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    [self check_initializing_complete];</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_main_loop_run(main_loop);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    GST_DEBUG("Exiting main loop...");</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_main_loop_unref(main_loop);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    main_loop = NULL;</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    g_main_context_pop_thread_</span><wbr style="font-size:9.6px"><span style="font-size:9.6px">default(context);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    g_main_context_unref(context);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    gst_object_unref (bus);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    gst_element_set_state (pipeline, GST_STATE_NULL);</span><br style="font-size:9.6px"><span style="font-size:9.6px">    gst_object_unref (pipeline);</span><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    pipeline = NULL;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    timeout_source = NULL;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    bus = NULL;</span><br style="font-size:9.6px"><span style="font-size:9.6px">    bus_source = NULL;</span><br style="font-size:9.6px"><br style="font-size:9.6px"><br style="font-size:9.6px"><span style="font-size:9.6px">    return;</span><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 18, 2016 at 3:08 PM, Michael Yarochkin <span dir="ltr"><<a href="mailto:michael.yarochkin@timetronics.be" target="_blank">michael.yarochkin@timetronics.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_1183652725073492564divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello, Adeel</p>
<p><br>
</p>
<p>First i will look is are you cleaning up all the buffers after usage.</p>
<p><span>gst_buffer_unref(buffer);</span><br>
</p>
<p><span><br>
</span></p>
<p>Can you show source code, please?</p>
<br>
<div style="color:rgb(0,0,0)">
<div>
<div class="gmail_extra">Mikl </div>
</div>
</div>
</div>
</div>

<br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div>