Age | Commit message (Collapse) | Author |
|
The Camera class currently requires the allocator to have no allocated
buffer before the camera is reconfigured, and the allocator to be
destroyed before the camera is released. There's no basis for these
restrictions anymore, remove them.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
To achieve the goal of preventing unwanted conversion between a DRM and
a V4L2 FourCC, make the PixelFormat constructor that takes an integer
value explicit. All users of pixel formats flagged by the compiler
are fixed.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
|
|
Use the PixelFormat instead of unsigned int where a pixel format is to
be used. PixelFormat is defined as an unsigned int but is about to be
turned into a class to add functionality.
There is no functional change in this patch.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Commit 17cccc68a88f ("Add GStreamer plugin and element skeleton") has
gained a last minute fix for a clang compilation error with GLib prior
to v2.63.0. The fix wasn't properly tested, and failed to check the GLib
dependency correctly. This resulted in compilation of the GStreamer
element to always be disabled.
Fix this by changing the GLib package name from 'glib' to 'glib-2.0'.
Fixes: 17cccc68a88f ("Add GStreamer plugin and element skeleton")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
|
The top-level plugin file gstlibcamera.c is the only C source file in
the whole libcamera GStreamer element. To avoid specifying both C and
C++ compiler arguments in the future, turn it into a C++ file.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
|
|
Allow GstLibcameraPool to notify the source when a new buffer has become
available in a previously exhausted buffer pool. This can be used to
resume a src task that got paused because it couldn't acquire a buffer.
Without this change the src task will never resume from pause once the
pool gets exhausted.
To trigger the deadlock (it doesn't happen every time), run:
gst-launch-1.0 libcamerasrc ! queue ! glimagesink
Signed-off-by: Jakub Adam <jakub.adam@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
Task resume will be added in the core GStreamer API in the future and
we will need to call this in another location in the following patches.
Signed-off-by: Jakub Adam <jakub.adam@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
These will be useful for streaming. The requestComplete callback will
store the buffers on each pads so that the _run() can pick them up
and push them through the pads from a streaming thread.
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signe
int FlagsTest::run()
{
/* Commented-out constructs are expected not to compile. */
/* Flags<int> f; */
/*
* Unary operators with enum argument.
*/
Options options;
if (options) {
cerr << "Default-constructed Flags<> is not zero" << endl;
return TestFail;
}
options |= Option::First;
if (!options || options != Option::First) {
cerr << "Unary bitwise OR with enum failed" << endl;
return TestFail;
}
/* options &= Mode::Alpha; */
/* options |= Mode::Beta; */
/* options ^= Mode::Gamma; */
options &= ~Option::First;
if (options) {
cerr << "Unary bitwise AND with enum failed" << endl;
return TestFail;
}
options ^= Option::Second;
if (options != Option::Second) {
cerr << "Unary bitwise XOR with enum failed" << endl;
return TestFail;
}
options = Options();
/*
* Unary operators with Flags argument.
*/
options |= Options(Option::First);
if (options != Option::First) {
cerr << "Unary bitwise OR with Flags<> failed" << endl;
return TestFail;
}
/* options &= Options(Mode::Alpha); */
/* options |= Options(Mode::Beta); */
/* options ^= Options(Mode::Gamma); */
options &= ~Options(Option::First);
if (options) {
cerr << "Unary bitwise AND with Flags<> failed" << endl;
return TestFail;
}
options ^= Options(Option::Second);
if (options != Option::Second) {
cerr << "Unary bitwise XOR with Flags<> failed" << endl;
return TestFail;
}
options = Options();
/*
* Binary operators with enum argument.
*/
options = options | Option::First;
if (!(options & Option::First)) {
cerr << "Binary bitwise OR with enum failed" << endl;
return TestFail;
}
/* options = options & Mode::Alpha; */
/* options = options | Mode::Beta; */
/* options = options ^ Mode::Gamma; */
options = options & ~Option::First;
if (options != (Option::First & Option::Second)) {
cerr << "Binary bitwise AND with enum failed" << endl;
return TestFail;
}
options = options ^ (Option::First ^ Option::Second);
if (options != (Option::First | Option::Second)) {
cerr << "Binary bitwise XOR with enum failed" << endl;
return TestFail;
}
options = Options();
/*
* Binary operators with Flags argument.
*/
options |= Options(Option::First);
if (!(options & Option::First)) {
cerr << "Binary bitwise OR with Flags<> failed" << endl;
return TestFail;
}
/* options = options & Options(Mode::Alpha); */
/* options = options | Options(Mode::Beta); */
/* options = options ^ Options(Mode::Gamma); */
options = options & ~Options(Option::First);
if (options) {
cerr << "Binary bitwise AND with Flags<> failed" << endl;
return TestFail;
}
options = options ^ Options(Option::Second);
if (options != Option::Second) {
cerr << "Binary bitwise XOR with Flags<> failed" << endl;
return TestFail;
}
options = Options();
/*
* Conversion operators.
*/
options |= Option::First | Option::Second | Option::Third;
if (static_cast<Options::Type>(options) != 7) {
cerr << "Cast to underlying type failed" << endl;
return TestFail;
}
/*
* Conversion of the result of ninary operators on the underlying enum.
*/
/* unsigned int val1 = Option::First; */
/* unsigned int val2 = ~Option::First; */
/* unsigned int val3 = Option::First | Option::Second; */
/* Option val4 = ~Option::First; */
/* Option val5 = Option::First | Option::Second; */
return TestPass;
}
TEST_REGISTER(FlagsTest)
|