[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] H264 Support

From: Vadim Lebedev
Subject: Re: [Linphone-developers] H264 Support
Date: Thu, 16 Jul 2009 15:00:35 +0200
User-agent: Thunderbird (X11/20090608)


As i wrote in my previous email i had problem to activate video capture on my platform.
I've nailed it down.

V4L2 Api says that VIDIOC_STREAMON ioctl should return EINVAL if there is now enqueued buffers...
This was EXACTLY what happened in my case...  (It seems that some camera drivers does not respect this requirement
and because of this the actual code in v4l2.c sometimes works).
Si i've uncommented and modified a little bit a loop which is just before ioctl(..VIDIOC_STREAMON) in msv4l2.c
And oopsla it works....

The patch is attached....


Vadim Lebedev wrote:

I'm too working on this platform with the same goal actually.

My problem right know, is that when i'm using linphone 3.1.2  i'm getting following:

ortp-message-Driver is mxc_v4l2                            
ortp-message-v4lv2: YUV420P choosen                        
ortp-message-Size of webcam delivered pictures is 352x288  
ortp-message-vsize=352x288, fps=17.000000, send format: (null), capture format: 0, bitrate: 1500000
ortp-message-ms_filter_link: MSV4L2Capture:0x33a58,0-->MSPixConv:0x40518,0                        
ortp-message-ms_filter_link: MSPixConv:0x40518,0-->MSSizeConv:0x33b88,0                           
ortp-message-ms_filter_link: MSSizeConv:0x33b88,0-->MSH263Enc:0x33a08,0                           
ortp-message-ms_filter_link: MSH263Enc:0x33a08,0-->MSRtpSend:0x33958,0                            
ortp-error-VIDIOC_STREAMON failed: Invalid argument                                               
ortp-message-Codec bitrate set to 1050000                                                         
ortp-message-qmin=2 qmax=31                                                                       

But when i'm using 3.1.1  it works ok....
Any idea what happens... ????
I've looked msv4l2.c in both versions is EXACTLY the same....  so i'm baffled by this diffrenece in behaviour


Code Warrior wrote:
Thanks for your reply Simon.
I'm using freescale iMX platform and want to use the H264 codec capability of the hardware. Clearly,
this needs changes to the linphone and ffmpeg source. Can you provide me some pointers in the code
where these changes would be needed? Though i'm working on the code, any directions in this regard
would surely be helpful.
I'm using Linphone version 3.1.2 with ffmpeg version 0.5.

On Wed, Jul 15, 2009 at 9:33 PM, Simon Morlat <address@hidden> wrote:

See RFC3984 (
Packetization-mode 1 is for H264 NALs that must be fragmented (because they
don't fit into the network mtu). Not all phone support this mode.
The other is packetization-mode=0 (the default), in which a NAL is sent
directly into RTP packets.
The one used is the first one accepted in the SDP answer, by default from
linphone to linphone it should mode 0.


Le mercredi 15 juillet 2009 12:36:42, Code Warrior a écrit :
> Hi,
> I want to use H264 encoding in linphone. While browsing the code, i could
> see two payload types defined for H264 (in linphonecore.c)
> + H264 Packetization Mode 1
> + H264
> What is the difference between the two and which one is used in Linphone ?
> /csj

_______________________________________________ Linphone-developers mailing list address@hidden

_______________________________________________ Linphone-developers mailing list address@hidden

--- /home/vadim/linphone-svn/mediastreamer2/src/msv4l2.c        2009-06-09 
18:47:01.000000000 +0200
+++ ./msv4l2.c  2009-07-16 12:18:27.000000000 +0200
@@ -197,7 +197,7 @@
-       req.count               = 4;
+       req.count               = 4; /* V.L. original value of 4 does not work 
on GIP */
        req.type                = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        req.memory              = V4L2_MEMORY_MMAP;
@@ -235,7 +235,7 @@
-       /*
        for (i = 0; i < s->frame_max; ++i) {
                struct v4l2_buffer buf;
@@ -246,9 +246,13 @@
                if (-1==ioctl (s->fd, VIDIOC_QBUF, &buf)){
                        ms_error("VIDIOC_QBUF failed: %s",strerror(errno));
+               else {
+                 s->frames[i]->b_datap->db_ref++;
+                 s->queued++;
+               }
-       */
-       /*start capture immediately*/
+       /* start capture immediately */
        type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
        if (-1 ==ioctl (s->fd, VIDIOC_STREAMON, &type)){
                ms_error("VIDIOC_STREAMON failed: %s",strerror(errno));

reply via email to

[Prev in Thread] Current Thread [Next in Thread]