Age | Commit message (Collapse) | Author |
|
Source files in libcamera start by a comment block header, which
includes the file name and a one-line description of the file contents.
While the latter is useful to get a quick overview of the file contents
at a glance, the former is mostly a source of inconvenience. The name in
the comments can easily get out of sync with the file name when files
are renamed, and copy & paste during development have often lead to
incorrect names being used to start with.
Readers of the source code are expected to know which file they're
looking it. Drop the file name from the header comment blocks in all
remaining locations that were not caught by the automated script as they
are out of sync with the file name.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
|
|
The provider g_autoptr variable introduced by commit adb1bbb748a1
("tests: gstreamer: Test cameras' enumeration from GstDeviceProvider")
is left uninitialized when declared. The cleanup function could thus get
called on an unitialized variable if the scope was exited before the
variable gets initialized. This can't occur here, but gcc 8.4.0 still
complains about it:
/usr/include/glib-2.0/glib/gmacros.h: In member function ‘virtual int GstreamerDeviceProviderTest::run()’:
/usr/include/glib-2.0/glib/gmacros.h:1049:27: error: ‘provider’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
{ if (_ptr) (cleanup) ((ParentName *) _ptr); } \
^
../test/gstreamer/gstreamer_device_provider_test.cpp:37:32: note: ‘provider’ was declared here
g_autoptr(GstDeviceProvider) provider;
Silence the error by initializing the variable to NULL at declaration
time. This is a good practice in any case, as later refactoring could
otherwise introduce a scope exit before initialization.
Fixes: adb1bbb748a1 ("tests: gstreamer: Test cameras' enumeration from GstDeviceProvider")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
|
|
Test the enumeration of the cameras through GstDeviceProvider against
the libcamera camera manager.
Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|