FreeSWITCH API Documentation  1.7.0
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 /*! \brief An abstraction of a data frame */
43  struct switch_frame {
44  /*! a pointer to the codec information */
46  /*! the originating source of the frame */
47  const char *source;
48  /*! the raw packet */
49  void *packet;
50  /*! the size of the raw packet when applicable */
51  uint32_t packetlen;
52  /*! the extra frame data */
53  void *extra_data;
54  /*! the frame data */
55  void *data;
56  /*! the size of the buffer that is in use */
57  uint32_t datalen;
58  /*! the entire size of the buffer */
59  uint32_t buflen;
60  /*! the number of audio samples present (audio only) */
61  uint32_t samples;
62  /*! the rate of the frame */
63  uint32_t rate;
64  /*! the number of channels in the frame */
65  uint32_t channels;
66  /*! the payload of the frame */
68  /*! the timestamp of the frame */
69  uint32_t timestamp;
70  uint16_t seq;
71  uint32_t ssrc;
73  /*! frame flags */
75  void *user_data;
78 };
79 
81 #endif
82 /* For Emacs:
83  * Local Variables:
84  * mode:c
85  * indent-tabs-mode:t
86  * tab-width:4
87  * c-basic-offset:4
88  * End:
89  * For VIM:
90  * vim:set softtabstop=4 shiftwidth=4 tabstop=4 noet:
91  */
switch_bool_t m
Definition: switch_frame.h:72
Image Descriptor.
Definition: switch_image.h:88
#define SWITCH_END_EXTERN_C
Definition: switch.h:43
switch_bool_t
Definition: switch_types.h:405
uint32_t timestamp
Definition: switch_frame.h:69
const char * source
Definition: switch_frame.h:47
uint32_t ssrc
Definition: switch_frame.h:71
switch_codec_t * codec
Definition: switch_frame.h:45
uint16_t seq
Definition: switch_frame.h:70
uint32_t buflen
Definition: switch_frame.h:59
uint32_t datalen
Definition: switch_frame.h:57
uint32_t packetlen
Definition: switch_frame.h:51
switch_frame_flag_t flags
Definition: switch_frame.h:74
payload_map_t * pmap
Definition: switch_frame.h:76
uint32_t rate
Definition: switch_frame.h:63
void * extra_data
Definition: switch_frame.h:53
An abstraction of a data frame.
Definition: switch_frame.h:43
uint32_t switch_frame_flag_t
void * packet
Definition: switch_frame.h:49
switch_image_t * img
Definition: switch_frame.h:77
Main Library Header.
uint32_t samples
Definition: switch_frame.h:61
void * user_data
Definition: switch_frame.h:75
uint32_t channels
Definition: switch_frame.h:65
switch_payload_t payload
Definition: switch_frame.h:67
uint8_t switch_payload_t
#define SWITCH_BEGIN_EXTERN_C
Definition: switch.h:42