typedef void (*ValidateSDPFunc) (struct test_webrtc * t, GstElement * element,
GstWebRTCSessionDescription * desc, gpointer user_data);
+struct validate_sdp;
struct validate_sdp
{
ValidateSDPFunc validate;
gpointer user_data;
+ struct validate_sdp *next;
};
static GstWebRTCSessionDescription *
gst_structure_get (reply, field,
GST_TYPE_WEBRTC_SESSION_DESCRIPTION, &offer, NULL);
- validate->validate (t, element, offer, validate->user_data);
+ while (validate) {
+ validate->validate (t, element, offer, validate->user_data);
+ validate = validate->next;
+ }
return offer;
}
struct test_webrtc *t = create_audio_video_test ();
const gchar *expected_offer[] = { "sendrecv", "sendrecv" };
const gchar *expected_answer[] = { "sendrecv", "recvonly" };
- struct validate_sdp offer = { on_sdp_media_direction, expected_offer };
- struct validate_sdp answer = { on_sdp_media_direction, expected_answer };
+ struct validate_sdp offer = { on_sdp_media_direction, expected_offer, NULL };
+ struct validate_sdp answer =
+ { on_sdp_media_direction, expected_answer, NULL };
GstHarness *h;
/* check the default media directions for transceivers */
GST_START_TEST (test_payload_types)
{
struct test_webrtc *t = create_audio_video_test ();
- struct validate_sdp offer = { on_sdp_media_payload_types, NULL };
+ struct validate_sdp offer = { on_sdp_media_payload_types, NULL, NULL };
GstWebRTCRTPTransceiver *trans;
GArray *transceivers;
struct test_webrtc *t = create_audio_test ();
const gchar *expected_offer[] = { "actpass" };
const gchar *expected_answer[] = { "active" };
- struct validate_sdp offer = { on_sdp_media_setup, expected_offer };
- struct validate_sdp answer = { on_sdp_media_setup, expected_answer };
+ struct validate_sdp offer = { on_sdp_media_setup, expected_offer, NULL };
+ struct validate_sdp answer = { on_sdp_media_setup, expected_answer, NULL };
/* check the default dtls setup negotiation values */
GstWebRTCRTPTransceiver *trans;
const gchar *expected_offer[] = { "recvonly" };
const gchar *expected_answer[] = { "sendonly" };
- struct validate_sdp offer = { on_sdp_media_direction, expected_offer };
- struct validate_sdp answer = { on_sdp_media_direction, expected_answer };
+ struct validate_sdp offer = { on_sdp_media_direction, expected_offer, NULL };
+ struct validate_sdp answer =
+ { on_sdp_media_direction, expected_answer, NULL };
GstCaps *caps;
GstHarness *h;
GstWebRTCRTPTransceiver *trans;
const gchar *expected_offer[] = { "recvonly", "sendonly" };
const gchar *expected_answer[] = { "sendonly", "recvonly" };
- struct validate_sdp offer = { on_sdp_media_direction, expected_offer };
- struct validate_sdp answer = { on_sdp_media_direction, expected_answer };
+ struct validate_sdp offer = { on_sdp_media_direction, expected_offer, NULL };
+ struct validate_sdp answer =
+ { on_sdp_media_direction, expected_answer, NULL };
GstCaps *caps;
GstHarness *h;
GArray *transceivers;
{
struct test_webrtc *t = test_webrtc_new ();
GObject *channel = NULL;
- struct validate_sdp offer = { on_sdp_has_datachannel, NULL };
- struct validate_sdp answer = { on_sdp_has_datachannel, NULL };
+ struct validate_sdp offer = { on_sdp_has_datachannel, NULL, NULL };
+ struct validate_sdp answer = { on_sdp_has_datachannel, NULL, NULL };
gchar *label;
t->on_negotiation_needed = NULL;
{
struct test_webrtc *t = test_webrtc_new ();
GObject *channel = NULL;
- struct validate_sdp offer = { on_sdp_has_datachannel, NULL };
- struct validate_sdp answer = { on_sdp_has_datachannel, NULL };
+ struct validate_sdp offer = { on_sdp_has_datachannel, NULL, NULL };
+ struct validate_sdp answer = { on_sdp_has_datachannel, NULL, NULL };
t->on_negotiation_needed = NULL;
t->offer_data = &offer;
{
struct test_webrtc *t = test_webrtc_new ();
GObject *channel = NULL;
- struct validate_sdp offer = { on_sdp_has_datachannel, NULL };
- struct validate_sdp answer = { on_sdp_has_datachannel, NULL };
+ struct validate_sdp offer = { on_sdp_has_datachannel, NULL, NULL };
+ struct validate_sdp answer = { on_sdp_has_datachannel, NULL, NULL };
t->on_negotiation_needed = NULL;
t->offer_data = &offer;
{
struct test_webrtc *t = test_webrtc_new ();
GObject *channel = NULL;
- struct validate_sdp offer = { on_sdp_has_datachannel, NULL };
- struct validate_sdp answer = { on_sdp_has_datachannel, NULL };
+ struct validate_sdp offer = { on_sdp_has_datachannel, NULL, NULL };
+ struct validate_sdp answer = { on_sdp_has_datachannel, NULL, NULL };
t->on_negotiation_needed = NULL;
t->offer_data = &offer;
{
struct test_webrtc *t = test_webrtc_new ();
GObject *channel = NULL;
- struct validate_sdp offer = { on_sdp_has_datachannel, NULL };
- struct validate_sdp answer = { on_sdp_has_datachannel, NULL };
+ struct validate_sdp offer = { on_sdp_has_datachannel, NULL, NULL };
+ struct validate_sdp answer = { on_sdp_has_datachannel, NULL, NULL };
t->on_negotiation_needed = NULL;
t->offer_data = &offer;
{
struct test_webrtc *t = test_webrtc_new ();
GObject *channel = NULL;
- struct validate_sdp offer = { on_sdp_has_datachannel, NULL };
- struct validate_sdp answer = { on_sdp_has_datachannel, NULL };
+ struct validate_sdp offer = { on_sdp_has_datachannel, NULL, NULL };
+ struct validate_sdp answer = { on_sdp_has_datachannel, NULL, NULL };
t->on_negotiation_needed = NULL;
t->offer_data = &offer;
{
struct test_webrtc *t = test_webrtc_new ();
GObject *channel = NULL;
- struct validate_sdp offer = { on_sdp_has_datachannel, NULL };
- struct validate_sdp answer = { on_sdp_has_datachannel, NULL };
+ struct validate_sdp offer = { on_sdp_has_datachannel, NULL, NULL };
+ struct validate_sdp answer = { on_sdp_has_datachannel, NULL, NULL };
t->on_negotiation_needed = NULL;
t->offer_data = &offer;
{
struct test_webrtc *t = test_webrtc_new ();
GObject *channel1 = NULL, *channel2 = NULL;
- struct validate_sdp offer = { on_sdp_has_datachannel, NULL };
- struct validate_sdp answer = { on_sdp_has_datachannel, NULL };
+ struct validate_sdp offer = { on_sdp_has_datachannel, NULL, NULL };
+ struct validate_sdp answer = { on_sdp_has_datachannel, NULL, NULL };
GstStructure *s;
gint n_ready = 0;
bundle,
answer_bundle_only,
};
- struct validate_sdp offer = { _check_bundled_sdp_media, &offer_data };
- struct validate_sdp answer = { _check_bundled_sdp_media, &answer_data };
+ struct validate_sdp offer = { _check_bundled_sdp_media, &offer_data, NULL };
+ struct validate_sdp answer = { _check_bundled_sdp_media, &answer_data, NULL };
gst_util_set_object_arg (G_OBJECT (t->webrtc1), "bundle-policy",
"max-bundle");
bundle,
bundle_only,
};
- struct validate_sdp offer = { _check_bundled_sdp_media, &offer_data };
- struct validate_sdp answer = { _check_bundled_sdp_media, &answer_data };
+ struct validate_sdp offer = { _check_bundled_sdp_media, &offer_data, NULL };
+ struct validate_sdp answer = { _check_bundled_sdp_media, &answer_data, NULL };
gst_util_set_object_arg (G_OBJECT (t->webrtc1), "bundle-policy",
"max-compat");
answer_bundle,
answer_bundle_only,
};
- struct validate_sdp offer = { _check_bundled_sdp_media, &offer_data };
- struct validate_sdp answer = { _check_bundled_sdp_media, &answer_data };
+ struct validate_sdp offer = { _check_bundled_sdp_media, &offer_data, NULL };
+ struct validate_sdp answer = { _check_bundled_sdp_media, &answer_data, NULL };
gst_util_set_object_arg (G_OBJECT (t->webrtc1), "bundle-policy",
"max-bundle");
bundle,
answer_bundle_only,
};
- struct validate_sdp offer = { _check_bundled_sdp_media, &offer_data };
- struct validate_sdp answer = { _check_bundled_sdp_media, &answer_data };
+ struct validate_sdp offer = { _check_bundled_sdp_media, &offer_data, NULL };
+ struct validate_sdp answer = { _check_bundled_sdp_media, &answer_data, NULL };
gst_util_set_object_arg (G_OBJECT (t->webrtc1), "bundle-policy",
"max-bundle");
struct test_webrtc *t = create_audio_video_test ();
const gchar *expected_offer[] = { "sendrecv", "sendrecv" };
const gchar *expected_answer[] = { "sendrecv", "recvonly" };
- struct validate_sdp offer = { on_sdp_media_direction, expected_offer };
- struct validate_sdp answer = { on_sdp_media_direction, expected_answer };
+ struct validate_sdp offer = { on_sdp_media_direction, expected_offer, NULL };
+ struct validate_sdp answer =
+ { on_sdp_media_direction, expected_answer, NULL };
GstHarness *h;
/* check that negotiating twice succeeds */