![]() |
DVBCore
22.3.0
Open Source DVB Engine
|
DVB Interface for MHEG5 engine - Audio. More...
#include <stdio.h>
#include <techtype.h>
#include <dbgfuncs.h>
#include "stberc.h"
#include "stbhwav.h"
#include "stbdpc.h"
#include "ap_dbacc.h"
#include "ap_cntrl.h"
#include "app.h"
#include "ap_cfg.h"
#include "ap_uiinfo.h"
#include "dvbmh_int.h"
#include "dvb_audio.h"
Functions | |
void | DVBMH_PlayAudio (U8BIT path, U16BIT audio_pid, E_STB_DP_AUDIO_CODEC codec, U16BIT ad_pid) |
E_MhegErr | DVB_MhegAudioPlayDefault (void) |
MHEG5 engine gives control of Audio to external application. Set decoding and presentation of Audio according to the default user selection. More... | |
E_MhegErr | DVB_MhegAudioPlayStream (S_DvbComponent *pDvbComponent) |
MHEG5 engine takes control of Audio - and informs that Audio must be switched to the specified Audio stream. This setting takes effect regardless of whether or not an audio stream is currently playing. If the locator references a service component that is not currently being broadcast, the audio should be muted until the referenced component is being broadcast. More... | |
E_MhegErr | DVB_MhegAudioStopStream (void) |
MHEG5 engine takes control of Audio - and specifies that decoding and presentation of any Audio stream must be stopped. More... | |
E_MhegErr | DVB_MhegAudioPlayClip (U8BIT *pAudioData, U32BIT dataLength, U32BIT repeatCount, E_AudioEncoding encoding) |
Instruct the controlling application that the provided audio sound clip should be played. Playback from an audio stream and playback of an audio clip are mutually exclusive. If an audio clip is still playing due to a previous call to DVB_MhegPlayAudioClip(), the previous playback should be silently terminated without a call to DVB_MhegNotifyAudioPlayStopped. The audio data passed MUST be copied before use, as the caller retains exclusive ownership. The audio data can be discarded when either the playback of the last loop finishes, DVB_MhegPlayAudioClip() is invoked with a new audio clip or DVB_MhegAudioStopClip() is invoked. Each block of audio data is formatted as either: More... | |
E_MhegErr | DVB_MhegAudioStopClip (void) |
Instruct the controlling application that playback of the previously supplied audio clip should be stopped. This should not generate a DVB_EVENT_SAMPLE_STOPPED event If no audio clip currently playing, the call should be silently ignored. More... | |
E_MhegErr | DVB_MhegAudioSetVolume (S32BIT volumeAdjust) |
Adjust sound level for any external application sourced audio. A setting of 0 dB means leave the audio volume unchanged. A setting of greater than 0 dB may be approximated as 0 dB. A setting of less than 0 dB may be approximated as a mute. This affects playback of audio from stream and audio clips. More... | |
E_MhegErr | DVB_MhegAudioSetSpeed (E_AudioSpeed speed) |
Instruct the controlling application that playback of the previously supplied audio clip should be paused or restarted. When there is no audio clip currently playing, it should be silently ignored. This MUST be a non-blocking function. More... | |
U8BIT | DVB_MhegPrefAudioLangs (U32BIT *langs, U8BIT max) |
Get list of preferred audio languages. If there is no preference then zero is returned. This only writes into array up to 'max' items This MUST be a non-blocking function, returning results immediately. More... | |
BOOLEAN | DVB_MhegAudioDescriptionPref (void) |
This function is used by the MHEG-5 engine to determine whether audio description is currently enabled. This may be used to allow a content provider to make available streams with and without audio description to avoid streaming unused data. This MUST be a non-blocking function. More... | |
DVB Interface for MHEG5 engine - Audio.
BOOLEAN DVB_MhegAudioDescriptionPref | ( | void | ) |
This function is used by the MHEG-5 engine to determine whether audio description is currently enabled. This may be used to allow a content provider to make available streams with and without audio description to avoid streaming unused data. This MUST be a non-blocking function.
E_MhegErr DVB_MhegAudioPlayClip | ( | U8BIT * | pAudioData, |
U32BIT | dataLength, | ||
U32BIT | repeatCount, | ||
E_AudioEncoding | encoding | ||
) |
Instruct the controlling application that the provided audio sound clip should be played. Playback from an audio stream and playback of an audio clip are mutually exclusive. If an audio clip is still playing due to a previous call to DVB_MhegPlayAudioClip(), the previous playback should be silently terminated without a call to DVB_MhegNotifyAudioPlayStopped. The audio data passed MUST be copied before use, as the caller retains exclusive ownership. The audio data can be discarded when either the playback of the last loop finishes, DVB_MhegPlayAudioClip() is invoked with a new audio clip or DVB_MhegAudioStopClip() is invoked. Each block of audio data is formatted as either:
pAudioData | Audio data to play. |
dataLength | Length of the audio data. |
repeatCount | Number of times to repeat play of audio data. |
encoding | encoding - see E_AudioEncoding |
MHERR_OTHER controlling application specific error.
E_MhegErr DVB_MhegAudioPlayDefault | ( | void | ) |
MHEG5 engine gives control of Audio to external application. Set decoding and presentation of Audio according to the default user selection.
E_MhegErr DVB_MhegAudioPlayStream | ( | S_DvbComponent * | pDvbComponent | ) |
MHEG5 engine takes control of Audio - and informs that Audio must be switched to the specified Audio stream. This setting takes effect regardless of whether or not an audio stream is currently playing. If the locator references a service component that is not currently being broadcast, the audio should be muted until the referenced component is being broadcast.
E_MhegErr DVB_MhegAudioSetSpeed | ( | E_AudioSpeed | speed | ) |
Instruct the controlling application that playback of the previously supplied audio clip should be paused or restarted. When there is no audio clip currently playing, it should be silently ignored. This MUST be a non-blocking function.
speed | The new speed for audio. As speed can only be 0 or 1. |
E_MhegErr DVB_MhegAudioSetVolume | ( | S32BIT | volumeAdjust | ) |
Adjust sound level for any external application sourced audio. A setting of 0 dB means leave the audio volume unchanged. A setting of greater than 0 dB may be approximated as 0 dB. A setting of less than 0 dB may be approximated as a mute. This affects playback of audio from stream and audio clips.
volumeAdjust | New setting of the amount by which to adjust volume in dB |
E_MhegErr DVB_MhegAudioStopClip | ( | void | ) |
Instruct the controlling application that playback of the previously supplied audio clip should be stopped. This should not generate a DVB_EVENT_SAMPLE_STOPPED event If no audio clip currently playing, the call should be silently ignored.
E_MhegErr DVB_MhegAudioStopStream | ( | void | ) |
MHEG5 engine takes control of Audio - and specifies that decoding and presentation of any Audio stream must be stopped.
U8BIT DVB_MhegPrefAudioLangs | ( | U32BIT * | langs, |
U8BIT | max | ||
) |
Get list of preferred audio languages. If there is no preference then zero is returned. This only writes into array up to 'max' items This MUST be a non-blocking function, returning results immediately.
langs | Array of ISO 639 language codes to be returned |
max | maximum number of preferred languages required by caller |