[PD] alternative for quicktime

Patrice Colet colet.patrice at free.fr
Sat Mar 17 22:42:59 CET 2012


> De: "Mathieu Bouchard" <matju at artengine.ca>

> Though ideally, I'd be replacing it with gmerlin, a newer library by
> the
> same author. Last time I looked, something about installing it was a
> mess,
> but I don't remember what it was, and it was years ago, so it's
> surely
> much better now.
> 

It's still a mess on windows, on msys apply this following patch for resolving missing X11 headers:

http://comments.gmane.org/gmane.comp.video.gmerlin.general/325


there are plenty of errors popping from *_ffmpeg.c, I've manually resolved some, but this is not really elegant.

==========================================================
--- lib/demux_ffmpeg.c.old      2012-03-17 21:28:15 +0000
+++ lib/demux_ffmpeg.c  2012-03-17 21:23:33 +0000
@@ -577,11 +577,11 @@
 
   /* With the current implementation in ffmpeg, this can be
      called multiple times */
-#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 29, 0)
-  register_protocol(&bgav_protocol);
-#else
-  av_register_protocol(&bgav_protocol);
-#endif
+// #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 29, 0)
+  // register_protocol(&bgav_protocol);
+// #else
+  // av_register_protocol(&bgav_protocol);
+// #endif
   
 #if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(52, 26, 0)
   avfc = av_alloc_format_context();
@@ -626,14 +626,12 @@
     {
     switch(avfc->streams[i]->codec->codec_type)
       {
-      case CODEC_TYPE_AUDIO:
+      case AVMEDIA_TYPE_AUDIO:
         init_audio_stream(ctx, avfc->streams[i], i);
         break;
-      case CODEC_TYPE_VIDEO:
+      case AVMEDIA_TYPE_VIDEO:
         init_video_stream(ctx, avfc->streams[i], i);
         break;
-      case CODEC_TYPE_SUBTITLE:
-        break;
       default:
         break;
       }
@@ -650,7 +648,7 @@
   ctx->stream_description = bgav_sprintf(TRD("%s (via ffmpeg)"),
                                          priv->avfc->iformat->long_name);
 
-  /* Metadata */
+  /* Metadata 
   if(avfc->title[0])
     ctx->tt->cur->metadata.title = bgav_strdup(avfc->title);
   if(avfc->author[0])
@@ -660,7 +658,7 @@
   if(avfc->album[0])
     ctx->tt->cur->metadata.album = bgav_strdup(avfc->album);
   if(avfc->genre[0])
-    ctx->tt->cur->metadata.genre = bgav_strdup(avfc->genre);
+    ctx->tt->cur->metadata.genre = bgav_strdup(avfc->genre);*/
   
   return 1;
   }
@@ -736,8 +734,8 @@
     s->data.video.palette_changed = 1;
     }
   
-  if(pkt.flags&PKT_FLAG_KEY)
-    PACKET_SET_KEYFRAME(p);
+  // if(pkt.flags&PKT_FLAG_KEY)
+    // PACKET_SET_KEYFRAME(p);
   bgav_packet_done_write(p);
   
   av_free_packet(&pkt);

==========================================================

--- lib/video_ffmpeg.c.old      2012-03-17 21:28:00 +0000
+++ lib/video_ffmpeg.c  2012-03-17 21:23:47 +0000
@@ -55,6 +55,12 @@
 
 #define LOG_DOMAIN "ffmpeg_video"
 
+#ifdef WIN32
+#define AV_DLLIMPORT __declspec(dllimport)
+#else
+#define AV_DLLIMPORT
+#endif
+
 // #define DUMP_DECODE
 // #define DUMP_EXTRADATA
 // #define DUMP_PACKET
@@ -815,7 +821,7 @@
   if(s->action == BGAV_STREAM_PARSE)
     return 1;
   
-  priv->ctx->codec_type = CODEC_TYPE_VIDEO;
+  priv->ctx->codec_type = AVMEDIA_TYPE_VIDEO;
   
   priv->ctx->bit_rate = 0;
 
@@ -2305,6 +2311,7 @@
     {
     // TODO: Enable postprocessing for non-gavl pixelformats
     // (but not as long as it makes no sense)
+
 #ifdef HAVE_LIBSWSCALE
     sws_scale(priv->swsContext,
               priv->frame->data, priv->frame->linesize,


==============================================================

./configure --without-doxygen --disable-speex 


will make the gmerlin lib on msys



More information about the Pd-list mailing list