mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-01 23:49:44 +08:00
5864328e35
* [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
33 lines
721 B
C#
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();
|
|
}
|
|
}
|
|
}
|