2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 FGrpVideoTexture.cpp
20 * @brief This is the implementation file for VideoTexture class.
26 #include <FGrpVideoTexture.h>
27 #include <FBaseSysLog.h>
29 #include "FGrp_VideoTextureImpl.h"
31 namespace Tizen { namespace Graphics { namespace Opengl
34 VideoTexture::VideoTexture(void)
35 : __pImpl(new (std::nothrow)_VideoTextureImpl)
39 VideoTexture::~VideoTexture(void)
45 VideoTexture::Construct(int textureId, int width, int height)
47 SysAssertf(this->__pImpl != null, "Not yet constructed. Construct() should be called before use.");
48 result r = this->__pImpl->Construct(textureId, width, height);
49 SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
54 VideoTexture::BindTexture(void)
56 SysAssertf(this->__pImpl != null, "Not yet constructed. Construct() should be called before use.");
57 result r = this->__pImpl->BindTexture();
58 SysTryReturn(NID_GRP, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
63 VideoTexture::AddVideoTextureUpdateListener(IVideoTextureUpdateListener& listener)
65 SysAssertf(this->__pImpl != null, "Not yet constructed. Construct() should be called before use.");
66 this->__pImpl->AddVideoTextureUpdateListener(listener, this);
70 VideoTexture::RemoveVideoTextureUpdateListener(IVideoTextureUpdateListener& listener)
72 SysAssertf(this->__pImpl != null, "Not yet constructed. Construct() should be called before use.");
73 this->__pImpl->RemoveVideoTextureUpdateListener(listener);
76 }}} // Tizen::Graphics