| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
rtp_media.h File Reference
`#include <glib.h>`
`#include <wsutil/wmem/wmem_map.h>`

Go to the source code of this file.

## Classes
struct | _rtp_packet

## Macros
#define | SAMPLE_MAX INT16_MAX
#define | SAMPLE_MIN INT16_MIN
#define | SAMPLE_NaN SAMPLE_MIN
#define | SAMPLE_BYTES (sizeof(SAMPLE) / sizeof(char))

## Typedefs
typedef int16_t | SAMPLE
typedef struct _rtp_packet | rtp_packet_t

## Functions
GHashTable * | rtp_decoder_hash_table_new (void)
size_t | decode_rtp_packet (rtp_packet_t *rp, SAMPLE **out_buff, GHashTable *decoders_hash, unsigned *channels_ptr, unsigned *sample_rate_ptr)

## Detailed Description

RTP decoding routines for Wireshark. Copied from ui/gtk/rtp_player.c

Copyright 2006, Alejandro Vaquero aleja.nosp@m.ndro.nosp@m.vaque.nosp@m.ro@y.nosp@m.ahoo..nosp@m.com

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1999 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

"RTP Player" dialog box common routines.

## Function Documentation

## ◆ decode_rtp_packet()

size_t decode_rtp_packet | ( | rtp_packet_t * | rp,
|  | SAMPLE ** | out_buff,
|  | GHashTable * | decoders_hash,
|  | unsigned * | channels_ptr,
|  | unsigned * | sample_rate_ptr
| ) |  |

Decode an RTP packet

Parameters

  rp | Wrapper for per-packet RTP tap data.
  out_buff | Output audio samples.
  decoders_hash | Hash table created with rtp_decoder_hash_table_new.
  channels_ptr | If non-NULL, receives the number of channels in the sample.
  sample_rate_ptr | If non-NULL, receives the sample rate.

Returns
  The number of decoded bytes on success, 0 on failure.

## ◆ rtp_decoder_hash_table_new()

GHashTable * rtp_decoder_hash_table_new | ( | void |  | ) |

Create a new hash table.

Returns
  A new hash table suitable for passing to decode_rtp_packet.