merge commits of 2.2.1 to public
[platform/framework/native/media.git] / inc / FMediaVideoStreamInfo.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file                FMediaVideoStreamInfo.h
20  * @brief               This is the header file for the %VideoStreamInfo class.
21  *
22  * This header file contains the declarations of the %VideoStreamInfo class.
23  */
24
25 #ifndef _FMEDIA_VIDEO_STREAM_INFO_H_
26 #define _FMEDIA_VIDEO_STREAM_INFO_H_
27
28 #include <FBaseObject.h>
29 #include <FMediaTypes.h>
30
31 namespace Tizen { namespace Media
32 {
33 /**
34  * @class        VideoStreamInfo
35  * @brief        This class provides methods to get video information.
36  *
37  * @since               2.0
38  *
39  * The %VideoStreamInfo class provides methods to get video stream information, such as codec type, video width or height, bit rate,
40  * and frame rate.
41  *
42  */
43
44 class _OSP_EXPORT_ VideoStreamInfo
45         : public Tizen::Base::Object
46 {
47 public:
48    /**
49         * This destructor overrides Tizen::Base::Object::~Object().
50         *
51         * @since                2.0
52         */
53         virtual ~VideoStreamInfo(void);
54
55 public:
56    /**
57         * Gets the encoding type of a video.
58         *
59         * @since                2.0
60         *
61         * @return               The encoding type
62         */
63         CodecType GetCodecType(void) const;
64
65    /**
66         * Gets the width of a video.
67         *
68         * @since                2.0
69         *
70         * @return               The video width
71         */
72         int GetWidth(void) const;
73
74    /**
75         * Gets the height of a video.
76         *
77         * @since                2.0
78         *
79         * @return               The video height
80         */
81         int GetHeight(void) const;
82
83    /**
84         * Gets the bit rate of a video.
85         *
86         * @since                2.0
87         *
88         * @return               The video bit rate in bits per second (bps)
89         */
90         int GetBitRate(void) const;
91
92    /**
93         * Gets the frame rate of a video.
94         *
95         * @since                2.0
96         *
97         * @return               The video frame rate
98         */
99         float GetFrameRate(void) const;
100
101    /**
102         * Copying of objects using this copy constructor is allowed.
103         *
104         * @since                2.0
105         *
106         * @return               A copy of this instance
107         * @param[in]    rhs     An instance of %VideoStreamInfo to copy
108         */
109         VideoStreamInfo(const VideoStreamInfo & rhs);
110
111    /**
112         * Copying of objects using this copy assignment operator is allowed.
113         *
114         * @since                2.0
115         *
116         * @return               A reference to this instance
117         * @param[in]    rhs     An instance of %VideoStreamInfo to copy
118         */
119         VideoStreamInfo & operator =(const VideoStreamInfo & rhs);
120
121    /**
122         * Compares the specified instance of Tizen::Base::Object with the current instance of %VideoStreamInfo.
123         *
124         * @since                2.0
125         *
126         * @return               @c true if the value of the specified instance equals the value of the current instance, @n
127         *                               else @c false
128         * @param[in]    rhs             The object to compare with the current instance
129         */
130         virtual bool Equals(const Tizen::Base::Object& rhs) const;
131
132    /**
133         * Gets the hash value of the current instance.
134         *
135         * @since                2.0
136         *
137         * @return               The hash value of the current instance
138         */
139         virtual int GetHashCode(void) const;
140
141 private:
142         /**
143         * This default constructor is intentionally declared as private so that only the platform can create an instance.
144         *
145         * @param [in]   codecType       The value of the encoding type
146         * @param [in]   width           The value of the video width
147         * @param [in]   height          The value of the video height
148         * @param [in]   bitrate         The video bit rate in bits per second (bps)
149         * @param [in]   frameRate       The video frame rate
150         */
151         VideoStreamInfo(CodecType codecType, int width, int height, int bitrate, float frameRate);
152
153 private:
154         friend class _PlayerImpl;
155         class _VideoStreamInfoImpl *__pVideoStreamInfoImpl;
156 };
157
158 }}//Tizen::Media
159
160
161 #endif