RTS API Documentation  1.10.11
switch_packetizer.h
Go to the documentation of this file.
1 /*
2  * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
3  * Copyright (C) 2005-2020, 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  * Seven Du <dujinfang@gmail.com>
21  * Portions created by the Initial Developer are Copyright (C)
22  * the Initial Developer. All Rights Reserved.
23  *
24  * Contributor(s):
25  *
26  * Seven Du <dujinfang@gmail.com>
27  *
28  * switch_packetizer H264 packetizer
29  *
30  */
31 
32 #ifndef SWITCH_PACKETIZER_H
33 #define SWITCH_PACKETIZER_H
34 
35 typedef void switch_packetizer_t;
36 
37 typedef enum {
38  SPT_H264_BITSTREAM, // with separator 0 0 0 1 or 0 0 1
43 
44  // no more beyond this line
47 
48 /*
49 
50  create a packetizer and feed data, to avoid data copy, data MUST be valid before the next feed, or before close.
51 
52  */
53 
55 SWITCH_DECLARE(switch_status_t) switch_packetizer_feed(switch_packetizer_t *packetizer, void *data, uint32_t size);
59 
60 #endif
void switch_packetizer_close(switch_packetizer_t **packetizer)
switch_status_t switch_packetizer_feed_extradata(switch_packetizer_t *packetizer, void *data, uint32_t size)
switch_status_t switch_packetizer_feed(switch_packetizer_t *packetizer, void *data, uint32_t size)
An abstraction of a data frame.
Definition: switch_frame.h:54
switch_packetizer_t * switch_packetizer_create(switch_packetizer_bitstream_t type, uint32_t slice_size)
switch_status_t
Common return values.
#define SWITCH_DECLARE(type)
switch_packetizer_bitstream_t
void switch_packetizer_t
switch_status_t switch_packetizer_read(switch_packetizer_t *packetizer, switch_frame_t *frame)