]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/tmv.c
avio: avio_ prefixes for get_* functions
[ffmpeg] / libavformat / tmv.c
index cec6f99148e2fbaa66a1ac72348e8d6b29594fa5..3fe9e65dccc349984bcac23639a54957a4814f78 100644 (file)
@@ -21,7 +21,7 @@
 
 /**
  * 8088flex TMV file demuxer
- * @file libavformat/tmv.c
+ * @file
  * @author Daniel Verkamp
  * @sa http://www.oldskool.org/pc/8088_Corruption
  */
@@ -65,12 +65,12 @@ static int tmv_probe(AVProbeData *p)
 static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
 {
     TMVContext *tmv   = s->priv_data;
-    ByteIOContext *pb = s->pb;
+    AVIOContext *pb = s->pb;
     AVStream *vst, *ast;
     AVRational fps;
     unsigned comp_method, char_cols, char_rows, features;
 
-    if (get_le32(pb) != TMV_TAG)
+    if (avio_rl32(pb) != TMV_TAG)
         return -1;
 
     if (!(vst = av_new_stream(s, 0)))
@@ -79,30 +79,30 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
     if (!(ast = av_new_stream(s, 0)))
         return AVERROR(ENOMEM);
 
-    ast->codec->sample_rate = get_le16(pb);
+    ast->codec->sample_rate = avio_rl16(pb);
     if (!ast->codec->sample_rate) {
         av_log(s, AV_LOG_ERROR, "invalid sample rate\n");
         return -1;
     }
 
-    tmv->audio_chunk_size   = get_le16(pb);
+    tmv->audio_chunk_size   = avio_rl16(pb);
     if (!tmv->audio_chunk_size) {
         av_log(s, AV_LOG_ERROR, "invalid audio chunk size\n");
         return -1;
     }
 
-    comp_method             = get_byte(pb);
+    comp_method             = avio_r8(pb);
     if (comp_method) {
         av_log(s, AV_LOG_ERROR, "unsupported compression method %d\n",
                comp_method);
         return -1;
     }
 
-    char_cols = get_byte(pb);
-    char_rows = get_byte(pb);
+    char_cols = avio_r8(pb);
+    char_rows = avio_r8(pb);
     tmv->video_chunk_size = char_cols * char_rows * 2;
 
-    features  = get_byte(pb);
+    features  = avio_r8(pb);
     if (features & ~(TMV_PADDING | TMV_STEREO)) {
         av_log(s, AV_LOG_ERROR, "unsupported features 0x%02x\n",
                features & ~(TMV_PADDING | TMV_STEREO));
@@ -142,7 +142,7 @@ static int tmv_read_header(AVFormatContext *s, AVFormatParameters *ap)
 static int tmv_read_packet(AVFormatContext *s, AVPacket *pkt)
 {
     TMVContext *tmv   = s->priv_data;
-    ByteIOContext *pb = s->pb;
+    AVIOContext *pb = s->pb;
     int ret, pkt_size = tmv->stream_index ?
                         tmv->audio_chunk_size : tmv->video_chunk_size;
 
@@ -156,7 +156,7 @@ static int tmv_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     pkt->stream_index  = tmv->stream_index;
     tmv->stream_index ^= 1;
-    pkt->flags        |= PKT_FLAG_KEY;
+    pkt->flags        |= AV_PKT_FLAG_KEY;
 
     return ret;
 }
@@ -178,7 +178,7 @@ static int tmv_read_seek(AVFormatContext *s, int stream_index,
     return 0;
 }
 
-AVInputFormat tmv_demuxer = {
+AVInputFormat ff_tmv_demuxer = {
     "tmv",
     NULL_IF_CONFIG_SMALL("8088flex TMV"),
     sizeof(TMVContext),