Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Show Cases
IBC 2019
multistream-server
Commits
72da45d5
Commit
72da45d5
authored
Aug 23, 2019
by
Olivier Crête
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set direction in offer
parent
6c75e8a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
src/main.c
src/main.c
+13
-0
No files found.
src/main.c
View file @
72da45d5
...
...
@@ -54,6 +54,7 @@ on_offer_created (GstPromise *promise, GstElement *webrtcbin)
GstWebRTCSessionDescription
*
offer
=
NULL
;
gchar
*
sdp
;
GstSDPMedia
*
media
;
guint
i
;
gst_structure_get
(
gst_promise_get_reply
(
promise
),
"offer"
,
GST_TYPE_WEBRTC_SESSION_DESCRIPTION
,
&
offer
,
NULL
);
...
...
@@ -61,6 +62,18 @@ on_offer_created (GstPromise *promise, GstElement *webrtcbin)
media
=
(
GstSDPMedia
*
)
gst_sdp_message_get_media
(
offer
->
sdp
,
0
);
for
(
i
=
0
;
i
<
gst_sdp_media_attributes_len
(
media
);
i
++
)
{
const
GstSDPAttribute
*
a
=
gst_sdp_media_get_attribute
(
media
,
i
);
if
(
!
strcmp
(
a
->
key
,
"sendrecv"
))
{
GstSDPAttribute
newa
;
newa
.
key
=
g_strdup
(
"sendonly"
);
newa
.
value
=
g_strdup
(
""
);
gst_sdp_media_replace_attribute
(
media
,
i
,
&
newa
);
break
;
}
}
gst_sdp_media_add_attribute
(
media
,
"fmtp"
,
"96 packetization-mode=1;profile-level-id=42e01f"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment