# MediaStoreOutputOptions

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/MediaStoreOutputOptions.java+class:androidx.camera.video.MediaStoreOutputOptions) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/camera#1.1.0)

*** ** * ** ***


```
class MediaStoreOutputOptions : OutputOptions
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.camera.video.OutputOptions](https://developer.android.com/reference/kotlin/androidx/camera/video/OutputOptions) ||
|   | ↳ | [androidx.camera.video.MediaStoreOutputOptions](https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions) |

*** ** * ** ***

A class providing options for storing output to MediaStore.

Example:

```kotlin
ContentValues contentValues = new ContentValues();
contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME, "NEW_VIDEO");
contentValues.put(MediaStore.MediaColumns.MIME_TYPE, "video/mp4");

MediaStoreOutputOptions options =
        new MediaStoreOutputOptions.Builder(
            contentResolver, MediaStore.Video.Media.EXTERNAL_CONTENT_URI)
        .setContentValues(contentValues)
        .build();
```

The output `https://developer.android.com/reference/android/net/Uri.html` can be obtained via `https://developer.android.com/reference/kotlin/androidx/camera/video/OutputResults#getOutputUri()` from `https://developer.android.com/reference/kotlin/androidx/camera/video/VideoRecordEvent.Finalize#getOutputResults()`.

For more information about setting collections `https://developer.android.com/reference/android/net/Uri.html` and `https://developer.android.com/reference/android/content/ContentValues.html`, read the [Access media files from shared storage](https://developer.android.com/training/data-storage/shared/media) and [MediaStore](https://developer.android.com/reference/android/provider/MediaStore) developer guide.

## Summary

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

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/android/content/ContentValues.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions#EMPTY_CONTENT_VALUES()` An empty `https://developer.android.com/reference/android/content/ContentValues.html`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions#equals(java.lang.Object)(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions#getCollectionUri()()` Gets the URI of the collection to insert into. |
| `https://developer.android.com/reference/android/content/ContentResolver.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions#getContentResolver()()` Gets the ContentResolver instance. |
| `https://developer.android.com/reference/android/content/ContentValues.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions#getContentValues()()` Gets the content values to be included in the created video row. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions#toString()()` |

| ### Inherited Constants |
|---|
| From [androidx.camera.video.OutputOptions](https://developer.android.com/reference/kotlin/androidx/camera/video/OutputOptions) |---|---| | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/OutputOptions#DURATION_UNLIMITED() = 0` Represents an unlimited duration. | | `const https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/OutputOptions#FILE_SIZE_UNLIMITED() = 0` Represents an unbound file size. | |

| ### Inherited functions |
|---|
| From [androidx.camera.video.OutputOptions](https://developer.android.com/reference/kotlin/androidx/camera/video/OutputOptions) |---|---| | `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/OutputOptions#getDurationLimitMillis()()` Gets the limit for the video duration in milliseconds. | | `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/camera/video/OutputOptions#getFileSizeLimit()()` Gets the limit for the file size in bytes. | | `https://developer.android.com/reference/android/location/Location.html?` | `https://developer.android.com/reference/kotlin/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. | |

## Constants

### EMPTY_CONTENT_VALUES

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

```
const val EMPTY_CONTENT_VALUES: ContentValues
```

An empty `https://developer.android.com/reference/android/content/ContentValues.html`.

## Public functions

### equals

```
fun equals(o: Any?): Boolean
```

### getCollectionUri

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

```
fun getCollectionUri(): Uri
```

Gets the URI of the collection to insert into.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions.Builder#Builder(android.content.ContentResolver,android.net.Uri)` |   |

### getContentResolver

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

```
fun getContentResolver(): ContentResolver
```

Gets the ContentResolver instance.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions.Builder#Builder(android.content.ContentResolver,android.net.Uri)` |   |

### getContentValues

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

```
fun getContentValues(): ContentValues
```

Gets the content values to be included in the created video row.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/camera/video/MediaStoreOutputOptions.Builder#setContentValues(android.content.ContentValues)` |   |

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String
```