decklink: Fix indentation

This commit is contained in:
Sebastian Dröge 2017-08-02 18:43:54 +03:00
parent 58e2b2ef1c
commit 571c8bc1ff
3 changed files with 35 additions and 41 deletions

View File

@ -883,17 +883,14 @@ public:
GStreamerDecklinkMemoryAllocator ()
: IDeckLinkMemoryAllocator (),
m_lastBufferSize (0),
m_nonEmptyCalls (0),
m_buffers (NULL),
m_refcount (1)
m_nonEmptyCalls (0), m_buffers (NULL), m_refcount (1)
{
g_mutex_init (&m_mutex);
m_buffers = gst_queue_array_new (60);
}
virtual ~ GStreamerDecklinkMemoryAllocator ()
{
virtual ~ GStreamerDecklinkMemoryAllocator () {
Decommit ();
gst_queue_array_free (m_buffers);
@ -974,8 +971,7 @@ public:
return S_OK;
}
virtual HRESULT STDMETHODCALLTYPE
ReleaseBuffer (void * buffer)
virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer (void *buffer)
{
g_mutex_lock (&m_mutex);
@ -992,14 +988,12 @@ public:
return S_OK;
}
virtual HRESULT STDMETHODCALLTYPE
Commit ()
virtual HRESULT STDMETHODCALLTYPE Commit ()
{
return S_OK;
}
virtual HRESULT STDMETHODCALLTYPE
Decommit ()
virtual HRESULT STDMETHODCALLTYPE Decommit ()
{
/* Clear all remaining pools */
_clearBufferPool ();
@ -1299,8 +1293,8 @@ gst_decklink_acquire_nth_input (gint n, GstElement * src, gboolean is_audio)
}
g_mutex_lock (&input->lock);
input->input->SetVideoInputFrameMemoryAllocator(
new GStreamerDecklinkMemoryAllocator);
input->input->SetVideoInputFrameMemoryAllocator (new
GStreamerDecklinkMemoryAllocator);
if (is_audio && !input->audiosrc) {
input->audiosrc = GST_ELEMENT_CAST (gst_object_ref (src));
g_mutex_unlock (&input->lock);

View File

@ -275,8 +275,8 @@ public:
written_sum += written;
} while (len > 0 && res == S_OK);
GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08lx", written_sum,
(unsigned long) res);
GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08lx",
written_sum, (unsigned long) res);
gst_audio_ring_buffer_clear (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer),
seg);

View File

@ -71,9 +71,8 @@ public:
return ret;
}
virtual HRESULT WINAPI ScheduledFrameCompleted (
IDeckLinkVideoFrame * completedFrame,
BMDOutputFrameCompletionResult result)
virtual HRESULT WINAPI ScheduledFrameCompleted (IDeckLinkVideoFrame *
completedFrame, BMDOutputFrameCompletionResult result)
{
switch (result) {
case bmdOutputFrameCompleted:
@ -624,7 +623,8 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer)
frame->GetBytes ((void **) &outdata);
indata = (guint8 *) GST_VIDEO_FRAME_PLANE_DATA (&vframe, 0);
stride = MIN (GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 0), frame->GetRowBytes());
stride =
MIN (GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 0), frame->GetRowBytes ());
for (i = 0; i < self->info.height; i++) {
memcpy (outdata, indata, stride);
indata += GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 0);