public abstract class

AudioMimeInfo

extends MimeInfo

 java.lang.Object

androidx.camera.video.internal.config.MimeInfo

↳androidx.camera.video.internal.config.AudioMimeInfo

Gradle dependencies

compile group: 'androidx.camera', name: 'camera-video', version: '1.5.0-alpha01'

  • groupId: androidx.camera
  • artifactId: camera-video
  • version: 1.5.0-alpha01

Artifact androidx.camera:camera-video:1.5.0-alpha01 it located at Google repository (https://maven.google.com/)

Overview

Data class containing information about a audio mime.

The information includes all information from MimeInfo as well as compatible configuration types that can be used to resolve settings, such as .

Summary

Constructors
publicAudioMimeInfo()

Methods
public static AudioMimeInfo.Builderbuilder(java.lang.String mimeType)

Creates a builder for the given mime type

public abstract EncoderProfilesProxy.AudioProfileProxygetCompatibleAudioProfile()

Returns compatible that can be used to resolve settings.

from MimeInfogetMimeType, getProfile
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructors

public AudioMimeInfo()

Methods

public abstract EncoderProfilesProxy.AudioProfileProxy getCompatibleAudioProfile()

Returns compatible that can be used to resolve settings.

If no AudioProfileProxy is provided, returns null.

public static AudioMimeInfo.Builder builder(java.lang.String mimeType)

Creates a builder for the given mime type

Source

/*
 * Copyright 2023 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.camera.video.internal.config;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.camera.core.impl.EncoderProfilesProxy;
import androidx.camera.video.internal.encoder.EncoderConfig;

import com.google.auto.value.AutoValue;

/**
 * Data class containing information about a audio mime.
 *
 * <p>The information includes all information from {@link MimeInfo} as well as
 * compatible configuration types that can be used to resolve settings, such as
 * {@link EncoderProfilesProxy.AudioProfileProxy}.
 */
@SuppressWarnings("NullableProblems") // Problem from AutoValue generated class.
@AutoValue
public abstract class AudioMimeInfo extends MimeInfo {

    /**
     * Returns compatible {@link EncoderProfilesProxy.AudioProfileProxy} that can be used to
     * resolve settings.
     *
     * <p>If no AudioProfileProxy is provided, returns {@code null}.
     */
    @Nullable
    public abstract EncoderProfilesProxy.AudioProfileProxy getCompatibleAudioProfile();

    /** Creates a builder for the given mime type */
    @NonNull
    public static AudioMimeInfo.Builder builder(@NonNull String mimeType) {
        return new AutoValue_AudioMimeInfo.Builder()
                .setMimeType(mimeType)
                .setProfile(EncoderConfig.CODEC_PROFILE_NONE);
    }

    /** A Builder for an {@link AudioMimeInfo}. */
    @SuppressWarnings("NullableProblems") // Problem from AutoValue generated class.
    @AutoValue.Builder
    public abstract static class Builder extends MimeInfo.Builder<Builder> {
        /** Sets a compatible {@link EncoderProfilesProxy.AudioProfileProxy} */
        @NonNull
        public abstract Builder setCompatibleAudioProfile(
                @Nullable EncoderProfilesProxy.AudioProfileProxy audioProfile);

        /** Builds a AudioMimeInfo. */
        @Override
        @NonNull
        public abstract AudioMimeInfo build();
    }
}