Skip to content

Commit

Permalink
Fix StyleCop warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
radek-k committed Apr 25, 2022
1 parent 03314b6 commit f9be15c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions FFMediaToolkit/Common/Internal/AudioFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public AudioFrame(AVFrame* frame)
/// <param name="num_samples">The number of samples in the audio frame.</param>
/// <param name="channel_layout">The channel layout to be used by the audio frame.</param>
/// <param name="sampleFormat">The audio sample format.</param>
/// <param name="decodingTimestamp">The timestamp when the frame has to be decoded</param>
/// <param name="presentationTimestamp">The timestamp when the frame has to be presented</param>
/// <param name="decodingTimestamp">The timestamp when the frame has to be decoded.</param>
/// <param name="presentationTimestamp">The timestamp when the frame has to be presented.</param>
/// <returns>The new audio frame.</returns>
public static AudioFrame Create(int sample_rate, int num_channels, int num_samples, long channel_layout, SampleFormat sampleFormat, long decodingTimestamp, long presentationTimestamp)
{
Expand Down
2 changes: 2 additions & 0 deletions FFMediaToolkit/Decoding/StreamInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ internal unsafe StreamInfo(AVStream* stream, MediaType type, InputContainer cont
{
IsFrameCountProvidedByContainer = true;
NumberOfFrames = (int)stream->nb_frames;
#pragma warning disable CS0618 // Type or member is obsolete
FrameCount = NumberOfFrames.Value;
}
else
Expand All @@ -61,6 +62,7 @@ internal unsafe StreamInfo(AVStream* stream, MediaType type, InputContainer cont
if (!IsVariableFrameRate)
{
NumberOfFrames = FrameCount;
#pragma warning restore CS0618 // Type or member is obsolete
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion FFMediaToolkit/Encoding/AudioOutputStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal AudioOutputStream(OutputStream<AudioFrame> stream, AudioEncoderSettings
ffmpeg.swr_init(swrContext);

Configuration = config;
frame = AudioFrame.Create(config.SampleRate, config.Channels, config.SamplesPerFrame, channelLayout, SampleFormat.SingleP,0,0);
frame = AudioFrame.Create(config.SampleRate, config.Channels, config.SamplesPerFrame, channelLayout, SampleFormat.SingleP, 0, 0);
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions FFMediaToolkit/Graphics/ImagePixelFormat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ public enum ImagePixelFormat
/// Represents a YUV 12bpp 4:2:0 video pixel format.
/// </summary>
Yuv420 = AVPixelFormat.AV_PIX_FMT_YUV420P,

/// <summary>
/// Represents a Gray 16bpp little-endian video pixel format.
/// </summary>
Gray16 = AVPixelFormat.AV_PIX_FMT_GRAY16LE,

/// <summary>
/// Represents a Gray 8bpp video pixel format.
/// Represents a Gray 8bpp video pixel format.
/// </summary>
Gray8 = AVPixelFormat.AV_PIX_FMT_GRAY8,
}
Expand Down

0 comments on commit f9be15c

Please sign in to comment.