Android Issue on Ticket#1861(Video capture orientation)

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

 



Hi,

The change set for #1861 on Android does not work well. Testing on org.pjsip.pjsua2.app get could not get the "proper" orientation result,  i.e: head upside whatever the device orientation is.

The culprit should be the I420Rotate() invoked by pjmedia_vid_dev_conv_resize_and_rotate() in  pjmedia/src/pjmedia-videodev/util.c. The libyuv document says "Rotate by 180 can be done in place, but 90 and 270 can not."

In addition, change set #5138  introduces a convert for the stream. Another convert, however, was created for pjmedia_vid_port and is dependent on the source video size too. 

An alternative solution is to publish a PJMEDIA_EVENT_FMT_CHANGED event on PJMEDIA_DIR_ENCODING and finally invoke client_port_event_cb() in vid_port.c, and the client_port_event_cb() should be amended to NOT overwrite the destination size on PJMEDIA_DIR_ENCODING. The stream convert is not required. 

Is there any problem or potential risk on this solution?


--
                                           Deng Xiaoming
                                     dengxiaoming@xxxxxxxxx
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux