# Methods available while the stream is connected.

These methods can only be called once both the Consumer and Producer have successfully connected to the EGLStream and it is in the CONNECTED state. More...

## Functions

virtual int | CameraEGLStreamConsumer::acquireFd (uint64_t timeout=0xFFFFFFFFFFFFFFFF, CONSUMER_STATUS *status=NULL)=0
| Acquires a new dmabuf Fd.
virtual CONSUMER_STATUS | CameraEGLStreamConsumer::releaseFd (int fd)=0
| Releases an acquired dmabuf .
| CameraEGLStreamConsumer::~CameraEGLStreamConsumer ()

## Detailed Description

These methods can only be called once both the Consumer and Producer have successfully connected to the EGLStream and it is in the CONNECTED state.

Calling any of these function when the stream is not in the CONNECTED state will return an INVALID_STATE status.

## Function Documentation

virtual int CameraEGLStreamConsumer::acquireFd | ( | uint64_t | timeout = `0xFFFFFFFFFFFFFFFF`,
|  | CONSUMER_STATUS * | status = `NULL` |
| ) |  |  | `[pure virtual, inherited]`

Acquires a new dmabuf Fd.

If the maximum number of fds are currently acquired, an error will be returned immediately. If -1 is returned and the status is DISCONNECTED, the producer has disconnected from the stream and no more fds can be acquired.

Parameters:

  `[in]` | timeout | The timeout to wait for a frame if one isn't available.
  `[out]` | status | An optional pointer to return an error status code.

Returns:
  dmabuf Fd of a frame acquired from the stream, or -1 on error. This dmabuf object is owned by the Consumer, and is valid until it is released by releaseFd() or is implicitly released by destroy().

virtual CONSUMER_STATUS CameraEGLStreamConsumer::releaseFd | ( | int | fd | ) | `[pure virtual, inherited]`

Releases an acquired dmabuf .

Parameters:

  `[in]` | fd | The dmabuf fd to release.

Returns:
  Success/error code of the call.

CameraEGLStreamConsumer::~CameraEGLStreamConsumer | ( |  | ) | `[inline, protected, inherited]`

Definition at line 151 of file CameraEGLStreamConsumer.h.