desktop/ktp-call-ui/ktp-call-ui-0.8.1-gstreamer1-0007-videomaxrate-seems-to-have-been-generalized-into-vid.patch

54 lines
2.4 KiB
Diff
Raw Normal View History

2014-09-09 20:55:52 +08:00
From 74f56f226c62b4a2cb5161bb0182d753ae30f13a Mon Sep 17 00:00:00 2001
From: Diane Trout <diane@ghic.org>
Date: Wed, 4 Jun 2014 22:57:15 -0700
Subject: [PATCH 7/8] videomaxrate seems to have been generalized into
videorate.
this attempts to configure videorate to act like videomaxrate did.
---
libktpcall/private/tf-video-content-handler.cpp | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/libktpcall/private/tf-video-content-handler.cpp b/libktpcall/private/tf-video-content-handler.cpp
index bfae1e0..5bab57e 100644
--- a/libktpcall/private/tf-video-content-handler.cpp
+++ b/libktpcall/private/tf-video-content-handler.cpp
@@ -139,9 +139,10 @@ bool TfVideoContentHandler::createSrcBin(const QGst::ElementPtr & src)
//some unique id for this content - use the name that the CM gives to the content object
QString id = tfContent()->property("object-path").toString().section(QLatin1Char('/'), -1);
- //videomaxrate drops frames to support the 15fps restriction
+ //videorate drops frames to support the 15fps restriction
//in the capsfilter if the camera cannot produce 15fps
- QGst::ElementPtr videomaxrate = QGst::ElementFactory::make("videomaxrate");
+ QGst::ElementPtr videorate = QGst::ElementFactory::make("videorate");
+ videorate->setProperty("max-rate", 15);
//videoscale supports the 320x240 restriction in the capsfilter
//if the camera cannot produce 320x240
@@ -183,15 +184,15 @@ bool TfVideoContentHandler::createSrcBin(const QGst::ElementPtr & src)
QGst::BinPtr bin = QGst::Bin::create();
bin->add(src, videoscale, colorspace, capsfilter, tee, fakesink, queue);
- // src ! (videomaxrate) ! videoscale
- if (videomaxrate) {
- bin->add(videomaxrate);
- if (!QGst::Element::linkMany(src, videomaxrate, videoscale)) {
- kWarning() << "Failed to link videosrc ! videomaxrate ! videoscale";
+ // src ! (videorate) ! videoscale
+ if (videorate) {
+ bin->add(videorate);
+ if (!QGst::Element::linkMany(src, videorate, videoscale)) {
+ kWarning() << "Failed to link videosrc ! videorate ! videoscale";
return false;
}
} else {
- kDebug() << "NOT using videomaxrate";
+ kDebug() << "NOT using videorate";
if (!src->link(videoscale)) {
kWarning() << "Failed to link videosrc ! videoscale";
return false;
--
1.8.3.1