20 : m_refCount(0), displayMode(displayMode), width(0), height(0)
45 pthread_mutex_init(&m_mutex, NULL);
50 cout <<
"DESTRUCTOR!!!" << endl;
51 pthread_mutex_destroy(&m_mutex);
111 #pragma omp critical (blackmagic_output_queue) 133 cout <<
"failed to create video frame" << endl;
138 void *frameBytesDest;
140 memcpy(frameBytesDest, castBytes,
width *
height * 4);
163 #pragma omp critical (blackmagic_output_queue) 173 omp_set_nested(
true);
191 #pragma omp task firstprivate(frame, copy_frameCount) 195 void *audioFrameBytes;
197 width = frame->GetWidth();
198 height = frame->GetHeight();
201 int numBytes = frame->GetHeight() * frame->GetWidth() * 4;
202 uint8_t *castBytes =
new uint8_t[numBytes];
221 #pragma omp critical (blackmagic_output_queue) 240 #pragma omp critical (blackmagic_output_queue) 254 cout <<
"Prerolling!" << endl;
259 cout <<
"Starting scheduled playback!" << endl;
267 #pragma omp critical (blackmagic_output_queue) std::deque< uint8_t *> final_frames
virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted(IDeckLinkVideoFrame *completedFrame, BMDOutputFrameCompletionResult result)
std::deque< std::shared_ptr< openshot::Frame > > raw_video_frames
Header file for DecklinkOutput class.
DeckLinkOutputDelegate(IDeckLinkDisplayMode *displayMode, IDeckLinkOutput *deckLinkOutput)
#define OPEN_MP_NUM_PROCESSORS
BMDTimeValue frameRateScale
unsigned long m_audioSampleDepth
IDeckLinkMutableVideoFrame * m_currentFrame
std::map< int, uint8_t *> temp_cache
void WriteFrame(std::shared_ptr< openshot::Frame > frame)
Custom method to write new frames.
unsigned long m_totalFramesScheduled
OutputSignal m_outputSignal
unsigned long m_audioChannelCount
IDeckLinkOutput * deckLinkOutput
unsigned long audioSamplesPerFrame
BMDAudioSampleRate m_audioSampleRate
BMDTimeValue frameRateDuration
~DeckLinkOutputDelegate()
virtual HRESULT STDMETHODCALLTYPE RenderAudioSamples(bool preroll)
virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped()
unsigned long m_audioBufferSampleLength
void ScheduleNextFrame(bool prerolling)
Schedule the next frame.
unsigned long m_framesPerSecond