1 /* 2 * Copyright (c) 2018-2021, Intel Corporation 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included 12 * in all copies or substantial portions of the Software. 13 * 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 * OTHER DEALINGS IN THE SOFTWARE. 21 */ 22 23 //! 24 //! \file media_scalability_singlepipe.h 25 //! \brief Defines the common interface for media scalability singlepipe mode. 26 //! \details The media scalability singlepipe interface is further sub-divided by component, 27 //! this file is for the base interface which is shared by all components. 28 //! 29 30 #ifndef __MEDIA_SCALABILITY_SINGLEPIPE_H__ 31 #define __MEDIA_SCALABILITY_SINGLEPIPE_H__ 32 #include <stdint.h> 33 #include "mos_defs.h" 34 #include "mos_os_specific.h" 35 #include "media_scalability_singlepipe_next.h" 36 class MediaContext; 37 class MediaScalabilityOption; 38 class MhwMiInterface; 39 40 class MediaScalabilitySinglePipe : public MediaScalabilitySinglePipeNext 41 { 42 43 public: 44 //! 45 //! \brief Media scalability singlepipe constructor 46 //! \param [in] hwInterface 47 //! Pointer to HwInterface 48 //! \param [in] componentType 49 //! Component type 50 //! 51 MediaScalabilitySinglePipe(void *hwInterface, MediaContext *mediaContext, uint8_t componentType); 52 53 //! 54 //! \brief Media scalability singlepipe destructor 55 //! ~MediaScalabilitySinglePipe()56 virtual ~MediaScalabilitySinglePipe(){}; 57 58 //! 59 //! \brief Submit command buffer 60 //! \param [in, out] cmdBuffer 61 //! Pointer to command buffer 62 //! \return MOS_STATUS 63 //! MOS_STATUS_SUCCESS if success, else fail reason 64 //! 65 virtual MOS_STATUS SubmitCmdBuffer(PMOS_COMMAND_BUFFER cmdBuffer) override; 66 67 virtual MOS_STATUS Initialize(const MediaScalabilityOption &option) override; 68 69 //! 70 //! \brief Set hint parameters 71 //! \return MOS_STATUS 72 //! MOS_STATUS_SUCCESS if success, else fail reason 73 //! 74 virtual MOS_STATUS SetHintParams() override; 75 76 //! 77 //! \brief Destroy the media scalability 78 //! \return MOS_STATUS 79 //! MOS_STATUS_SUCCESS if success, else fail reason 80 //! 81 virtual MOS_STATUS Destroy() override; 82 83 protected: 84 MhwMiInterface * m_miInterface = nullptr; //!< Mi interface used to add BB end 85 MEDIA_CLASS_DEFINE_END(MediaScalabilitySinglePipe) 86 }; 87 88 #endif // !__MEDIA_SCALABILITY_SINGLEPIPE_LEGACY_H__ 89 90