UniMRCP  1.3.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mpf_stream_descriptor.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_stream_descriptor.h 2136 2014-07-04 06:33:36Z achaloyan@gmail.com $
17  */
18 
19 #ifndef MPF_STREAM_DESCRIPTOR_H
20 #define MPF_STREAM_DESCRIPTOR_H
21 
22 /**
23  * @file mpf_stream_descriptor.h
24  * @brief MPF Stream Descriptor
25  */
26 
27 #include "mpf_codec_descriptor.h"
28 
30 
31 /** Stream capabilities declaration */
33 
34 /** Stream directions (none, send, receive, duplex) */
35 typedef enum {
36  STREAM_DIRECTION_NONE = 0x0, /**< none */
37  STREAM_DIRECTION_SEND = 0x1, /**< send (sink) */
38  STREAM_DIRECTION_RECEIVE = 0x2, /**< receive (source) */
39 
42 
43 
44 /** Stream capabilities */
46  /** Supported directions either send, receive or bidirectional stream (bitmask of mpf_stream_direction_e) */
48  /** Codec capabilities (supported codecs and named events) */
50 };
51 
52 /** Create stream capabilities */
54 
55 /** Create source stream capabilities */
56 static APR_INLINE mpf_stream_capabilities_t* mpf_source_stream_capabilities_create(apr_pool_t *pool)
57 {
59 }
60 
61 /** Create sink stream capabilities */
62 static APR_INLINE mpf_stream_capabilities_t* mpf_sink_stream_capabilities_create(apr_pool_t *pool)
63 {
65 }
66 
67 /** Clone stream capabilities */
69 
70 /** Merge stream capabilities */
71 MPF_DECLARE(apt_bool_t) mpf_stream_capabilities_merge(mpf_stream_capabilities_t *capabilities, const mpf_stream_capabilities_t *src_capabilities, apr_pool_t *pool);
72 
73 
74 /** Get reverse direction */
75 static APR_INLINE mpf_stream_direction_e mpf_stream_reverse_direction_get(mpf_stream_direction_e direction)
76 {
77  mpf_stream_direction_e rev_direction = direction;
78  if(rev_direction == STREAM_DIRECTION_SEND) {
79  rev_direction = STREAM_DIRECTION_RECEIVE;
80  }
81  else if(rev_direction == STREAM_DIRECTION_RECEIVE) {
82  rev_direction = STREAM_DIRECTION_SEND;
83  }
84  return rev_direction;
85 }
86 
87 
89 
90 #endif /* MPF_STREAM_DESCRIPTOR_H */