~ubuntu-branches/ubuntu/trusty/libav/trusty-proposed

« back to all changes in this revision

Viewing changes to libavformat/daud.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2013-10-22 23:24:08 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: package-import@ubuntu.com-20131022232408-b8tvvn4pyzri9mi3
Tags: 6:9.10-1ubuntu1
* Build all -extra flavors from this source package, as libav got demoted
  from main to universe, cf LP: #1243235
* Simplify debian/rules to follow exactly the code that debian executes
* New upstream (LP: #1180288) fixes lots of security issues (LP: #1242802)
* Merge from unstable, remaining changes:
  - build-depend on libtiff5-dev rather than libtiff4-dev,
    avoids FTBFS caused by imlib
  - follow the regular debian codepaths

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * License along with Libav; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
20
 */
 
21
 
 
22
#include "libavutil/channel_layout.h"
21
23
#include "avformat.h"
22
24
 
23
 
static int daud_header(AVFormatContext *s, AVFormatParameters *ap) {
 
25
static int daud_header(AVFormatContext *s) {
24
26
    AVStream *st = avformat_new_stream(s, NULL);
25
27
    if (!st)
26
28
        return AVERROR(ENOMEM);
27
29
    st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
28
 
    st->codec->codec_id = CODEC_ID_PCM_S24DAUD;
 
30
    st->codec->codec_id = AV_CODEC_ID_PCM_S24DAUD;
29
31
    st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
30
32
    st->codec->channels = 6;
 
33
    st->codec->channel_layout = AV_CH_LAYOUT_5POINT1;
31
34
    st->codec->sample_rate = 96000;
32
35
    st->codec->bit_rate = 3 * 6 * 96000 * 8;
33
36
    st->codec->block_align = 3 * 6;
72
75
#if CONFIG_DAUD_DEMUXER
73
76
AVInputFormat ff_daud_demuxer = {
74
77
    .name           = "daud",
75
 
    .long_name      = NULL_IF_CONFIG_SMALL("D-Cinema audio format"),
 
78
    .long_name      = NULL_IF_CONFIG_SMALL("D-Cinema audio"),
76
79
    .read_header    = daud_header,
77
80
    .read_packet    = daud_packet,
78
 
    .extensions = "302",
 
81
    .extensions     = "302",
79
82
};
80
83
#endif
81
84
 
82
85
#if CONFIG_DAUD_MUXER
83
86
AVOutputFormat ff_daud_muxer = {
84
87
    .name         = "daud",
85
 
    .long_name    = NULL_IF_CONFIG_SMALL("D-Cinema audio format"),
 
88
    .long_name    = NULL_IF_CONFIG_SMALL("D-Cinema audio"),
86
89
    .extensions   = "302",
87
 
    .audio_codec  = CODEC_ID_PCM_S24DAUD,
88
 
    .video_codec  = CODEC_ID_NONE,
 
90
    .audio_codec  = AV_CODEC_ID_PCM_S24DAUD,
 
91
    .video_codec  = AV_CODEC_ID_NONE,
89
92
    .write_header = daud_write_header,
90
93
    .write_packet = daud_write_packet,
91
94
    .flags        = AVFMT_NOTIMESTAMPS,