WIP digging in gstreamer internals...

This commit is contained in:
Quentin 2020-01-28 21:02:01 +01:00
parent fa13fccfb0
commit 9a7fbb1343
2 changed files with 14 additions and 9 deletions

View file

@ -54,8 +54,8 @@ add_executable(dcall src/dcall.c)
find_package(PkgConfig REQUIRED) find_package(PkgConfig REQUIRED)
pkg_search_module(GLIB REQUIRED glib-2.0) pkg_search_module(GLIB REQUIRED glib-2.0)
pkg_search_module(GST REQUIRED gstreamer-1.0 >= 1.14) pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.14
>>>>>>> 22c07f1e26d7ad8bd76249bf690e437f27e25529 gstreamer-rtp-1.0>=1.14)
target_include_directories(donar PRIVATE ${GLIB_INCLUDE_DIRS}) target_include_directories(donar PRIVATE ${GLIB_INCLUDE_DIRS})
target_link_libraries(donar ${GLIB_LDFLAGS}) target_link_libraries(donar ${GLIB_LDFLAGS})

View file

@ -122,16 +122,21 @@ static GstPadProbeReturn jitter_buffer_sink_event(GstPad *pad, GstPadProbeInfo *
static GstPadProbeReturn jitter_buffer_sink_buffer(GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { static GstPadProbeReturn jitter_buffer_sink_buffer(GstPad *pad, GstPadProbeInfo *info, gpointer user_data) {
//g_print("Entering rtpjitterbuffer sink pad handler for buffers...\n"); //g_print("Entering rtpjitterbuffer sink pad handler for buffers...\n");
GstBuffer *buffer = NULL; guint16 seqnum;
buffer = gst_pad_probe_info_get_buffer (info); GstBuffer *out = NULL, *rtp_extracted = NULL;
if (buffer == NULL) return GST_PAD_PROBE_OK; GstRTPBuffer rtp_buffer = {0};
out = gst_pad_probe_info_get_buffer (info);
if (out == NULL) return GST_PAD_PROBE_OK;
//if (gst_buffer_get_size (buffer) != 172) g_print("buffer size is %ld\n", gst_buffer_get_size (buffer)); //if (gst_buffer_get_size (buffer) != 172) g_print("buffer size is %ld\n", gst_buffer_get_size (buffer));
GstMapInfo gmi; if (G_UNLIKELY (!gst_rtp_buffer_map (out, GST_MAP_READ, &rtp_buffer))) return GST_PAD_PROBE_OK;
gst_buffer_map(buffer, &gmi, GST_MAP_READ); seqnum = gst_rtp_buffer_get_seq (&rtp_buffer);
g_print("Receiving packet %d\n", seqnum);
GstRTPBuffer *rtp_buffer; gst_rtp_buffer_unmap (&rtp_buffer);
rtp_buffer->
rtp_extracted = gst_rtp_buffer_get_payload_buffer (&rtp_buffer);
return GST_PAD_PROBE_OK; return GST_PAD_PROBE_OK;