Revision 54a73bb5 libavformat/raw.c

View differences:

libavformat/raw.c
31 31

  
32 32
/* simple formats */
33 33

  
34
#if CONFIG_ROQ_MUXER
35
static int roq_write_header(struct AVFormatContext *s)
36
{
37
    static const uint8_t header[] = {
38
        0x84, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0x1E, 0x00
39
    };
40

  
41
    put_buffer(s->pb, header, 8);
42
    put_flush_packet(s->pb);
43

  
44
    return 0;
45
}
46
#endif
47

  
48 34
#if CONFIG_NULL_MUXER
49 35
static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
50 36
{
......
53 39
#endif
54 40

  
55 41
#if CONFIG_MUXERS
56
static int raw_write_packet(struct AVFormatContext *s, AVPacket *pkt)
42
int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
57 43
{
58 44
    put_buffer(s->pb, pkt->data, pkt->size);
59 45
    put_flush_packet(s->pb);
......
688 674
    CODEC_ID_AC3,
689 675
    CODEC_ID_NONE,
690 676
    NULL,
691
    raw_write_packet,
677
    ff_raw_write_packet,
692 678
    .flags= AVFMT_NOTIMESTAMPS,
693 679
};
694 680
#endif
......
716 702
    CODEC_ID_NONE,
717 703
    CODEC_ID_DIRAC,
718 704
    NULL,
719
    raw_write_packet,
705
    ff_raw_write_packet,
720 706
    .flags= AVFMT_NOTIMESTAMPS,
721 707
};
722 708
#endif
......
744 730
    CODEC_ID_NONE,
745 731
    CODEC_ID_DNXHD,
746 732
    NULL,
747
    raw_write_packet,
733
    ff_raw_write_packet,
748 734
    .flags= AVFMT_NOTIMESTAMPS,
749 735
};
750 736
#endif
......
773 759
    CODEC_ID_DTS,
774 760
    CODEC_ID_NONE,
775 761
    NULL,
776
    raw_write_packet,
762
    ff_raw_write_packet,
777 763
    .flags= AVFMT_NOTIMESTAMPS,
778 764
};
779 765
#endif
......
802 788
    CODEC_ID_EAC3,
803 789
    CODEC_ID_NONE,
804 790
    NULL,
805
    raw_write_packet,
791
    ff_raw_write_packet,
806 792
    .flags= AVFMT_NOTIMESTAMPS,
807 793
};
808 794
#endif
......
845 831
    CODEC_ID_NONE,
846 832
    CODEC_ID_H261,
847 833
    NULL,
848
    raw_write_packet,
834
    ff_raw_write_packet,
849 835
    .flags= AVFMT_NOTIMESTAMPS,
850 836
};
851 837
#endif
......
874 860
    CODEC_ID_NONE,
875 861
    CODEC_ID_H263,
876 862
    NULL,
877
    raw_write_packet,
863
    ff_raw_write_packet,
878 864
    .flags= AVFMT_NOTIMESTAMPS,
879 865
};
880 866
#endif
......
903 889
    CODEC_ID_NONE,
904 890
    CODEC_ID_H264,
905 891
    NULL,
906
    raw_write_packet,
892
    ff_raw_write_packet,
907 893
    .flags= AVFMT_NOTIMESTAMPS,
908 894
};
909 895
#endif
......
918 904
    CODEC_ID_NONE,
919 905
    CODEC_ID_CAVS,
920 906
    NULL,
921
    raw_write_packet,
907
    ff_raw_write_packet,
922 908
    .flags= AVFMT_NOTIMESTAMPS,
923 909
};
924 910
#endif
......
961 947
    CODEC_ID_NONE,
962 948
    CODEC_ID_MPEG4,
963 949
    NULL,
964
    raw_write_packet,
950
    ff_raw_write_packet,
965 951
    .flags= AVFMT_NOTIMESTAMPS,
966 952
};
967 953
#endif
......
990 976
    CODEC_ID_NONE,
991 977
    CODEC_ID_MJPEG,
992 978
    NULL,
993
    raw_write_packet,
979
    ff_raw_write_packet,
994 980
    .flags= AVFMT_NOTIMESTAMPS,
995 981
};
996 982
#endif
......
1019 1005
    CODEC_ID_MLP,
1020 1006
    CODEC_ID_NONE,
1021 1007
    NULL,
1022
    raw_write_packet,
1008
    ff_raw_write_packet,
1023 1009
    .flags= AVFMT_NOTIMESTAMPS,
1024 1010
};
1025 1011
#endif
......
1030 1016
    .long_name      = NULL_IF_CONFIG_SMALL("SubRip subtitle format"),
1031 1017
    .mime_type      = "application/x-subrip",
1032 1018
    .extensions     = "srt",
1033
    .write_packet   = raw_write_packet,
1019
    .write_packet   = ff_raw_write_packet,
1034 1020
    .flags          = AVFMT_NOTIMESTAMPS,
1035 1021
    .subtitle_codec = CODEC_ID_SRT,
1036 1022
};
......
1060 1046
    CODEC_ID_TRUEHD,
1061 1047
    CODEC_ID_NONE,
1062 1048
    NULL,
1063
    raw_write_packet,
1049
    ff_raw_write_packet,
1064 1050
    .flags= AVFMT_NOTIMESTAMPS,
1065 1051
};
1066 1052
#endif
......
1075 1061
    CODEC_ID_NONE,
1076 1062
    CODEC_ID_MPEG1VIDEO,
1077 1063
    NULL,
1078
    raw_write_packet,
1064
    ff_raw_write_packet,
1079 1065
    .flags= AVFMT_NOTIMESTAMPS,
1080 1066
};
1081 1067
#endif
......
1090 1076
    CODEC_ID_NONE,
1091 1077
    CODEC_ID_MPEG2VIDEO,
1092 1078
    NULL,
1093
    raw_write_packet,
1079
    ff_raw_write_packet,
1094 1080
    .flags= AVFMT_NOTIMESTAMPS,
1095 1081
};
1096 1082
#endif
......
1164 1150
    CODEC_ID_NONE,
1165 1151
    CODEC_ID_RAWVIDEO,
1166 1152
    NULL,
1167
    raw_write_packet,
1153
    ff_raw_write_packet,
1168 1154
    .flags= AVFMT_NOTIMESTAMPS,
1169 1155
};
1170 1156
#endif
1171 1157

  
1172
#if CONFIG_ROQ_MUXER
1173
AVOutputFormat roq_muxer =
1174
{
1175
    "RoQ",
1176
    NULL_IF_CONFIG_SMALL("raw id RoQ format"),
1177
    NULL,
1178
    "roq",
1179
    0,
1180
    CODEC_ID_ROQ_DPCM,
1181
    CODEC_ID_ROQ,
1182
    roq_write_header,
1183
    raw_write_packet,
1184
};
1185
#endif
1186

  
1187 1158
#if CONFIG_SHORTEN_DEMUXER
1188 1159
AVInputFormat shorten_demuxer = {
1189 1160
    "shn",
......
1238 1209
    codec,\
1239 1210
    CODEC_ID_NONE,\
1240 1211
    NULL,\
1241
    raw_write_packet,\
1212
    ff_raw_write_packet,\
1242 1213
    .flags= AVFMT_NOTIMESTAMPS,\
1243 1214
};
1244 1215

  

Also available in: Unified diff