To show that player has been created.
Additionally: add one more log line
to track that the play media is being requested.
Change-Id: I4e8eb8f282654902a96bffb70c7c241e9c78b8d5
In order to understand whether is must be initialized.
And use a given parser pointer to do so. This can be native or
json parser.
Remove previously introduced bool param, which was used
for differentiation.
Change-Id: I6d0bb083fe4dea5625d40175c8978fffaca6d34f
There is a dedicated JSON parser, so use this.
Also leave some TODO'ers to think about adding own
`parser_arg` for JSON-like formatted data.
Change-Id: I5399ffb6ec74e88887b52fd63b96a8e44428c495
If already having the local ptr, then why not to use it,
instead of using directly the globally visible object.
In the `control_ng_process_payload()` add a pointer
to the `ng_parser_json` parser.
Change-Id: I9d656733991e2d99c18aa1cc6d705ed053f57f0a
When preparing a response, especially for the case of error,
we already make sure to init the resp ctx. So just add
a helper for this, because same routine used.
Also optionally init parser as native (dict) if required.
Some of the cases like data is <= 0 length, or
there has been not dict or JSON format spotted,
then init as native.
Change-Id: I7d13669075525b754e1950e3212b79800b20f85a
In case the data length is <= 0, or there has been
no dictionary-like or json-like format spotted in the
NG incoming control message, then treat parser
as native (so dict) by default.
Otherwise not possible to initilize the command context,
and hence the error treatment wouldn't be
able to prepare the response properly.
Change-Id: I99b9c571a9112a25e474dfc39e21cce15fc5f634
If any caller passes NULL for item callback and
then receives a JSON with a nested object/list/int, this can crash.
Change-Id: I69fbb9fec76305f6e1ed9ea5b25a50a7ee85c454
Allocate dict enough in-time for the `command_ctx.resp`,
because a plenty of the `err_send` gotos, having this alias
appending something to the dict, will use it uninitialized.
Change-Id: I9114e7b02437e47de256b8fc88faf993329f083f
Some of the values aren't actually checked, such as:
`redis_disable_time`, `mqtt_publish_interval`, `dtx_lag`,
`dtx_delay`, `dtx_shift` and `max_dtx`.
Add consistent validation where negative values
are not meaningful.
Change-Id: Ibb6e128ec71253f4e17c1232e3c90de44ded050b
In those initialization paths (where possible)
use the `die()` alternative to the `abort()` one.
`die()` gives an explanatory message,
which is friendlier for configuration/startup failures.
Change-Id: I5d79c26925cf3adaebf83dd6bcac756418745275
The `fill_initial_rtpe_cfg()` func doesn't copy
`RTPE_CONFIG_STR_PARAMS` and `RTPE_CONFIG_CHARPP_PARAMS`,
even though the `unfill_initial_rtpe_cfg()` func frees them.
Globally it starts zeroed and this may never crash,
but then the snapshot is still incomplete.
Change-Id: I448ee6f8b9a22ad066bb57a9acd14134b7a71869
When failing to read the transcode config
for the destiantion codec, log accordingly the destination codec,
not the source one.
Change-Id: I1211cde6e1d055169e809e8a49c6f88b0028e3ec
Resolve file name conflicts between different components
Ensure shared log levels are identical across components
Encapsulates lib/*
Change-Id: If848d6fa0e4cd8eac88ce9e63ee77fc5a7a481fd
When parsing the config validate general
and per-iface port ranges:
- port min < port max
- 1 < port-min and port-max < 65535
Change-Id: I9f336e51f9bb32dcccee965d51dc552f86934fe3
The documented behavior is:
- if not set at all, set to 180s by default
- if set to 0, then will be ignored in media player
- if set to > 0, then will be used to set the value
Current code is inconsistent, 0 is always reset to 180s,
hence 0 value can never lead to ignoring.
Only reset to 180s the `-1` (default value, means never parsed).
Also clarify a little bit more the description of the option.
Change-Id: I5c3e63ffaca6271424783eeba828578e54c819e5
Check that `silence_detect` is in the range 0-100.
Also properly cast to actual `silence_detect_int` type which
is `uint32_t`.
The reason is that in the current code this can exceed `INT_MAX`
(for values near or above 50%) and also, values above 100% are not rejected.
Change-Id: Ic2359402879412926b18125e292c1969cda45203
Since this is parsed as type int, potentially can be given as -1.
Hence don't accept the range < 0 and > 2.
Change-Id: I8cdbf6e7626ec89bcd287742ddfbd49a3e1a3c90
In case when parsing fails in `redis_ep_parse()`
and it returns -1, we never de-allocate the actually
duplicated strings before (using `g_strdup()`).
For example with redis subscribe, where we have a fallback,
will leak and overwrite previous allocations.
So just free what's been allocated on the failure case.
Change-Id: I340f8998de9de80342f293c669719bea7c3a2a97
Already used by `--no-fallback`, so the rest just probably
inherited the same letter when doing copy-paste.
That is ambiguous and may cause option parsing conflicts.
Keep `F` only for the historical(most important) option
and set the rest to 0.
Change-Id: I6e4841f6e6614bfdfcf53d159130d6d676073d47
We indeed already didn't support it, just silently ignored.
Now just completely drop support even in flags parsing.
In the documentation it was removed already a long while ago.
Accordingly update tests and utils.
Change-Id: I2de8ad24b77aa5f43270640559bf809ed1c565bc
First check if the given `command_action` is a dict, and only then
allocate manipulation object. Because otherwise it still creates
an object, but then if the `command_action` isn't a dict,
it just returns. So useless. Hence re-order them.
Change-Id: I50bd334d8b945a5dd5177202168ef21cf2915458
The nested if-statement is correctly written,
but visually is fragile. Simple curly braces will prevent
anyone in the future introducing a dangling-if style mistake.
Change-Id: I3632702390f046c317eac4e5fef76bc7db707081