summaryrefslogtreecommitdiff
path: root/src/gstreamer
AgeCommit message (Expand)Author
2020-08-25meson: Remove -Wno-unused-parameterLaurent Pinchart
2020-08-25libcamera: Remove void specifier for functions that take no argumentsLaurent Pinchart
2020-08-05libcamera: camera: Rename name() to id()Niklas Söderlund
2020-06-18gst: Replace explicit DRM FourCCs with libcamera formatsLaurent Pinchart
2020-05-13licenses: License all meson files under CC0-1.0Laurent Pinchart
2020-03-18libcamera: framebuffer_allocator: Lift camera restrictions on allocatorLaurent Pinchart
2020-03-18libcamera: PixelFormat: Make constructor explicitLaurent Pinchart
2020-03-18libcamera: Use PixelFormat instead of unsigned int where appropriateNiklas Söderlund
2020-03-07gst: Fix GLib detectionLaurent Pinchart
2020-03-07gst: Turn the top-level plugin file gstlibcamera.c into a C++ fileLaurent Pinchart
2020-03-07gst: libcamerasrc: Prevent src task deadlock on exhausted buffer poolJakub Adam
2020-03-07gst: utils: Factor-out the task resume helperJakub Adam
2020-03-07gst: libcamerasrc: Add a TODO commentNicolas Dufresne
2020-03-07gst: libcamerasrc: Implement timestamp supportNicolas Dufresne
2020-03-07gst: libcamerasrc: Implement initial streamingNicolas Dufresne
2020-03-07gst: pad: Add method to store retrieve pending buffersNicolas Dufresne
2020-03-07gst: Add getters for Stream and FrameBufferNicolas Dufresne
2020-03-07gst: libcamerasrc: Allocate and release buffersNicolas Dufresne
2020-03-07gst: libcamerapad: Allow storing a poolNicolas Dufresne
2020-03-07gst: Add a pool and an allocator implementationNicolas Dufresne
2020-03-07gst: libcamerasrc: Push segment eventNicolas Dufresne
2020-03-07gst: libcamerasrc: Implement minimal caps negotiationNicolas Dufresne
2020-03-07gst: utils: Add StreamConfiguration helpersNicolas Dufresne
2020-03-07gst: libcamerasrc: Send stream start eventNicolas Dufresne
2020-03-07gst: libcamerasrc: Store the srcpad in a vectorNicolas Dufresne
2020-03-07gst: libcamerapad: Add a method to access the roleNicolas Dufresne
2020-03-07gst: libcamerasrc: Add a task for the streaming threadNicolas Dufresne
2020-03-07gst: libcamerasrc: Implement selection and acquisitionNicolas Dufresne
2020-03-07gst: libcamerasrc: Add a debug categoryNicolas Dufresne
2020-03-07gst: libcamerasrc: Add camera-name propertyNicolas Dufresne
2020-03-07gst: libcamerasrc: Allocate and add static padNicolas Dufresne
2020-03-07gst: Add pads to the sourceNicolas Dufresne
2020-03-07gst: utils: Add simple scoped lockers for GMutex and GRectMutexNicolas Dufresne
2020-03-07gst: Add initial device providerNicolas Dufresne
2020-03-07gst: Add utility to convert StreamFormats to GstCapsNicolas Dufresne
2020-03-07Add GStreamer plugin and element skeletonNicolas Dufresne
ss="hl kwd">base() + 4 || wco.size() != 10 || wco.offset() != 0 || wco.overflow() || wbuf.offset() != 14 || wbuf.overflow()) { cerr << "Carving out write buffer failed" << endl; return TestFail; } /* Test write on the carved out buffer. */ value = 0x87654321; ret = wco.write(&value); if (ret || wco.offset() != 4 || wco.overflow() || *reinterpret_cast<uint32_t *>(data.data() + 4) != 0x87654321) { cerr << "Write failed on carve out buffer" << endl; return TestFail; } if (wbuf.offset() != 14 || wbuf.overflow()) { cerr << "Write on carve out buffer modified write buffer" << endl; return TestFail; } /* Test read, this should fail. */ ret = wbuf.read(&value); if (!ret || wbuf.overflow()) { cerr << "Read should fail on write buffer" << endl; return TestFail; } /* Test overflow on carved out buffer. */ for (i = 0; i < 2; ++i) { ret = wco.write(&value); if (ret < 0) break; } if (i != 1 || !wco.overflow() || !wbuf.overflow()) { cerr << "Write on carve out buffer failed to overflow" << endl; return TestFail; } /* Test reinitialization of the buffer. */ wbuf = ByteStreamBuffer(data.data(), data.size()); if (wbuf.overflow() || wbuf.base() != data.data() || wbuf.offset() != 0) { cerr << "Write buffer reinitialization failed" << endl; return TestFail; } /* * Read mode. */ ByteStreamBuffer rbuf(const_cast<const uint8_t *>(data.data()), data.size()); if (rbuf.base() != data.data() || rbuf.size() != data.size() || rbuf.offset() != 0 || rbuf.overflow()) { cerr << "Read buffer incorrectly constructed" << endl; return TestFail; } /* Test read. */ value = 0; ret = rbuf.read(&value); if (ret || rbuf.offset() != 4 || rbuf.overflow() || value != 0x12345678) { cerr << "Write failed on write buffer" << endl; return TestFail; } /* Test read carve out. */ ByteStreamBuffer rco = rbuf.carveOut(10); if (rco.base() != rbuf.base() + 4 || rco.size() != 10 || rco.offset() != 0 || rco.overflow() || rbuf.offset() != 14 || rbuf.overflow()) { cerr << "Carving out read buffer failed" << endl; return TestFail; } /* Test read on the carved out buffer. */ value = 0; ret = rco.read(&value); if (ret || rco.offset() != 4 || rco.overflow() || value != 0x87654321) { cerr << "Read failed on carve out buffer" << endl; return TestFail; } if (rbuf.offset() != 14 || rbuf.overflow()) { cerr << "Read on carve out buffer modified read buffer" << endl; return TestFail; } /* Test write, this should fail. */ ret = rbuf.write(&value); if (!ret || rbuf.overflow()) { cerr << "Write should fail on read buffer" << endl; return TestFail; } /* Test overflow on carved out buffer. */ for (i = 0; i < 2; ++i) { ret = rco.read(&value); if (ret < 0) break; } if (i != 1 || !rco.overflow() || !rbuf.overflow()) { cerr << "Read on carve out buffer failed to overflow" << endl; return TestFail; } /* Test reinitialization of the buffer. */ rbuf = ByteStreamBuffer(const_cast<const uint8_t *>(data.data()), data.size()); if (rbuf.overflow() || rbuf.base() != data.data() || rbuf.offset() != 0) { cerr << "Read buffer reinitialization failed" << endl; return TestFail; } return TestPass; } }; TEST_REGISTER(ByteStreamBufferTest)