OpenShot Library | libopenshot
0.2.2
|
Go to the documentation of this file.
53 #include "../include/DecklinkOutput.h"
58 : m_refCount(0), displayMode(displayMode), width(0), height(0)
83 pthread_mutex_init(&m_mutex, NULL);
88 cout <<
"DESTRUCTOR!!!" << endl;
89 pthread_mutex_destroy(&m_mutex);
149 #pragma omp critical (blackmagic_output_queue)
171 cout <<
"failed to create video frame" << endl;
176 void *frameBytesDest;
178 memcpy(frameBytesDest, castBytes,
width *
height * 4);
201 #pragma omp critical (blackmagic_output_queue)
211 omp_set_nested(
true);
229 #pragma omp task firstprivate(frame, copy_frameCount)
233 void *audioFrameBytes;
235 width = frame->GetWidth();
236 height = frame->GetHeight();
239 int numBytes = frame->GetHeight() * frame->GetWidth() * 4;
240 uint8_t *castBytes =
new uint8_t[numBytes];
259 #pragma omp critical (blackmagic_output_queue)
278 #pragma omp critical (blackmagic_output_queue)
292 cout <<
"Prerolling!" << endl;
297 cout <<
"Starting scheduled playback!" << endl;
305 #pragma omp critical (blackmagic_output_queue)
OutputSignal m_outputSignal
virtual HRESULT STDMETHODCALLTYPE RenderAudioSamples(bool preroll)
~DeckLinkOutputDelegate()
deque< std::shared_ptr< openshot::Frame > > raw_video_frames
void WriteFrame(std::shared_ptr< openshot::Frame > frame)
Custom method to write new frames.
unsigned long m_totalFramesScheduled
BMDAudioSampleRate m_audioSampleRate
#define OPEN_MP_NUM_PROCESSORS
IDeckLinkOutput * deckLinkOutput
unsigned long m_audioBufferSampleLength
unsigned long audioSamplesPerFrame
BMDTimeValue frameRateDuration
virtual HRESULT STDMETHODCALLTYPE ScheduledPlaybackHasStopped()
IDeckLinkDisplayMode * displayMode
unsigned long m_framesPerSecond
BMDTimeValue frameRateScale
virtual HRESULT STDMETHODCALLTYPE ScheduledFrameCompleted(IDeckLinkVideoFrame *completedFrame, BMDOutputFrameCompletionResult result)
void ScheduleNextFrame(bool prerolling)
Schedule the next frame.
DeckLinkOutputDelegate(IDeckLinkDisplayMode *displayMode, IDeckLinkOutput *deckLinkOutput)
unsigned long m_audioSampleDepth
IDeckLinkMutableVideoFrame * m_currentFrame
map< int, uint8_t * > temp_cache
deque< uint8_t * > final_frames
unsigned long m_audioChannelCount