]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/nutenc.c
lavfi: simplify signature for avfilter_get_audio_buffer() and friends
[ffmpeg] / libavformat / nutenc.c
index 412c670387cf9dcf0968d06dba95d517a368e920..21af7ca9cfcc6ad2f1a9fbd99b7ed730a9ed5624 100644 (file)
@@ -59,10 +59,10 @@ static int find_expected_header(AVCodecContext *c, int size, int key_frame, uint
         else if(sample_rate < (44100 + 48000)/2) sample_rate_index=0;
         else                                     sample_rate_index=1;
 
-        sample_rate= ff_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25);
+        sample_rate= avpriv_mpa_freq_tab[sample_rate_index] >> (lsf + mpeg25);
 
         for(bitrate_index=2; bitrate_index<30; bitrate_index++){
-            frame_size = ff_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1];
+            frame_size = avpriv_mpa_bitrate_tab[lsf][layer-1][bitrate_index>>1];
             frame_size = (frame_size * 144000) / (sample_rate << lsf) + (bitrate_index&1);
 
             if(frame_size == size)
@@ -578,7 +578,7 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc){
     return 0;
 }
 
-static int write_header(AVFormatContext *s){
+static int nut_write_header(AVFormatContext *s){
     NUTContext *nut = s->priv_data;
     AVIOContext *bc = s->pb;
     int i, j, ret;
@@ -603,7 +603,7 @@ static int write_header(AVFormatContext *s){
         AVRational time_base;
         ff_parse_specific_params(st->codec, &time_base.den, &ssize, &time_base.num);
 
-        av_set_pts_info(st, 64, time_base.num, time_base.den);
+        avpriv_set_pts_info(st, 64, time_base.num, time_base.den);
 
         for(j=0; j<nut->time_base_count; j++){
             if(!memcmp(&time_base, &nut->time_base[j], sizeof(AVRational))){
@@ -691,7 +691,7 @@ static int find_best_header_idx(NUTContext *nut, AVPacket *pkt){
     return best_i;
 }
 
-static int write_packet(AVFormatContext *s, AVPacket *pkt){
+static int nut_write_packet(AVFormatContext *s, AVPacket *pkt){
     NUTContext *nut = s->priv_data;
     StreamContext *nus= &nut->stream[pkt->stream_index];
     AVIOContext *bc = s->pb, *dyn_bc;
@@ -845,7 +845,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){
     return 0;
 }
 
-static int write_trailer(AVFormatContext *s){
+static int nut_write_trailer(AVFormatContext *s){
     NUTContext *nut= s->priv_data;
     AVIOContext *bc= s->pb;
 
@@ -861,22 +861,25 @@ static int write_trailer(AVFormatContext *s){
 }
 
 AVOutputFormat ff_nut_muxer = {
-    "nut",
-    NULL_IF_CONFIG_SMALL("NUT format"),
-    "video/x-nut",
-    "nut",
-    sizeof(NUTContext),
+    .name           = "nut",
+    .long_name      = NULL_IF_CONFIG_SMALL("NUT format"),
+    .mime_type      = "video/x-nut",
+    .extensions     = "nut",
+    .priv_data_size = sizeof(NUTContext),
 #if   CONFIG_LIBVORBIS
-    CODEC_ID_VORBIS,
+    .audio_codec    = CODEC_ID_VORBIS,
 #elif CONFIG_LIBMP3LAME
-    CODEC_ID_MP3,
+    .audio_codec    = CODEC_ID_MP3,
 #else
-    CODEC_ID_MP2,
+    .audio_codec    = CODEC_ID_MP2,
 #endif
-    CODEC_ID_MPEG4,
-    write_header,
-    write_packet,
-    write_trailer,
-    .flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS,
-    .codec_tag = (const AVCodecTag * const []){ ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags, ff_nut_subtitle_tags, 0 },
+    .video_codec    = CODEC_ID_MPEG4,
+    .write_header   = nut_write_header,
+    .write_packet   = nut_write_packet,
+    .write_trailer  = nut_write_trailer,
+    .flags          = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS,
+    .codec_tag      = (const AVCodecTag * const []){
+        ff_codec_bmp_tags, ff_nut_video_tags, ff_codec_wav_tags,
+        ff_nut_subtitle_tags, 0
+    },
 };