diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-09-01 10:35:55 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-09-02 08:25:49 +0200 |
commit | cac2438b0c33f54a6dcac55b55e8cfc33de197b2 (patch) | |
tree | bf8b01402f20bfb5d49a4cf6204197061dcb0924 /openbsc/include/openbsc/mgcp_internal.h | |
parent | 3713f78ac23ca815c361fe79378ff6d2e522ef6a (diff) |
mgcp: Move the "codec" params to a struct
We might be offered multiple codecs by the remote and need to
switch between them once we receive data. Do this by moving it
to a struct so we can separate between proposed and current
codec. In SDP we can have multiple codecs but a global ptime.
The current code doesn't separate that clearly instead we write
it to the main codec.
Diffstat (limited to 'openbsc/include/openbsc/mgcp_internal.h')
-rw-r--r-- | openbsc/include/openbsc/mgcp_internal.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/openbsc/include/openbsc/mgcp_internal.h b/openbsc/include/openbsc/mgcp_internal.h index 3d308835e..245890994 100644 --- a/openbsc/include/openbsc/mgcp_internal.h +++ b/openbsc/include/openbsc/mgcp_internal.h @@ -67,6 +67,17 @@ struct mgcp_rtp_state { struct mgcp_rtp_stream_state out_stream; }; +struct mgcp_rtp_codec { + uint32_t rate; + int channels; + uint32_t frame_duration_num; + uint32_t frame_duration_den; + + int payload_type; + char *audio_name; + char *subtype_name; +}; + struct mgcp_rtp_end { /* statistics */ unsigned int packets; @@ -77,17 +88,13 @@ struct mgcp_rtp_end { /* in network byte order */ int rtp_port, rtcp_port; + /* audio codec information */ + struct mgcp_rtp_codec codec; + /* per endpoint data */ - int payload_type; - uint32_t rate; - int channels; - uint32_t frame_duration_num; - uint32_t frame_duration_den; int frames_per_packet; uint32_t packet_duration_ms; char *fmtp_extra; - char *audio_name; - char *subtype_name; int output_enabled; int force_output_ptime; |