pleorasrc: run gst-indent

This commit is contained in:
Joshua M. Doe 2018-10-04 13:05:17 -04:00
parent 5546ea432a
commit bcb80f3b87

View File

@ -109,7 +109,8 @@ static GstStaticPadTemplate gst_pleorasrc_src_template =
GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS (VIDEO_CAPS_MAKE_BAYER16 ("{ bggr16, grbg16, rggb16, gbrg16 }") ";" GST_STATIC_CAPS (VIDEO_CAPS_MAKE_BAYER16
("{ bggr16, grbg16, rggb16, gbrg16 }") ";"
VIDEO_CAPS_MAKE_BAYER8 ("{ bggr, grbg, rggb, gbrg }") ";" VIDEO_CAPS_MAKE_BAYER8 ("{ bggr, grbg, rggb, gbrg }") ";"
GST_VIDEO_CAPS_MAKE ("{ GRAY16_LE, GRAY16_BE, GRAY8, UYVY, YUY2, RGB }") GST_VIDEO_CAPS_MAKE ("{ GRAY16_LE, GRAY16_BE, GRAY8, UYVY, YUY2, RGB }")
) )
@ -169,9 +170,9 @@ gst_pleorasrc_class_init (GstPleoraSrcClass * klass)
g_param_spec_int ("timeout", "Timeout (ms)", g_param_spec_int ("timeout", "Timeout (ms)",
"Timeout in ms (0 to use default)", 0, G_MAXINT, DEFAULT_PROP_TIMEOUT, "Timeout in ms (0 to use default)", 0, G_MAXINT, DEFAULT_PROP_TIMEOUT,
(GParamFlags) (G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE))); (GParamFlags) (G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE)));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DETECTION_TIMEOUT, g_object_class_install_property (G_OBJECT_CLASS (klass),
g_param_spec_int ("detection-timeout", "Detection Timeout (ms)", PROP_DETECTION_TIMEOUT, g_param_spec_int ("detection-timeout",
"Timeout in ms to detect GigE cameras", 100, "Detection Timeout (ms)", "Timeout in ms to detect GigE cameras", 100,
60000, DEFAULT_PROP_DETECTION_TIMEOUT, 60000, DEFAULT_PROP_DETECTION_TIMEOUT,
(GParamFlags) (G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE))); (GParamFlags) (G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE)));
g_object_class_install_property (gobject_class, PROP_MULTICAST_GROUP, g_object_class_install_property (gobject_class, PROP_MULTICAST_GROUP,
@ -182,8 +183,7 @@ gst_pleorasrc_class_init (GstPleoraSrcClass * klass)
GST_PARAM_MUTABLE_READY))); GST_PARAM_MUTABLE_READY)));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT, g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT,
g_param_spec_int ("port", "Multicast port", g_param_spec_int ("port", "Multicast port",
"The port of the multicast group.", 0, "The port of the multicast group.", 0, 65535, DEFAULT_PROP_PORT,
65535, DEFAULT_PROP_PORT,
(GParamFlags) (G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE))); (GParamFlags) (G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE)));
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_RECEIVER_ONLY, g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_RECEIVER_ONLY,
g_param_spec_boolean ("receiver-only", "Receiver only", g_param_spec_boolean ("receiver-only", "Receiver only",
@ -550,7 +550,8 @@ gst_pleorasrc_setup_device (GstPleoraSrc * src)
GST_DEBUG_OBJECT (src, "Opening multicast stream"); GST_DEBUG_OBJECT (src, "Opening multicast stream");
PvStreamGEV *stream = new PvStreamGEV; PvStreamGEV *stream = new PvStreamGEV;
// FIXME: need to add prop for enabling multicast // FIXME: need to add prop for enabling multicast
stream->Open(device_info->GetConnectionID(), src->multicast_group, src->port); stream->Open (device_info->GetConnectionID (), src->multicast_group,
src->port);
src->stream = stream; src->stream = stream;
} else { } else {
src->stream = src->stream =
@ -822,7 +823,8 @@ gst_pleorasrc_start (GstBaseSrc * bsrc)
if (!src->receiver_only) { if (!src->receiver_only) {
PvGenParameterArray *lDeviceParams = src->device->GetParameters (); PvGenParameterArray *lDeviceParams = src->device->GetParameters ();
PvGenCommand *start_cmd = PvGenCommand *start_cmd =
dynamic_cast < PvGenCommand * >(lDeviceParams->Get ("AcquisitionStart")); dynamic_cast <
PvGenCommand * >(lDeviceParams->Get ("AcquisitionStart"));
if (start_cmd == NULL) { if (start_cmd == NULL) {
GST_ELEMENT_ERROR (src, RESOURCE, FAILED, GST_ELEMENT_ERROR (src, RESOURCE, FAILED,
@ -1047,13 +1049,16 @@ gst_pleorasrc_create (GstPushSrc * psrc, GstBuffer ** buf)
while (TRUE) { while (TRUE) {
pvRes = src->pipeline->RetrieveNextBuffer (&pvbuffer, src->timeout, &opRes); pvRes = src->pipeline->RetrieveNextBuffer (&pvbuffer, src->timeout, &opRes);
if (!pvRes.IsOK ()) { if (!pvRes.IsOK ()) {
GST_ELEMENT_ERROR (src, RESOURCE, FAILED, ("Failed to retrieve buffer in timeout (%d ms): 0x%04x, '%s'", src->timeout, pvRes.GetCode(), pvRes.GetDescription().GetAscii()), (NULL)); GST_ELEMENT_ERROR (src, RESOURCE, FAILED,
("Failed to retrieve buffer in timeout (%d ms): 0x%04x, '%s'",
src->timeout, pvRes.GetCode (),
pvRes.GetDescription ().GetAscii ()), (NULL));
return GST_FLOW_ERROR; return GST_FLOW_ERROR;
} }
// continue if we get a bad frame // continue if we get a bad frame
if (!opRes.IsOK ()) { if (!opRes.IsOK ()) {
GST_WARNING_OBJECT(src, "Failed to get buffer: 0x%04x, '%s'", opRes.GetCode(), opRes.GetCodeString().GetAscii()); GST_WARNING_OBJECT (src, "Failed to get buffer: 0x%04x, '%s'",
opRes.GetCode (), opRes.GetCodeString ().GetAscii ());
src->pipeline->ReleaseBuffer (pvbuffer); src->pipeline->ReleaseBuffer (pvbuffer);
continue; continue;
} }