RTS API Documentation  1.10.11
switch_frame.h
Go to the documentation of this file.
1 /*
2  * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
3  * Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
4  *
5  * Version: MPL 1.1
6  *
7  * The contents of this file are subject to the Mozilla Public License Version
8  * 1.1 (the "License"); you may not use this file except in compliance with
9  * the License. You may obtain a copy of the License at
10  * http://www.mozilla.org/MPL/
11  *
12  * Software distributed under the License is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14  * for the specific language governing rights and limitations under the
15  * License.
16  *
17  * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
18  *
19  * The Initial Developer of the Original Code is
20  * Anthony Minessale II <anthm@freeswitch.org>
21  * Portions created by the Initial Developer are Copyright (C)
22  * the Initial Developer. All Rights Reserved.
23  *
24  * Contributor(s):
25  *
26  * Anthony Minessale II <anthm@freeswitch.org>
27  *
28  *
29  * switch_frame.h -- Media Frame Structure
30  *
31  */
32 /*! \file switch_frame.h
33  \brief Media Frame Structure
34 */
35 
36 #ifndef SWITCH_FRAME_H
37 #define SWITCH_FRAME_H
38 
39 #include <switch.h>
40 
42 
43 typedef struct switch_frame_geometry {
44  int32_t w;
45  int32_t h;
46  int32_t x;
47  int32_t y;
48  int32_t z;
49  int32_t M;
50  int32_t X;
52 
53 /*! \brief An abstraction of a data frame */
54  struct switch_frame {
55  /*! a pointer to the codec information */
57  /*! the originating source of the frame */
58  const char *source;
59  /*! the raw packet */
60  void *packet;
61  /*! the size of the raw packet when applicable */
62  uint32_t packetlen;
63  /*! the extra frame data */
64  void *extra_data;
65  /*! the frame data */
66  void *data;
67  /*! the size of the buffer that is in use */
68  uint32_t datalen;
69  /*! the entire size of the buffer */
70  uint32_t buflen;
71  /*! the number of audio samples present (audio only) */
72  uint32_t samples;
73  /*! the rate of the frame */
74  uint32_t rate;
75  /*! the number of channels in the frame */
76  uint32_t channels;
77  /*! the payload of the frame */
79  /*! the timestamp of the frame */
80  uint32_t timestamp;
81  uint16_t seq;
82  uint32_t ssrc;
84  /*! frame flags */
86  void *user_data;
89  struct switch_frame_geometry geometry;
90 };
91 
93 #endif
94 /* For Emacs:
95  * Local Variables:
96  * mode:c
97  * indent-tabs-mode:t
98  * tab-width:4
99  * c-basic-offset:4
100  * End:
101  * For VIM:
102  * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
103  */
switch_bool_t m
Definition: switch_frame.h:83
Image Descriptor.
Definition: switch_image.h:88
#define SWITCH_END_EXTERN_C
Definition: switch.h:43
switch_bool_t
Definition: switch_types.h:437
uint32_t timestamp
Definition: switch_frame.h:80
const char * source
Definition: switch_frame.h:58
uint32_t ssrc
Definition: switch_frame.h:82
switch_codec_t * codec
Definition: switch_frame.h:56
uint16_t seq
Definition: switch_frame.h:81
uint32_t buflen
Definition: switch_frame.h:70
uint32_t datalen
Definition: switch_frame.h:68
uint32_t packetlen
Definition: switch_frame.h:62
switch_frame_flag_t flags
Definition: switch_frame.h:85
payload_map_t * pmap
Definition: switch_frame.h:87
uint32_t rate
Definition: switch_frame.h:74
void * extra_data
Definition: switch_frame.h:64
An abstraction of a data frame.
Definition: switch_frame.h:54
uint32_t switch_frame_flag_t
void * packet
Definition: switch_frame.h:60
switch_image_t * img
Definition: switch_frame.h:88
SWITCH_BEGIN_EXTERN_C struct switch_frame_geometry switch_frame_geometry_t
Main Library Header.
uint32_t samples
Definition: switch_frame.h:72
void * user_data
Definition: switch_frame.h:86
uint32_t channels
Definition: switch_frame.h:76
switch_payload_t payload
Definition: switch_frame.h:78
uint8_t switch_payload_t
#define SWITCH_BEGIN_EXTERN_C
Definition: switch.h:42