1 /*
2 * Copyright (c) 2019, 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 //! \file     decode_marker.h
24 //! \brief    Defines the common interface for decode marker
25 //! \details  The decode marker interface implements the decode marker feature.
26 //!
27 #ifndef __DECODE_MARKER_H__
28 #define __DECODE_MARKER_H__
29 
30 #include "codec_def_decode.h"
31 #include "decode_allocator.h"
32 #include "media_feature.h"
33 #include "codec_hw_next.h"
34 
35 namespace decode {
36 
37 class DecodeMarker: public MediaFeature
38 {
39 public:
40     //!
41     //! \brief  Decode marker constructor
42     //! \param  [in] allocator
43     //!         Reference to decode allocator
44     //!
45     DecodeMarker(DecodeAllocator& allocator);
46 
47     //!
48     //! \brief  Decode marker destructor
49     //!
50     virtual ~DecodeMarker();
51 
52     //!
53     //! \brief  Update decode predication
54     //! \param  [in] params
55     //!         Reference to CodechalDecodeParams
56     //! \return MOS_STATUS
57     //!         MOS_STATUS_SUCCESS if success, else fail reason
58     //!
59     virtual MOS_STATUS Update(void *params) override;
60 
61     bool            m_setMarkerEnabled = false;   //!< Indicates whether or not SetMarker is enabled
62     PMOS_BUFFER     m_markerBuffer     = nullptr; //!< Resource for SetMarker
63     uint32_t        m_setMarkerNumTs   = 0;       //!< Number Timestamp for SetMarker
64 
65 protected:
66     DecodeAllocator* m_allocator;                 //!< Decode allocator
67 
68 MEDIA_CLASS_DEFINE_END(decode__DecodeMarker)
69 };
70 
71 }//decode
72 
73 #endif // !__DECODE_MARKER_H__
74