gstvaapidecoder_dpb.h 2.36 KB
Newer Older
1 2 3
/*
 *  gstvaapidecoder_dpb.h - Decoded Picture Buffer
 *
4
 *  Copyright (C) 2012-2013 Intel Corporation
5
 *    Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public License
 *  as published by the Free Software Foundation; either version 2.1
 *  of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU Lesser General Public
 *  License along with this library; if not, write to the Free
 *  Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 *  Boston, MA 02110-1301 USA
 */

#ifndef GST_VAAPI_DECODER_DPB_H
#define GST_VAAPI_DECODER_DPB_H

#include <gst/vaapi/gstvaapidecoder_objects.h>

G_BEGIN_DECLS

typedef struct _GstVaapiDpb             GstVaapiDpb;
typedef struct _GstVaapiDpbClass        GstVaapiDpbClass;

/* ------------------------------------------------------------------------- */
34
/* --- Decoded Picture Buffer                                            --- */
35 36
/* ------------------------------------------------------------------------- */

37
#define GST_VAAPI_DPB(obj) \
38 39 40
    ((GstVaapiDpb *)(obj))

#define GST_VAAPI_IS_DPB(obj) \
41
    (GST_VAAPI_DPB(obj) != NULL)
42

43 44 45 46
G_GNUC_INTERNAL
GstVaapiDpb *
gst_vaapi_dpb_new(guint max_pictures);

47
G_GNUC_INTERNAL
48
void
49
gst_vaapi_dpb_flush(GstVaapiDpb *dpb);
50

51
G_GNUC_INTERNAL
52
gboolean
53
gst_vaapi_dpb_add(GstVaapiDpb *dpb, GstVaapiPicture *picture);
54

55
G_GNUC_INTERNAL
56
guint
57
gst_vaapi_dpb_size(GstVaapiDpb *dpb);
58

59 60 61 62 63 64 65 66 67
G_GNUC_INTERNAL
void
gst_vaapi_dpb_get_neighbours(
    GstVaapiDpb        *dpb,
    GstVaapiPicture    *picture,
    GstVaapiPicture   **prev_picture_ptr,
    GstVaapiPicture   **next_picture_ptr
);

68 69 70 71 72 73 74 75 76
#define gst_vaapi_dpb_ref(dpb) \
    gst_vaapi_mini_object_ref(GST_VAAPI_MINI_OBJECT(dpb))

#define gst_vaapi_dpb_unref(dpb) \
    gst_vaapi_mini_object_unref(GST_VAAPI_MINI_OBJECT(dpb))

#define gst_vaapi_dpb_replace(old_dpb_ptr, new_dpb) \
    gst_vaapi_mini_object_replace((GstVaapiMiniObject **)(old_dpb_ptr), \
        (GstVaapiMiniObject *)(new_dpb))
77 78 79 80

G_END_DECLS

#endif /* GST_VAAPI_DECODER_DPB */