Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 12-24-2012, 02:16 PM   #1
LQ Newbie
Registered: Sep 2012
Posts: 15

Rep: Reputation: Disabled
Video in Linphone (sip-phone tool)

Hi to all.
I have found a new problem, so need an advice about compiling Linphone with video support. When I'm trying to build it I've got an error output:
videoenc.c: In function «ms_ffmpeg_check_init»:
videoenc.c:56:3: warning: неявная декларация функции «avcodec_init» [-Wimplicit-function-declaration]
videoenc.c: In function «prepare»:
videoenc.c:239:2: warning: «avcodec_get_context_defaults» is deprecated (declared at /usr/include/libavcodec/avcodec.h:3260) [-Wdeprecated-declarations]
videoenc.c: In function «prepare_h263»:
videoenc.c:303:13: error: «CODEC_FLAG_H263P_UMV» undeclared (first use in this function)
videoenc.c:303:13: notice: each undeclared identifier is reported only once for each function it appears in
videoenc.c:305:13: error: «CODEC_FLAG_H263P_SLICE_STRUCT» undeclared (first use in this function)
videoenc.c: In function «enc_preprocess»:
videoenc.c:345:2: warning: «avcodec_open» is deprecated (declared at /usr/include/libavcodec/avcodec.h:3380) [-Wdeprecated-declarations]
videoenc.c: In function «add_rfc2190_header»:
videoenc.c:375:41: error: «FF_I_TYPE» undeclared (first use in this function)
videoenc.c: In function «process_frame»:
videoenc.c:782:18: error: «FF_I_TYPE» undeclared (first use in this function)
videoenc.c:794:2: warning: «avcodec_encode_video» is deprecated (declared at /usr/include/libavcodec/avcodec.h:4077) [-Wdeprecated-declarations]
make[5]: *** [videoenc.lo] Error 1
make[5]: Leaving directory `/tmp/SBo/linphone-3.5.2/mediastreamer2/src'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/tmp/SBo/linphone-3.5.2/mediastreamer2/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/SBo/linphone-3.5.2/mediastreamer2'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/SBo/linphone-3.5.2/mediastreamer2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/linphone-3.5.2'
make: *** [all] Error 2
One wise man adviced me a solution:
$  cat mpeg-dirty.diff 
diff -ru linphone-3.5.2/mediastreamer2/src/h264dec.c linphone-3.5.2/mediastreamer2/src/h264dec.c
--- linphone-3.5.2/mediastreamer2/src/h264dec.c    2012-02-22 15:54:58.000000000 +0400
+++ linphone-3.5.2/mediastreamer2/src/h264dec.c    2012-12-22 21:11:27.951128175 +0400
@@ -44,7 +44,7 @@
 static void ffmpeg_init(){
     static bool_t done=FALSE;
     if (!done){
-        avcodec_init();
+        //avcodec_init();
diff -ru linphone-3.5.2/mediastreamer2/src/videoenc.c linphone-3.5.2/mediastreamer2/src/videoenc.c
--- linphone-3.5.2/mediastreamer2/src/videoenc.c    2012-02-22 15:54:58.000000000 +0400
+++ linphone-3.5.2/mediastreamer2/src/videoenc.c    2012-12-22 21:10:44.577670418 +0400
@@ -53,7 +53,7 @@
 void ms_ffmpeg_check_init(){
-        avcodec_init();
+        //avcodec_init();
@@ -300,10 +300,10 @@
     if (s->profile==0){
-        c->flags|=CODEC_FLAG_H263P_UMV;
-        c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
+        c->flags|=CODEC_FLAG_H263P_UMV;
+        c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
@@ -372,7 +372,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 +779,7 @@
     if (s->req_vfu){
-        pict.pict_type=FF_I_TYPE;
+        pict.pict_type=AV_PICTURE_TYPE_I;
@@ -799,7 +799,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");
In this case I can build a psckage, but video still not working. As I was told, the problem is that ffmpeg, and exactly libavcodec( is to new for linphone 3.5.2. I don't want to use old version of ffmpeg because it will make problem with vlc and xbmc. I looked in linuxmint (ubuntu) how it is work there, they are using libavcodec ( with libav project instead of ffmpeg. So what is an appropriate decision for this issue?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sip linphone issue madosaif Linux - Newbie 1 12-12-2012 11:24 PM
VOIP phone for windows that understands sip, anybody? oskar General 4 07-12-2009 01:00 AM
cannot get SIP Phone to work over iptables firewall browny_amiga Linux - Networking 2 02-11-2008 06:54 PM
Help 4 SIP based IP phone arsalan Programming 2 01-29-2008 12:01 AM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration