~siretart/libav/trusty

« back to all changes in this revision

Viewing changes to libavformat/bmv.c

  • Committer: Reinhard Tartler
  • Date: 2013-10-23 03:04:17 UTC
  • mfrom: (1.3.36 sid)
  • Revision ID: siretart@tauware.de-20131023030417-1o6mpkl1l0raifjt
mergeĀ fromĀ debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
20
 */
21
21
 
 
22
#include "libavutil/channel_layout.h"
22
23
#include "avformat.h"
23
24
#include "internal.h"
24
25
 
38
39
    int64_t  audio_pos;
39
40
} BMVContext;
40
41
 
41
 
static int bmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
 
42
static int bmv_read_header(AVFormatContext *s)
42
43
{
43
44
    AVStream *st, *ast;
44
45
    BMVContext *c = s->priv_data;
47
48
    if (!st)
48
49
        return AVERROR(ENOMEM);
49
50
    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
50
 
    st->codec->codec_id   = CODEC_ID_BMV_VIDEO;
 
51
    st->codec->codec_id   = AV_CODEC_ID_BMV_VIDEO;
51
52
    st->codec->width      = 640;
52
53
    st->codec->height     = 429;
53
 
    st->codec->pix_fmt    = PIX_FMT_PAL8;
 
54
    st->codec->pix_fmt    = AV_PIX_FMT_PAL8;
54
55
    avpriv_set_pts_info(st, 16, 1, 12);
55
56
    ast = avformat_new_stream(s, 0);
56
57
    if (!ast)
57
58
        return AVERROR(ENOMEM);
58
59
    ast->codec->codec_type      = AVMEDIA_TYPE_AUDIO;
59
 
    ast->codec->codec_id        = CODEC_ID_BMV_AUDIO;
 
60
    ast->codec->codec_id        = AV_CODEC_ID_BMV_AUDIO;
60
61
    ast->codec->channels        = 2;
 
62
    ast->codec->channel_layout  = AV_CH_LAYOUT_STEREO;
61
63
    ast->codec->sample_rate     = 22050;
62
64
    avpriv_set_pts_info(ast, 16, 1, 22050);
63
65
 
133
135
    .read_header    = bmv_read_header,
134
136
    .read_packet    = bmv_read_packet,
135
137
    .read_close     = bmv_read_close,
136
 
    .extensions     = "bmv"
 
138
    .extensions     = "bmv",
137
139
};