decklink: Fix indention

This commit is contained in:
Sebastian Dröge 2014-11-14 10:40:31 +01:00
parent 8c76b5897a
commit bdfac8a6d4
3 changed files with 30 additions and 24 deletions

View file

@ -119,9 +119,9 @@ HRESULT
g_mutex_lock (&decklinksrc->mutex);
if (decklinksrc->video_frame != NULL) {
decklinksrc->dropped_frames++;
decklinksrc->video_frame->Release();
decklinksrc->video_frame->Release ();
if (decklinksrc->audio_frame) {
decklinksrc->audio_frame->Release();
decklinksrc->audio_frame->Release ();
}
}
videoFrame->AddRef ();
@ -141,11 +141,11 @@ HRESULT
}
HRESULT
DeckLinkCaptureDelegate::VideoInputFormatChanged (
BMDVideoInputFormatChangedEvents events, IDeckLinkDisplayMode * mode,
BMDDetectedVideoInputFormatFlags)
{
GstDecklinkSrc *decklinksrc;
DeckLinkCaptureDelegate::VideoInputFormatChanged
(BMDVideoInputFormatChangedEvents events, IDeckLinkDisplayMode * mode,
BMDDetectedVideoInputFormatFlags) {
GstDecklinkSrc *
decklinksrc;
g_return_val_if_fail (priv != NULL, S_OK);
g_return_val_if_fail (GST_IS_DECKLINK_SRC (priv), S_OK);

View file

@ -157,10 +157,11 @@ gst_decklink_mode_get_structure (GstDecklinkModeEnum e)
"width", G_TYPE_INT, mode->width,
"height", G_TYPE_INT, mode->height,
"framerate", GST_TYPE_FRACTION, mode->fps_n, mode->fps_d,
"interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive",
"pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d,
"colorimetry", G_TYPE_STRING, mode->is_hdtv ? "bt709" : "bt601",
"chroma-site", G_TYPE_STRING, "mpeg2", NULL);
"interlace-mode", G_TYPE_STRING,
mode->interlaced ? "interleaved" : "progressive", "pixel-aspect-ratio",
GST_TYPE_FRACTION, mode->par_n, mode->par_d, "colorimetry", G_TYPE_STRING,
mode->is_hdtv ? "bt709" : "bt601", "chroma-site", G_TYPE_STRING, "mpeg2",
NULL);
}
GstCaps *
@ -191,7 +192,8 @@ gst_decklink_mode_get_template_caps (void)
}
typedef struct _Device Device;
struct _Device {
struct _Device
{
IDeckLink *decklink;
IDeckLinkInput *input;
IDeckLinkOutput *output;
@ -210,7 +212,8 @@ init_devices (void)
int i;
static gboolean inited = FALSE;
if (inited) return;
if (inited)
return;
inited = TRUE;
iterator = CreateDeckLinkIteratorInstance ();
@ -253,7 +256,7 @@ init_devices (void)
n_devices = i;
iterator->Release();
iterator->Release ();
}
IDeckLink *

View file

@ -331,7 +331,8 @@ gst_decklink_src_finalize (GObject * object)
if (decklinksrc->comInitialized) {
g_mutex_lock (&decklinksrc->com_deinit_lock);
g_cond_signal (&decklinksrc->com_uninitialize);
g_cond_wait (&decklinksrc->com_uninitialized, &decklinksrc->com_deinit_lock);
g_cond_wait (&decklinksrc->com_uninitialized,
&decklinksrc->com_deinit_lock);
g_mutex_unlock (&decklinksrc->com_deinit_lock);
}
@ -418,7 +419,8 @@ gst_decklink_src_start (GstElement * element)
GST_DEBUG_OBJECT (decklinksrc, "start");
decklinksrc->decklink = gst_decklink_get_nth_device (decklinksrc->device_number);
decklinksrc->decklink =
gst_decklink_get_nth_device (decklinksrc->device_number);
if (decklinksrc->decklink == NULL) {
return FALSE;
}
@ -437,7 +439,8 @@ gst_decklink_src_start (GstElement * element)
return FALSE;
}
decklinksrc->config = gst_decklink_get_nth_config (decklinksrc->device_number);
decklinksrc->config =
gst_decklink_get_nth_config (decklinksrc->device_number);
config = decklinksrc->config;
if (decklinksrc->config == NULL) {
GST_ERROR ("no config for device %i", decklinksrc->device_number);
@ -618,7 +621,7 @@ gst_decklink_src_audio_src_query (GstPad * pad, GstObject * parent,
GST_DEBUG_OBJECT (pad, "query: %" GST_PTR_FORMAT, query);
switch (GST_QUERY_TYPE (query)) {
/* FIXME: report live-ness and latency for audio too */
/* FIXME: report live-ness and latency for audio too */
case GST_QUERY_LATENCY:
GST_FIXME_OBJECT (parent, "should report live-ness and audio latency");
res = gst_pad_query_default (pad, parent, query);
@ -722,9 +725,9 @@ gst_decklink_src_send_initial_events (GstDecklinkSrc * src)
/* caps */
gst_pad_push_event (src->audiosrcpad,
gst_event_new_caps (gst_caps_new_simple ("audio/x-raw",
"format", G_TYPE_STRING, "S16LE", "channels", G_TYPE_INT, 2,
"rate", G_TYPE_INT, 48000, "layout", G_TYPE_STRING, "interleaved",
NULL)));
"format", G_TYPE_STRING, "S16LE", "channels", G_TYPE_INT, 2,
"rate", G_TYPE_INT, 48000, "layout", G_TYPE_STRING, "interleaved",
NULL)));
gst_pad_push_event (src->videosrcpad,
gst_event_new_caps (gst_decklink_mode_get_caps (src->mode)));
@ -774,7 +777,7 @@ gst_decklink_src_task (void *priv)
}
if (g_atomic_int_compare_and_exchange (&decklinksrc->pending_eos, TRUE,
FALSE)) {
FALSE)) {
GST_INFO_OBJECT (decklinksrc, "EOS pending");
flow = GST_FLOW_EOS;
goto pause;
@ -847,7 +850,7 @@ gst_decklink_src_task (void *priv)
gst_util_uint64_scale_int ((decklinksrc->frame_num + 1) * GST_SECOND,
mode->fps_d, mode->fps_n) - GST_BUFFER_TIMESTAMP (buffer);
GST_BUFFER_OFFSET (buffer) = decklinksrc->frame_num;
GST_BUFFER_OFFSET_END (buffer) = decklinksrc->frame_num; /* FIXME: +1? */
GST_BUFFER_OFFSET_END (buffer) = decklinksrc->frame_num; /* FIXME: +1? */
/* FIXME: set video meta */
@ -962,7 +965,7 @@ gst_decklinksrc_list_devices (void)
n_devices++;
}
}
iterator->Release();
iterator->Release ();
g_print ("%d devices\n", n_devices);
}