webrtc examples: Fix building with make

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9023>
This commit is contained in:
Nirbheek Chauhan 2025-05-19 14:30:56 +05:30 committed by GStreamer Marge Bot
parent 6c9f9761ad
commit ceb1e6cd33
5 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,5 @@
CC := gcc
LIBS := $(shell pkg-config --libs --cflags gstreamer-webrtc-1.0 gstreamer-sdp-1.0 libsoup-2.4 json-glib-1.0)
LIBS := $(shell pkg-config --libs --cflags gstreamer-webrtc-1.0 gstreamer-sdp-1.0 libsoup-3.0 json-glib-1.0)
CFLAGS := -O0 -ggdb -Wall -fno-omit-frame-pointer
mp-webrtc-sendrecv: mp-webrtc-sendrecv.c

View File

@ -1,6 +1,6 @@
CC := gcc
LIBS := $(shell pkg-config --libs --cflags glib-2.0 gstreamer-1.0 gstreamer-rtp-1.0 gstreamer-sdp-1.0 gstreamer-webrtc-1.0 json-glib-1.0 libsoup-2.4 gstreamer-webrtc-nice-1.0)
LIBS := $(shell pkg-config --libs --cflags glib-2.0 gstreamer-1.0 gstreamer-rtp-1.0 gstreamer-sdp-1.0 gstreamer-webrtc-1.0 json-glib-1.0 libsoup-3.0 gstreamer-webrtc-nice-1.0)
CFLAGS := -O0 -ggdb -Wall -fno-omit-frame-pointer \
$(shell pkg-config --cflags glib-2.0 gstreamer-1.0 gstreamer-rtp-1.0 gstreamer-sdp-1.0 gstreamer-webrtc-1.0 json-glib-1.0 libsoup-2.4)
$(shell pkg-config --cflags glib-2.0 gstreamer-1.0 gstreamer-rtp-1.0 gstreamer-sdp-1.0 gstreamer-webrtc-1.0 json-glib-1.0 libsoup-3.0)
webrtc-sendrecv: webrtc-sendrecv.c custom_agent.c custom_agent.h
"$(CC)" $(CFLAGS) $^ $(LIBS) -o $@

View File

@ -1,6 +1,7 @@
#ifndef __CUSTOM_AGENT_H__
#define __CUSTOM_AGENT_H__
#define GST_USE_UNSTABLE_API
#include <gst/webrtc/ice.h>
G_BEGIN_DECLS

View File

@ -2,7 +2,6 @@ executable('webrtc-sendrecv',
'webrtc-sendrecv.c',
'custom_agent.h',
'custom_agent.c',
c_args : ['-DGST_USE_UNSTABLE_API'],
dependencies : [gst_dep, gstsdp_dep, gstwebrtc_dep, gstrtp_dep,
libsoup_dep, json_glib_dep, libgstwebrtcnice_dep])

View File

@ -11,6 +11,7 @@
#include <gst/sdp/sdp.h>
#include <gst/rtp/rtp.h>
#define GST_USE_UNSTABLE_API
#include <gst/webrtc/webrtc.h>
#include <gst/webrtc/nice/nice.h>