2005-11-19 20:07:43 +00:00
|
|
|
/*
|
|
|
|
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
|
|
|
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
|
|
|
*
|
|
|
|
* Version: MPL 1.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Anthony Minessale II <anthmct@yahoo.com>
|
|
|
|
* Portions created by the Initial Developer are Copyright (C)
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Anthony Minessale II <anthmct@yahoo.com>
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* switch_frame.h -- Media Frame Structure
|
|
|
|
*
|
|
|
|
*/
|
2006-01-02 17:28:59 +00:00
|
|
|
/*! \file switch_frame.h
|
|
|
|
\brief Media Frame Structure
|
2006-01-01 15:23:12 +00:00
|
|
|
*/
|
|
|
|
|
2005-11-19 20:07:43 +00:00
|
|
|
#ifndef SWITCH_FRAME_H
|
|
|
|
#define SWITCH_FRAME_H
|
|
|
|
|
|
|
|
#include <switch.h>
|
|
|
|
|
2006-09-07 14:23:31 +00:00
|
|
|
SWITCH_BEGIN_EXTERN_C
|
2006-04-28 20:04:08 +00:00
|
|
|
|
2006-01-05 21:03:22 +00:00
|
|
|
/*! \brief An abstraction of a data frame */
|
2005-11-19 20:07:43 +00:00
|
|
|
struct switch_frame {
|
2006-01-05 21:03:22 +00:00
|
|
|
/*! a pointer to the codec information */
|
2006-04-29 06:05:03 +00:00
|
|
|
switch_codec_t *codec;
|
2006-04-18 00:24:52 +00:00
|
|
|
/*! the originating source of the frame */
|
|
|
|
const char *source;
|
|
|
|
/*! the raw packet */
|
|
|
|
void *packet;
|
|
|
|
/*! the size of the raw packet when applicable*/
|
|
|
|
uint32_t packetlen;
|
2006-01-05 21:03:22 +00:00
|
|
|
/*! the frame data */
|
2005-11-19 20:07:43 +00:00
|
|
|
void *data;
|
2006-01-05 21:03:22 +00:00
|
|
|
/*! the size of the buffer that is in use */
|
2006-04-09 00:10:13 +00:00
|
|
|
uint32_t datalen;
|
2006-01-05 21:03:22 +00:00
|
|
|
/*! the entire size of the buffer */
|
2006-04-09 00:10:13 +00:00
|
|
|
uint32_t buflen;
|
2006-01-05 21:03:22 +00:00
|
|
|
/*! the number of audio samples present (audio only) */
|
2006-04-09 00:10:13 +00:00
|
|
|
uint32_t samples;
|
2006-01-05 21:03:22 +00:00
|
|
|
/*! the rate of the frame */
|
2006-04-09 00:10:13 +00:00
|
|
|
uint32_t rate;
|
2006-04-18 00:24:52 +00:00
|
|
|
/*! the payload of the frame */
|
2006-04-18 16:50:34 +00:00
|
|
|
switch_payload_t payload;
|
2006-04-18 00:24:52 +00:00
|
|
|
/*! the timestamp of the frame */
|
2007-03-05 20:53:54 +00:00
|
|
|
switch_size_t timestamp;
|
2006-04-06 19:50:53 +00:00
|
|
|
/*! frame flags */
|
2006-04-29 23:43:28 +00:00
|
|
|
switch_frame_flag_t flags;
|
2005-11-19 20:07:43 +00:00
|
|
|
};
|
|
|
|
|
2006-09-07 15:15:39 +00:00
|
|
|
SWITCH_END_EXTERN_C
|
2005-11-19 20:07:43 +00:00
|
|
|
|
|
|
|
#endif
|
2006-11-27 22:30:48 +00:00
|
|
|
|
|
|
|
/* For Emacs:
|
|
|
|
* Local Variables:
|
|
|
|
* mode:c
|
2007-02-09 02:36:03 +00:00
|
|
|
* indent-tabs-mode:t
|
2006-11-27 22:30:48 +00:00
|
|
|
* tab-width:4
|
|
|
|
* c-basic-offset:4
|
|
|
|
* End:
|
|
|
|
* For VIM:
|
|
|
|
* vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
|
|
|
|
*/
|