Release 4.0.0-preview1-00201
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.MediaPlayer / Player / VideoStreamChangedEventArgs.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 using System;
17
18 namespace Tizen.Multimedia
19 {
20     /// <summary>
21     /// Provides data for the <see cref="Player.VideoStreamChanged"/> event.
22     /// </summary>
23     public class VideoStreamChangedEventArgs : EventArgs
24     {
25         /// <summary>
26         /// Initializes a new instance of the VideoStreamChangedEventArgs class.
27         /// </summary>
28         internal VideoStreamChangedEventArgs(int height, int width, int fps, int bitRate)
29         {
30             Size = new Size(width, height);
31             Fps = fps;
32             BitRate = bitRate;
33         }
34
35         /// <summary>
36         /// Gets the <see cref="Size"/> of the new video.
37         /// </summary>
38         public Size Size { get; }
39
40         /// <summary>
41         /// Gets the fps of the new video
42         /// </summary>
43         public int Fps { get; }
44
45         /// <summary>
46         /// Gets the bit rate of the new video.
47         /// </summary>
48         public int BitRate { get; }
49
50         /// <summary>
51         /// Returns a string that represents the current object.
52         /// </summary>
53         /// <returns>A string that represents the current object.</returns>
54         public override string ToString()
55         {
56             return $"Size=({ Size.ToString() }), Fps={ Fps.ToString() }, BitRate={ BitRate.ToString() }";
57         }
58     }
59 }