Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37417238
en ru br
Репозитории ALT
S:1.1.7-alt12
5.1: 1.1.7-alt7
4.1: 1.1.6-alt2.qa1
4.0: 1.1.6-alt1
www.altlinux.org/Changes

Группа :: Видео
Пакет: xvidcap

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xvidcap-1.1.7-alt-libav.patch
Скачать


diff --git a/xvidcap/src/codecs.c b/xvidcap/src/codecs.c
index 9754ad0..5fa2259 100644
--- a/xvidcap/src/codecs.c
+++ b/xvidcap/src/codecs.c
@@ -43,8 +43,8 @@
 #include <locale.h>
 
 #ifdef USE_FFMPEG
-#include <ffmpeg/avcodec.h>
-#include <ffmpeg/avformat.h>
+#include <libavcodec/avcodec.h>
+#include <libavformat/avformat.h>
 #endif     // USE_FFMPEG
 
 #include "app_data.h"
diff --git a/xvidcap/src/main.c b/xvidcap/src/main.c
index b88d27f..9febc0b 100644
--- a/xvidcap/src/main.c
+++ b/xvidcap/src/main.c
@@ -45,7 +45,7 @@
 #include <locale.h>
 
 #ifdef USE_FFMPEG
-#include <ffmpeg/avcodec.h>
+#include <libavcodec/avcodec.h>
 #endif     // USE_FFMPEG
 
 #include "control.h"
@@ -218,7 +218,7 @@ cleanup ()
     if (app)
         xvc_appdata_free (app);
 #ifdef USE_FFMPEG
-    av_free_static ();
+//    av_free_static ();
 #endif
 }
 
diff --git a/xvidcap/src/xtoffmpeg.c b/xvidcap/src/xtoffmpeg.c
index 914d801..91dd1a4 100644
--- a/xvidcap/src/xtoffmpeg.c
+++ b/xvidcap/src/xtoffmpeg.c
@@ -56,13 +56,13 @@
 #include "xvidcap-intl.h"
 
 // ffmpeg stuff
-#include <ffmpeg/avcodec.h>
-#include <ffmpeg/avformat.h>
-#include <ffmpeg/avdevice.h>
+#include <libavcodec/avcodec.h>
+#include <libavformat/avformat.h>
+#include <libavdevice/avdevice.h>
 //#include <ffmpeg/dsputil.h>
-#include <ffmpeg/swscale.h>
-#include <ffmpeg/rgb2rgb.h>
-#include <ffmpeg/fifo.h>
+#include <libswscale/swscale.h>
+//#include <ffmpeg/rgb2rgb.h>
+#include <libavutil/fifo.h>
 #define swscale_isRGB(x) ((x)==PIX_FMT_BGR32 || (x)==PIX_FMT_RGB24 \
                         || (x)==PIX_FMT_RGB565 || (x)==PIX_FMT_RGB555 \
                         || (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4 \
@@ -96,7 +96,7 @@
                         || (x)==PIX_FMT_YUVJ420P || (x)==PIX_FMT_YUVJ422P \
                         || (x)==PIX_FMT_YUVJ444P)
 
-#define PIX_FMT_ARGB32 PIX_FMT_RGBA32  /* this is just my personal
+#define PIX_FMT_ARGB32 PIX_FMT_RGB32  /* this is just my personal
                                         * convenience */
 
 /*
@@ -361,7 +361,7 @@ add_audio_stream (Job * job)
     }
     // put sample parameters
     au_c->codec_id = xvc_audio_codecs[job->au_targetCodec].ffmpeg_id;
-    au_c->codec_type = CODEC_TYPE_AUDIO;
+    au_c->codec_type = AVMEDIA_TYPE_AUDIO;
     au_c->bit_rate = target->sndsize;
     au_c->sample_rate = target->sndrate;
     au_c->channels = target->sndchannels;
@@ -567,7 +567,7 @@ do_audio_out (AVFormatContext * s, AVOutputStream * ost,
                     av_rescale_q (enc->coded_frame->pts, enc->time_base,
                                   ost->st->time_base);
             }
-            pkt.flags |= PKT_FLAG_KEY;
+            pkt.flags |= AV_PKT_FLAG_KEY;
             pkt.stream_index = ost->st->index;
 
             pkt.data = audio_out;
@@ -627,7 +627,7 @@ do_audio_out (AVFormatContext * s, AVOutputStream * ost,
             pkt.pts =
                 av_rescale_q (enc->coded_frame->pts, enc->time_base,
                               ost->st->time_base);
-        pkt.flags |= PKT_FLAG_KEY;
+        pkt.flags |= AV_PKT_FLAG_KEY;
         av_interleaved_write_frame (s, &pkt);
     }
 
@@ -681,7 +681,7 @@ cleanup_thread_when_stopped ()
     if (ret <= 0) {
         ret = avcodec_encode_audio (enc, bit_buffer, bit_buffer_size, NULL);
     }
-    pkt.flags |= PKT_FLAG_KEY;
+    pkt.flags |= AV_PKT_FLAG_KEY;
 
     if (samples) {
         av_free (samples);
@@ -905,7 +905,7 @@ do_video_out (AVFormatContext * s, AVStream * ost, unsigned char *buf, int size)
                               ost->time_base);
         }
         if (enc->coded_frame->key_frame)
-            pkt.flags |= PKT_FLAG_KEY;
+            pkt.flags |= AV_PKT_FLAG_KEY;
     }
 
     pkt.stream_index = ost->index;
@@ -1157,7 +1157,7 @@ add_video_stream (AVFormatContext * oc, const XImage * image,
     }
 
     st->codec->codec_id = codec_id;
-    st->codec->codec_type = CODEC_TYPE_VIDEO;
+    st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
 
     // find the video encoder
     codec = avcodec_find_encoder (st->codec->codec_id);
@@ -1247,8 +1247,8 @@ add_video_stream (AVFormatContext * oc, const XImage * image,
     // flags
     st->codec->flags |= CODEC_FLAG2_FAST;
     // there is no trellis quantiser in libav* for mjpeg
-    if (st->codec->codec_id != CODEC_ID_MJPEG)
-        st->codec->flags |= CODEC_FLAG_TRELLIS_QUANT;
+//    if (st->codec->codec_id != CODEC_ID_MJPEG)
+//        st->codec->flags |= CODEC_FLAG_TRELLIS_QUANT;
     st->codec->flags &= ~CODEC_FLAG_OBMC;
     // some formats want stream headers to be seperate
     if (oc->oformat->flags & AVFMT_GLOBALHEADER)
@@ -1439,13 +1439,13 @@ xvc_ffmpeg_save_frame (FILE * fp, XImage * image)
         // guess AVOutputFormat
         if (job->target >= CAP_MF)
             file_oformat =
-                guess_format (xvc_formats[job->target].ffmpeg_name, NULL, NULL);
+                av_guess_format (xvc_formats[job->target].ffmpeg_name, NULL, NULL);
         else {
             char tmp_fn[30];
 
             snprintf (tmp_fn, 29, "test-%%d.%s",
                       xvc_formats[job->target].extensions[0]);
-            file_oformat = guess_format (NULL, tmp_fn, NULL);
+            file_oformat = av_guess_format (NULL, tmp_fn, NULL);
         }
         if (!file_oformat) {
             fprintf (stderr,
@@ -1466,7 +1466,7 @@ xvc_ffmpeg_save_frame (FILE * fp, XImage * image)
 #endif     // DEBUG
 
         // prepare AVFormatContext
-        output_file = av_alloc_format_context ();
+        output_file = avformat_alloc_context ();
         if (!output_file) {
             fprintf (stderr,
                      _
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin