xap/linphone: Patched against recent xap/ffmeg.

slackware-14.2
Damien Goutte-Gattat 9 years ago
parent 3d35924ef1
commit 6c01c4aad3
  1. 64
      xap/linphone/linphone-3.5.2-ffmpeg.diff
  2. 9
      xap/linphone/linphone.SlackBuild

@ -0,0 +1,64 @@
diff -urN linphone-3.5.2.orig/mediastreamer2/src/h264dec.c linphone-3.5.2/mediastreamer2/src/h264dec.c
--- linphone-3.5.2.orig/mediastreamer2/src/h264dec.c 2012-02-22 18:54:58.000000000 +0700
+++ linphone-3.5.2/mediastreamer2/src/h264dec.c 2012-10-11 09:29:58.229247989 +0700
@@ -44,7 +44,6 @@
static void ffmpeg_init(){
static bool_t done=FALSE;
if (!done){
- avcodec_init();
avcodec_register_all();
done=TRUE;
}
diff -urN linphone-3.5.2.orig/mediastreamer2/src/videoenc.c linphone-3.5.2/mediastreamer2/src/videoenc.c
--- linphone-3.5.2.orig/mediastreamer2/src/videoenc.c 2012-02-22 18:54:58.000000000 +0700
+++ linphone-3.5.2/mediastreamer2/src/videoenc.c 2012-10-11 09:36:46.770805574 +0700
@@ -37,6 +37,13 @@
#define RATE_CONTROL_MARGIN 15000 /*bits/second*/
+#ifndef CODEC_FLAG_H263P_UMV
+#define CODEC_FLAG_H263P_UMV 0x02000000
+#endif
+#ifndef CODEC_FLAG_H263P_SLICE_STRUCT
+#define CODEC_FLAG_H263P_SLICE_STRUCT 0x10000000
+#endif
+
static bool_t avcodec_initialized=FALSE;
#ifdef ENABLE_LOG_FFMPEG
@@ -53,7 +60,6 @@
void ms_ffmpeg_check_init(){
if(!avcodec_initialized){
- avcodec_init();
avcodec_register_all();
avcodec_initialized=TRUE;
#ifdef ENABLE_LOG_FFMPEG
@@ -372,7 +378,7 @@
// assume video size is CIF or QCIF
if (context->width == 352 && context->height == 288) header->b_wptr[1] = 0x60;
else header->b_wptr[1] = 0x40;
- if (context->coded_frame->pict_type != FF_I_TYPE) header->b_wptr[1] |= 0x10;
+ if (context->coded_frame->pict_type != AV_PICTURE_TYPE_I) header->b_wptr[1] |= 0x10;
header->b_wptr += 4;
header->b_cont = *packet;
*packet = header;
@@ -779,7 +785,7 @@
s->req_vfu=TRUE;
}
if (s->req_vfu){
- pict.pict_type=FF_I_TYPE;
+ pict.pict_type=AV_PICTURE_TYPE_I;
s->req_vfu=FALSE;
}
comp_buf->b_rptr=comp_buf->b_wptr=comp_buf->b_datap->db_base;
@@ -799,7 +805,7 @@
if (s->framenum==1){
video_starter_first_frame (&s->starter,f->ticker->time);
}
- if (c->coded_frame->pict_type==FF_I_TYPE){
+ if (c->coded_frame->pict_type==AV_PICTURE_TYPE_I){
ms_message("Emitting I-frame");
}
comp_buf->b_wptr+=error;

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2010,2011,2012 Damien Goutte-Gattat
# Copyright (C) 2010,2011,2012,2013 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -35,7 +35,7 @@ WGET=${WGET:-http://download.savannah.gnu.org/releases/linphone/3.5.x/sources/$A
# Build infos
NAMEPKG=${NAMEPKG:-linphone}
BUILD=${BUILD:-2GGD}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
@ -88,6 +88,9 @@ tar xf $CWD/$ARCHIVE
cd $NAME
# Support for XDG Base Directory Specification
patch -p 1 < $CWD/linphone-3.5.2-xdg-basedir.diff
# Support for recent Ffmpeg, from
# <https://build.opensuse.org/package/view_file?expand=1&file=linphone-ffmpeg.patch&package=linphone&project=openSUSE%3AFactory&rev=e0565b98439f40a4f5e91aa23cceaf1a>
patch -p 1 < $CWD/linphone-3.5.2-ffmpeg.diff
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
@ -100,7 +103,7 @@ CXXFLAGS=$CPUOPT \
--enable-truespeech \
--enable-ssl \
--enable-alsa \
--disable-video # Does not work with recent xap/ffmpeg
--enable-video
make -j $JOBS
make install-strip DESTDIR=$PKG

Loading…
Cancel
Save