Wireshark  2.9.0-477-g68ec514b
The Wireshark network protocol analyzer
rtp_media.h
Go to the documentation of this file.
1 /* rtp_media.h
2  *
3  * RTP decoding routines for Wireshark.
4  * Copied from ui/gtk/rtp_player.c
5  *
6  * Copyright 2006, Alejandro Vaquero <alejandrovaquero@yahoo.com>
7  *
8  * Wireshark - Network traffic analyzer
9  * By Gerald Combs <gerald@wireshark.org>
10  * Copyright 1999 Gerald Combs
11  *
12  * SPDX-License-Identifier: GPL-2.0-or-later
13  */
14 
15 #ifndef __RTP_MEDIA_H__
16 #define __RTP_MEDIA_H__
17 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26 
27 #include <glib.h>
28 
29 /****************************************************************************/
30 /* INTERFACE */
31 /****************************************************************************/
32 
33 typedef gint16 SAMPLE;
34 #define SAMPLE_MAX G_MAXINT16
35 #define SAMPLE_MIN G_MININT16
36 
37 /* Defines an RTP packet */
38 typedef struct _rtp_packet {
39  guint32 frame_num; /* Qt only */
40  struct _rtp_info *info; /* the RTP dissected info */
41  double arrive_offset; /* arrive offset time since the beginning of the stream as ms in GTK UI and s in Qt UI */
42  guint8* payload_data;
43 } rtp_packet_t;
44 
49 GHashTable *rtp_decoder_hash_table_new(void);
50 
60 size_t decode_rtp_packet(rtp_packet_t *rp, SAMPLE **out_buff, GHashTable *decoders_hash, unsigned *channels_ptr, unsigned *sample_rate_ptr);
61 
62 #ifdef __cplusplus
63 }
64 #endif /* __cplusplus */
65 
66 #endif /* __RTP_MEDIA_H__ */
67 
68 /*
69  * Editor modelines - http://www.wireshark.org/tools/modelines.html
70  *
71  * Local variables:
72  * c-basic-offset: 4
73  * tab-width: 8
74  * indent-tabs-mode: nil
75  * End:
76  *
77  * vi: set shiftwidth=4 tabstop=8 expandtab:
78  * :indentSize=4:tabSize=8:noTabs=true:
79  */
Definition: file-pcapng.c:177
size_t decode_rtp_packet(rtp_packet_t *rp, SAMPLE **out_buff, GHashTable *decoders_hash, unsigned *channels_ptr, unsigned *sample_rate_ptr)
Definition: rtp_media.c:39
GHashTable * rtp_decoder_hash_table_new(void)
Definition: rtp_media.c:106
Definition: packet-rtp.h:26
Definition: rtp_media.h:38