Loading...
Searching...
No Matches
openshot::ReaderInfo Struct Reference

This struct contains info about a media file, such as height, width, frames per second, etc... More...

`#include <ReaderBase.h>`

## Public Attributes

std::string | acodec
| The name of the audio codec used to encode / decode the video stream.
int | audio_bit_rate
| The bit rate of the audio stream (in bytes)
int | audio_stream_index
| The index of the audio stream.
openshot::Fraction | audio_timebase
| The audio timebase determines how long each audio packet should be played.
openshot::ChannelLayout | channel_layout
| The channel layout (mono, stereo, 5 point surround, etc...)
int | channels
| The number of audio channels used in the audio stream.
openshot::Fraction | display_ratio
| The ratio of width to height of the video stream (i.e. 640x480 has a ratio of 4/3)
float | duration
| Length of time (in seconds)
int64_t | file_size
| Size of file (in bytes)
openshot::Fraction | fps
| Frames per second, as a fraction (i.e. 24/1 = 24 fps)
bool | has_audio
| Determines if this file has an audio stream.
bool | has_single_image
| Determines if this file only contains a single image.
bool | has_video
| Determines if this file has a video stream.
int | height
| The height of the video (in pixels)
bool | interlaced_frame
std::map< std::string, std::string > | metadata
| An optional map/dictionary of metadata for this reader.
int | pixel_format
| The pixel format (i.e. YUV420P, RGB24, etc...)
openshot::Fraction | pixel_ratio
| The pixel ratio of the video stream as a fraction (i.e. some pixels are not square)
int | sample_rate
| The number of audio samples per second (44100 is a common sample rate)
bool | top_field_first
std::string | vcodec
| The name of the video codec used to encode / decode the video stream.
int | video_bit_rate
| The bit rate of the video stream (in bytes)
int64_t | video_length
| The number of frames in the video stream.
int | video_stream_index
| The index of the video stream.
openshot::Fraction | video_timebase
| The video timebase determines how long each frame stays on the screen.
int | width
| The width of the video (in pixesl)

## Detailed Description

This struct contains info about a media file, such as height, width, frames per second, etc...

Each derived class of ReaderBase is responsible for updating this struct to reflect accurate information about the streams.

Definition at line 38 of file ReaderBase.h.

## Member Data Documentation

## acodec

std::string openshot::ReaderInfo::acodec

The name of the audio codec used to encode / decode the video stream.

Definition at line 58 of file ReaderBase.h.

