# FileDescriptorOutputOptions

Artifact: [androidx.camera:camera-video](https://developer.android.com/jetpack/androidx/releases/camera) [View Source](https://cs.android.com/search?q=file:androidx/camera/video/FileDescriptorOutputOptions.java+class:androidx.camera.video.FileDescriptorOutputOptions) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

*** ** * ** ***


```
public final class FileDescriptorOutputOptions extends OutputOptions
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.camera.video.OutputOptions](https://developer.android.com/reference/androidx/camera/video/OutputOptions) ||
|   | ↳ | [androidx.camera.video.FileDescriptorOutputOptions](https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions) |

*** ** * ** ***

A class providing options for storing the result to a given file descriptor.

The file descriptor must be seekable and writable. The caller is responsible for closing the file descriptor, which can be safely closed after the recording starts. That is, after `https://developer.android.com/reference/androidx/camera/video/PendingRecording#start(java.util.concurrent.Executor,androidx.core.util.Consumer<androidx.camera.video.VideoRecordEvent>)` returns. Application should not use the file referenced by this file descriptor until the recording is complete.

To use a `https://developer.android.com/reference/java/io/File.html` as an output destination instead of a file descriptor, use `https://developer.android.com/reference/androidx/camera/video/FileOutputOptions`.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions.Builder` The builder of the `https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions` object. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html o)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/ParcelFileDescriptor.html` | `https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions#getParcelFileDescriptor()()` Gets the file descriptor instance. |
| `int` | `https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/camera/video/FileDescriptorOutputOptions#toString()()` |

| ### Inherited Constants |
|---|
| From [androidx.camera.video.OutputOptions](https://developer.android.com/reference/androidx/camera/video/OutputOptions) |---|---| | `static final int` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#DURATION_UNLIMITED() = 0` Represents an unlimited duration. | | `static final int` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#FILE_SIZE_UNLIMITED() = 0` Represents an unbound file size. | |

| ### Inherited methods |
|---|
| From [androidx.camera.video.OutputOptions](https://developer.android.com/reference/androidx/camera/video/OutputOptions) |---|---| | `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) long` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#getDurationLimitMillis()()` Gets the limit for the video duration in milliseconds. | | `@https://developer.android.com/reference/androidx/annotation/IntRange(from = 0) long` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#getFileSizeLimit()()` Gets the limit for the file size in bytes. | | `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/location/Location.html` | `https://developer.android.com/reference/androidx/camera/video/OutputOptions#getLocation()()` Returns a `https://developer.android.com/reference/android/location/Location.html` object representing the geographic location where the video was recorded. | |

## Public methods

### equals

```
public boolean equals(@Nullable Object o)
```

### getParcelFileDescriptor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

```
public @NonNull ParcelFileDescriptor getParcelFileDescriptor()
```

Gets the file descriptor instance.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/os/ParcelFileDescriptor.html` | the file descriptor used as the output destination. |

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```