WIP digging in gstreamer internals...
This commit is contained in:
parent
fa13fccfb0
commit
9a7fbb1343
2 changed files with 14 additions and 9 deletions
|
@ -54,8 +54,8 @@ add_executable(dcall src/dcall.c)
|
|||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_search_module(GLIB REQUIRED glib-2.0)
|
||||
pkg_search_module(GST REQUIRED gstreamer-1.0 >= 1.14)
|
||||
>>>>>>> 22c07f1e26d7ad8bd76249bf690e437f27e25529
|
||||
pkg_check_modules(GST REQUIRED gstreamer-1.0>=1.14
|
||||
gstreamer-rtp-1.0>=1.14)
|
||||
|
||||
target_include_directories(donar PRIVATE ${GLIB_INCLUDE_DIRS})
|
||||
target_link_libraries(donar ${GLIB_LDFLAGS})
|
||||
|
|
19
src/dcall.c
19
src/dcall.c
|
@ -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) {
|
||||
//g_print("Entering rtpjitterbuffer sink pad handler for buffers...\n");
|
||||
|
||||
GstBuffer *buffer = NULL;
|
||||
buffer = gst_pad_probe_info_get_buffer (info);
|
||||
if (buffer == NULL) return GST_PAD_PROBE_OK;
|
||||
guint16 seqnum;
|
||||
GstBuffer *out = NULL, *rtp_extracted = NULL;
|
||||
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));
|
||||
|
||||
GstMapInfo gmi;
|
||||
gst_buffer_map(buffer, &gmi, GST_MAP_READ);
|
||||
if (G_UNLIKELY (!gst_rtp_buffer_map (out, GST_MAP_READ, &rtp_buffer))) return GST_PAD_PROBE_OK;
|
||||
seqnum = gst_rtp_buffer_get_seq (&rtp_buffer);
|
||||
g_print("Receiving packet %d\n", seqnum);
|
||||
|
||||
GstRTPBuffer *rtp_buffer;
|
||||
rtp_buffer->
|
||||
gst_rtp_buffer_unmap (&rtp_buffer);
|
||||
|
||||
rtp_extracted = gst_rtp_buffer_get_payload_buffer (&rtp_buffer);
|
||||
|
||||
|
||||
return GST_PAD_PROBE_OK;
|
||||
|
|
Loading…
Reference in a new issue