Referenced by openshot::QtHtmlReader::Close(), openshot::QtImageReader::Close(), openshot::QtTextReader::Close(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ReaderBase::ReaderBase(), openshot::ReaderBase::SetJsonValue(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## audio_bit_rate

int openshot::ReaderInfo::audio_bit_rate

The bit rate of the audio stream (in bytes)

Definition at line 59 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## audio_stream_index

int openshot::ReaderInfo::audio_stream_index

The index of the audio stream.

Definition at line 63 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::FFmpegReader::Open(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## audio_timebase

openshot::Fraction openshot::ReaderInfo::audio_timebase

The audio timebase determines how long each audio packet should be played.

Definition at line 64 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## channel_layout

openshot::ChannelLayout openshot::ReaderInfo::channel_layout

The channel layout (mono, stereo, 5 point surround, etc...)

Definition at line 62 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::FrameMapper::FrameMapper(), openshot::FrameMapper::GetFrame(), openshot::Timeline::GetFrame(), openshot::ReaderBase::JsonValue(), openshot::ReaderBase::ReaderBase(), openshot::FrameMapper::ResampleMappedAudio(), openshot::ReaderBase::SetJsonValue(), openshot::QtPlayer::SetSource(), and openshot::Timeline::Timeline().

## channels

int openshot::ReaderInfo::channels

The number of audio channels used in the audio stream.

Definition at line 61 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::AudioWaveformer::ExtractSamples(), openshot::FFmpegReader::FFmpegReader(), openshot::FrameMapper::FrameMapper(), openshot::FrameMapper::GetFrame(), openshot::QtImageReader::GetFrame(), openshot::Timeline::GetFrame(), openshot::Clip::init_reader_settings(), openshot::ReaderBase::JsonValue(), openshot::DummyReader::Open(), openshot::FFmpegReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::FrameMapper::ResampleMappedAudio(), openshot::VideoCacheThread::run(), openshot::ReaderBase::SetJsonValue(), openshot::QtPlayer::SetSource(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## display_ratio

openshot::Fraction openshot::ReaderInfo::display_ratio

The ratio of width to height of the video stream (i.e. 640x480 has a ratio of 4/3)

Definition at line 51 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::ReaderBase::SetJsonValue(), and openshot::Timeline::Timeline().

## duration

float openshot::ReaderInfo::duration

Length of time (in seconds)

Definition at line 43 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::Clip::Clip(), openshot::Clip::Clip(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::AudioWaveformer::ExtractSamples(), openshot::FrameMapper::FrameMapper(), openshot::AudioReaderSource::getTotalLength(), openshot::ReaderBase::JsonValue(), openshot::Clip::Open(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::Timeline::SetJsonValue(), openshot::ReaderBase::SetJsonValue(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## file_size

int64_t openshot::ReaderInfo::file_size

Size of file (in bytes)

Definition at line 44 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## fps

openshot::Fraction openshot::ReaderInfo::fps

Frames per second, as a fraction (i.e. 24/1 = 24 fps)

Definition at line 48 of file ReaderBase.h.

Referenced by openshot::Timeline::apply_effects(), openshot::FrameMapper::ChangeMapping(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::Clip::End(), openshot::FFmpegReader::FFmpegReader(), openshot::FrameMapper::FrameMapper(), openshot::FrameMapper::GetFrame(), openshot::QtImageReader::GetFrame(), openshot::Timeline::GetFrame(), openshot::Timeline::GetMaxFrame(), openshot::ReaderBase::JsonValue(), openshot::FFmpegReader::Open(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::Clip::PropertiesJSON(), openshot::ReaderBase::ReaderBase(), openshot::VideoCacheThread::run(), openshot::Timeline::SetJsonValue(), openshot::ReaderBase::SetJsonValue(), openshot::QtPlayer::SetSource(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## has_audio

bool openshot::ReaderInfo::has_audio

Determines if this file has an audio stream.

Definition at line 41 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::FFmpegReader::Close(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::AudioWaveformer::ExtractSamples(), openshot::FrameMapper::FrameMapper(), openshot::FrameMapper::GetFrame(), openshot::FrameMapper::GetMappedFrame(), openshot::ReaderBase::JsonValue(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::ReaderBase::SetJsonValue(), openshot::QtPlayer::Speed(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## has_single_image

bool openshot::ReaderInfo::has_single_image

Determines if this file only contains a single image.

Definition at line 42 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::Mask::GetFrame(), openshot::FrameMapper::GetMappedFrame(), openshot::ReaderBase::JsonValue(), openshot::ImageReader::Open(), openshot::QtImageReader::Open(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## has_video

bool openshot::ReaderInfo::has_video

Determines if this file has a video stream.

Definition at line 40 of file ReaderBase.h.

Referenced by openshot::FFmpegReader::Close(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::AudioWaveformer::ExtractSamples(), openshot::FFmpegReader::GetFrame(), openshot::FrameMapper::GetMappedFrame(), openshot::ReaderBase::JsonValue(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::ReaderBase::SetJsonValue(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## height

int openshot::ReaderInfo::height

The height of the video (in pixels)

Definition at line 45 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::FFmpegReader::FFmpegReader(), openshot::FrameMapper::FrameMapper(), openshot::Timeline::GetFrame(), openshot::Clip::init_reader_settings(), openshot::ReaderBase::JsonValue(), openshot::DummyReader::Open(), openshot::FFmpegReader::Open(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::VideoCacheThread::run(), openshot::Timeline::SetJsonValue(), openshot::ReaderBase::SetJsonValue(), openshot::Timeline::SetMaxSize(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## interlaced_frame

bool openshot::ReaderInfo::interlaced_frame

Definition at line 56 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## metadata

std::map<std::string, std::string> openshot::ReaderInfo::metadata

An optional map/dictionary of metadata for this reader.

Definition at line 65 of file ReaderBase.h.

Referenced by openshot::ReaderBase::DisplayInfo(), openshot::Clip::init_reader_rotation(), openshot::ReaderBase::JsonValue(), openshot::FFmpegReader::Open(), and openshot::ReaderBase::SetJsonValue().

## pixel_format

int openshot::ReaderInfo::pixel_format

The pixel format (i.e. YUV420P, RGB24, etc...)

Definition at line 47 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## pixel_ratio

openshot::Fraction openshot::ReaderInfo::pixel_ratio

The pixel ratio of the video stream as a fraction (i.e. some pixels are not square)

Definition at line 50 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::ReaderBase::SetJsonValue(), and openshot::Timeline::Timeline().

## sample_rate

int openshot::ReaderInfo::sample_rate

The number of audio samples per second (44100 is a common sample rate)

Definition at line 60 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::AudioWaveformer::ExtractSamples(), openshot::FFmpegReader::FFmpegReader(), openshot::FrameMapper::FrameMapper(), openshot::FrameMapper::GetFrame(), openshot::QtImageReader::GetFrame(), openshot::Timeline::GetFrame(), openshot::AudioReaderSource::getTotalLength(), openshot::Clip::init_reader_settings(), openshot::ReaderBase::JsonValue(), openshot::DummyReader::Open(), openshot::FFmpegReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::FrameMapper::ResampleMappedAudio(), openshot::VideoCacheThread::run(), openshot::ReaderBase::SetJsonValue(), openshot::QtPlayer::SetSource(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## top_field_first

bool openshot::ReaderInfo::top_field_first

Definition at line 57 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## vcodec

std::string openshot::ReaderInfo::vcodec

The name of the video codec used to encode / decode the video stream.

Definition at line 52 of file ReaderBase.h.

Referenced by openshot::QtHtmlReader::Close(), openshot::QtImageReader::Close(), openshot::QtTextReader::Close(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::ReaderBase::SetJsonValue(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## video_bit_rate

int openshot::ReaderInfo::video_bit_rate

The bit rate of the video stream (in bytes)

Definition at line 49 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## video_length

int64_t openshot::ReaderInfo::video_length

The number of frames in the video stream.

Definition at line 53 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::FFmpegReader::Close(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::AudioWaveformer::ExtractSamples(), openshot::FrameMapper::FrameMapper(), openshot::FFmpegReader::GetFrame(), openshot::ReaderBase::JsonValue(), openshot::FFmpegReader::Open(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::Timeline::SetJsonValue(), openshot::ReaderBase::SetJsonValue(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## video_stream_index

int openshot::ReaderInfo::video_stream_index

The index of the video stream.

Definition at line 54 of file ReaderBase.h.

Referenced by openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::ReaderBase::JsonValue(), openshot::FFmpegReader::Open(), openshot::ReaderBase::ReaderBase(), and openshot::ReaderBase::SetJsonValue().

## video_timebase

openshot::Fraction openshot::ReaderInfo::video_timebase

The video timebase determines how long each frame stays on the screen.

Definition at line 55 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::FrameMapper::FrameMapper(), openshot::ReaderBase::JsonValue(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::ReaderBase::SetJsonValue(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

## width

int openshot::ReaderInfo::width

The width of the video (in pixesl)

Definition at line 46 of file ReaderBase.h.

Referenced by openshot::FrameMapper::ChangeMapping(), openshot::WriterBase::CopyReaderInfo(), openshot::ReaderBase::DisplayInfo(), openshot::FFmpegReader::FFmpegReader(), openshot::FrameMapper::FrameMapper(), openshot::Timeline::GetFrame(), openshot::Clip::init_reader_settings(), openshot::ReaderBase::JsonValue(), openshot::DummyReader::Open(), openshot::FFmpegReader::Open(), openshot::ImageReader::Open(), openshot::QtHtmlReader::Open(), openshot::QtImageReader::Open(), openshot::QtTextReader::Open(), openshot::TextReader::Open(), openshot::ReaderBase::ReaderBase(), openshot::VideoCacheThread::run(), openshot::Timeline::SetJsonValue(), openshot::ReaderBase::SetJsonValue(), openshot::Timeline::SetMaxSize(), openshot::Timeline::Timeline(), and openshot::Timeline::Timeline().

The documentation for this struct was generated from the following file:

- ReaderBase.h