package vendor.hardware.hwnxmediaplayerhal@1.0; //import IMediaCallBack; //import android.hardware.graphics.bufferqueue@2.0::IGraphicBufferProducer; interface INxPlayerMetadata { /** *Sets the data source as a content Url *@param url the Content URI of the data you want to get metadata *@param headers the headers to be sent together with the request for the data *@return ret 0, success * !0 fail */ setDataSourceUrl(string url, vec
headers) generates (int32_t ret); /** *Set fd data source to play *@param fdHandle the fdHandle for the file you want to get metadata *@param offset the offset into the file where the data to get metadata, in bytes *@param length the length in bytes of the data to get metadata *@return ret 0, success * !0 fail */ setDataSourceFd(handle fdHandle, int64_t offset, int64_t length) generates (int32_t ret); /** *get frame associated with time *@param timeUs The time position where the frame will be retrieved *@param option a hint on how the frame is found *@param colorFormat colorFormat of frame *@param metaOnly whether extract metadata only *@return ret 0, success * !0 fail *@return pic picture data */ getFrameAtTime(int64_t timeUs, int32_t option, int32_t colorFormat, bool metaOnly) generates (int32_t ret, MediaBuffer pic); /** *get frame associated with time *@param index 0-based index of the image *@param colorFormat colorFormat of frame *@param metaOnly whether extract metadata only *@param thumbnail whether thumbnail *@return ret 0, success * !0 fail *@return pic picture data */ getImageAtIndex(int32_t index, int32_t colorFormat, int32_t metaOnly, int32_t thumbnail) generates (int32_t ret, MediaBuffer pic); /** *retrieves a still image by its index with special rect *@param index 0-based index of the image *@param colorFormat colorFormat of frame *@param left left margin of image rect *@param top top margin of image rect *@param right right margin of image rect *@param bottom bottom margin of image rect *@return ret 0, success * !0 fail *@return pic picture data */ getImageRectAtIndex(int32_t index, int32_t colorFormat, int32_t left, int32_t top, int32_t right, int32_t bottom) generates (int32_t ret, MediaBuffer pic); /** *retrieves a video frame by its index *@param frameIndex frameIndex 0-based index of the video frame *@param numFrames extract many frames *@param colorFormat colorFormat of frame *@param metaOnly whether extract metadata only *@return ret 0, success * !0 fail *@return pic picture data */ getFrameAtIndex(int32_t frameIndex, int32_t numFrames, int32_t colorFormat, int32_t metaOnly) generates (int32_t ret, vec pic); /** *rretrieves the meta data value associated with the keyCode. *@param keyCode indicate which metadata we want *@return ret 0, success * !0 fail *@return metadata metadata returned */ extractMetadata(int32_t keyCode) generates (int32_t ret, string metadata); /** *retrieves albumart *@return ret 0, success * !0 fail *@return albumArtString albumArt returned */ extractAlbumArt() generates (int32_t ret, string albumArtString); };