SysTryReturn(NID_MEDIA, r == E_SUCCESS, null, r, "[%s] Propagated. ", GetErrorMessage(r));
pBuf.get()->Flip();
- r = __pGifDecoder->GetValue(String("duration"), longValue);
+ r = GetValue(String("duration"), longValue);
SysTryReturn(NID_MEDIA, r == E_SUCCESS, null, r,
"[%s] dec.GetValue(duration)", GetErrorMessage(r));
duration = longValue.ToLong();
return pBitmap.release();
}
+result
+_GifDecoderImpl::GetValue(const Tizen::Base::String& key, Tizen::Base::Object &value)
+{
+ result r = E_SUCCESS;
+ if (key.Equals(L"duration", false))
+ {
+ Long *pLong = null;
+ pLong = dynamic_cast<Long*>(&value);
+
+ SysTryReturn(NID_MEDIA, pLong, E_INVALID_ARG, E_INVALID_ARG, "value is not a Long");
+ pLong->value = __pGifDecoder->GetDuration();
+ }
+ else
+ {
+ r = E_OBJ_NOT_FOUND;
+ }
+ return r;
+}
}} // Tizen::Media
* The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Graphics::Bitmap* GetNextBitmapN(long& duration, Tizen::Graphics::BufferScaling bufferScaling = Tizen::Graphics::BUFFER_SCALING_AUTO);
+
+ /**
+ * Gets the value of given key.
+ *
+ * @return An error code
+ * @param[in] key The key of the value.
+ * @param[out] value The output value.
+ * @exception E_SUCCESS The method is successful.
+ * @exception E_INVALID_ARG The input parameter is invalid.
+ * @exception E_UNSUPPORTED_OPERATION This method is unsupported.
+ */
+ result GetValue(const Tizen::Base::String& key, Tizen::Base::Object &value);
+
private:
_GifDecoderImpl(const _GifDecoderImpl& rhs);
_GifDecoderImpl& operator =(const _GifDecoderImpl& rhs);