diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-07-02 22:32:12 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-07-02 22:32:12 +0100 |
| commit | 02478f9f6af48b6209a8e87401025237b7461986 (patch) | |
| tree | eb21f4a36bf2b665c8f41b3fcb3417862dcd7084 /src/lib/ffmpeg_examiner.cc | |
| parent | d42225fe5b857fc78979fdb7c980ede67b008785 (diff) | |
Add bits per pixel to video content properties.
Diffstat (limited to 'src/lib/ffmpeg_examiner.cc')
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 16a89faa7..f4b650eee 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -20,6 +20,8 @@ extern "C" { #include <libavcodec/avcodec.h> #include <libavformat/avformat.h> +#include <libavutil/pixfmt.h> +#include <libavutil/pixdesc.h> } #include "ffmpeg_examiner.h" #include "ffmpeg_content.h" @@ -275,3 +277,9 @@ FFmpegExaminer::stream_name (AVStream* s) const return n.str (); } + +int +FFmpegExaminer::bits_per_pixel () const +{ + return av_get_bits_per_pixel (av_pix_fmt_desc_get (video_codec_context()->pix_fmt)); +} |
