package com.foxx.androidcast.media.codec;

/*********************************************************************
 * VideoDecoderFactory.java
 * Created at: Sun 17 May 2026 22:49:49 +0200
 * Updated at: Wed 20 May 2026 15:17:13 +0200 by Anton Afanasyeu <a.afanasieff@gmail.com>
 * Commit: 5d8e82d2e60a21fff3138d2a394ee4e8b4c6dcb8
 * class VideoDecoderFactory
 * Contributors:
 *    - Anton Afanasyeu <a.afanasieff@gmail.com> (3 commits, 23 lines)
 *    - Cursor Agent (project assistant)
 * Digest: SHA256	478c0cd5ddb8c25d46f2010ab216e758cd7d48c44a042dac38b76d9092cefb71
**********************************************************************/
import com.foxx.androidcast.media.codec.jni.NativeCodecBridge;
import com.foxx.androidcast.receiver.VideoDecoder;

/** Creates video decoder sinks. */
public final class VideoDecoderFactory {
    private VideoDecoderFactory() {}

    public static VideoDecoderSink createDecoder() {
        if (NativeCodecBridge.isLibvpxAvailable()) {
            return new LibvpxCapableVideoDecoder();
        }
        return new VideoDecoder();
    }
}
