The unified `rtpengine_message` struct has become quite large, and most
fields are not used for most of the messages sent to the kernel module.
Use command-specific structures that only contain the required
information. Adapt the I/O code and the size checks to use the correct
sizes.
Do special handling for GET_*_STATS as these commands do both input and
output at the same time. Copy in only the input portion of the struct.
(Copy-out still copies the entire struct at this point.)
Change-Id: Ia8aec6135fd7de42ae4e62e7f2dc23804e1f0914
Defer handling of trickle ICE updates to the appropriate function, which
also handles queuing up the updates in case they're processed before the
call or call party has been fully created.
Change-Id: I2489cb0ee96fba35003765bbdd692f02caed7055
Move trickle ICE handling out of __media_init_from_flags and into a
higher-level function. This obsoletes the special magic return value to
indicate a trickle ICE failure.
All methods accepting trickle ICE updates must now explicitly call the
trickle ICE update function.
The requirement to have a full dialogue for trickle ICE updates is
removed as trickle ICE only affects one side.
Change-Id: I0850e1858876ca7bcdd39b7144b53b5a4afed53e
Moving code for handling (queuing, dequeuing) trickle ICE fragments into
ice.c, where it makes no sense. No functional changes.
Change-Id: Ib68f82e8d58efe066fdc48cd32ca9869cdeab846
This is slightly more performant as it does the retrieval and removal
with just one lookup instead of two.
Change-Id: Iba702704218ac4689a6788fd23a792ad40460ea8
We're also in controlling role for subscribe answers.
Make sure we don't clobber the source media's ICE options when adding a
subcriptions.
Change-Id: I5361462aefdbbe6411841332b69a8dc4b0e1e013
1) a=ice-options can be a session-level attribute. Use the correct
lookup function to check for both media-level and session-level
attributes.
2) The RTP endpoint address must be filled in before we do the trickle
ICE check, which uses 0.0.0.0:9 as determining factor.
3) Adapt a test case.
Change-Id: Ic0caffc85791131173848d28f5a652ad9d9124db
Using a pointer array instead of a linked lists allows us to directly
reference a media section by index number, without having to spool into
the linked list.
No functional changes.
Change-Id: I8b0e93f0c2e9addbcb4c938894118ed4a6aec768
There's no point in creating a new monologue that doesn't exist yet if
all we want to do is destroy it.
Change-Id: I6b782f2706f82d1f15a5718f1bf7352fc3c3f0a4
Deprecate the `append_attr_to_gstring()` and combine the functionality
of it with the `append_attr_char_to_gstring()` to not have multiple
functions doing same thing.
Change-Id: Id955f79a4f3b0864427216af20b11fd4baeb2b93
Just fixing of some typos introduced before by this commits list:
- 3444febebc
- 21562866ce
- c024b54dc3
Change-Id: I9b7f6ed5c67f1a5f31bb37ef776cf943096f1d2f
We have to stop using objects of `struct port_pool` (media_socket.h),
becasue a newer approach introduced for ports allocations deprecates
usage of them.
Deprecated objects:
`port_pool.last_used`
`port_pool.ports_used`
`port_pool.free_list`
`port_pool.free_list_used`
Change-Id: I70e166753da7a43cb3b6b188c83d978b7dbce046
Introduce a reworked port allocation in RTPEngine.
The goal of this rework is to:
- simplify the logic of handling free/engaged ports
- eliminate a bottle neck begotten by overcomplicated logic
- potentially resolve the issue with "ran out of ports"
under heavy loading, when still there must be ports left
in the ports pool
Change-Id: Ifd2b1565611dd3b86c474a1ea5507fc6152fc212
Require all callers of media_block_match() and play_media_select_party()
ot provide their own "flags" and do the cleanup of them afterwards.
Change-Id: I465696e899851dd98e714c5b0d55397a6dbd5dab
The `encoder` is actually persistent and only freed when the output is
freed, so testing for its existence is not enough to determine whether
the output is open. The `fmtctx` can be used for that.
Change-Id: I2cc3f00a0e983fafd5915736089a0421385b6ce3