Skip to content

Commit

Permalink
ExternalOutput uses AV Coder classes
Browse files Browse the repository at this point in the history
* ExternalOutput transcode AV for required output.
* AV encoder/decoder inherits from CoderEncoder, CoderDecoder.
* CoderCodec is base class for CoderEncoder, CoderDecoder
  • Loading branch information
zevarito committed May 29, 2018
1 parent 59ff231 commit 7700db0
Show file tree
Hide file tree
Showing 12 changed files with 761 additions and 439 deletions.
4 changes: 2 additions & 2 deletions erizo/src/erizo/media/ExternalInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ int ExternalInput::init() {
op_->init(om, this);
} else {
needTranscoding_ = true;
inCodec_.initDecoder(&video_codec_ctx_, st->codecpar);
inCodec_.initDecoder(st->codecpar);

bufflen_ = video_codec_ctx_->width*video_codec_ctx_->height*3/2;
bufflen_ = inCodec_.codec_context_->width*inCodec_.codec_context_->height*3/2;
decodedBuffer_.reset((unsigned char*) malloc(bufflen_));


Expand Down
1 change: 0 additions & 1 deletion erizo/src/erizo/media/ExternalInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class ExternalInput : public MediaSource, public RTPDataReceiver {
std::queue<RawDataPacket> packetQueue_;
AVFormatContext* context_;
AVPacket avpacket_;
AVCodecContext *video_codec_ctx_;
int video_stream_index_, video_time_base_;
int audio_stream_index_, audio_time_base_;
int bufflen_;
Expand Down
Loading

0 comments on commit 7700db0

Please sign in to comment.