~phatforge/libav/fixup

« back to all changes in this revision

Viewing changes to libavformat/xa.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2011-04-30 14:27:42 UTC
  • mfrom: (1.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110430142742-quvblxk1tj6adlh5
Tags: 4:0.7~b1-1ubuntu1
* Merge from debian. Remaining changes:
  - don't build against libfaad, libdirac, librtmp and libopenjpeg
    (all in universe)
  - explicitly --enable-pic on powerpc, cf. LP #654666
  - different arm configure bits that should probably better be
    merged into debian
* Cherry-picked from git: 
  - install doc/APIChanges and refer to them in NEWS.Debian (Closes: #623682)
  - don't try to install non-existing documentation, fixes FTBFS on powerpc

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Maxis XA (.xa) File Demuxer
3
3
 * Copyright (c) 2008 Robert Marston
4
4
 *
5
 
 * This file is part of FFmpeg.
 
5
 * This file is part of Libav.
6
6
 *
7
 
 * FFmpeg is free software; you can redistribute it and/or
 
7
 * Libav is free software; you can redistribute it and/or
8
8
 * modify it under the terms of the GNU Lesser General Public
9
9
 * License as published by the Free Software Foundation; either
10
10
 * version 2.1 of the License, or (at your option) any later version.
11
11
 *
12
 
 * FFmpeg is distributed in the hope that it will be useful,
 
12
 * Libav is distributed in the hope that it will be useful,
13
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
15
 * Lesser General Public License for more details.
16
16
 *
17
17
 * You should have received a copy of the GNU Lesser General Public
18
 
 * License along with FFmpeg; if not, write to the Free Software
 
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
21
 
66
66
               AVFormatParameters *ap)
67
67
{
68
68
    MaxisXADemuxContext *xa = s->priv_data;
69
 
    ByteIOContext *pb = s->pb;
 
69
    AVIOContext *pb = s->pb;
70
70
    AVStream *st;
71
71
 
72
72
    /*Set up the XA Audio Decoder*/
76
76
 
77
77
    st->codec->codec_type   = AVMEDIA_TYPE_AUDIO;
78
78
    st->codec->codec_id     = CODEC_ID_ADPCM_EA_MAXIS_XA;
79
 
    url_fskip(pb, 4);       /* Skip the XA ID */
80
 
    xa->out_size            =  get_le32(pb);
81
 
    url_fskip(pb, 2);       /* Skip the tag */
82
 
    st->codec->channels     = get_le16(pb);
83
 
    st->codec->sample_rate  = get_le32(pb);
 
79
    avio_skip(pb, 4);       /* Skip the XA ID */
 
80
    xa->out_size            =  avio_rl32(pb);
 
81
    avio_skip(pb, 2);       /* Skip the tag */
 
82
    st->codec->channels     = avio_rl16(pb);
 
83
    st->codec->sample_rate  = avio_rl32(pb);
84
84
    /* Value in file is average byte rate*/
85
 
    st->codec->bit_rate     = get_le32(pb) * 8;
86
 
    st->codec->block_align  = get_le16(pb);
87
 
    st->codec->bits_per_coded_sample = get_le16(pb);
 
85
    st->codec->bit_rate     = avio_rl32(pb) * 8;
 
86
    st->codec->block_align  = avio_rl16(pb);
 
87
    st->codec->bits_per_coded_sample = avio_rl16(pb);
88
88
 
89
89
    av_set_pts_info(st, 64, 1, st->codec->sample_rate);
90
90
 
96
96
{
97
97
    MaxisXADemuxContext *xa = s->priv_data;
98
98
    AVStream *st = s->streams[0];
99
 
    ByteIOContext *pb = s->pb;
 
99
    AVIOContext *pb = s->pb;
100
100
    unsigned int packet_size;
101
101
    int ret;
102
102
 
118
118
    return ret;
119
119
}
120
120
 
121
 
AVInputFormat xa_demuxer = {
 
121
AVInputFormat ff_xa_demuxer = {
122
122
    "xa",
123
123
    NULL_IF_CONFIG_SMALL("Maxis XA File Format"),
124
124
    sizeof(MaxisXADemuxContext),