From: Helge Norberg Date: Mon, 21 Mar 2016 12:24:17 +0000 (+0100) Subject: Removed audio_channel_layout from audio_decoder. X-Git-Tag: 2.1.0_Beta1~90 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=c585d525bc1d66933376ef3c1e8da3d6544708b6;p=casparcg Removed audio_channel_layout from audio_decoder. --- diff --git a/modules/ffmpeg/ffmpeg_pipeline_backend_internal.cpp b/modules/ffmpeg/ffmpeg_pipeline_backend_internal.cpp index 91c770aa6..6c59497e9 100644 --- a/modules/ffmpeg/ffmpeg_pipeline_backend_internal.cpp +++ b/modules/ffmpeg/ffmpeg_pipeline_backend_internal.cpp @@ -177,7 +177,7 @@ public: try { - audio_decoder_.reset(new audio_decoder(*input_, core::video_format_desc(), L"")); + audio_decoder_.reset(new audio_decoder(*input_, core::video_format_desc())); } catch (averror_stream_not_found&) { diff --git a/modules/ffmpeg/producer/audio/audio_decoder.cpp b/modules/ffmpeg/producer/audio/audio_decoder.cpp index 7f6dc59f6..2366c10d8 100644 --- a/modules/ffmpeg/producer/audio/audio_decoder.cpp +++ b/modules/ffmpeg/producer/audio/audio_decoder.cpp @@ -81,7 +81,6 @@ struct audio_decoder::impl : boost::noncopyable }; cache_aligned_vector buffer_; - core::audio_channel_layout channel_layout_; std::shared_ptr current_packet_; @@ -89,17 +88,12 @@ public: explicit impl( input& in, const core::video_format_desc& format_desc, - const std::wstring& channel_layout_spec, int audio_stream_index) : input_(in) , index_(audio_stream_index) , actual_index_(input_.get_actual_audio_stream_index(index_)) , format_desc_(format_desc) , buffer_(480000 * 4) - , channel_layout_(get_audio_channel_layout( - codec_context_->channels, - codec_context_->channel_layout, - channel_layout_spec)) { if(!swr_) CASPAR_THROW_EXCEPTION(bad_alloc()); @@ -187,12 +181,11 @@ public: } }; -audio_decoder::audio_decoder(input& input, const core::video_format_desc& format_desc, const std::wstring& channel_layout_spec, int audio_stream_index) : impl_(new impl(input, format_desc, channel_layout_spec, audio_stream_index)){} +audio_decoder::audio_decoder(input& input, const core::video_format_desc& format_desc, int audio_stream_index) : impl_(new impl(input, format_desc, audio_stream_index)){} audio_decoder::audio_decoder(audio_decoder&& other) : impl_(std::move(other.impl_)){} audio_decoder& audio_decoder::operator=(audio_decoder&& other){impl_ = std::move(other.impl_); return *this;} std::shared_ptr audio_decoder::operator()(){return impl_->poll();} uint32_t audio_decoder::nb_frames() const{return impl_->nb_frames();} -const core::audio_channel_layout& audio_decoder::channel_layout() const { return impl_->channel_layout_; } std::wstring audio_decoder::print() const{return impl_->print();} core::monitor::subject& audio_decoder::monitor_output() { return impl_->monitor_subject_;} diff --git a/modules/ffmpeg/producer/audio/audio_decoder.h b/modules/ffmpeg/producer/audio/audio_decoder.h index a1ed37506..93cbcccb9 100644 --- a/modules/ffmpeg/producer/audio/audio_decoder.h +++ b/modules/ffmpeg/producer/audio/audio_decoder.h @@ -38,7 +38,7 @@ namespace caspar { namespace ffmpeg { class audio_decoder : public boost::noncopyable { public: - explicit audio_decoder(class input& input, const core::video_format_desc& format_desc, const std::wstring& channel_layout_spec, int audio_stream_index = 0); + explicit audio_decoder(class input& input, const core::video_format_desc& format_desc, int audio_stream_index = 0); audio_decoder(audio_decoder&& other); audio_decoder& operator=(audio_decoder&& other); @@ -46,7 +46,6 @@ public: std::shared_ptr operator()(); uint32_t nb_frames() const; - const core::audio_channel_layout& channel_layout() const; std::wstring print() const;