Home | History | Annotate | Download | only in mediaeditor
      1 /*
      2  * Copyright (C) 2011 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef VIDEOEDITOR_THUMBNAIL_MAIN_H
     18 #define VIDEOEDITOR_THUMBNAIL_MAIN_H
     19 
     20 /**
     21  ************************************************************************
     22  * @file        VideoEditorThumbnailMain.h
     23  * @brief       Thumbnail extract interface.
     24  ************************************************************************
     25 */
     26 
     27 /**
     28  ************************************************************************
     29  * @brief    Interface to open a Thumbnail session.
     30  * @param    pContext   (OUT)   Thumbnail Context.
     31  * @param    pString    (IN)    File path from which thumbnail will be
     32  *                              retrieved
     33  * @param    M4OSA_Bool (IN)    true if this is for rendering at native layer.
     34  ************************************************************************
     35 */
     36 M4OSA_ERR ThumbnailOpen(M4OSA_Context *pPContext,
     37                   const M4OSA_Char *pString,
     38                   M4OSA_Bool bRender);
     39 
     40 /**
     41  ************************************************************************
     42  * @brief    Interface to retrieve a RGB888 format thumbnail pixels
     43  * @param    pContext   (IN)    Thumbnail Context.
     44  * @param    pixelArray (OUT)   Pointer to array in which pixels data to return
     45  * @param    width      (IN)    Width of thumbnail
     46  * @param    height     (IN)    Height of thumbnail
     47  * @param    pTimeMS    (IN/OUT)Time stamp at which thumbnail is retrieved.
     48  ************************************************************************
     49 */
     50 M4OSA_ERR ThumbnailGetPixels32(const M4OSA_Context pContext,
     51                              M4OSA_Int32* pixelArray, M4OSA_UInt32 width,
     52                              M4OSA_UInt32 height, M4OSA_UInt32 *timeMS,
     53                              M4OSA_UInt32 tolerance);
     54 
     55 /**
     56  ************************************************************************
     57  * @brief    Interface to retrieve a RGB565 format thumbnail pixels
     58  * @param    pContext   (IN)    Thumbnail Context.
     59  * @param    pixelArray (OUT)   Pointer to array in which pixcel data to return
     60  * @param    width      (IN)    Width of thumbnail
     61  * @param    height     (IN)    Height of thumbnail
     62  * @param    pTimeMS    (IN/OUT)Time stamp at which thumbnail is retrieved.
     63  ************************************************************************
     64 */
     65 M4OSA_ERR ThumbnailGetPixels16(const M4OSA_Context pContext,
     66                              M4OSA_Int16* pixelArray, M4OSA_UInt32 width,
     67                              M4OSA_UInt32 height, M4OSA_UInt32 *timeMS,
     68                              M4OSA_UInt32 tolerance);
     69 
     70 /**
     71  ************************************************************************
     72  * @brief    Interface to close the Thumbnail session.
     73  * @param    pContext   (IN)    Thumbnail Context.
     74  ************************************************************************
     75 */
     76 void ThumbnailClose(const M4OSA_Context pContext);
     77 
     78 #endif // VIDEOEDITOR_THUMBNAIL_MAIN_H
     79