50
|
1 |
// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
2 |
// All rights reserved.
|
|
3 |
// This component and the accompanying materials are made available
|
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
#include <imageprocessor/imageprocessoroutputinfointf.h>
|
|
17 |
#include <imageprocessor/imageprocessoroutputinfo.h>
|
|
18 |
#include "imageprocessorimpl.h"
|
|
19 |
#include <imageprocessor/imageprocessor.h>
|
|
20 |
|
|
21 |
namespace ImageProcessor
|
|
22 |
{
|
|
23 |
|
|
24 |
TOutputInfo::TOutputInfo(Plugin::MOutputInfo& aOutputInfoImpl, CImageProcessorImpl& aImageProcessorImpl)
|
|
25 |
:iImageProcessorImpl(aImageProcessorImpl),
|
|
26 |
iOutputInfoImpl(aOutputInfoImpl),
|
|
27 |
iReserved(0)
|
|
28 |
{
|
|
29 |
}
|
|
30 |
|
|
31 |
/**
|
|
32 |
Sets the output JPEG image quality
|
|
33 |
|
|
34 |
@param aQuality
|
|
35 |
The new JPEG image quality to set to the output. Range (0, 1], where 1 means best JPEG quality (100%).
|
|
36 |
*/
|
|
37 |
EXPORT_C void TOutputInfo::SetJpegQualityL(TReal32& aQuality)
|
|
38 |
{
|
|
39 |
__ASSERT_ALWAYS((0.0f<aQuality)&&(1.0f>=aQuality),User::Leave(KErrArgument));
|
|
40 |
__ASSERT_ALWAYS(iImageProcessorImpl.IsOutputSet(), User::Leave(KErrNotReady));
|
|
41 |
iOutputInfoImpl.SetJpegQualityL(aQuality);
|
|
42 |
}
|
|
43 |
|
|
44 |
/**
|
|
45 |
Sets the output JPEG image sampling rate
|
|
46 |
|
|
47 |
@param aSampling
|
|
48 |
The new JPEG image sampling rate to set to the output.
|
|
49 |
*/
|
|
50 |
EXPORT_C void TOutputInfo::SetSamplingL(TUid& aSampling)
|
|
51 |
{
|
|
52 |
__ASSERT_ALWAYS(iImageProcessorImpl.IsOutputSet(), User::Leave(KErrNotReady));
|
|
53 |
iOutputInfoImpl.SetSamplingL(aSampling);
|
|
54 |
}
|
|
55 |
|
|
56 |
/**
|
|
57 |
Retrieves access to a custom extension.
|
|
58 |
|
|
59 |
@param aExtension
|
|
60 |
The UID of the extension to be retrieved
|
|
61 |
|
|
62 |
@return Extension corresponding to the UID given as a parameter.
|
|
63 |
*/
|
|
64 |
EXPORT_C TAny* TOutputInfo::Extension(TUid /*aExtension*/) const
|
|
65 |
{
|
|
66 |
return NULL;
|
|
67 |
}
|
|
68 |
}//namespace ImageProcessor
|
|
69 |
//EOF
|