]> git.sesse.net Git - casparcg/blob - core/producer/ffmpeg/audio/audio_decoder.h
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
[casparcg] / core / producer / ffmpeg / audio / audio_decoder.h
1 #pragma once\r
2 \r
3 #include "../packet.h"\r
4 #include "../../../frame/audio_chunk.h"\r
5 \r
6 namespace caspar{ namespace ffmpeg      {\r
7 \r
8 class audio_decoder : boost::noncopyable\r
9 {\r
10 public:\r
11         audio_decoder(const sound_channel_info_ptr& snd_channel_info);\r
12         audio_packet_ptr execute(const audio_packet_ptr& audio_packet);\r
13         \r
14         /// <summary> The alignment </summary>\r
15         /// <remarks> Four sec of 16 bit stereo 48kHz should be enough </remarks>\r
16         static const int ALIGNMENT = 16 ;\r
17 \r
18         /// <summary> Size of the audio decomp buffer </summary>\r
19         static const int AUDIO_DECOMP_BUFFER_SIZE = 4*48000*4+ALIGNMENT;\r
20 private:\r
21         struct implementation;\r
22         std::shared_ptr<implementation> impl_;\r
23 };\r
24 typedef std::shared_ptr<audio_decoder> audio_decoder_ptr;\r
25 typedef std::unique_ptr<audio_decoder> audio_decoder_uptr;\r
26 \r
27 }}