Hello Guys,
After the receiving video frame from jni , i try to construct the buffer to be displayed on my android screen but i have an issue which consist freez video after some seconds. Here is my method of pushing frames datas on Appsrc pipeline : static void gst_native_receive_video_data(JNIEnv *env, jobject thiz, jbyteArray array) { GstFlowReturn ret; jbyte *temp = (*env)->GetByteArrayElements(env, array, NULL); jsize size = (*env)->GetArrayLength(env, array); GST_DEBUG("Gst size before %d", size); GstBuffer *buffer = gst_buffer_new_allocate(NULL, size, NULL); gst_buffer_fill(buffer, 0, temp, size); GST_DEBUG("Gst size after %d", gst_buffer_get_size(buffer)); //g_async_queue_push(gAsyncQueue, gst_buffer_ref(buffer)); GstElement *element = gst_bin_get_by_name(GST_BIN(pCustomData->pipeline), "video_app_source"); if (basetimestamp == 0) { if (appsrc) { element = gst_object_ref(appsrc); } else { fprintf(stdout, "%s:%d %s\n", __func__, __LINE__, "manually setting time: exit"); element = NULL; return; } GST_OBJECT_LOCK (element); if (GST_ELEMENT_CLOCK (element)) { GstClockTime now; GstClockTime base_time; now = gst_clock_get_time (GST_ELEMENT_CLOCK (element)); base_time = GST_ELEMENT_CAST (element)->base_time; basetimestamp = now - base_time; GST_BUFFER_TIMESTAMP (buffer) = basetimestamp; GST_DEBUG ("Timestamp calculated = : %",GST_TIME_ARGS (basetimestamp)); } GST_OBJECT_UNLOCK (element); gst_object_unref (element); gst_app_src_push_buffer (GST_APP_SRC(element), buffer); } else { gst_app_src_push_buffer(appsrc, buffer); } (*env)->ReleaseByteArrayElements(env, array, temp, JNI_ABORT); } in the logs i see the delta skew become a big interval on timestamp : 03-18 14:04:25.520 9749-10359/com.test.demo W/GStreamer+rtpjitterbuffer: 0:00:25.369909886 0x9b61eb80 ../gst/rtpmanager/rtpjitterbuffer.c:749:rtp_jitter_buffer_calculate_pts backward timestamps at server, schedule resync 03-18 14:04:27.585 9749-10359/com.test.demo W/GStreamer+rtpjitterbuffer: 0:00:27.436841348 0x9b61eb80 ../gst/rtpmanager/rtpjitterbuffer.c:749:rtp_jitter_buffer_calculate_pts backward timestamps at server, schedule resync 03-18 14:04:27.725 9749-10359/com.test.demo W/GStreamer+rtpjitterbuffer: 0:00:27.574713348 0x9b61eb80 ../gst/rtpmanager/rtpjitterbuffer.c:749:rtp_jitter_buffer_calculate_pts backward timestamps at server, schedule resync 03-18 14:04:27.785 9749-10359/com.test.demo W/GStreamer+rtpjitterbuffer: 0:00:27.635596155 0x9b61eb80 ../gst/rtpmanager/rtpjitterbuffer.c:573:calculate_skew delta - skew: 0:00:01.004460489 too big, reset skew Can you please give me how can i resolve this issue of the timestamp. Best Regards, Sofien -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |