summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-13 01:51:21 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-28 23:53:45 +0200
commit921c0cdc6a0c486c9b53af5746b1cce6a2501b3e (patch)
treea29d683f93daa23192cda188b96a7536a887f5b7 /test
parent1beff36f5a47f6d4d79d2f428b6120db28bfbbe1 (diff)
libcamera: pipeline: rkisp1: Expose self path stream
Expose the self stream to applications and prefers it for the viewfinder and video roles as it can be extended to produce RGB. Keep preferring the main path for still capture as it could be extended to support RAW formats which makes most sense for still capture. With this change the self path becomes available to applications and a camera backed by this pipeline can produce two streams simultaneously. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions
an class="hl kwd">status_(NoSignal) { } Status status() const { return status_; } int value() const { return value_; } void reset() { status_ = NoSignal; value_ = 0; } void slot(int value) { if (Thread::current() != thread()) status_ = InvalidThread; else status_ = SignalReceived; value_ = value; } private: Status status_; int value_; }; class SignalThreadsTest : public Test { protected: int run() { SignalReceiver receiver; signal_.connect(&receiver, &SignalReceiver::slot); /* Test that a signal is received in the main thread. */ signal_.emit(0); switch (receiver.status()) { case SignalReceiver::NoSignal: cout << "No signal received for direct connection" << endl; return TestFail; case SignalReceiver::InvalidThread: cout << "Signal received in incorrect thread " "for direct connection" << endl; return TestFail; default: break; } /* * Move the object to a thread and verify that the signal is * correctly delivered, with the correct data. */ receiver.reset(); receiver.moveToThread(&thread_); thread_.start(); signal_.emit(42); this_thread::sleep_for(chrono::milliseconds(100)); switch (receiver.status()) { case SignalReceiver::NoSignal: cout << "No signal received for message connection" << endl; return TestFail; case SignalReceiver::InvalidThread: cout << "Signal received in incorrect thread " "for message connection" << endl; return TestFail; default: break; } if (receiver.value() != 42) { cout << "Signal received with incorrect value" << endl; return TestFail; } return TestPass; } void cleanup() { thread_.exit(0); thread_.wait(); } private: Thread thread_; Signal<int> signal_; }; TEST_REGISTER(SignalThreadsTest)