]> git.sesse.net Git - casparcg/commitdiff
Removed audio_channel_layout from audio_decoder.
authorHelge Norberg <helge.norberg@svt.se>
Mon, 21 Mar 2016 12:24:17 +0000 (13:24 +0100)
committerHelge Norberg <helge.norberg@svt.se>
Mon, 21 Mar 2016 12:24:17 +0000 (13:24 +0100)
modules/ffmpeg/ffmpeg_pipeline_backend_internal.cpp
modules/ffmpeg/producer/audio/audio_decoder.cpp
modules/ffmpeg/producer/audio/audio_decoder.h

index 91c770aa64bd676872dc58ed1bad0e5206ae0bc5..6c59497e9ebb1e3ff52f85f3e6912a28c16bf5fa 100644 (file)
@@ -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&)
                {
index 7f6dc59f6899821b853815dacd6a082841801be0..2366c10d8032260be15a9ca11197455926c528ce 100644 (file)
@@ -81,7 +81,6 @@ struct audio_decoder::impl : boost::noncopyable
                                                                                                                                                                        };
 
        cache_aligned_vector<uint8_t>                                                           buffer_;
-       core::audio_channel_layout                                                                      channel_layout_;
 
        std::shared_ptr<AVPacket>                                                                       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<AVFrame> 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_;}
 
index a1ed375067d2977021eb288b6854232250e321db..93cbcccb947383beacc92a0e255ec1ef450a8139 100644 (file)
@@ -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<AVFrame> operator()();
 
        uint32_t nb_frames() const;
-       const core::audio_channel_layout& channel_layout() const;
        
        std::wstring print() const;