9 #ifndef _NTV2DOLBYPLAYER_H 10 #define _NTV2DOLBYPLAYER_H 19 #define DOLBY_FULL_PARSER // If defined, parse EC3 files with multiple sync frames per HDMI burst; otherwise parse with single sync frame per HDMI burst. 74 virtual void Quit (
void);
76 virtual bool IsRunning (
void)
const {
return !mGlobalQuit;}
221 #ifdef DOLBY_FULL_PARSER 229 virtual bool GetDolbyFrame (uint16_t * pInDolbyBuffer, uint32_t & numSamples);
247 virtual void SetBitBuffer (uint8_t * pBuffer, uint32_t size);
255 virtual bool GetBits (uint32_t & data, uint32_t inBitCount);
282 typedef std::vector<NTV2Buffer> NTV2Buffers;
291 double mToneFrequency;
299 NTV2Buffers mTestPatRasters;
302 uint16_t mRampSample;
303 uint32_t mBurstIndex;
304 uint32_t mBurstSamples;
305 uint16_t * mBurstBuffer;
307 uint32_t mBurstOffset;
309 uint16_t * mDolbyBuffer;
311 uint32_t mDolbyBlocks;
312 uint8_t * mBitBuffer;
317 #endif // _NTV2DOLBY_H
virtual bool GetDolbyFrame(uint16_t *pInDolbyBuffer, uint32_t &numSamples)
Get a dolby audio frame from the input file.
static void ProducerThreadStatic(AJAThread *pThread, void *pContext)
This is the producer thread's static callback function that gets called when the producer thread star...
std::ostream & operator<<(std::ostream &ioStrm, const DolbyPlayerConfig &inObj)
NTV2AudioSystem
Used to identify an Audio System on an NTV2 device. See Audio System Operation for more information...
std::set< NTV2TCIndex > NTV2TCIndexes
DolbyPlayerConfig(const std::string &inDeviceSpecifier="0")
Constructs a default DolbyPlayer configuration.
virtual AJAStatus Run(void)
Runs me.
I interrogate and control an AJA video/audio capture/playout device.
NTV2TaskMode
Describes the task mode state. See also: Sharing AJA Devices With Other Applications.
uint8_t mixdatabuffer[64]
AJALabelValuePairs Get(const bool inCompact=(0)) const
virtual AJAStatus SetUpHostBuffers(void)
Sets up my host video & audio buffers.
virtual AJAStatus SetUpAudio(void)
Performs all audio setup.
std::vector< AJALabelValuePair > AJALabelValuePairs
An ordered sequence of label/value pairs.
DolbyPlayerConfig DolbyPlayerConfig
Configures an NTV2DolbyPlayer instance.
virtual AJAStatus SetUpVideo(void)
Performs all video setup.
I am similar to NTV2Player, but I demonstrate how to play/output 8 channels of audio tone (or ramp da...
Declares the AJATimeCodeBurn class.
Declares the AJAThread class.
virtual void ConsumeFrames(void)
My consumer thread that repeatedly plays frames using AutoCirculate (until quit). ...
Declares the AJAFileIO class.
virtual void ProduceFrames(void)
My producer thread that repeatedly produces video frames.
virtual uint32_t AddDolby(NTV2FrameData &inFrameData)
Inserts dolby audio into the given NTV2FrameData's audio buffer.
NTV2DolbyPlayer(const DolbyPlayerConfig &inConfigData)
Constructs me using the given configuration settings.
Configures an NTV2DolbyPlayer instance.
virtual void Quit(void)
Gracefully stops me from running.
virtual uint32_t AddTone(NTV2FrameData &inFrameData)
Inserts audio tone (based on my current tone frequency) into the given NTV2FrameData's audio buffer...
virtual void StartProducerThread(void)
Starts my producer thread.
virtual AJAStatus SetUpTestPatternBuffers(void)
Creates my test pattern buffers.
std::string fDolbyFilePath
Optional path to Dolby audio source file.
std::vector< NTV2FrameData > NTV2FrameDataArray
A vector of NTV2FrameData elements.
bool fDoRamp
If true, use audio ramp pattern instead of tone.
virtual bool ParseBSI(uint16_t *pInDolbyBuffer, uint32_t numSamples, NTV2DolbyBSI *pBsi)
Parse the dolby audio bit stream information block.
virtual void StartConsumerThread(void)
Starts my consumer thread.
This is returned from the CNTV2Card::AutoCirculateGetStatus function.
virtual uint32_t AddRamp(NTV2FrameData &inFrameData)
Inserts audio test ramp into the given NTV2FrameData's audio buffer.
virtual bool RouteOutputSignal(void)
Performs all widget/signal routing for playout.
virtual bool IsRunning(void) const
static void ConsumerThreadStatic(AJAThread *pThread, void *pContext)
This is the consumer thread's static callback function that gets called when the consumer thread star...
virtual AJAStatus Init(void)
Initializes me and prepares me to Run.
I encapsulate the video, audio and anc host buffers used in the AutoCirculate demos. I'm a more modern version of the AVDataBuffer.
virtual void GetACStatus(AUTOCIRCULATE_STATUS &outStatus)
Provides status information about my output (playout) process.
This file contains some structures, constants, classes and functions that are used in some of the dem...
Configures an NTV2Player instance.
virtual bool GetBits(uint32_t &data, uint32_t inBitCount)
Retreive the specified number of bits from the bitstream buffer.
uint32_t blkmixcfginfo[6]
I am a circular frame buffer that simplifies implementing a type-safe producer/consumer model for pro...
virtual ~NTV2DolbyPlayer(void)
virtual void SetBitBuffer(uint8_t *pBuffer, uint32_t size)
Set the bitstream buffer for bit retrieval.