Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–6354 unchanged (6354 lines)
6355 if (!hasHardwareHi10P
6356 && string.Equals(videoStream.Codec, "h264", StringComparison.OrdinalIgnoreCase))
6357 {
6358 return null;
6359 }
6360 }
6361
6362 var decoder = hardwareAccelerationType switch
6363 {
6364 HardwareAccelerationType.vaapi => GetVaapiVidDecoder(state, options, videoStream, bitDepth),
6365 HardwareAccelerationType.amf => GetAmfVidDecoder(state, options, videoStream, bitDepth),
6366 HardwareAccelerationType.qsv => GetQsvHwVidDecoder(state, options, videoStream, bitDepth),
6367 HardwareAccelerationType.nvenc => GetNvdecVidDecoder(state, options, videoStream, bitDepth),
…lines 6368–7799 unchanged (1432 lines)

After

…lines 1–6355 unchanged (6355 lines)
6356 && string.Equals(videoStream.Codec, "h264", StringComparison.OrdinalIgnoreCase))
6357 {
6358 return null;
6359 }
6360 }
6361
6362 // Block unsupported H.264 Hi422P and Hi444PP profiles, which can be encoded with 4:2:0 pixel format
6363 if (string.Equals(videoStream.Codec, "h264", StringComparison.OrdinalIgnoreCase))
6364 {
6365 if (videoStream.Profile.Contains("4:2:2", StringComparison.OrdinalIgnoreCase)
6366 || videoStream.Profile.Contains("4:4:4", StringComparison.OrdinalIgnoreCase))
6367 {
6368 // VideoToolbox on Apple Silicon has H.264 Hi444PP and theoretically also has Hi422P
6369 if (!(hardwareAccelerationType == HardwareAccelerationType.videotoolbox
6370 && RuntimeInformation.OSArchitecture.Equals(Architecture.Arm64)))
6371 {
6372 return null;
6373 }
6374 }
6375 }
6376
6377 var decoder = hardwareAccelerationType switch
6378 {
6379 HardwareAccelerationType.vaapi => GetVaapiVidDecoder(state, options, videoStream, bitDepth),
6380 HardwareAccelerationType.amf => GetAmfVidDecoder(state, options, videoStream, bitDepth),
6381 HardwareAccelerationType.qsv => GetQsvHwVidDecoder(state, options, videoStream, bitDepth),
…lines 6382–7814 unchanged (1433 lines)

Before

compilation_unit
preproc_nullable
#nullable "#nullable"
disable "disable"
preproc_pragma
#pragma "#pragma"
warning "warning"
disable "disable"
identifier "CS1591"
comment "// We need lowercase normalized string for ffmpeg"
preproc_pragma
#pragma "#pragma"
warning "warning"
disable "disable"
identifier "CA1308"
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Collections"
. "."
identifier "Generic"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Globalization"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Runtime"
. "."
identifier "InteropServices"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Text"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Text"
. "."
identifier "RegularExpressions"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Threading"
; ";"
using_directive
using "using"
qualified_name
identifier "Jellyfin"
. "."
identifier "Data"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "Jellyfin"
. "."
identifier "Data"
. "."
identifier "Enums"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "Jellyfin"
. "."
identifier "Database"
. "."
identifier "Implementations"
. "."
identifier "Enums"
; ";"
using_directive
using "using"
qualified_name
identifier "Jellyfin"
. "."
identifier "Extensions"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Common"
. "."
identifier "Configuration"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Controller"
. "."
identifier "Extensions"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Controller"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "Configuration"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "Dlna"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "Dto"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "Entities"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "MediaInfo"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "Microsoft"
. "."
identifier "Extensions"
. "."
identifier "Configuration"
; ";"
using_directive
using "using"
identifier "IConfigurationManager"
= "="
qualified_name
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Common"
. "."
identifier "Configuration"
. "."
identifier "IConfigurationManager"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Controller"
. "."
identifier "MediaEncoding"
declaration_list
{ "{"
class_declaration
modifier
public "public"
modifier
partial "partial"
class "class"
identifier "EncodingHelper"
declaration_list
{ "{"
comment "/// <summary>"
comment "/// The codec validation regex."
comment "/// This regular expression matches strings that consist of "...
comment "/// periods, underscores, commas, and vertical bars, with a "...
comment "/// This should matches all common valid codecs."
comment "/// </summary>"
field_declaration
modifier
public "public"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "ContainerValidationRegex"
= "="
verbatim_string_literal "@\"^[a-zA-Z0-9\\-\\._,|]{0,40}$\""
; ";"
comment "/// <summary>"
comment "/// The level validation regex."
comment "/// This regular expression matches strings representing a d"...
comment "/// </summary>"
field_declaration
modifier
public "public"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "LevelValidationRegex"
= "="
verbatim_string_literal "@\"-?[0-9]+(?:\\.[0-9]+)?\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "_defaultMjpegEncoder"
= "="
string_literal
" "\""
string_literal_content "mjpeg"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "QsvAlias"
= "="
string_literal
" "\""
string_literal_content "qs"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "VaapiAlias"
= "="
string_literal
" "\""
string_literal_content "va"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "D3d11vaAlias"
= "="
string_literal
" "\""
string_literal_content "dx11"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "VideotoolboxAlias"
= "="
string_literal
" "\""
string_literal_content "vt"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "RkmppAlias"
= "="
string_literal
" "\""
string_literal_content "rk"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "OpenclAlias"
= "="
string_literal
" "\""
string_literal_content "ocl"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "CudaAlias"
= "="
string_literal
" "\""
string_literal_content "cu"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "DrmAlias"
= "="
string_literal
" "\""
string_literal_content "dr"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "VulkanAlias"
= "="
string_literal
" "\""
string_literal_content "vk"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IApplicationPaths"
variable_declarator
identifier "_appPaths"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IMediaEncoder"
variable_declarator
identifier "_mediaEncoder"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "ISubtitleEncoder"
variable_declarator
identifier "_subtitleEncoder"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IConfiguration"
variable_declarator
identifier "_config"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IConfigurationManager"
variable_declarator
identifier "_configurationManager"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IPathManager"
variable_declarator
identifier "_pathManager"
; ";"
comment "// i915 hang was fixed by linux 6.2 (3f882f2)"
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+26 nodes collapsed)
field_declaration (+75 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+41 nodes collapsed)
field_declaration (+61 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
comment "// Set max transcoding channels for encoders that can't hand"...
comment "// AAC, FLAC, ALAC, libopus, libvorbis encoders all support "...
field_declaration (+103 nodes collapsed)
field_declaration (+91 nodes collapsed)
field_declaration (+61 nodes collapsed)
constructor_declaration (+69 nodes collapsed)
enum_declaration
modifier
private "private"
enum "enum"
identifier "DynamicHdrMetadataRemovalPlan"
enum_member_declaration_list
{ "{"
enum_member_declaration
identifier "None"
, ","
enum_member_declaration
identifier "RemoveDovi"
, ","
enum_member_declaration
identifier "RemoveHdr10Plus"
, ","
} "}"
method_declaration (+23 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+253 nodes collapsed)
method_declaration (+134 nodes collapsed)
method_declaration (+74 nodes collapsed)
method_declaration (+147 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+73 nodes collapsed)
method_declaration (+103 nodes collapsed)
method_declaration (+102 nodes collapsed)
method_declaration (+88 nodes collapsed)
method_declaration (+83 nodes collapsed)
method_declaration (+358 nodes collapsed)
method_declaration (+73 nodes collapsed)
method_declaration (+129 nodes collapsed)
method_declaration (+107 nodes collapsed)
method_declaration (+290 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the name of the output video codec."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"encodingOptions\">Encoding options.</param>"
comment "/// <returns>Encoder string.</returns>"
method_declaration (+276 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the user agent param."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <returns>System.String.</returns>"
method_declaration (+67 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the referer param."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <returns>System.String.</returns>"
method_declaration (+67 nodes collapsed)
method_declaration (+653 nodes collapsed)
comment "/// <summary>"
comment "/// Gets decoder from a codec."
comment "/// </summary>"
comment "/// <param name=\"codec\">Codec to use.</param>"
comment "/// <returns>Decoder string.</returns>"
method_declaration (+139 nodes collapsed)
comment "/// <summary>"
comment "/// Infers the audio codec based on the url."
comment "/// </summary>"
comment "/// <param name=\"container\">Container to use.</param>"
comment "/// <returns>Codec string.</returns>"
method_declaration (+194 nodes collapsed)
comment "/// <summary>"
comment "/// Infers the video codec."
comment "/// </summary>"
comment "/// <param name=\"url\">The URL.</param>"
comment "/// <returns>System.Nullable{VideoCodecs}.</returns>"
method_declaration (+221 nodes collapsed)
method_declaration (+255 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the audio encoder."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <returns>System.String.</returns>"
method_declaration (+377 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+153 nodes collapsed)
method_declaration (+154 nodes collapsed)
method_declaration (+114 nodes collapsed)
method_declaration (+253 nodes collapsed)
method_declaration (+67 nodes collapsed)
method_declaration (+221 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+194 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the input video hwaccel argument."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <returns>Input video hwaccel arguments.</returns>"
method_declaration (+2111 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the input argument."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"segmentContainer\">Segment Container.</param"...
comment "/// <returns>Input arguments.</returns>"
method_declaration (+815 nodes collapsed)
comment "/// <summary>"
comment "/// Determines whether the specified stream is H264."
comment "/// </summary>"
comment "/// <param name=\"stream\">The stream.</param>"
comment "/// <returns><c>true</c> if the specified stream is H264; ot"...
method_declaration (+77 nodes collapsed)
method_declaration (+77 nodes collapsed)
method_declaration (+56 nodes collapsed)
method_declaration (+56 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+67 nodes collapsed)
method_declaration (+55 nodes collapsed)
comment "/// <summary>"
comment "/// Check if dynamic HDR metadata should be removed during s"...
comment "/// Please note this check assumes the range check has alrea"...
comment "/// and trivial fallbacks like HDR10+ to HDR10, DOVIWithHDR1"...
comment "/// </summary>"
method_declaration (+399 nodes collapsed)
method_declaration (+167 nodes collapsed)
method_declaration (+62 nodes collapsed)
method_declaration (+62 nodes collapsed)
method_declaration (+341 nodes collapsed)
method_declaration (+217 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+821 nodes collapsed)
method_declaration (+1373 nodes collapsed)
method_declaration (+259 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the text subtitle param."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <param name=\"enableAlpha\">Enable alpha processing.</para"...
comment "/// <param name=\"enableSub2video\">Enable sub2video mode.</pa"...
comment "/// <returns>System.String.</returns>"
method_declaration (+501 nodes collapsed)
method_declaration (+133 nodes collapsed)
method_declaration (+673 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the video bitrate to specify on the command line."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"videoEncoder\">Video encoder to use.</param>"
comment "/// <param name=\"encodingOptions\">Encoding options.</param>"
comment "/// <param name=\"defaultPreset\">Default present to use for e"...
comment "/// <returns>Video bitrate.</returns>"
method_declaration (+2899 nodes collapsed)
method_declaration (+1525 nodes collapsed)
method_declaration (+388 nodes collapsed)
method_declaration (+288 nodes collapsed)
method_declaration (+91 nodes collapsed)
method_declaration (+136 nodes collapsed)
method_declaration (+235 nodes collapsed)
method_declaration (+51 nodes collapsed)
method_declaration (+594 nodes collapsed)
method_declaration (+392 nodes collapsed)
method_declaration (+388 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the number of audio channels to specify on the comm"...
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <param name=\"audioStream\">The audio stream.</param>"
comment "/// <param name=\"outputAudioCodec\">The output audio codec.</"...
comment "/// <returns>System.Nullable{System.Int32}.</returns>"
method_declaration (+334 nodes collapsed)
comment "/// <summary>"
comment "/// Enforces the resolution limit."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
method_declaration (+81 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the fast seek command line parameter."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <param name=\"options\">The options.</param>"
comment "/// <param name=\"segmentContainer\">Segment Container.</param"...
comment "/// <returns>System.String.</returns>"
comment "/// <value>The fast seek command line parameter.</value>"
method_declaration (+397 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the map args."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <returns>System.String.</returns>"
method_declaration (+631 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the negative map args by filters."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <param name=\"videoProcessFilters\">The videoProcessFilter"...
comment "/// <returns>System.String.</returns>"
method_declaration (+125 nodes collapsed)
comment "/// <summary>"
comment "/// Determines which stream will be used for playback."
comment "/// </summary>"
comment "/// <param name=\"allStream\">All stream.</param>"
comment "/// <param name=\"desiredIndex\">Index of the desired.</param>"
comment "/// <param name=\"type\">The type.</param>"
comment "/// <param name=\"returnFirstIfNoIndex\">if set to <c>true</c>"...
comment "/// <returns>MediaStream.</returns>"
method_declaration (+222 nodes collapsed)
method_declaration (+419 nodes collapsed)
method_declaration (+242 nodes collapsed)
method_declaration (+366 nodes collapsed)
method_declaration (+291 nodes collapsed)
method_declaration (+219 nodes collapsed)
method_declaration (+685 nodes collapsed)
method_declaration (+247 nodes collapsed)
method_declaration (+102 nodes collapsed)
method_declaration (+503 nodes collapsed)
method_declaration (+577 nodes collapsed)
method_declaration (+459 nodes collapsed)
method_declaration (+83 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of software filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+1123 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Nvidia NVENC filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+229 nodes collapsed)
method_declaration (+1806 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of AMD AMF filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+272 nodes collapsed)
method_declaration (+1890 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Intel QSV filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+391 nodes collapsed)
method_declaration (+2588 nodes collapsed)
method_declaration (+2483 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Intel/AMD VAAPI filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+528 nodes collapsed)
method_declaration (+2183 nodes collapsed)
method_declaration (+2115 nodes collapsed)
method_declaration (+1702 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Apple VideoToolBox filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+267 nodes collapsed)
method_declaration (+1639 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Rockchip RKMPP/RKRGA filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+285 nodes collapsed)
method_declaration (+2289 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of video processing filters."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"outputVideoCodec\">Video codec to use.</para"...
comment "/// <returns>The video processing filters parameter.</return"...
method_declaration (+890 nodes collapsed)
method_declaration (+54 nodes collapsed)
method_declaration (+59 nodes collapsed)
method_declaration (+94 nodes collapsed)
method_declaration (+371 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the ffmpeg option string for the hardware accelerat"...
comment "/// </summary>"
comment "/// <param name=\"state\">The encoding job info.</param>"
comment "/// <param name=\"options\">The encoding options.</param>"
comment "/// <returns>The option string or null if none available.</r"...
method_declaration
modifier
protected "protected"
predefined_type "string"
identifier "GetHardwareVideoDecoder"
parameter_list
( "("
parameter
identifier "EncodingJobInfo"
identifier "state"
, ","
parameter
identifier "EncodingOptions"
identifier "options"
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "videoStream"
= "="
member_access_expression
identifier "state"
. "."
identifier "VideoStream"
; ";"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "mediaSource"
= "="
member_access_expression
identifier "state"
. "."
identifier "MediaSource"
; ";"
if_statement (+23 nodes collapsed)
comment "// HWA decoders can handle both video files and video folder"...
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "videoType"
= "="
member_access_expression
identifier "state"
. "."
identifier "VideoType"
; ";"
if_statement (+45 nodes collapsed)
if_statement (+21 nodes collapsed)
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "hardwareAccelerationType"
= "="
member_access_expression
identifier "options"
. "."
identifier "HardwareAccelerationType"
; ";"
if_statement
if "if"
( "("
binary_expression (+24 nodes collapsed)
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "bitDepth"
= "="
invocation_expression
identifier "GetVideoColorBitDepth"
argument_list
( "("
argument
identifier "state"
) ")"
; ";"
comment "// Only HEVC, VP9 and AV1 formats have 10-bit hardware decod"...
if_statement (+265 nodes collapsed)
local_declaration_statement (+164 nodes collapsed)
if_statement (+23 nodes collapsed)
} "}"
comment "// leave blank so ffmpeg will decide"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
comment "/// <summary>"
comment "/// Gets a hw decoder name."
comment "/// </summary>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"decoderPrefix\">Decoder prefix.</param>"
comment "/// <param name=\"decoderSuffix\">Decoder suffix.</param>"
comment "/// <param name=\"videoCodec\">Video codec to use.</param>"
comment "/// <param name=\"bitDepth\">Video color bit depth.</param>"
comment "/// <returns>Hardware decoder name.</returns>"
method_declaration (+409 nodes collapsed)
comment "/// <summary>"
comment "/// Gets a hwaccel type to use as a hardware decoder dependi"...
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"videoCodec\">Video codec to use.</param>"
comment "/// <param name=\"bitDepth\">Video color bit depth.</param>"
comment "/// <param name=\"outputHwSurface\">Specifies if output hw sur"...
comment "/// <returns>Hardware accelerator type.</returns>"
method_declaration (+1319 nodes collapsed)
method_declaration (+1184 nodes collapsed)
method_declaration (+1094 nodes collapsed)
method_declaration (+614 nodes collapsed)
method_declaration (+878 nodes collapsed)
method_declaration (+790 nodes collapsed)
method_declaration (+1066 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the number of threads."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"encodingOptions\">Encoding options.</param>"
comment "/// <param name=\"outputVideoCodec\">Video codec to use.</para"...
comment "/// <returns>Number of threads.</returns>"
preproc_nullable
#nullable "#nullable"
enable "enable"
method_declaration (+86 nodes collapsed)
preproc_nullable
#nullable "#nullable"
disable "disable"
method_declaration (+228 nodes collapsed)
method_declaration (+968 nodes collapsed)
method_declaration (+1007 nodes collapsed)
method_declaration (+269 nodes collapsed)
method_declaration (+238 nodes collapsed)
method_declaration (+93 nodes collapsed)
method_declaration (+152 nodes collapsed)
method_declaration (+296 nodes collapsed)
method_declaration (+105 nodes collapsed)
method_declaration (+652 nodes collapsed)
method_declaration (+396 nodes collapsed)
method_declaration (+714 nodes collapsed)
method_declaration (+142 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+55 nodes collapsed)
method_declaration (+168 nodes collapsed)
} "}"
} "}"

After

compilation_unit
preproc_nullable
#nullable "#nullable"
disable "disable"
preproc_pragma
#pragma "#pragma"
warning "warning"
disable "disable"
identifier "CS1591"
comment "// We need lowercase normalized string for ffmpeg"
preproc_pragma
#pragma "#pragma"
warning "warning"
disable "disable"
identifier "CA1308"
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Collections"
. "."
identifier "Generic"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Globalization"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Runtime"
. "."
identifier "InteropServices"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Text"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Text"
. "."
identifier "RegularExpressions"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Threading"
; ";"
using_directive
using "using"
qualified_name
identifier "Jellyfin"
. "."
identifier "Data"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "Jellyfin"
. "."
identifier "Data"
. "."
identifier "Enums"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "Jellyfin"
. "."
identifier "Database"
. "."
identifier "Implementations"
. "."
identifier "Enums"
; ";"
using_directive
using "using"
qualified_name
identifier "Jellyfin"
. "."
identifier "Extensions"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Common"
. "."
identifier "Configuration"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Controller"
. "."
identifier "Extensions"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Controller"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "Configuration"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "Dlna"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "Dto"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "Entities"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Model"
. "."
identifier "MediaInfo"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "Microsoft"
. "."
identifier "Extensions"
. "."
identifier "Configuration"
; ";"
using_directive
using "using"
identifier "IConfigurationManager"
= "="
qualified_name
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Common"
. "."
identifier "Configuration"
. "."
identifier "IConfigurationManager"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
qualified_name
identifier "MediaBrowser"
. "."
identifier "Controller"
. "."
identifier "MediaEncoding"
declaration_list
{ "{"
class_declaration
modifier
public "public"
modifier
partial "partial"
class "class"
identifier "EncodingHelper"
declaration_list
{ "{"
comment "/// <summary>"
comment "/// The codec validation regex."
comment "/// This regular expression matches strings that consist of "...
comment "/// periods, underscores, commas, and vertical bars, with a "...
comment "/// This should matches all common valid codecs."
comment "/// </summary>"
field_declaration
modifier
public "public"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "ContainerValidationRegex"
= "="
verbatim_string_literal "@\"^[a-zA-Z0-9\\-\\._,|]{0,40}$\""
; ";"
comment "/// <summary>"
comment "/// The level validation regex."
comment "/// This regular expression matches strings representing a d"...
comment "/// </summary>"
field_declaration
modifier
public "public"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "LevelValidationRegex"
= "="
verbatim_string_literal "@\"-?[0-9]+(?:\\.[0-9]+)?\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "_defaultMjpegEncoder"
= "="
string_literal
" "\""
string_literal_content "mjpeg"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "QsvAlias"
= "="
string_literal
" "\""
string_literal_content "qs"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "VaapiAlias"
= "="
string_literal
" "\""
string_literal_content "va"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "D3d11vaAlias"
= "="
string_literal
" "\""
string_literal_content "dx11"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "VideotoolboxAlias"
= "="
string_literal
" "\""
string_literal_content "vt"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "RkmppAlias"
= "="
string_literal
" "\""
string_literal_content "rk"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "OpenclAlias"
= "="
string_literal
" "\""
string_literal_content "ocl"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "CudaAlias"
= "="
string_literal
" "\""
string_literal_content "cu"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "DrmAlias"
= "="
string_literal
" "\""
string_literal_content "dr"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
const "const"
variable_declaration
predefined_type "string"
variable_declarator
identifier "VulkanAlias"
= "="
string_literal
" "\""
string_literal_content "vk"
" "\""
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IApplicationPaths"
variable_declarator
identifier "_appPaths"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IMediaEncoder"
variable_declarator
identifier "_mediaEncoder"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "ISubtitleEncoder"
variable_declarator
identifier "_subtitleEncoder"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IConfiguration"
variable_declarator
identifier "_config"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IConfigurationManager"
variable_declarator
identifier "_configurationManager"
; ";"
field_declaration
modifier
private "private"
modifier
readonly "readonly"
variable_declaration
identifier "IPathManager"
variable_declarator
identifier "_pathManager"
; ";"
comment "// i915 hang was fixed by linux 6.2 (3f882f2)"
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+22 nodes collapsed)
field_declaration (+25 nodes collapsed)
field_declaration (+26 nodes collapsed)
field_declaration (+75 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+41 nodes collapsed)
field_declaration (+61 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
comment "// Set max transcoding channels for encoders that can't hand"...
comment "// AAC, FLAC, ALAC, libopus, libvorbis encoders all support "...
field_declaration (+103 nodes collapsed)
field_declaration (+91 nodes collapsed)
field_declaration (+61 nodes collapsed)
constructor_declaration (+69 nodes collapsed)
enum_declaration
modifier
private "private"
enum "enum"
identifier "DynamicHdrMetadataRemovalPlan"
enum_member_declaration_list
{ "{"
enum_member_declaration
identifier "None"
, ","
enum_member_declaration
identifier "RemoveDovi"
, ","
enum_member_declaration
identifier "RemoveHdr10Plus"
, ","
} "}"
method_declaration (+23 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+253 nodes collapsed)
method_declaration (+134 nodes collapsed)
method_declaration (+74 nodes collapsed)
method_declaration (+147 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+73 nodes collapsed)
method_declaration (+103 nodes collapsed)
method_declaration (+102 nodes collapsed)
method_declaration (+88 nodes collapsed)
method_declaration (+83 nodes collapsed)
method_declaration (+358 nodes collapsed)
method_declaration (+73 nodes collapsed)
method_declaration (+129 nodes collapsed)
method_declaration (+107 nodes collapsed)
method_declaration (+290 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the name of the output video codec."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"encodingOptions\">Encoding options.</param>"
comment "/// <returns>Encoder string.</returns>"
method_declaration (+276 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the user agent param."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <returns>System.String.</returns>"
method_declaration (+67 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the referer param."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <returns>System.String.</returns>"
method_declaration (+67 nodes collapsed)
method_declaration (+653 nodes collapsed)
comment "/// <summary>"
comment "/// Gets decoder from a codec."
comment "/// </summary>"
comment "/// <param name=\"codec\">Codec to use.</param>"
comment "/// <returns>Decoder string.</returns>"
method_declaration (+139 nodes collapsed)
comment "/// <summary>"
comment "/// Infers the audio codec based on the url."
comment "/// </summary>"
comment "/// <param name=\"container\">Container to use.</param>"
comment "/// <returns>Codec string.</returns>"
method_declaration (+194 nodes collapsed)
comment "/// <summary>"
comment "/// Infers the video codec."
comment "/// </summary>"
comment "/// <param name=\"url\">The URL.</param>"
comment "/// <returns>System.Nullable{VideoCodecs}.</returns>"
method_declaration (+221 nodes collapsed)
method_declaration (+255 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the audio encoder."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <returns>System.String.</returns>"
method_declaration (+377 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+34 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+153 nodes collapsed)
method_declaration (+154 nodes collapsed)
method_declaration (+114 nodes collapsed)
method_declaration (+253 nodes collapsed)
method_declaration (+67 nodes collapsed)
method_declaration (+221 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+194 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the input video hwaccel argument."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <returns>Input video hwaccel arguments.</returns>"
method_declaration (+2111 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the input argument."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"segmentContainer\">Segment Container.</param"...
comment "/// <returns>Input arguments.</returns>"
method_declaration (+815 nodes collapsed)
comment "/// <summary>"
comment "/// Determines whether the specified stream is H264."
comment "/// </summary>"
comment "/// <param name=\"stream\">The stream.</param>"
comment "/// <returns><c>true</c> if the specified stream is H264; ot"...
method_declaration (+77 nodes collapsed)
method_declaration (+77 nodes collapsed)
method_declaration (+56 nodes collapsed)
method_declaration (+56 nodes collapsed)
method_declaration (+69 nodes collapsed)
method_declaration (+67 nodes collapsed)
method_declaration (+55 nodes collapsed)
comment "/// <summary>"
comment "/// Check if dynamic HDR metadata should be removed during s"...
comment "/// Please note this check assumes the range check has alrea"...
comment "/// and trivial fallbacks like HDR10+ to HDR10, DOVIWithHDR1"...
comment "/// </summary>"
method_declaration (+399 nodes collapsed)
method_declaration (+167 nodes collapsed)
method_declaration (+62 nodes collapsed)
method_declaration (+62 nodes collapsed)
method_declaration (+341 nodes collapsed)
method_declaration (+217 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+821 nodes collapsed)
method_declaration (+1373 nodes collapsed)
method_declaration (+259 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the text subtitle param."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <param name=\"enableAlpha\">Enable alpha processing.</para"...
comment "/// <param name=\"enableSub2video\">Enable sub2video mode.</pa"...
comment "/// <returns>System.String.</returns>"
method_declaration (+501 nodes collapsed)
method_declaration (+133 nodes collapsed)
method_declaration (+673 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the video bitrate to specify on the command line."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"videoEncoder\">Video encoder to use.</param>"
comment "/// <param name=\"encodingOptions\">Encoding options.</param>"
comment "/// <param name=\"defaultPreset\">Default present to use for e"...
comment "/// <returns>Video bitrate.</returns>"
method_declaration (+2899 nodes collapsed)
method_declaration (+1525 nodes collapsed)
method_declaration (+388 nodes collapsed)
method_declaration (+288 nodes collapsed)
method_declaration (+91 nodes collapsed)
method_declaration (+136 nodes collapsed)
method_declaration (+235 nodes collapsed)
method_declaration (+51 nodes collapsed)
method_declaration (+594 nodes collapsed)
method_declaration (+392 nodes collapsed)
method_declaration (+388 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the number of audio channels to specify on the comm"...
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <param name=\"audioStream\">The audio stream.</param>"
comment "/// <param name=\"outputAudioCodec\">The output audio codec.</"...
comment "/// <returns>System.Nullable{System.Int32}.</returns>"
method_declaration (+334 nodes collapsed)
comment "/// <summary>"
comment "/// Enforces the resolution limit."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
method_declaration (+81 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the fast seek command line parameter."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <param name=\"options\">The options.</param>"
comment "/// <param name=\"segmentContainer\">Segment Container.</param"...
comment "/// <returns>System.String.</returns>"
comment "/// <value>The fast seek command line parameter.</value>"
method_declaration (+397 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the map args."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <returns>System.String.</returns>"
method_declaration (+631 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the negative map args by filters."
comment "/// </summary>"
comment "/// <param name=\"state\">The state.</param>"
comment "/// <param name=\"videoProcessFilters\">The videoProcessFilter"...
comment "/// <returns>System.String.</returns>"
method_declaration (+125 nodes collapsed)
comment "/// <summary>"
comment "/// Determines which stream will be used for playback."
comment "/// </summary>"
comment "/// <param name=\"allStream\">All stream.</param>"
comment "/// <param name=\"desiredIndex\">Index of the desired.</param>"
comment "/// <param name=\"type\">The type.</param>"
comment "/// <param name=\"returnFirstIfNoIndex\">if set to <c>true</c>"...
comment "/// <returns>MediaStream.</returns>"
method_declaration (+222 nodes collapsed)
method_declaration (+419 nodes collapsed)
method_declaration (+242 nodes collapsed)
method_declaration (+366 nodes collapsed)
method_declaration (+291 nodes collapsed)
method_declaration (+219 nodes collapsed)
method_declaration (+685 nodes collapsed)
method_declaration (+247 nodes collapsed)
method_declaration (+102 nodes collapsed)
method_declaration (+503 nodes collapsed)
method_declaration (+577 nodes collapsed)
method_declaration (+459 nodes collapsed)
method_declaration (+83 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of software filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+1123 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Nvidia NVENC filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+229 nodes collapsed)
method_declaration (+1806 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of AMD AMF filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+272 nodes collapsed)
method_declaration (+1890 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Intel QSV filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+391 nodes collapsed)
method_declaration (+2588 nodes collapsed)
method_declaration (+2483 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Intel/AMD VAAPI filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+528 nodes collapsed)
method_declaration (+2183 nodes collapsed)
method_declaration (+2115 nodes collapsed)
method_declaration (+1702 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Apple VideoToolBox filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+267 nodes collapsed)
method_declaration (+1639 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of Rockchip RKMPP/RKRGA filter chain."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"vidEncoder\">Video encoder to use.</param>"
comment "/// <returns>The tuple contains three lists: main, sub and o"...
method_declaration (+285 nodes collapsed)
method_declaration (+2289 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the parameter of video processing filters."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"outputVideoCodec\">Video codec to use.</para"...
comment "/// <returns>The video processing filters parameter.</return"...
method_declaration (+890 nodes collapsed)
method_declaration (+54 nodes collapsed)
method_declaration (+59 nodes collapsed)
method_declaration (+94 nodes collapsed)
method_declaration (+371 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the ffmpeg option string for the hardware accelerat"...
comment "/// </summary>"
comment "/// <param name=\"state\">The encoding job info.</param>"
comment "/// <param name=\"options\">The encoding options.</param>"
comment "/// <returns>The option string or null if none available.</r"...
method_declaration
modifier
protected "protected"
predefined_type "string"
identifier "GetHardwareVideoDecoder"
parameter_list
( "("
parameter
identifier "EncodingJobInfo"
identifier "state"
, ","
parameter
identifier "EncodingOptions"
identifier "options"
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "videoStream"
= "="
member_access_expression
identifier "state"
. "."
identifier "VideoStream"
; ";"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "mediaSource"
= "="
member_access_expression
identifier "state"
. "."
identifier "MediaSource"
; ";"
if_statement (+23 nodes collapsed)
comment "// HWA decoders can handle both video files and video folder"...
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "videoType"
= "="
member_access_expression
identifier "state"
. "."
identifier "VideoType"
; ";"
if_statement (+45 nodes collapsed)
if_statement (+21 nodes collapsed)
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "hardwareAccelerationType"
= "="
member_access_expression
identifier "options"
. "."
identifier "HardwareAccelerationType"
; ";"
if_statement
if "if"
( "("
binary_expression (+24 nodes collapsed)
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "bitDepth"
= "="
invocation_expression
identifier "GetVideoColorBitDepth"
argument_list
( "("
argument
identifier "state"
) ")"
; ";"
comment "// Only HEVC, VP9 and AV1 formats have 10-bit hardware decod"...
if_statement (+265 nodes collapsed)
comment "// Block unsupported H.264 Hi422P and Hi444PP profiles, whic"...
if_statement
if "if"
( "("
invocation_expression
member_access_expression
predefined_type "string"
. "."
identifier "Equals"
argument_list
( "("
argument
member_access_expression
identifier "videoStream"
. "."
identifier "Codec"
, ","
argument
string_literal
" "\""
string_literal_content "h264"
" "\""
, ","
argument
member_access_expression
identifier "StringComparison"
. "."
identifier "OrdinalIgnoreCase"
) ")"
) ")"
block
{ "{"
if_statement
if "if"
( "("
binary_expression
invocation_expression
member_access_expression
member_access_expression
identifier "videoStream"
. "."
identifier "Profile"
. "."
identifier "Contains"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "4:2:2"
" "\""
, ","
argument
member_access_expression
identifier "StringComparison"
. "."
identifier "OrdinalIgnoreCase"
) ")"
|| "||"
invocation_expression
member_access_expression
member_access_expression
identifier "videoStream"
. "."
identifier "Profile"
. "."
identifier "Contains"
argument_list
( "("
argument
string_literal
" "\""
string_literal_content "4:4:4"
" "\""
, ","
argument
member_access_expression
identifier "StringComparison"
. "."
identifier "OrdinalIgnoreCase"
) ")"
) ")"
block
{ "{"
comment "// VideoToolbox on Apple Silicon has H.264 Hi444PP and theor"...
if_statement
if "if"
( "("
prefix_unary_expression
! "!"
parenthesized_expression
( "("
binary_expression
binary_expression
identifier "hardwareAccelerationType"
== "=="
member_access_expression
identifier "HardwareAccelerationType"
. "."
identifier "videotoolbox"
&& "&&"
invocation_expression
member_access_expression
member_access_expression
identifier "RuntimeInformation"
. "."
identifier "OSArchitecture"
. "."
identifier "Equals"
argument_list
( "("
argument
member_access_expression
identifier "Architecture"
. "."
identifier "Arm64"
) ")"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
} "}"
} "}"
local_declaration_statement (+164 nodes collapsed)
if_statement (+23 nodes collapsed)
} "}"
comment "// leave blank so ffmpeg will decide"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
comment "/// <summary>"
comment "/// Gets a hw decoder name."
comment "/// </summary>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"decoderPrefix\">Decoder prefix.</param>"
comment "/// <param name=\"decoderSuffix\">Decoder suffix.</param>"
comment "/// <param name=\"videoCodec\">Video codec to use.</param>"
comment "/// <param name=\"bitDepth\">Video color bit depth.</param>"
comment "/// <returns>Hardware decoder name.</returns>"
method_declaration (+409 nodes collapsed)
comment "/// <summary>"
comment "/// Gets a hwaccel type to use as a hardware decoder dependi"...
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"options\">Encoding options.</param>"
comment "/// <param name=\"videoCodec\">Video codec to use.</param>"
comment "/// <param name=\"bitDepth\">Video color bit depth.</param>"
comment "/// <param name=\"outputHwSurface\">Specifies if output hw sur"...
comment "/// <returns>Hardware accelerator type.</returns>"
method_declaration (+1319 nodes collapsed)
method_declaration (+1184 nodes collapsed)
method_declaration (+1094 nodes collapsed)
method_declaration (+614 nodes collapsed)
method_declaration (+878 nodes collapsed)
method_declaration (+790 nodes collapsed)
method_declaration (+1066 nodes collapsed)
comment "/// <summary>"
comment "/// Gets the number of threads."
comment "/// </summary>"
comment "/// <param name=\"state\">Encoding state.</param>"
comment "/// <param name=\"encodingOptions\">Encoding options.</param>"
comment "/// <param name=\"outputVideoCodec\">Video codec to use.</para"...
comment "/// <returns>Number of threads.</returns>"
preproc_nullable
#nullable "#nullable"
enable "enable"
method_declaration (+86 nodes collapsed)
preproc_nullable
#nullable "#nullable"
disable "disable"
method_declaration (+228 nodes collapsed)
method_declaration (+968 nodes collapsed)
method_declaration (+1007 nodes collapsed)
method_declaration (+269 nodes collapsed)
method_declaration (+238 nodes collapsed)
method_declaration (+93 nodes collapsed)
method_declaration (+152 nodes collapsed)
method_declaration (+296 nodes collapsed)
method_declaration (+105 nodes collapsed)
method_declaration (+652 nodes collapsed)
method_declaration (+396 nodes collapsed)
method_declaration (+714 nodes collapsed)
method_declaration (+142 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+55 nodes collapsed)
method_declaration (+168 nodes collapsed)
} "}"
} "}"