<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://ffdiaporama.tuxfamily.org/Forum/extern.php?action=feed&amp;tid=858&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[ffDiaporama Forum / Adaptation of 2.1 to 14.10 with a .deb)]]></title>
		<link>http://ffdiaporama.tuxfamily.org/Forum/viewtopic.php?id=858</link>
		<description><![CDATA[The most recent posts in Adaptation of 2.1 to 14.10 with a .deb).]]></description>
		<lastBuildDate>Fri, 08 May 2015 23:08:31 +0000</lastBuildDate>
		<generator>FluxBB 1.4.7</generator>
		<item>
			<title><![CDATA[Re: Adaptation of 2.1 to 14.10 with a .deb)]]></title>
			<link>http://ffdiaporama.tuxfamily.org/Forum/viewtopic.php?pid=3847#p3847</link>
			<description><![CDATA[<p>[WARNING] with the above version I can&#039;t include video in ffDiaporama, it core dump ! However it is able to render photos to video.</p>]]></description>
			<author><![CDATA[dummy@example.com (alexg)]]></author>
			<pubDate>Fri, 08 May 2015 23:08:31 +0000</pubDate>
			<guid>http://ffdiaporama.tuxfamily.org/Forum/viewtopic.php?pid=3847#p3847</guid>
		</item>
		<item>
			<title><![CDATA[Adaptation of 2.1 to 14.10 with a .deb)]]></title>
			<link>http://ffdiaporama.tuxfamily.org/Forum/viewtopic.php?pid=3846#p3846</link>
			<description><![CDATA[<p>Hello,</p><p>I tried to compile ffDiaporama 2.1 to debian 14.10.<br />Since libav has changed since then, I had to change the code a bit (failing and retrying).<br />I don&#039;t know all those lib, I just tried to resolve compilations problems with a logical solution.<br />Here is a .deb that works for a simple project on my PC : <a href="http://ilfrancese.free.fr/ffdiaporama/ffdiaporama_2.1.ubuntu14.10_amd64-by-alexg.deb">http://ilfrancese.free.fr/ffdiaporama/f … -alexg.deb</a></p><p>I detail here what I&#039;ve done, I can also push my bzr branch, but I don&#039;t really now anything about launchpad, so I need help from the normal release managers.</p><h5>The story :</h5><p>The first thing that made ffDiaporama 2.1 impossible to install on 10.14 was a dependency to libavresample1 which is no more available.</p><p>Looking around in launchpad, I see the recipe stuff.<br />So I just tried to change the dependency in the debian package specification, starting from the 1404 in a new branch 1410</p><p>I Cloned the&#160; repository and made my changes :<br /></p><div class="codebox"><pre><code>$bzr branch lp:~ffdiaporamateam/ffdiaporama/debian_stable_1404 debian_stable_1410

$ bzr diff
=== modified file &#039;debian/control&#039;
--- debian/control	2014-04-21 05:34:12 +0000
+++ debian/control	2015-04-29 22:37:26 +0000
@@ -9,7 +9,7 @@
 Package: ffdiaporama
 Architecture: any
 Depends:
- libqt5help5, libqt5svg5, libqt5sql5-sqlite, qt5-image-formats-plugins, libav-tools, libavcodec-extra, libavresample1,
+ libqt5help5, libqt5svg5, libqt5sql5-sqlite, qt5-image-formats-plugins, libav-tools, libavcodec-extra, libavresample2,
  ${misc:Depends},
  ${shlibs:Depends}
 Description:Movie creator

$bzr commit</code></pre></div><p>I also cloned ffDiaporama 2.1 branch :<br /></p><div class="codebox"><pre><code>$bzr bzr branch lp:ffdiaporama/2.1 ffdiaporama-2.1</code></pre></div><p>In launchpad I found useful info on how to test my recipe :<br /><a href="https://help.launchpad.net/Packaging/SourceBuilds/Recipes">https://help.launchpad.net/Packaging/So … ds/Recipes</a></p><p>So I adapt t the 10.04 recipe in a new one, with my local branches:</p><div class="codebox"><pre><code>$ cat debian-stable-14.10.recipe
# bzr-builder format 0.3 deb-version 2.1.20140209~{revno}~{time}
debian_stable_1410
nest ffDiaporama ffdiaporama-2.1 ffDiaporama
nest ffDiaporama-rsc lp:~ffdiaporamateam/ffdiaporama-rsc/2.1 ffDiaporama_rsc</code></pre></div><p>I then found more usefull doc to be able to build the dep <a href="https://help.launchpad.net/Packaging/SourceBuilds/BzrBuilder">https://help.launchpad.net/Packaging/So … BzrBuilder</a> and&#160; <a href="https://www.netfort.gr.jp/~dancer/software/pbuilder-doc/pbuilder-doc.html">https://www.netfort.gr.jp/~dancer/softw … r-doc.html</a></p><p>As my build fails, I need to enter in with a hook. That said, --hookdir didn&#039;t work but defining HOOKDIR in .pbuilderrc did…</p><p>So here is the pb I found, they were with two thing</p><p>* A rename of AVCodecID enum. see <a href="https://git.libav.org/?p=libav.git;a=commitdiff;h=104e10fb426f903ba9157fdbfe30292d0e4c3d72">https://git.libav.org/?p=libav.git;a=co … 2d0e4c3d72</a><br />&#160; &#160;</p><div class="codebox"><pre><code>   +2012-08-xx - xxxxxxx - lavc 54.25 - avcodec.h
   +  Rename CodecID to AVCodecID and all CODEC_ID_* to AV_CODEC_ID_*.
   </code></pre></div><p>* <em>r_frame_rate</em> was replaced by <em>avg_frame_rate</em> and <em>duration_error</em> disapeared&#160; (so no more need to free it in the code)<br />&#160; &#160;<a href="https://git.libav.org/?p=libav.git;a=commitdiff;h=85a5bc054c1290699ccbf5799ba6c4e2fbcc3530">https://git.libav.org/?p=libav.git;a=co … e2fbcc3530</a></p><p>At the end :</p><div class="codebox"><pre class="vscroll"><code>$ bzr diff
=== modified file &#039;src/ffDiaporama/engine/_EncodeVideo.cpp&#039;
--- src/ffDiaporama/engine/_EncodeVideo.cpp	2014-01-14 11:12:48 +0000
+++ src/ffDiaporama/engine/_EncodeVideo.cpp	2015-05-01 15:50:48 +0000
@@ -136,7 +136,6 @@
             av_freep(&amp;Container-&gt;streams[i]-&gt;codec-&gt;extradata);
             av_freep(&amp;Container-&gt;streams[i]-&gt;codec-&gt;subtitle_header);
             av_freep(&amp;Container-&gt;streams[i]-&gt;priv_data);
-            if (Container-&gt;streams[i]-&gt;info) av_freep(&amp;Container-&gt;streams[i]-&gt;info-&gt;duration_error);
         }
         //=== End of patch
         avformat_free_context(Container);
@@ -185,11 +184,11 @@
 int cEncodeVideo::getThreadFlags(AVCodecID ID) {
     int Ret=0;
     switch (ID) {
-        case CODEC_ID_PRORES:
-        case CODEC_ID_MPEG1VIDEO:
-        case CODEC_ID_DVVIDEO:
-        case CODEC_ID_MPEG2VIDEO:   Ret=FF_THREAD_SLICE;                    break;
-        case CODEC_ID_H264 :        Ret=FF_THREAD_FRAME|FF_THREAD_SLICE;    break;
+        case AV_CODEC_ID_PRORES:
+        case AV_CODEC_ID_MPEG1VIDEO:
+        case AV_CODEC_ID_DVVIDEO:
+        case AV_CODEC_ID_MPEG2VIDEO:   Ret=FF_THREAD_SLICE;                    break;
+        case AV_CODEC_ID_H264 :        Ret=FF_THREAD_FRAME|FF_THREAD_SLICE;    break;
         default:                    Ret=FF_THREAD_FRAME;                    break;
     }
     return Ret;

=== modified file &#039;src/ffDiaporama/engine/cBaseMediaFile.cpp&#039;
--- src/ffDiaporama/engine/cBaseMediaFile.cpp	2014-02-09 09:43:37 +0000
+++ src/ffDiaporama/engine/cBaseMediaFile.cpp	2015-05-01 14:48:31 +0000
@@ -3024,7 +3024,7 @@
 
     if (!FPSDuration) {
         if (PreviewMode) FPSDuration=double(AV_TIME_BASE)/((cApplicationConfig *)ApplicationConfig)-&gt;PreviewFPS;
-            else if (VideoStream) FPSDuration=double(VideoStream-&gt;r_frame_rate.den*AV_TIME_BASE)/double(VideoStream-&gt;r_frame_rate.num);
+            else if (VideoStream) FPSDuration=double(VideoStream-&gt;avg_frame_rate.den*AV_TIME_BASE)/double(VideoStream-&gt;avg_frame_rate.num);
             else FPSDuration=double(AV_TIME_BASE)/double(SoundTrackBloc-&gt;SamplingRate);
     }
     // If position &gt;= end of file : disable audio
@@ -3565,11 +3565,11 @@
 int cVideoFile::getThreadFlags(AVCodecID ID) {
     int Ret=0;
     switch (ID) {
-        case CODEC_ID_PRORES:
-        case CODEC_ID_MPEG1VIDEO:
-        case CODEC_ID_DVVIDEO:
-        case CODEC_ID_MPEG2VIDEO:   Ret=FF_THREAD_SLICE;                    break;
-        case CODEC_ID_H264 :        Ret=FF_THREAD_FRAME|FF_THREAD_SLICE;    break;
+        case AV_CODEC_ID_PRORES:
+        case AV_CODEC_ID_MPEG1VIDEO:
+        case AV_CODEC_ID_DVVIDEO:
+        case AV_CODEC_ID_MPEG2VIDEO:   Ret=FF_THREAD_SLICE;                    break;
+        case AV_CODEC_ID_H264 :        Ret=FF_THREAD_FRAME|FF_THREAD_SLICE;    break;
         default:                    Ret=FF_THREAD_FRAME;                    break;
     }
     return Ret;

=== modified file &#039;src/ffDiaporama/engine/cDeviceModelDef.h&#039;
--- src/ffDiaporama/engine/cDeviceModelDef.h	2014-01-17 15:22:16 +0000
+++ src/ffDiaporama/engine/cDeviceModelDef.h	2015-05-01 14:34:24 +0000
@@ -110,7 +110,7 @@
     #define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
 #endif
 
-#if !defined(FF_API_CODEC_ID)
+#if !defined(FF_API_CODEC_ID) &amp;&amp; (LIBAVCODEC_VERSION_MAJOR&lt;54 || (LIBAVCODEC_VERSION_MAJOR==54 &amp;&amp; LIBAVCODEC_VERSION_MINOR&lt;25))
     #define AV_CODEC_ID_NONE        CODEC_ID_NONE
     #define AV_CODEC_ID_MJPEG       CODEC_ID_MJPEG
     #define AV_CODEC_ID_MPEG2VIDEO  CODEC_ID_MPEG2VIDEO</code></pre></div><p>So I<br /></p><div class="codebox"><pre><code>  $ bzr commit</code></pre></div><p>And then pbuild worked !</p>]]></description>
			<author><![CDATA[dummy@example.com (alexg)]]></author>
			<pubDate>Fri, 01 May 2015 22:36:48 +0000</pubDate>
			<guid>http://ffdiaporama.tuxfamily.org/Forum/viewtopic.php?pid=3846#p3846</guid>
		</item>
	</channel>
</rss>
