mpeghdec
Fraunhofer IIS MPEG-H Decoder Library
Loading...
Searching...
No Matches
mpeghUIManager.h
Go to the documentation of this file.
1/*-----------------------------------------------------------------------------
2Software License for The Fraunhofer FDK MPEG-H Software
3
4Copyright (c) 2018 - 2023 Fraunhofer-Gesellschaft zur Förderung der angewandten
5Forschung e.V. and Contributors
6All rights reserved.
7
81. INTRODUCTION
9
10The "Fraunhofer FDK MPEG-H Software" is software that implements the ISO/MPEG
11MPEG-H 3D Audio standard for digital audio or related system features. Patent
12licenses for necessary patent claims for the Fraunhofer FDK MPEG-H Software
13(including those of Fraunhofer), for the use in commercial products and
14services, may be obtained from the respective patent owners individually and/or
15from Via LA (www.via-la.com).
16
17Fraunhofer supports the development of MPEG-H products and services by offering
18additional software, documentation, and technical advice. In addition, it
19operates the MPEG-H Trademark Program to ease interoperability testing of end-
20products. Please visit www.mpegh.com for more information.
21
222. COPYRIGHT LICENSE
23
24Redistribution and use in source and binary forms, with or without modification,
25are permitted without payment of copyright license fees provided that you
26satisfy the following conditions:
27
28* You must retain the complete text of this software license in redistributions
29of the Fraunhofer FDK MPEG-H Software or your modifications thereto in source
30code form.
31
32* You must retain the complete text of this software license in the
33documentation and/or other materials provided with redistributions of
34the Fraunhofer FDK MPEG-H Software or your modifications thereto in binary form.
35You must make available free of charge copies of the complete source code of
36the Fraunhofer FDK MPEG-H Software and your modifications thereto to recipients
37of copies in binary form.
38
39* The name of Fraunhofer may not be used to endorse or promote products derived
40from the Fraunhofer FDK MPEG-H Software without prior written permission.
41
42* You may not charge copyright license fees for anyone to use, copy or
43distribute the Fraunhofer FDK MPEG-H Software or your modifications thereto.
44
45* Your modified versions of the Fraunhofer FDK MPEG-H Software must carry
46prominent notices stating that you changed the software and the date of any
47change. For modified versions of the Fraunhofer FDK MPEG-H Software, the term
48"Fraunhofer FDK MPEG-H Software" must be replaced by the term "Third-Party
49Modified Version of the Fraunhofer FDK MPEG-H Software".
50
513. No PATENT LICENSE
52
53NO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without
54limitation the patents of Fraunhofer, ARE GRANTED BY THIS SOFTWARE LICENSE.
55Fraunhofer provides no warranty of patent non-infringement with respect to this
56software. You may use this Fraunhofer FDK MPEG-H Software or modifications
57thereto only for purposes that are authorized by appropriate patent licenses.
58
594. DISCLAIMER
60
61This Fraunhofer FDK MPEG-H Software is provided by Fraunhofer on behalf of the
62copyright holders and contributors "AS IS" and WITHOUT ANY EXPRESS OR IMPLIED
63WARRANTIES, including but not limited to the implied warranties of
64merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE
65COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE for any direct, indirect,
66incidental, special, exemplary, or consequential damages, including but not
67limited to procurement of substitute goods or services; loss of use, data, or
68profits, or business interruption, however caused and on any theory of
69liability, whether in contract, strict liability, or tort (including
70negligence), arising in any way out of the use of this software, even if
71advised of the possibility of such damage.
72
735. CONTACT INFORMATION
74
75Fraunhofer Institute for Integrated Circuits IIS
76Attention: Division Audio and Media Technologies - MPEG-H FDK
77Am Wolfsmantel 33
7891058 Erlangen, Germany
79www.iis.fraunhofer.de/amm
80amm-info@iis.fraunhofer.de
81-----------------------------------------------------------------------------*/
82
83/************************************** ***************************************
84 Author(s): Matthias Neusinger
85 Description: MPEG-H UI Manager
86
87 This software and/or program is protected by copyright law and international
88 treaties. Any reproduction or distribution of this software and/or program,
89 or any portion of it, may result in severe civil and criminal penalties, and
90 will be prosecuted to the maximum extent possible under law.
91
92*******************************************************************************/
93
94#ifndef MPEGHUIMANAGER_H
95#define MPEGHUIMANAGER_H
96
101
102#include "mpeghexport.h"
103
104#ifdef __cplusplus
105extern "C" {
106#endif
107
108typedef struct MPEGH_UI_MANAGER* HANDLE_MPEGH_UI_MANAGER;
109
110#define MAX_NUMBER_SUBSTREAMS 16
111
112typedef enum {
113 MPEGH_UI_OK = 0,
114 MPEGH_UI_OUT_OF_MEMORY,
115 MPEGH_UI_BUFFER_TOO_SMALL, /* This error is not recoverable until a new RAP frame is processed,
116 i.e. UI events will be delayed. */
117 MPEGH_UI_INVALID_PARAM,
118 MPEGH_UI_NOT_ALLOWED,
119 MPEGH_UI_INVALID_STATE,
120 MPEGH_UI_PARSE_ERROR,
121 MPEGH_UI_OK_BUT_NO_VALID_DATA
122} MPEGH_UI_ERROR;
123
129#define MPEGH_UI_FORCE_UPDATE 1
135#define MPEGH_UI_FORCE_RESTART_XML 4
136
142#define MPEGH_UI_NO_CHANGE 1
148#define MPEGH_UI_CONTINUES_XML 2
155#define MPEGH_UI_INCOMPLETE_XML 4
160#define MPEGH_UI_SHORT_OUTPUT 8
161
167MPEGHDEC_EXPORT HANDLE_MPEGH_UI_MANAGER mpegh_UI_Manager_Open(void);
168
175MPEGHDEC_EXPORT void mpegh_UI_Manager_Close(HANDLE_MPEGH_UI_MANAGER self);
176
200MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_GetXmlSceneState(HANDLE_MPEGH_UI_MANAGER self, char* xmlOut,
201 unsigned int xmlOutSize,
202 unsigned int flagsIn,
203 unsigned int* flagsOut);
204
215MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_ApplyXmlAction(HANDLE_MPEGH_UI_MANAGER self,
216 const char* xmlIn, unsigned int xmlInSize,
217 unsigned int* flagsOut);
218
227MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_FeedMHAS(HANDLE_MPEGH_UI_MANAGER self,
228 unsigned char* mhasBuffer,
229 unsigned int mhasLength);
230
246MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_UpdateMHAS(HANDLE_MPEGH_UI_MANAGER self,
247 unsigned char* mhasBuffer,
248 unsigned int mhasBufferLength,
249 unsigned int* mhasLength);
250
274MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_SetPersistenceMemory(HANDLE_MPEGH_UI_MANAGER self,
275 void* persistenceMemoryBlock,
276 unsigned short persistenceMemorySize);
277
293MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_GetPersistenceMemory(HANDLE_MPEGH_UI_MANAGER self,
294 void** persistenceMemoryBlock,
295 unsigned short* persistenceMemorySize);
296
297#ifdef __cplusplus
298}
299#endif
300
301#endif
MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_GetPersistenceMemory(HANDLE_MPEGH_UI_MANAGER self, void **persistenceMemoryBlock, unsigned short *persistenceMemorySize)
Get current UI persistency memory block (updates content, call is required before storing persistence...
MPEGHDEC_EXPORT HANDLE_MPEGH_UI_MANAGER mpegh_UI_Manager_Open(void)
Open a mpegh UI manager instance.
MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_UpdateMHAS(HANDLE_MPEGH_UI_MANAGER self, unsigned char *mhasBuffer, unsigned int mhasBufferLength, unsigned int *mhasLength)
Update MHAS buffer, inserting UI and DRC packets from UI manager. A previous call of mpegh_UI_FeedMHA...
MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_GetXmlSceneState(HANDLE_MPEGH_UI_MANAGER self, char *xmlOut, unsigned int xmlOutSize, unsigned int flagsIn, unsigned int *flagsOut)
Get XML description of audio scene and available user interactivity parameters.
MPEGHDEC_EXPORT void mpegh_UI_Manager_Close(HANDLE_MPEGH_UI_MANAGER self)
De-allocate all resources of a mpegh UI manager instance.
MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_FeedMHAS(HANDLE_MPEGH_UI_MANAGER self, unsigned char *mhasBuffer, unsigned int mhasLength)
Feed MHAS input into UI manager.
MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_ApplyXmlAction(HANDLE_MPEGH_UI_MANAGER self, const char *xmlIn, unsigned int xmlInSize, unsigned int *flagsOut)
Send XML description of UI command to the UI manager.
MPEGHDEC_EXPORT MPEGH_UI_ERROR mpegh_UI_SetPersistenceMemory(HANDLE_MPEGH_UI_MANAGER self, void *persistenceMemoryBlock, unsigned short persistenceMemorySize)
Set memory block for storing UI persistency data (activates internal persistence handling)