MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
mh5audio.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
33 #ifndef _MH5AUDIO_H
34 #define _MH5AUDIO_H
35 
36 /*---includes for this file--------------------------------------------------*/
37 #include "mh5presentable.h"
38 #include "mh5stream.h"
39 
40 /*---Constant and macro definitions for public use---------------------------*/
41 
42 /*---Enumerations for public use---------------------------------------------*/
43 
44 /*---Global type defs for public use-----------------------------------------*/
45 typedef struct
46 {
47  /* Base class */
48  MHEG5Ingredient ingredient;
49 
50  /* Exchanged attributes */
51  MHEG5Int originalVolume;
52  MHEG5Int componentTag;
53 
54  /* Internal attributes */
55  MHEG5Int volume;
56 
57  /* Engine data */
58  MHEG5Stream *parent;
59 } MHEG5Audio;
60 
61 /*---Global variable declarations for public use-----------------------------*/
62 
63 /*---Global Function prototypes for public use-------------------------------*/
64 
76 void MHEG5audioInit(MHEG5Audio *audio);
77 
78 
86 void MHEG5audioFree(MHEG5Audio *audio);
87 
88 /*
89  Internal behaviours
90  */
91 void MHEG5audioPrepare(MHEG5Audio *audio);
92 void MHEG5audioActivate(MHEG5Audio *audio);
93 void MHEG5audioDeactivate(MHEG5Audio *audio);
94 void MHEG5audioDestruct(MHEG5Audio *audio);
95 
96 /*
97  Actions
98  */
99 MHEG5ErrorCode MHEG5setVolume(MHEG5Root *target, MHEG5GList *params);
100 MHEG5ErrorCode MHEG5getVolume(MHEG5Root *target, MHEG5GList *params);
101 
102 /*
103  Debug
104  */
105 #ifdef MH5PRINTOUT
106 void MHEG5audioPrint(MHEG5Audio *audio, char *out);
107 #endif
108 
109 #endif /*_MH5AUDIO_H*/
Implement the MHEG5 Stream Class Stream Class Defines the behaviour of a composition of continuous me...
Definition: mh5ingredient.h:63
void MHEG5audioDeactivate(MHEG5Audio *audio)
Apply the deactivation behaviour off the audio class. As this class has no own deactivation behaviour...
Definition: mh5audio.c:177
Definition: mh5base.h:169
Definition: mh5stream.h:62
MHEG5ErrorCode MHEG5getVolume(MHEG5Root *target, MHEG5GList *params)
Returns the volume of an Audio. Implementation of the GetVolume (VolumeVar) action of the audio class...
Definition: mh5audio.c:253
Implement the MHEG5 Presentable Class Description Presentable Class Defines the behaviour of objects ...
MHEG5ErrorCode MHEG5setVolume(MHEG5Root *target, MHEG5GList *params)
Change the volume of an audio. Implementation of the SetVolume (NewVolume) action of the audio class...
Definition: mh5audio.c:221
void MHEG5audioActivate(MHEG5Audio *audio)
Apply the activation behaviour off the audio class. Apply the activation behaviour of the base class...
Definition: mh5audio.c:144
Definition: mh5root.h:43
void MHEG5audioPrepare(MHEG5Audio *audio)
Apply the preparation behaviour off the audio class Apply the preparation behaviour off the audio cla...
Definition: mh5audio.c:127
void MHEG5audioInit(MHEG5Audio *audio)
<Function description>="">
Definition: mh5audio.c:97
void MHEG5audioDestruct(MHEG5Audio *audio)
Destruct an audio object.
Definition: mh5audio.c:205
void MHEG5audioFree(MHEG5Audio *audio)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5audio.c:111
Definition: mh5audio.h:45