Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Vision / MediaVision / PersonAppearanceDetectionConfiguration.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18
19 namespace Tizen.Multimedia
20 {
21     /// <summary>
22     /// Represents a configuration of <see cref="PersonAppearanceDetector"/> instances.
23     /// </summary>
24     /// <since_tizen> 3</since_tizen>
25     public class PersonAppearanceDetectionConfiguration : SurveillanceEngineConfiguration
26     {
27         private const string KeySkipFramesCount = "MV_SURVEILLANCE_SKIP_FRAMES_COUNT";
28
29         /// <summary>
30         /// A read-only field that represents the default value of <see cref="SkipFramesCount"/>.
31         /// </summary>
32         /// <since_tizen> 3</since_tizen>
33         public static readonly int DefaultSkipFramesCount = 0;
34
35         /// <summary>
36         /// Initializes a new instance of the <see cref="PersonAppearanceDetectionConfiguration"/> class.
37         /// </summary>
38         /// <exception cref="NotSupportedException">The feature is not supported.</exception>
39         /// <since_tizen> 3</since_tizen>
40         public PersonAppearanceDetectionConfiguration()
41         {
42         }
43
44         /// <summary>
45         /// Gets or sets how many frames will be skipped during push source.\n
46         /// </summary>
47         /// <value>
48         /// The value to specify the number of <see cref="MediaVisionSource"/> calls will be ignored by subscription
49         /// of the event trigger.\n
50         ///
51         /// The default is 0. It means that no frames will be skipped and all <see cref="MediaVisionSource"/> will
52         /// be processed.
53         /// </value>
54         /// <exception cref="ObjectDisposedException">The <see cref="PersonAppearanceDetectionConfiguration"/> already has been disposed of.</exception>
55         /// <exception cref="ArgumentOutOfRangeException"><paramref name="value"/> is less than zero.</exception>
56         /// <seealso cref="SurveillanceSource.Push(MediaVisionSource)"/>
57         /// <since_tizen> 3</since_tizen>
58         public int SkipFramesCount
59         {
60             get
61             {
62                 return GetInt(KeySkipFramesCount);
63             }
64             set
65             {
66                 if (value < 0)
67                 {
68                     throw new ArgumentOutOfRangeException(nameof(SkipFramesCount), value,
69                         $"{nameof(SkipFramesCount)} can't be less than zero.");
70                 }
71                 Set(KeySkipFramesCount, value);
72             }
73         }
74     }
75 }