SLIP
1.4
|
AvReader, inherited from ContainerReader, is a reader for videos. More...
#include <AvReader.hpp>
Public Types | |
typedef VideoContainer | container_type |
typedef T | value_type |
typedef ContainerReader < VideoContainer, T, Nb_block > | base |
Public Member Functions | |
void | initialize () |
initialized the reading process. More... | |
void | release () |
release the reading process. More... | |
int | read (VideoContainer &in) |
virtual read function. If Nb_block is more than one, it reads only one container, and returns 0. Else it reads the container and returns 1. If the file data_filename has been completely read (no more block to read), it returns 1. More... | |
Constructors & Destructors | |
AvReader () | |
AvReader (std::string data_filename) | |
virtual | ~AvReader () |
Getters | |
AVCodec * | get_codec () const |
get the codec pointer More... | |
CodecID | get_codec_id () const |
get the codec id (see avcodec.h : enum AVCodecID) More... | |
int | get_read_frames () const |
get the number of read frames More... | |
int | get_nb_frames () const |
get the total number of frames More... | |
int | get_bit_rate () const |
get the the average bit rate of the codec More... | |
std::size_t | get_frame_width () const |
get the width of a decoded frame picture More... | |
std::size_t | get_frame_height () const |
get the height of a decoded frame picture More... | |
AVRational | get_time_base () const |
get the time base of the video stream (1/framerate) More... | |
int64_t | get_duration () const |
get the duration of the video stream More... | |
Getters and setters | |
const std::string & | get_data_filename () const |
return the name of the file containing the data to read More... | |
void | set_data_filename (const std::string &data_filename) |
std::size_t | get_nb_block () const |
return the number of splitting blocks of the data More... | |
Protected Attributes | |
std::string | data_filename_ |
AvReader, inherited from ContainerReader, is a reader for videos.
VideoContainer | should be a 3d Container with a component number equal to Nb_components. The [][] operator and the slices(), the rows() and the cols() methods should have been defined. |
T | the type of the container data. |
Nb_components | the number of frames components (3 for a color video or 1 for a gray scale video). |
Nb_block | is the number of containers to create (>1 if one want to split the input data into different containers, default is 1). Notice that the video data is always cut according to the time dimension which must be the first dimension of the input container (or slices dimension). In other words each container will contain a set of frames which size depends on the Nb_block. |
Definition at line 49 of file AvReader.hpp.
typedef ContainerReader<VideoContainer,T,Nb_block> slip::AvReader< VideoContainer, T, Nb_components, Nb_block >::base |
Definition at line 53 of file AvReader.hpp.
typedef VideoContainer slip::AvReader< VideoContainer, T, Nb_components, Nb_block >::container_type |
Definition at line 51 of file AvReader.hpp.
typedef T slip::AvReader< VideoContainer, T, Nb_components, Nb_block >::value_type |
Definition at line 52 of file AvReader.hpp.
|
inline |
Default constructor
Definition at line 63 of file AvReader.hpp.
|
inline |
Constructor with parameters.
data_filename | is the name of the file containing the data to read |
Definition at line 74 of file AvReader.hpp.
|
inlinevirtual |
|
inline |
get the the average bit rate of the codec
Definition at line 160 of file AvReader.hpp.
|
inline |
|
inline |
get the codec id (see avcodec.h : enum AVCodecID)
Definition at line 135 of file AvReader.hpp.
|
inherited |
return the name of the file containing the data to read
|
inline |
get the duration of the video stream
Definition at line 204 of file AvReader.hpp.
|
inline |
get the height of a decoded frame picture
Definition at line 182 of file AvReader.hpp.
|
inline |
get the width of a decoded frame picture
Definition at line 171 of file AvReader.hpp.
|
inherited |
return the number of splitting blocks of the data
|
inline |
get the total number of frames
Definition at line 152 of file AvReader.hpp.
|
inline |
get the number of read frames
Definition at line 145 of file AvReader.hpp.
|
inline |
get the time base of the video stream (1/framerate)
Definition at line 193 of file AvReader.hpp.
|
inline |
initialized the reading process.
Definition at line 253 of file AvReader.hpp.
|
inlinevirtual |
virtual read function. If Nb_block is more than one, it reads only one container, and returns 0. Else it reads the container and returns 1. If the file data_filename has been completely read (no more block to read), it returns 1.
in | is the container to fill. Warning, the container should be a video container with [] operator, resize(), slices(), width(), height() methods defined. |
Implements slip::ContainerReader< VideoContainer, T, Nb_block >.
Definition at line 379 of file AvReader.hpp.
|
inline |
release the reading process.
Definition at line 474 of file AvReader.hpp.
|
inherited |
data_filename | is the name of the file containing the data to read |
|
protectedinherited |
Definition at line 100 of file ContainerReader.hpp.