Open-AVB AVTP Pipeline SDK  1.4
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
openavb_intf_pub.h
Go to the documentation of this file.
1 /*************************************************************************************************************
2 Copyright (c) 2012-2015, Symphony Teleca Corporation, a Harman International Industries, Incorporated company
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
8 1. Redistributions of source code must retain the above copyright notice, this
9  list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11  this list of conditions and the following disclaimer in the documentation
12  and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS LISTED "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS LISTED BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
25 Attributions: The inih library portion of the source code is licensed from
26 Brush Technology and Ben Hoyt - Copyright (c) 2009, Brush Technology and Copyright (c) 2009, Ben Hoyt.
27 Complete license and copyright information can be found at
28 https://github.com/benhoyt/inih/commit/74d2ca064fb293bc60a77b0bd068075b293cf175.
29 *************************************************************************************************************/
30 
31 /*
32 * HEADER SUMMARY : Common interface module public header
33 */
34 
35 #ifndef OPENAVB_INTF_PUB_H
36 #define OPENAVB_INTF_PUB_H 1
37 
38 #include "openavb_types_pub.h"
39 #include "openavb_mediaq_pub.h"
40 
57 typedef void (*openavb_intf_cfg_cb_t)(media_q_t *pMediaQ, const char *name, const char *value);
58 
66 typedef void (*openavb_intf_gen_init_cb_t)(media_q_t *pMediaQ);
67 
80 typedef void (*openavb_intf_avdecc_init_cb_t)(media_q_t *pMediaQ, U16 configIdx, U16 descriptorType, U16 descriptorIdx);
81 
90 typedef void (*openavb_intf_tx_init_cb_t)(media_q_t *pMediaQ);
91 
108 typedef bool (*openavb_intf_tx_cb_t)(media_q_t *pMediaQ);
109 
118 typedef void (*openavb_intf_rx_init_cb_t)(media_q_t *pMediaQ);
119 
132 typedef void (*openavb_intf_rx_translate_cb_t)(media_q_t *pMediaQ, U8 *pPubData, U32 length);
133 
141 typedef bool (*openavb_intf_rx_cb_t)(media_q_t *pMediaQ);
142 
149 typedef void (*openavb_intf_end_cb_t)(media_q_t *pMediaQ);
150 
158 typedef void (*openavb_intf_gen_end_cb_t)(media_q_t *pMediaQ);
159 
171 typedef unsigned int (*openavb_intf_get_src_bitrate_t)(media_q_t *pMediaQ);
172 
175 typedef struct {
188  // openavb_intf_rx_translate_cb_t intf_rx_translate_cb; // Hidden since it is for direct mapping -> interface CBs
201 
224 typedef bool (*openavb_intf_initialize_fn_t)(media_q_t *pMediaQ, openavb_intf_cb_t *pIntfCB);
225 
229 #endif // OPENAVB_INTF_PUB_H
230 
bool(* openavb_intf_rx_cb_t)(media_q_t *pMediaQ)
Receive callback into the interface module.
Definition: openavb_intf_pub.h:141
bool(* openavb_intf_tx_cb_t)(media_q_t *pMediaQ)
Transmit callback into the interface module.
Definition: openavb_intf_pub.h:108
Media Queue structure.
Definition: openavb_mediaq_pub.h:87
openavb_intf_get_src_bitrate_t intf_get_src_bitrate_cb
Source bit rate callback.
Definition: openavb_intf_pub.h:199
void(* openavb_intf_avdecc_init_cb_t)(media_q_t *pMediaQ, U16 configIdx, U16 descriptorType, U16 descriptorIdx)
AVDECC initialize callback for both a talker or listener.
Definition: openavb_intf_pub.h:80
void * intf_host_cb_list
Pointer to interface specific callbacks that a hosting application may call.
Definition: openavb_intf_pub.h:197
void(* openavb_intf_gen_init_cb_t)(media_q_t *pMediaQ)
General initialize callback regardless if a talker or listener.
Definition: openavb_intf_pub.h:66
openavb_intf_avdecc_init_cb_t intf_avdecc_init_cb
AVDECC initialize callback.
Definition: openavb_intf_pub.h:181
uint8_t U8
Unsigned 8 bit type.
Definition: openavb_types_base_pub.h:77
openavb_intf_rx_cb_t intf_rx_cb
Receive callback.
Definition: openavb_intf_pub.h:190
void(* openavb_intf_rx_translate_cb_t)(media_q_t *pMediaQ, U8 *pPubData, U32 length)
Translate RX data callback.
Definition: openavb_intf_pub.h:132
openavb_intf_gen_init_cb_t intf_gen_init_cb
General initialize callback.
Definition: openavb_intf_pub.h:179
openavb_intf_rx_init_cb_t intf_rx_init_cb
Initialize receive callback.
Definition: openavb_intf_pub.h:187
uint32_t U32
Unsigned 32 bit type.
Definition: openavb_types_base_pub.h:85
void(* openavb_intf_tx_init_cb_t)(media_q_t *pMediaQ)
Initialize transmit callback into the interface module.
Definition: openavb_intf_pub.h:90
void(* openavb_intf_rx_init_cb_t)(media_q_t *pMediaQ)
Initialize the receive callback into the interface module.
Definition: openavb_intf_pub.h:118
openavb_intf_cfg_cb_t intf_cfg_cb
Configuration callback.
Definition: openavb_intf_pub.h:177
unsigned int(* openavb_intf_get_src_bitrate_t)(media_q_t *pMediaQ)
Query the interface for source bitrate.
Definition: openavb_intf_pub.h:171
bool(* openavb_intf_initialize_fn_t)(media_q_t *pMediaQ, openavb_intf_cb_t *pIntfCB)
Main initialization entry point into the interface module.
Definition: openavb_intf_pub.h:224
Interface callbacks structure.
Definition: openavb_intf_pub.h:175
void(* openavb_intf_cfg_cb_t)(media_q_t *pMediaQ, const char *name, const char *value)
Configuration callback into the interface module.
Definition: openavb_intf_pub.h:57
openavb_intf_tx_cb_t intf_tx_cb
Transmit callback.
Definition: openavb_intf_pub.h:185
openavb_intf_end_cb_t intf_end_cb
Stream end callback.
Definition: openavb_intf_pub.h:192
uint16_t U16
Unsigned 16 bit type.
Definition: openavb_types_base_pub.h:81
openavb_intf_gen_end_cb_t intf_gen_end_cb
General shutdown callback.
Definition: openavb_intf_pub.h:194
void(* openavb_intf_gen_end_cb_t)(media_q_t *pMediaQ)
General shutdown callback into the interface module.
Definition: openavb_intf_pub.h:158
openavb_intf_tx_init_cb_t intf_tx_init_cb
Initialize transmit callback.
Definition: openavb_intf_pub.h:183
void(* openavb_intf_end_cb_t)(media_q_t *pMediaQ)
Callback when the stream is ending.
Definition: openavb_intf_pub.h:149