Skip to content

Commit

Permalink
Camera: Add file descriptor getting API
Browse files Browse the repository at this point in the history
Add file descriptor getting API to control camera device directly
by using ioctl.
  • Loading branch information
SPRESENSE committed Feb 6, 2023
1 parent fd6a7d2 commit 31cec1f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,17 @@ class CameraClass {
*/
static CameraClass getInstance();

/**
* @brief Get the file descriptor of camera device.
* @details [en] Get the file descriptor of camera device.<BR>
* [ja] カメラデバイスのファイルディスクリプタを取得する。
* @return [en] The file descriptor of camera device.
* Return CAM_ERR_NO_DEVICE if begin() methods is not executed.<BR>
* [ja] カメラデバイスのファイルディスクリプタ。
* begin()メソッドが実行されていない場合は、CAM_ERR_NO_DEVICEを返す。
*/
int getFd() { return (video_fd < 0) ? CAM_ERR_NO_DEVICE : video_fd; }

/**
* @brief Initialize CameraClass instance.
* @details [en] Initialize CameraClass Instance. This method must be called before
Expand Down

0 comments on commit 31cec1f

Please sign in to comment.