Skip to content

Commit

Permalink
Add av::AudioSamples::isPlanar()
Browse files Browse the repository at this point in the history
  • Loading branch information
h4tr3d committed Mar 28, 2018
1 parent 60f472f commit 3d88f43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/frame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ size_t AudioSamples::sampleBitDepth(OptionalErrorCode ec) const
: 0;
}

bool AudioSamples::isPlanar() const
{
return m_raw ? av_sample_fmt_is_planar(static_cast<AVSampleFormat>(m_raw->format)) : false;
}

string AudioSamples::channelsLayoutString() const
{
if (!m_raw)
Expand Down
1 change: 1 addition & 0 deletions src/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ class AudioSamples : public Frame<AudioSamples>
int64_t channelsLayout() const;
int sampleRate() const;
size_t sampleBitDepth(OptionalErrorCode ec = throws()) const;
bool isPlanar() const;

std::string channelsLayoutString() const;
};
Expand Down

0 comments on commit 3d88f43

Please sign in to comment.