37 lines
612 B
C++
37 lines
612 B
C++
#include "Stream.h"
|
|
#include <stdexcept>
|
|
|
|
namespace ffcpp {
|
|
|
|
Stream::Stream() {
|
|
_stream = nullptr;
|
|
}
|
|
|
|
Stream::Stream(AVStream *stream) {
|
|
_stream = stream;
|
|
_codec = Codec(_stream->codec, CodecType::Decoder);
|
|
}
|
|
|
|
Stream::Stream(AVStream *stream, AVCodec* encoder) {
|
|
_stream = stream;
|
|
_codec = Codec(stream->codec, encoder);
|
|
}
|
|
|
|
Stream::operator AVStream*() const {
|
|
return _stream;
|
|
}
|
|
|
|
Codec Stream::codec() const {
|
|
return _codec;
|
|
}
|
|
|
|
AVRational Stream::timeBase() const {
|
|
return _stream->time_base;
|
|
}
|
|
|
|
void Stream::setTimeBase(AVRational timeBase) {
|
|
_stream->time_base = timeBase;
|
|
}
|
|
|
|
}
|