Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: source/patched-ffmpeg-mt/libavformat/gxfenc.c

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * GXF muxer. 2 * GXF muxer.
3 * Copyright (c) 2006 SmartJog S.A., Baptiste Coudurier <baptiste dot coudurier at smartjog dot com> 3 * Copyright (c) 2006 SmartJog S.A., Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
4 * 4 *
5 * This file is part of FFmpeg. 5 * This file is part of FFmpeg.
6 * 6 *
7 * FFmpeg is free software; you can redistribute it and/or 7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version. 10 * version 2.1 of the License, or (at your option) any later version.
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
671 if (i != 0) { 671 if (i != 0) {
672 av_log(s, AV_LOG_ERROR, "video stream must be the first track\n" ); 672 av_log(s, AV_LOG_ERROR, "video stream must be the first track\n" );
673 return -1; 673 return -1;
674 } 674 }
675 /* FIXME check from time_base ? */ 675 /* FIXME check from time_base ? */
676 if (st->codec->height == 480 || st->codec->height == 512) { /* NTSC or NTSC+VBI */ 676 if (st->codec->height == 480 || st->codec->height == 512) { /* NTSC or NTSC+VBI */
677 sc->frame_rate_index = 5; 677 sc->frame_rate_index = 5;
678 sc->sample_rate = 60; 678 sc->sample_rate = 60;
679 gxf->flags |= 0x00000080; 679 gxf->flags |= 0x00000080;
680 gxf->time_base = (AVRational){ 1001, 60000 }; 680 gxf->time_base = (AVRational){ 1001, 60000 };
681 } else { /* assume PAL */ 681 } else if (st->codec->height == 576 || st->codec->height == 608) { / * PAL or PAL+VBI */
682 sc->frame_rate_index = 6; 682 sc->frame_rate_index = 6;
683 sc->media_type++; 683 sc->media_type++;
684 sc->sample_rate = 50; 684 sc->sample_rate = 50;
685 gxf->flags |= 0x00000040; 685 gxf->flags |= 0x00000040;
686 gxf->time_base = (AVRational){ 1, 50 }; 686 gxf->time_base = (AVRational){ 1, 50 };
687 } else {
688 av_log(s, AV_LOG_ERROR, "unsupported video resolution, "
689 "gxf muxer only accepts PAL or NTSC resolutions currently \n");
690 return -1;
687 } 691 }
688 av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den); 692 av_set_pts_info(st, 64, gxf->time_base.num, gxf->time_base.den);
689 if (gxf_find_lines_index(st) < 0) 693 if (gxf_find_lines_index(st) < 0)
690 sc->lines_index = -1; 694 sc->lines_index = -1;
691 sc->sample_size = st->codec->bit_rate; 695 sc->sample_size = st->codec->bit_rate;
692 sc->fields = 2; /* interlaced */ 696 sc->fields = 2; /* interlaced */
693 697
694 vsc = sc; 698 vsc = sc;
695 699
696 switch (st->codec->codec_id) { 700 switch (st->codec->codec_id) {
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 sizeof(GXFContext), 933 sizeof(GXFContext),
930 CODEC_ID_PCM_S16LE, 934 CODEC_ID_PCM_S16LE,
931 CODEC_ID_MPEG2VIDEO, 935 CODEC_ID_MPEG2VIDEO,
932 gxf_write_header, 936 gxf_write_header,
933 gxf_write_packet, 937 gxf_write_packet,
934 gxf_write_trailer, 938 gxf_write_trailer,
935 0, 939 0,
936 NULL, 940 NULL,
937 gxf_interleave_packet, 941 gxf_interleave_packet,
938 }; 942 };
OLDNEW
« no previous file with comments | « source/patched-ffmpeg-mt/libavformat/flvenc.c ('k') | source/patched-ffmpeg-mt/libavformat/h261dec.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698