~ubuntu-dev/mplayer/ubuntu-feisty

« back to all changes in this revision

Viewing changes to libavformat/yuv4mpeg.c

  • Committer: William Grant
  • Date: 2007-02-03 03:16:07 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: william.grant@ubuntu.org.au-20070203031607-08gc2ompbz6spt9i
Update to 1.0rc1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * YUV4MPEG format
3
3
 * Copyright (c) 2001, 2002, 2003 Fabrice Bellard.
4
4
 *
5
 
 * This library is free software; you can redistribute it and/or
 
5
 * This file is part of FFmpeg.
 
6
 *
 
7
 * FFmpeg is free software; you can redistribute it and/or
6
8
 * modify it under the terms of the GNU Lesser General Public
7
9
 * License as published by the Free Software Foundation; either
8
 
 * version 2 of the License, or (at your option) any later version.
 
10
 * version 2.1 of the License, or (at your option) any later version.
9
11
 *
10
 
 * This library is distributed in the hope that it will be useful,
 
12
 * FFmpeg is distributed in the hope that it will be useful,
11
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
15
 * Lesser General Public License for more details.
14
16
 *
15
17
 * You should have received a copy of the GNU Lesser General Public
16
 
 * License along with this library; if not, write to the Free Software
 
18
 * License along with FFmpeg; if not, write to the Free Software
17
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
20
 */
19
21
#include "avformat.h"
27
29
    int top_field_first;
28
30
};
29
31
 
30
 
#ifdef CONFIG_MUXERS
31
 
 
32
32
static int yuv4_generate_header(AVFormatContext *s, char* buf)
33
33
{
34
34
    AVStream *st;
35
35
    int width, height;
36
36
    int raten, rated, aspectn, aspectd, n;
37
37
    char inter;
38
 
    char *colorspace = "";
 
38
    const char *colorspace = "";
39
39
 
40
40
    st = s->streams[0];
41
41
    width = st->codec->width;
171
171
    return 0;
172
172
}
173
173
 
174
 
AVOutputFormat yuv4mpegpipe_oformat = {
 
174
#ifdef CONFIG_YUV4MPEGPIPE_MUXER
 
175
AVOutputFormat yuv4mpegpipe_muxer = {
175
176
    "yuv4mpegpipe",
176
177
    "YUV4MPEG pipe format",
177
178
    "",
184
185
    yuv4_write_trailer,
185
186
    .flags = AVFMT_RAWPICTURE,
186
187
};
187
 
#endif //CONFIG_MUXERS
 
188
#endif
188
189
 
189
190
/* Header size increased to allow room for optional flags */
190
191
#define MAX_YUV4_HEADER 80
393
394
        return 0;
394
395
}
395
396
 
396
 
AVInputFormat yuv4mpegpipe_iformat = {
 
397
#ifdef CONFIG_YUV4MPEGPIPE_DEMUXER
 
398
AVInputFormat yuv4mpegpipe_demuxer = {
397
399
    "yuv4mpegpipe",
398
400
    "YUV4MPEG pipe format",
399
401
    sizeof(struct frame_attributes),
403
405
    yuv4_read_close,
404
406
    .extensions = "y4m"
405
407
};
406
 
 
407
 
int yuv4mpeg_init(void)
408
 
{
409
 
    av_register_input_format(&yuv4mpegpipe_iformat);
410
 
#ifdef CONFIG_MUXERS
411
 
    av_register_output_format(&yuv4mpegpipe_oformat);
412
 
#endif //CONFIG_MUXERS
413
 
    return 0;
414
 
}
415
 
 
 
408
#endif