rtpstorage: Make debug category available to sub objects

This commit is contained in:
Olivier Crête 2019-03-21 17:12:53 -04:00
parent 9b0a373eac
commit 785219a317
7 changed files with 25 additions and 15 deletions

View file

@ -79,7 +79,7 @@ static GParamSpec *klass_properties[N_PROPERTIES] = { NULL, };
#define DEFAULT_SIZE_TIME (0)
GST_DEBUG_CATEGORY_STATIC (gst_rtp_storage_debug);
GST_DEBUG_CATEGORY (gst_rtp_storage_debug);
#define GST_CAT_DEFAULT (gst_rtp_storage_debug)
G_DEFINE_TYPE (GstRtpStorage, gst_rtp_storage, GST_TYPE_ELEMENT);

View file

@ -23,6 +23,8 @@
#include "rtpstorage.h"
#include "rtpstoragestream.h"
#define GST_CAT_DEFAULT (gst_rtp_storage_debug)
enum
{
SIGNAL_PACKET_RECOVERED,

View file

@ -20,6 +20,8 @@
#include "rtpstoragestream.h"
#define GST_CAT_DEFAULT (gst_rtp_storage_debug)
static RtpStorageItem *
rtp_storage_item_new (GstBuffer * buffer, guint8 pt, guint16 seq)
{

View file

@ -23,6 +23,8 @@
#include <gst/rtp/gstrtpbuffer.h>
GST_DEBUG_CATEGORY_EXTERN (gst_rtp_storage_debug);
typedef struct {
GstBuffer *buffer;
guint16 seq;

View file

@ -618,6 +618,12 @@ elements_rtpfunnel_LDADD = $(GST_PLUGINS_BASE_LIBS) -lgstrtp-$(GST_API_VERSION)
elements_rtpcollision_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
elements_rtpcollision_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_NET_LIBS) -lgstrtp-$(GST_API_VERSION) $(GIO_LIBS) $(LDADD)
elements_rtpstorage_SOURCES = \
elements/rtpstorage.c \
../../gst/rtp/gstrtpstorage.c \
../../gst/rtp/rtpstorage.c \
../../gst/rtp/rtpstoragestream.c
elements_rtpstorage_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(CFLAGS) $(AM_CFLAGS)
elements_rtpstorage_LDADD = $(GST_PLUGINS_BASE_LIBS) $(GST_NET_LIBS) -lgstrtp-$(GST_API_VERSION) $(GIO_LIBS) $(LDADD)

View file

@ -22,9 +22,8 @@
#include <gst/check/gstcheck.h>
#include <gst/check/gstharness.h>
#include "../../../gst/rtp/gstrtpstorage.h"
#include "../../../gst/rtp/rtpstorage.h"
#include "../../../gst/rtp/rtpstoragestream.c"
#include "../../../gst/rtp/rtpstorage.c"
#define RTP_CLOCK_RATE (90000)
#define RTP_FRAME_DUR (RTP_CLOCK_RATE / 30)
@ -62,7 +61,7 @@ put_recovered_packet (GstHarness * h, GstBuffer * buffer, guint8 pt,
g_object_get (h->element, "internal-storage", &internal_storage, NULL);
rtp_storage_do_put_recovered_packet (internal_storage, buffer, pt, ssrc, seq);
rtp_storage_put_recovered_packet (internal_storage, buffer, pt, ssrc, seq);
g_object_unref (internal_storage);
}
@ -523,6 +522,9 @@ rtpstorage_suite (void)
Suite *s = suite_create ("rtpstorage");
TCase *tc_chain = tcase_create ("general");
gst_element_register (NULL, "rtpstorage", GST_RANK_NONE,
GST_TYPE_RTP_STORAGE);
suite_add_tcase (s, tc_chain);
tcase_add_test (tc_chain, rtpstorage_up_and_down);
tcase_add_test (tc_chain, rtpstorage_resize);

View file

@ -72,7 +72,9 @@ good_tests = [
[ 'elements/rtpmux' ],
[ 'elements/rtprtx' ],
[ 'elements/rtpsession' ],
[ 'elements/rtpstorage' ],
[ 'elements/rtpstorage', false, [], ['../../gst/rtp/gstrtpstorage.c',
'../../gst/rtp/rtpstorage.c',
'../../gst/rtp/rtpstoragestream.c']],
[ 'elements/rtpred' ],
[ 'elements/rtpulpfec' ],
[ 'elements/rtpssrcdemux' ],
@ -171,15 +173,9 @@ test_deps = [gst_dep, gstbase_dep, gstnet_dep, gstcheck_dep, gstaudio_dep,
foreach t : good_tests
fname = '@0@.c'.format(t.get(0))
test_name = t.get(0).underscorify()
extra_deps = [ ]
if t.length() == 3
extra_deps = t.get(2)
skip_test = t.get(1)
elif t.length() == 2
skip_test = t.get(1)
else
skip_test = false
endif
extra_sources = t.get(3, [ ])
extra_deps = t.get(2, [ ])
skip_test = t.get(1, false)
if not skip_test
env = environment()
env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '')
@ -191,7 +187,7 @@ foreach t : good_tests
env.set('GSETTINGS_BACKEND', 'memory')
env.set('GST_REGISTRY', join_paths(meson.current_build_dir(), '@0@.registry'.format(test_name)))
exe = executable(test_name, fname,
exe = executable(test_name, fname, extra_sources,
include_directories : [configinc],
c_args : ['-DHAVE_CONFIG_H=1' ] + test_defines,
dependencies : [libm] + test_deps + extra_deps,