microsoft / FFmpegInterop
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 45 units with 1,073 lines of code in units (42.2% of code).
    • 1 very long units (201 lines of code)
    • 3 long units (169 lines of code)
    • 13 medium size units (424 lines of code)
    • 14 small units (200 lines of code)
    • 14 very small units (79 lines of code)
18% | 15% | 39% | 18% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp19% | 16% | 40% | 18% | 5%
h0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
Source18% | 15% | 39% | 18% | 7%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
HRESULT FFmpegInteropMSS::InitFFmpegContext()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
201 39 2
HRESULT FFmpegInteropMSS::CreateMediaStreamSource()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
61 14 5
HRESULT H264AVCSampleProvider::GetSPSAndPPSBuffer()
in FFmpegInterop/Source/H264AVCSampleProvider.cpp
54 9 1
HRESULT FFmpegInterop::MediaSampleProvider::GetNextPacket()
in FFmpegInterop/Source/MediaSampleProvider.cpp
54 12 4
HRESULT FFmpegInteropMSS::CreateVideoStreamDescriptor()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
48 15 1
HRESULT FFmpegInteropMSS::CreateMediaStreamSource()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
43 9 4
HRESULT UncompressedSampleProvider::GetFrameFromFFmpegDecoder()
in FFmpegInterop/Source/UncompressedSampleProvider.cpp
42 7 1
HRESULT UncompressedVideoSampleProvider::AllocateResources()
in FFmpegInterop/Source/UncompressedVideoSampleProvider.cpp
39 7 0
HRESULT UncompressedAudioSampleProvider::AllocateResources()
in FFmpegInterop/Source/UncompressedAudioSampleProvider.cpp
32 6 0
void FFmpegInteropMSS::OnStarting()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
30 9 2
static int lock_manager()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
30 5 2
HRESULT H264AVCSampleProvider::WriteNALPacket()
in FFmpegInterop/Source/H264AVCSampleProvider.cpp
30 5 2
HRESULT UncompressedSampleProvider::DecodeAVPacket()
in FFmpegInterop/Source/UncompressedSampleProvider.cpp
30 6 4
int FFmpegReader::ReadPacket()
in FFmpegInterop/Source/FFmpegReader.cpp
27 6 0
HRESULT FFmpegInteropMSS::CreateAudioStreamDescriptor()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
26 8 1
HRESULT FFmpegInteropMSS::ParseOptions()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
26 4 1
void FFmpegInteropLogging::SetLogProvider()
in FFmpegInterop/Source/FFmpegInteropLogging.cpp
21 4 1
void FFmpegInteropMSS::OnSampleRequested()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
20 6 2
HRESULT FFmpegInteropMSS::ConvertCodecName()
in FFmpegInterop/Source/FFmpegInteropMSS.cpp
19 3 2
HRESULT MediaSampleProvider::DecodeAVPacket()
in FFmpegInterop/Source/MediaSampleProvider.cpp
18 3 4