(TDIS-5787)Fixed CMakelist to write information of osp-media.pc
[platform/framework/native/media.git] / inc / FMediaIPlayerVideoEventListener.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                FMediaIPlayerVideoEventListener.h
20  * @brief               This is the header file for the %IPlayerVideoEventListener interface.
21  *
22  * This header file contains the declarations of the %IPlayerVideoEventListener interface.
23  */
24
25 #ifndef _FMEDIA_IPLAYER_VIDEO_EVENT_LISTENER_H_
26 #define _FMEDIA_IPLAYER_VIDEO_EVENT_LISTENER_H_
27
28 #include <FBaseRtIEventListener.h>
29 #include <FBaseDataType.h>
30 #include <FGrpDimension.h>
31 #include <FGrpBitmapCommon.h>
32 #include <FMediaPlayerTypes.h>
33
34 namespace Tizen { namespace Media
35 {
36 class Player;
37 /**
38  * @interface   IPlayerVideoEventListener
39  * @brief                       This interface provides a listener for the video event.
40  *
41  * @since               2.0
42  *
43  * The %IPlayerVideoEventListener interface specifies the method used to get the decoded video frame.
44  */
45
46 class _OSP_EXPORT_ IPlayerVideoEventListener
47         : virtual public Tizen::Base::Runtime::IEventListener
48 {
49
50 public:
51         /**
52         * This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
53         *
54         * @since                2.0
55         */
56         virtual ~IPlayerVideoEventListener(void) {}
57
58         /**
59         *       Called when the video frame is decoded asynchronously.
60         *
61         *   @since              2.0
62         *
63         *       @param[in]       src                            An instance of Player that fires the event
64         *       @param[in]       bitmapPixelFormat      A pixel format type of the decoded video frame
65         *       @param[in]       dim                            A dimension of the decoded video frame
66         *       @param[in]       pBuffer                        A pointer to a decoded video frame buffer
67         *       @param[in]       sizeOfBuffer           A size of a buffer
68         *   @param[in]   r                                      The cause of the error
69         *       @exception       E_SUCCESS                                                      The method is successful.
70         *       @exception       E_SYSTEM                                                       A system error has occurred.
71         *       @exception       E_INVALID_DATA                     The video frame has invalid blocks.
72         *       @remarks        The lifecycle of @c pBuffer is valid inside this method.
73         *       @see            Player::Play()
74         *       @see            Player::PlayAndPause()
75         *       @see            Player::SeekTo()
76         */
77         virtual void OnVideoFrameDecoded(Tizen::Media::Player& src, Tizen::Graphics::BitmapPixelFormat bitmapPixelFormat, const Tizen::Graphics::Dimension& dim, const byte* pBuffer, int sizeOfBuffer, result r) = 0;
78
79 protected:
80         //
81         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
82         //
83         // This method is reserved and may change its name at any time without prior notice.
84         //
85         // @since               2.0
86         //
87         virtual void IPlayerVideoEventListener_Reserved1(void) {}
88
89         //
90         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
91         //
92         // This method is reserved and may change its name at any time without prior notice.
93         //
94         // @since               2.0
95         //
96         virtual void IPlayerVideoEventListener_Reserved2(void) {}
97
98 };
99
100 }}// Tizen::Media
101
102 #endif