Wireshark  4.3.0
The Wireshark network protocol analyzer
rtp_media.h
Go to the documentation of this file.
1 
15 #ifndef __RTP_MEDIA_H__
16 #define __RTP_MEDIA_H__
17 
18 #include <glib.h>
19 #include <wsutil/wmem/wmem_map.h>
20 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* __cplusplus */
29 
30 /****************************************************************************/
31 /* INTERFACE */
32 /****************************************************************************/
33 
34 typedef int16_t SAMPLE;
35 #define SAMPLE_MAX INT16_MAX
36 #define SAMPLE_MIN INT16_MIN
37 #define SAMPLE_NaN SAMPLE_MIN
38 #define SAMPLE_BYTES (sizeof(SAMPLE) / sizeof(char))
39 
40 /* Defines an RTP packet */
41 typedef struct _rtp_packet {
42  uint32_t frame_num; /* Qt only */
43  struct _rtp_info *info; /* the RTP dissected info */
44  double arrive_offset; /* arrive offset time since the beginning of the stream as ms in GTK UI and s in Qt UI */
45  uint8_t* payload_data;
46 } rtp_packet_t;
47 
52 GHashTable *rtp_decoder_hash_table_new(void);
53 
73 size_t decode_rtp_packet_payload(uint8_t payload_type, const char *payload_type_str, int payload_rate, int payload_channels, wmem_map_t *payload_fmtp_map, uint8_t *payload_data, size_t payload_len, SAMPLE **out_buff, GHashTable *decoders_hash, unsigned *channels_ptr, unsigned *sample_rate_ptr);
74 
84 size_t decode_rtp_packet(rtp_packet_t *rp, SAMPLE **out_buff, GHashTable *decoders_hash, unsigned *channels_ptr, unsigned *sample_rate_ptr);
85 
86 #ifdef __cplusplus
87 }
88 #endif /* __cplusplus */
89 
90 #endif /* __RTP_MEDIA_H__ */
GHashTable * rtp_decoder_hash_table_new(void)
Definition: rtp_media.c:125
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:99
size_t decode_rtp_packet_payload(uint8_t payload_type, const char *payload_type_str, int payload_rate, int payload_channels, wmem_map_t *payload_fmtp_map, uint8_t *payload_data, size_t payload_len, SAMPLE **out_buff, GHashTable *decoders_hash, unsigned *channels_ptr, unsigned *sample_rate_ptr)
Definition: rtp_media.c:39
Definition: packet-rtp.h:29
Definition: rtp_media.h:41
Definition: wmem_map.c:44
Definition: file-pcapng.h:57