Add a minimum and maximum API level. Backward-compatible changes to
the API only bump the maximum API level. Backward incompatible
changes bump the maximum API level and the mininum, to the
new (maximum) level.
This may allow codec plugins to continue working without recompilation,
possibly with reduced functionality.
The API level is only defined for codecs because it is a small
and easy to define API, and very stable.
Maybe we could do the same for wiretap (file type) plugins. For the
various epan plugin types it seems pointless and futile. I cannot
see a scenario where a new Wireshark minor release does not increase
the minimum API level.
RTP static registered payload types fully describe the codec,
including clock rate and channels. For the payload formats that
use dynamic payload type number assignment, while some formats
have a fixed (or normal) clock rate and number of audio channels,
there are some codecs that can accept several possible values.
Change the codec plugin interface to accept these parameters,
and move the codec-specific state to a member of a new struct.
As an example, use this to implement the L16 media type for other
clock rates and number of audio channels, both the standard PT=10
stereo type as well as other clock rates negotiated via a dynamic
type. (See sip-rtp-l16.pcap on the SampleCaptures wiki page for
an example.)
Note that RTP Player doesn't support codecs returning output with
more than one channel currently, so downmix to mono.
The next step is adding the format parameters from fmtp to this.
(See #17608)
RFC 4855 3. Mapping to SDP Parameters
Note that the payload format (encoding) names defined in the RTP
Profile [4] are commonly shown in upper case. Media subtype names
are commonly shown in lower case. These names are case-insensitive
in both places.
Store and lookup codec names in an ASCII case-insensitive manner,
so that RTP Player works if the codec name is sent in SDP in a
different case.
This also has the effect of making AMR playback after using Decode
As (e.g., for a RTP stream set up heuristically without an SDP) work,
because the dissector is registered with a lower-case name of "amr"
(compare Opus, which is lower-case both in the dissector short name
and in the canonical IANA media type registration.)
Related to #17608
Instead *_register_plugin() is turned into a noop (with a warning).
The test suit is failing with ENABLE_PLUGINS=Off (it was already failing
before and this patch didn't affect that).
Closes#17202.
Adds a pre-commit hook for detecting and replacing
occurrences of `g_malloc()` and `wmem_alloc()` with
`g_new()` and `wmem_new()`, to improve the
readability of Wireshark's code, and
occurrences of
`g_malloc(sizeof(struct myobj) * foo)`
with
`g_new(struct myobj, foo)`
to prevent integer overflows
Also fixes all existing occurrences across
the codebase.
Change all wireshark.org URLs to use https.
Fix some broken links while we're at it.
Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>