summaryrefslogtreecommitdiff
path: root/src/libcamera/stream.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-04-28 16:42:12 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-05-23 00:27:13 +0300
commita40023e6cc005dfc57cc535167ee44761f3ed9f6 (patch)
tree7b666b223754855a7ea8a4e83e3df0bb9752bdfe /src/libcamera/stream.cpp
parent2ca2d658700c57c3d734d72b2148436907152257 (diff)
libcamera: Use stream roles directly instead of StreamUsage
In order to prepare for an API overhall of the camera configuration generation, remove the StreamUsage class and replace its uses by stream roles. The size hints can't be specified anymore, and will be replaced with an API on the StreamConfiguration to negotiate configuration parameters with cameras. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/libcamera/stream.cpp')
-rw-r--r--src/libcamera/stream.cpp89
1 files changed, 13 insertions, 76 deletions
diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp
index af259510..fe4c4ecf 100644
--- a/src/libcamera/stream.cpp
+++ b/src/libcamera/stream.cpp
@@ -75,62 +75,32 @@ std::string StreamConfiguration::toString() const
}
/**
- * \class StreamUsage
- * \brief Stream usage information
- *
- * The StreamUsage class describes how an application intends to use a stream.
- * Usages are specified by applications and passed to cameras, that then select
- * the most appropriate streams and their default configurations.
- */
-
-/**
- * \enum StreamUsage::Role
+ * \enum StreamRole
* \brief Identify the role a stream is intended to play
- * \var StreamUsage::StillCapture
+ *
+ * The StreamRole describes how an application intends to use a stream. Roles
+ * are specified by applications and passed to cameras, that then select the
+ * most appropriate streams and their default configurations.
+ *
+ * \var StillCapture
* The stream is intended to capture high-resolution, high-quality still images
* with low frame rate. The captured frames may be exposed with flash.
- * \var StreamUsage::VideoRecording
+ * \var VideoRecording
* The stream is intended to capture video for the purpose of recording or
* streaming. The video stream may produce a high frame rate and may be
* enhanced with video stabilization.
- * \var StreamUsage::Viewfinder
+ * \var Viewfinder
* The stream is intended to capture video for the purpose of display on the
- * local screen. The StreamUsage includes the desired resolution. Trade-offs
- * between quality and usage of system resources are acceptable.
+ * local screen. Trade-offs between quality and usage of system resources are
+ * acceptable.
*/
/**
- * \fn StreamUsage::role()
- * \brief Retrieve the stream role
- * \return The stream role
+ * \typedef StreamRoles
+ * \brief A vector of StreamRole
*/
/**
- * \fn StreamUsage::size()
- * \brief Retrieve desired size
- * \return The desired size
- */
-
-/**
- * \brief Create a stream usage
- * \param[in] role Stream role
- */
-StreamUsage::StreamUsage(Role role)
- : role_(role)
-{
-}
-
-/**
- * \brief Create a stream usage with a desired size
- * \param[in] role Stream role
- * \param[in] size The desired size
- */
-StreamUsage::StreamUsage(Role role, const Size &size)
- : role_(role), size_(size)
-{
-}
-
-/**
* \class Stream
* \brief Video stream for a camera
*
@@ -149,39 +119,6 @@ StreamUsage::StreamUsage(Role role, const Size &size)
*/
/**
- * \class Stream::StillCapture
- * \brief Describe a still capture usage
- */
-Stream::StillCapture::StillCapture()
- : StreamUsage(Role::StillCapture)
-{
-}
-
-/**
- * \class Stream::VideoRecording
- * \brief Describe a video recording usage
- */
-Stream::VideoRecording::VideoRecording()
- : StreamUsage(Role::VideoRecording)
-{
-}
-
-/**
- * \class Stream::Viewfinder
- * \brief Describe a viewfinder usage
- */
-
-/**
- * \brief Create a viewfinder usage with a desired dimension
- * \param[in] width The desired viewfinder width
- * \param[in] height The desired viewfinder height
- */
-Stream::Viewfinder::Viewfinder(int width, int height)
- : StreamUsage(Role::Viewfinder, Size(width, height))
-{
-}
-
-/**
* \brief Construct a stream with default parameters
*/
Stream::Stream()