/******************************************************************************\
|* Copyright (c) 2020 by VeriSilicon Holdings Co., Ltd. ("VeriSilicon")       *|
|* All Rights Reserved.                                                       *|
|*                                                                            *|
|* The material in this file is confidential and contains trade secrets of    *|
|* of VeriSilicon.  This is proprietary information owned or licensed by      *|
|* VeriSilicon.  No part of this work may be disclosed, reproduced, copied,   *|
|* transmitted, or used in any way for any purpose, without the express       *|
|* written permission of VeriSilicon.                                         *|
|*                                                                            *|
\******************************************************************************/

#pragma once

#include "common/interface.hpp"
#include <exa_ctrl/exa_ctrl_api.h>
#include <exa_ctrl/exa_ctrl_common.h>

struct Exa : ItfBufferCb, Ctrl {
  Exa();
  ~Exa();

  void bufferCb(MediaBuffer_t *) override;

  static void cbCompletion(exaCtrlCmdID_t, int32_t, void *);

  struct StartParam {
    exaCtrlSampleCb_t sampleCb;
    void *pSampleCbContext;
    uint8_t sampleSkip = 10;
  };

  int32_t start(void *) override;
  int32_t stop() override;

  exaCtrlHandle_t hCtrl = NULL;
};
