decklink: Fix indentation
This commit is contained in:
parent
58e2b2ef1c
commit
571c8bc1ff
@ -883,17 +883,14 @@ public:
|
|||||||
GStreamerDecklinkMemoryAllocator ()
|
GStreamerDecklinkMemoryAllocator ()
|
||||||
: IDeckLinkMemoryAllocator (),
|
: IDeckLinkMemoryAllocator (),
|
||||||
m_lastBufferSize (0),
|
m_lastBufferSize (0),
|
||||||
m_nonEmptyCalls (0),
|
m_nonEmptyCalls (0), m_buffers (NULL), m_refcount (1)
|
||||||
m_buffers (NULL),
|
|
||||||
m_refcount (1)
|
|
||||||
{
|
{
|
||||||
g_mutex_init (&m_mutex);
|
g_mutex_init (&m_mutex);
|
||||||
|
|
||||||
m_buffers = gst_queue_array_new (60);
|
m_buffers = gst_queue_array_new (60);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~ GStreamerDecklinkMemoryAllocator ()
|
virtual ~ GStreamerDecklinkMemoryAllocator () {
|
||||||
{
|
|
||||||
Decommit ();
|
Decommit ();
|
||||||
|
|
||||||
gst_queue_array_free (m_buffers);
|
gst_queue_array_free (m_buffers);
|
||||||
@ -974,8 +971,7 @@ public:
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual HRESULT STDMETHODCALLTYPE
|
virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer (void *buffer)
|
||||||
ReleaseBuffer (void * buffer)
|
|
||||||
{
|
{
|
||||||
g_mutex_lock (&m_mutex);
|
g_mutex_lock (&m_mutex);
|
||||||
|
|
||||||
@ -992,14 +988,12 @@ public:
|
|||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual HRESULT STDMETHODCALLTYPE
|
virtual HRESULT STDMETHODCALLTYPE Commit ()
|
||||||
Commit ()
|
|
||||||
{
|
{
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual HRESULT STDMETHODCALLTYPE
|
virtual HRESULT STDMETHODCALLTYPE Decommit ()
|
||||||
Decommit ()
|
|
||||||
{
|
{
|
||||||
/* Clear all remaining pools */
|
/* Clear all remaining pools */
|
||||||
_clearBufferPool ();
|
_clearBufferPool ();
|
||||||
@ -1299,8 +1293,8 @@ gst_decklink_acquire_nth_input (gint n, GstElement * src, gboolean is_audio)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_mutex_lock (&input->lock);
|
g_mutex_lock (&input->lock);
|
||||||
input->input->SetVideoInputFrameMemoryAllocator(
|
input->input->SetVideoInputFrameMemoryAllocator (new
|
||||||
new GStreamerDecklinkMemoryAllocator);
|
GStreamerDecklinkMemoryAllocator);
|
||||||
if (is_audio && !input->audiosrc) {
|
if (is_audio && !input->audiosrc) {
|
||||||
input->audiosrc = GST_ELEMENT_CAST (gst_object_ref (src));
|
input->audiosrc = GST_ELEMENT_CAST (gst_object_ref (src));
|
||||||
g_mutex_unlock (&input->lock);
|
g_mutex_unlock (&input->lock);
|
||||||
|
@ -275,8 +275,8 @@ public:
|
|||||||
written_sum += written;
|
written_sum += written;
|
||||||
} while (len > 0 && res == S_OK);
|
} while (len > 0 && res == S_OK);
|
||||||
|
|
||||||
GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08lx", written_sum,
|
GST_LOG_OBJECT (m_ringbuffer->sink, "Wrote %u samples: 0x%08lx",
|
||||||
(unsigned long) res);
|
written_sum, (unsigned long) res);
|
||||||
|
|
||||||
gst_audio_ring_buffer_clear (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer),
|
gst_audio_ring_buffer_clear (GST_AUDIO_RING_BUFFER_CAST (m_ringbuffer),
|
||||||
seg);
|
seg);
|
||||||
|
@ -71,9 +71,8 @@ public:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual HRESULT WINAPI ScheduledFrameCompleted (
|
virtual HRESULT WINAPI ScheduledFrameCompleted (IDeckLinkVideoFrame *
|
||||||
IDeckLinkVideoFrame * completedFrame,
|
completedFrame, BMDOutputFrameCompletionResult result)
|
||||||
BMDOutputFrameCompletionResult result)
|
|
||||||
{
|
{
|
||||||
switch (result) {
|
switch (result) {
|
||||||
case bmdOutputFrameCompleted:
|
case bmdOutputFrameCompleted:
|
||||||
@ -624,7 +623,8 @@ gst_decklink_video_sink_prepare (GstBaseSink * bsink, GstBuffer * buffer)
|
|||||||
|
|
||||||
frame->GetBytes ((void **) &outdata);
|
frame->GetBytes ((void **) &outdata);
|
||||||
indata = (guint8 *) GST_VIDEO_FRAME_PLANE_DATA (&vframe, 0);
|
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++) {
|
for (i = 0; i < self->info.height; i++) {
|
||||||
memcpy (outdata, indata, stride);
|
memcpy (outdata, indata, stride);
|
||||||
indata += GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 0);
|
indata += GST_VIDEO_FRAME_PLANE_STRIDE (&vframe, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user