MediaIO.JITR.Insights
MediaIO.JITR.Insights
#Overview
name: MediaIO.JITR.Insights
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Generate detailed Just-in-Time Media Rendering insights
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of MediaIO.JITR.Insights is to enable detailed insights for Just-in-Time Media Rendering (JITR) in the MediaIO framework. This setting variable is primarily used for debugging and performance analysis of media rendering processes.
This setting variable is utilized by the MediaIO framework, which is part of the Media plugins in Unreal Engine 5. Specifically, it’s used within the MediaIOFramework plugin, in the MediaIOCore module.
The value of this variable is set through a console variable (CVar) named CVarMediaIOJITRInsights. It’s defined as a TAutoConsoleVariable
The associated variable CVarMediaIOJITRInsights directly interacts with MediaIO.JITR.Insights. They share the same value and purpose. CVarMediaIOJITRInsights is used in the C++ code to check if detailed insights should be generated.
Developers must be aware that enabling this variable may impact performance, as it generates additional debug information. It should primarily be used during development and debugging phases, not in production builds.
Best practices when using this variable include:
- Only enable it when necessary for debugging or performance analysis.
- Disable it in production builds to avoid unnecessary overhead.
- Use it in conjunction with other MediaIO debugging tools for comprehensive analysis.
Regarding the associated variable CVarMediaIOJITRInsights:
The purpose of CVarMediaIOJITRInsights is to provide programmatic access to the MediaIO.JITR.Insights setting within the C++ code of the MediaIO framework.
This variable is used directly in the MediaIOCore module of the MediaIOFramework plugin. It’s specifically utilized in the FMediaIOCorePlayerBase class.
The value of CVarMediaIOJITRInsights is set when the MediaIO.JITR.Insights console variable is modified. It’s a boolean variable, defaulting to false.
CVarMediaIOJITRInsights interacts directly with the MediaIO.JITR.Insights console variable. It’s used in the code to check if detailed insights should be generated, particularly in the LogBookmark function of FMediaIOCorePlayerBase.
Developers should be aware that this variable is thread-safe, as evidenced by the use of GetValueOnAnyThread() method.
Best practices for using CVarMediaIOJITRInsights include:
- Use GetValueOnAnyThread() when accessing its value to ensure thread safety.
- Consider the performance implications when enabling this in performance-critical code paths.
- Use it in conjunction with other MediaIO debugging mechanisms for comprehensive analysis of media rendering processes.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Private/Player/MediaIOCorePlayerBase.cpp:57
Scope (from outer to inner):
file
namespace MediaIOCorePlayerDetail
Source code excerpt:
// [JITR] Detailed insights
static TAutoConsoleVariable<bool> CVarMediaIOJITRInsights(
TEXT("MediaIO.JITR.Insights"),
false,
TEXT("Generate detailed Just-in-Time Media Rendering insights"),
ECVF_Default);
static FAutoConsoleCommand CCommandShowTimecode(
TEXT("MediaIO.ShowInputTimecode"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarMediaIOJITRInsights
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Private/Player/MediaIOCorePlayerBase.cpp:56
Scope (from outer to inner):
file
namespace MediaIOCorePlayerDetail
Source code excerpt:
// [JITR] Detailed insights
static TAutoConsoleVariable<bool> CVarMediaIOJITRInsights(
TEXT("MediaIO.JITR.Insights"),
false,
TEXT("Generate detailed Just-in-Time Media Rendering insights"),
ECVF_Default);
static FAutoConsoleCommand CCommandShowTimecode(
#Loc: <Workspace>/Engine/Plugins/Media/MediaIOFramework/Source/MediaIOCore/Private/Player/MediaIOCorePlayerBase.cpp:1365
Scope (from outer to inner):
file
function void FMediaIOCorePlayerBase::LogBookmark
Source code excerpt:
{
// Put a bookmark if requested
const bool bDetailedInsights = MediaIOCorePlayerDetail::CVarMediaIOJITRInsights.GetValueOnAnyThread();
if (bDetailedInsights)
{
const TOptional<FTimecode> Timecode = Sample->GetTimecode();
if (Timecode.IsSet())
{
const FFrameNumber FrameNumber = Timecode.GetValue().ToFrameNumber(VideoFrameRate);