2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
19 * @file FMediaIPlayerVideoEventListener.h
20 * @brief This is the header file for the %IPlayerVideoEventListener interface.
22 * This header file contains the declarations of the %IPlayerVideoEventListener interface.
25 #ifndef _FMEDIA_IPLAYER_VIDEO_EVENT_LISTENER_H_
26 #define _FMEDIA_IPLAYER_VIDEO_EVENT_LISTENER_H_
28 #include <FBaseRtIEventListener.h>
29 #include <FBaseDataType.h>
30 #include <FGrpDimension.h>
31 #include <FGrpBitmapCommon.h>
32 #include <FMediaPlayerTypes.h>
34 namespace Tizen { namespace Media
38 * @interface IPlayerVideoEventListener
39 * @brief This interface provides a listener for the video event.
43 * The %IPlayerVideoEventListener interface specifies the method used to get the decoded video frame.
46 class _OSP_EXPORT_ IPlayerVideoEventListener
47 : virtual public Tizen::Base::Runtime::IEventListener
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.
56 virtual ~IPlayerVideoEventListener(void) {}
59 * Called when the video frame is decoded asynchronously.
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.
74 * @see Player::PlayAndPause()
75 * @see Player::SeekTo()
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;
81 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
83 // This method is reserved and may change its name at any time without prior notice.
87 virtual void IPlayerVideoEventListener_Reserved1(void) {}
90 // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
92 // This method is reserved and may change its name at any time without prior notice.
96 virtual void IPlayerVideoEventListener_Reserved2(void) {}