UniMRCP
1.3.0
Main Page
Related Pages
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
libs
mpf
include
mpf_rtp_header.h
Go to the documentation of this file.
1
/*
2
* Copyright 2008-2014 Arsen Chaloyan
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*
16
* $Id: mpf_rtp_header.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17
*/
18
19
#ifndef MPF_RTP_HEADER_H
20
#define MPF_RTP_HEADER_H
21
22
/**
23
* @file mpf_rtp_header.h
24
* @brief RTP Header Definition
25
*/
26
27
#include "
mpf.h
"
28
29
APT_BEGIN_EXTERN_C
30
31
/** Protocol version */
32
#define RTP_VERSION 2
33
34
/** RTP header declaration */
35
typedef
struct
rtp_header_t
rtp_header_t
;
36
/** RTP extension header declaration */
37
typedef
struct
rtp_extension_header_t
rtp_extension_header_t
;
38
39
40
/** RTP header */
41
struct
rtp_header_t
{
42
#if (APR_IS_BIGENDIAN == 1)
43
/** protocol version */
44
apr_uint32_t
version
: 2;
45
/** padding flag */
46
apr_uint32_t
padding
: 1;
47
/** header extension flag */
48
apr_uint32_t
extension
: 1;
49
/** CSRC count */
50
apr_uint32_t
count
: 4;
51
/** marker bit */
52
apr_uint32_t
marker
: 1;
53
/** payload type */
54
apr_uint32_t
type
: 7;
55
#else
56
/** CSRC count */
57
apr_uint32_t
count
: 4;
58
/** header extension flag */
59
apr_uint32_t
extension
: 1;
60
/** padding flag */
61
apr_uint32_t
padding
: 1;
62
/** protocol version */
63
apr_uint32_t
version
: 2;
64
/** payload type */
65
apr_uint32_t
type
: 7;
66
/** marker bit */
67
apr_uint32_t
marker
: 1;
68
#endif
69
70
/** sequence number */
71
apr_uint32_t
sequence
: 16;
72
/** timestamp */
73
apr_uint32_t
timestamp
;
74
/** synchronization source */
75
apr_uint32_t
ssrc
;
76
};
77
78
/** RTP extension header */
79
struct
rtp_extension_header_t
{
80
/** profile */
81
apr_uint16_t
profile
;
82
/** length */
83
apr_uint16_t
length
;
84
};
85
86
APT_END_EXTERN_C
87
88
#endif
/* MPF_RTP_HEADER_H */
Generated on Mon Feb 2 2015 19:41:38 for UniMRCP by
1.8.3.1