Files
sharpemu/src/SharpEmu.Libs/Media/FfmpegRuntime.cs
T
Berk 5864328e35 Merge media decoding into one FFmpeg bridge (#706)
* [media] merge bink into shared ffmpeg bridge

* [avplayer] decode in process and fix stream info size

* [font] add glyph and teardown exports

* [build] bump ffmpeg runtime to 3b502d4

* [font] add glyph and teardown exports

* [build] bump ffmpeg runtime to 3b502d4

* [avplayer] decode in process

* [font] add glyph and teardown exports

* [build] bump ffmpeg runtime to 3b502d4
2026-07-31 01:31:14 +03:00

33 lines
721 B
C#

// Copyright (C) 2026 SharpEmu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
using System;
using System.IO;
using FFmpeg.AutoGen;
namespace SharpEmu.Libs.Media;
internal static class FfmpegRuntime
{
private static readonly object _gate = new();
private static bool _initialized;
internal static void EnsureInitialized()
{
if (_initialized)
{
return;
}
lock (_gate)
{
if (_initialized)
{
return;
}
_initialized = true;
ffmpeg.RootPath = Path.Combine(AppContext.BaseDirectory, "plugins");
DynamicallyLoadedBindings.Initialize();
}
}
}