Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#13095 closed patch (fixed)

Negotiation more reasonable media format from video source

Reported by: haakon Owned by: Maiku
Milestone: 2.8.0 Component: Voice and Video
Version: 2.7.7 Keywords: video GstCapsFilter high CPU
Cc:

Description

Default Pidgin video source adds GstVideoScale? and GstCapsFilter? to the pipeline, limiting the image dimensions to something about 350x280 (see create_default_video_src() in gtkmedia.c).

However, when you use Voice/Video? Settings plugin, the capabilities of created video source are not limited, in practice highest possible resolution is negotiated and the image must be scaled down, once for the small preview in the Pidgin's media window and once before it is encoded and streamed over network. For example on my older laptop (Pentium M 1.73GHz) rescaling from 1280x1024, that the webcam provides, eats nearly 100% CPU power and both sent and received videos are so choppy that decent video conversation is impossible. With Pidgin default video source and 352x288 video directly from the webcam, the call runs smoothly with only about 40% CPU load.

I suggest to improve the performance with this patch that

  • adds a GstCapsFilter? between every video source and the rest of pipeline, forcing the same capabilities as "pidgindefaultvideosrc"
  • adds public API allowing protocol plugins to change the video capabilities when it is convenient (if the particular protocol supports higher resolution video and the machine has enough CPU power)

I split the patch in two parts so that the API extension can wait for 2.8.0 and the more important part added to next 2.7.X release.

Attachments (2)

0001-Add-capsfilter-after-video-source.patch (3.8 KB) - added by haakon 8 years ago.
0002-Video-caps-public-API.patch (2.7 KB) - added by haakon 8 years ago.

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by haakon

comment:1 Changed 8 years ago by QuLogic

  • Milestone set to Patches Needing Review

comment:2 Changed 8 years ago by rekkanoryo

  • Milestone changed from Patches Needing Review to 2.7.10

I'd like to get this patch in for 2.7.10 as well.

comment:3 Changed 8 years ago by darkrain42

As with all the others, I think this looks good, but knowledge_of(Gstreamer) keeps returning -ETOOLOW.

comment:4 Changed 8 years ago by jakub.adam@…

(In d675933edc091cf6c8c5aabe60fba40027c2699e):
Add a GstCapsFilter? between every video source and the rest of the pipeline. This will force the sources to have the same capaibilties as the "pidgindefaultvideosrc" and should reduce CPU usage as well. Refs #13095.

comment:6 Changed 8 years ago by jakub.adam@…

  • Milestone changed from 2.7.10 to 2.8.0
  • Resolution set to fixed
  • Status changed from new to closed

(In f4d00cd60a9daffa4de19396be4c3db6972fb5a0):
Public API allowing plugins (including prpls) to get/set video capabilities where desired/appropriate. Fixes #13095.

comment:7 Changed 8 years ago by rekkanoryo@…

(In 93815ced6f2a902161c3c02bc0bc115f461be559):
ChangeLog and credit Jakub appropriately. Refs #13095.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!