source: trunk/src/3rdparty/phonon/qt7/videoeffect.mm

Last change on this file was 2, checked in by Dmitry A. Kuminov, 17 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 2.0 KB
Line 
1/* This file is part of the KDE project.
2
3 Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4
5 This library is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 2.1 or 3 of the License.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this library. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#include "videoeffect.h"
19#include "backendheader.h"
20#include "objc_help.h"
21#include <phonon/effect.h>
22#include <phonon/effectparameter.h>
23
24QT_BEGIN_NAMESPACE
25
26namespace Phonon
27{
28namespace QT7
29{
30
31VideoEffect::VideoEffect(int effectId, QObject *parent) : MediaNode(VideoSink | VideoSource, 0, parent), effectId(effectId)
32{
33 ciFilter = objc_createCiFilter(effectId);
34 if (ciFilter)
35 filterName = objc_getCiFilterInfo()->filterDisplayNames[effectId];
36}
37
38VideoEffect::~VideoEffect()
39{
40 if (ciFilter)
41 objc_releaseCiFilter(ciFilter);
42}
43
44QList<EffectParameter> VideoEffect::parameters() const
45{
46 IMPLEMENTED;
47 return objc_getCiFilterParameterInfo(ciFilter).parameters;
48}
49
50QVariant VideoEffect::parameterValue(const EffectParameter &parameter) const
51{
52 IMPLEMENTED;
53 return objc_getCiFilterParameter(ciFilter, parameter.id());
54}
55
56void VideoEffect::setParameterValue(const EffectParameter &parameter, const QVariant &newValue)
57{
58 IMPLEMENTED;
59 objc_setCiFilterParameter(ciFilter, parameter.id(), newValue);
60}
61
62void VideoEffect::mediaNodeEvent(const MediaNodeEvent */*event*/)
63{
64}
65
66void VideoEffect::updateVideo(VideoFrame &frame){
67 frame.applyCoreImageFilter(ciFilter);
68 MediaNode::updateVideo(frame);
69}
70
71}}
72
73QT_END_NAMESPACE
74
75#include "moc_videoeffect.cpp"
76
Note: See TracBrowser for help on using the repository browser.