2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using Native = Interop.StreamRecorder;
20 namespace Tizen.Multimedia
23 /// Resolution for stream recorder.
25 public class StreamRecorderVideoResolution
27 private int _width, _height;
28 private bool _interopFlag;
29 internal IntPtr _Handle;
31 internal StreamRecorderVideoResolution(IntPtr handle)
35 int ret = Native.GetVideoResolution(_Handle, out _width, out _height);
36 StreamRecorderError err = (StreamRecorderError)ret;
37 Log.Info(StreamRecorderLog.Tag, "width " + _width + " height " + _height + "return " + err.ToString());
40 internal StreamRecorderVideoResolution(int width, int height)
50 /// <value>The width.</value>
53 if(_interopFlag == true)
54 Native.GetVideoResolution(_Handle, out _width, out _height);
59 if(_interopFlag == true) {
60 int ret = Native.SetVideoResolution(_Handle, _width, _height);
61 StreamRecorderError err = (StreamRecorderError)ret;
62 Log.Info(StreamRecorderLog.Tag, " set width " + _width + " height " + _height + "set return " + err.ToString());
70 /// <value>The height.</value>
73 if(_interopFlag == true)
74 Native.GetVideoResolution(_Handle, out _width, out _height);
79 if(_interopFlag == true) {
80 int ret = Native.SetVideoResolution(_Handle, _width, _height);
81 StreamRecorderError err = (StreamRecorderError)ret;
82 Log.Info(StreamRecorderLog.Tag, " set width " + _width + " height " + _height + "set return " + err.ToString());