AnsweredAssumed Answered

Problem with mfw_v4lsink buffers

Question asked by Marlon Smith on Feb 11, 2015
Latest reply on May 5, 2015 by Marlon Smith
Branched to a new discussion

Hi everyone,

 

I'm running Yocto on a custom i.MX6 board and trying to loop a video using playbin2.  I've attached to playbin2's "about-to-finish" signal as follows:

 

g_signal_connect(playbin2, "about-to-finish", G_CALLBACK(prepare_next_stream), (gpointer)ba.constData());

 

where ba.constData() returns a static array containing the filename to play.  And here's the callback function I'm using:

 

void prepare_next_stream(GstElement *obj, gpointer uri)

{

    qDebug() << "Prep next stream Marlon!" << (const char*) uri;

 

    //gst_element_set_state(obj,GST_STATE_READY);

    g_object_set (obj, "uri", (const char*) uri, NULL);

    //gst_element_set_state(obj,GST_STATE_PLAYING);

}

 

This works, but only every second time the video is played.  The video will play correctly, start to play and then freeze for the duration the video should be, and then start over and play the video correctly.

 

is this a bug in GStreamer?  Is there a workaround for this?

 

Update: After enablning debug output, I see this message constantly when the problem occurs:

 

0:00:31.162584338  1176   0x5eac00 WARN         mfw_v4lsink mfw_gst_v4l_buffer.c:435:mfw_gst_v4l2_new_buffer: Try new buffer failed, ret 0 Success queued 1
0:00:31.215699672  1176   0x5eac00 WARN              vpudec vpudec.c:915:gst_vpudec_core_create_and_register_frames: Allocate Internal framebuffers!!!!
0:00:31.250310672  1176 0x33f07600 WARN         mfw_v4lsink mfw_gst_v4lsink.c:1183:mfw_gst_v4lsink_show_frame: Drop because no reserved hwbuffer2
0:00:31.283367672  1176 0x33f07600 WARN         mfw_v4lsink mfw_gst_v4lsink.c:1183:mfw_gst_v4lsink_show_frame: Drop because no reserved hwbuffer2
0:00:31.316680005  1176 0x33f07600 WARN         mfw_v4lsink mfw_gst_v4lsink.c:1183:mfw_gst_v4lsink_show_frame: Drop because no reserved hwbuffer2
0:00:31.349995338  1176 0x33f07600 WARN         mfw_v4lsink mfw_gst_v4lsink.c:1183:mfw_gst_v4lsink_show_frame: Drop because no reserved hwbuffer2
0:00:31.383467005  1176 0x33f07600 WARN         mfw_v4lsink mfw_gst_v4lsink.c:1183:mfw_gst_v4lsink_show_frame: Drop because no reserved hwbuffer2

 

 

Thanks

 

Marlon

Outcomes