Wireshark-dev: Re: [Wireshark-dev] Support Opus in WireShark

From: Jiří Novák <j.novak@xxxxxxxxxxxx>
Date: Sun, 19 Jan 2020 15:06:36 +0000
Hi Ryan,

  I'm just finishing adding ilbc codec do Wireshark. You can check

https://code.wireshark.org/review/#/c/35686/

  to see what to change/add.

>     Here is the change:
> 
>     1、Change a function with C++ default parameters
> 
>     Origin version: size_t convert_payload_to_samples(unsigned int
>     payload_type, QTemporaryFile *tempfile, uint8_t *pd_out, size_t
>     expected_nchars, struct _GHashTable *decoders_hash );
> 
>     MyChanged version: size_t convert_payload_to_samples(unsigned int
>     payload_type, QTemporaryFile *tempfile, uint8_t *pd_out, size_t
>     expected_nchars, struct _GHashTable *decoders_hash , *size_t fecflag
>     = 0*);

I'm sorry but I don't understand why you need to use C++ default parameter.
BTW adding fecflag as a parameter is not wise from my point of view. I
suggest to handle it inside decoder.

>     2、Add some codes to support OPus fec、play and save.In my opinion
>     these codes don't affect other functions.(In the files:
>     rtp_audio_stream.cpp rtp_audio_stream.cpp )

Do you have samples with opus RTP? If so, create bug report in
https://bugs.wireshark.org and attach it to it. Later you will bind bug
id to your patch and files will be used for testing the patch.

>     I don't know whether the change is useful andmeets specifications.
> 
>     *The other question: * In the RTP protocol, Opus don't have a fixed
>     payload type.  Now Iwrite the payload type into macro. DoesithaveagoodwaytoletuserchoosetheOpuspayloadtype?
>     Althoughtried,Ifailed~~ I don'tknowhowtorealizeit.

Dynamic payload is handled by Wireshark. It will decode SDP and match
dynamic payload ID with opus codec. This relation is stored in struct
_GHashTable *decoders_hash. Your coded will be just called with packet
data when needed.

					Best regards,

							Jirka Novak