1 /* GStreamer NVENC plugin 2 * Copyright (C) 2015 Centricular Ltd 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __GST_NVENC_H_INCLUDED__ 21 #define __GST_NVENC_H_INCLUDED__ 22 23 #include <gst/gst.h> 24 #include <gst/video/video.h> 25 26 #include "gstcudaloader.h" 27 #include "nvEncodeAPI.h" 28 29 gboolean gst_nvenc_cmp_guid (GUID g1, GUID g2); 30 31 NV_ENC_BUFFER_FORMAT gst_nvenc_get_nv_buffer_format (GstVideoFormat fmt); 32 33 gboolean gst_nvenc_get_supported_input_formats (gpointer encoder, 34 GUID codec_id, 35 GValue ** formats); 36 37 GValue * gst_nvenc_get_interlace_modes (gpointer enc, 38 GUID codec_id); 39 40 GValue * gst_nvenc_get_supported_codec_profiles (gpointer enc, 41 GUID codec_id); 42 43 void gst_nvenc_plugin_init (GstPlugin * plugin, 44 guint device_index, 45 CUcontext cuda_ctx); 46 47 guint32 gst_nvenc_get_api_version (void); 48 49 guint32 gst_nvenc_get_caps_param_version (void); 50 51 guint32 gst_nvenc_get_encode_out_params_version (void); 52 53 guint32 gst_nvenc_get_create_input_buffer_version (void); 54 55 guint32 gst_nvenc_get_create_bitstream_buffer_version (void); 56 57 guint32 gst_nvenc_get_create_mv_buffer_version (void); 58 59 guint32 gst_nvenc_get_rc_params_version (void); 60 61 guint32 gst_nvenc_get_config_version (void); 62 63 guint32 gst_nvenc_get_initialize_params_version (void); 64 65 guint32 gst_nvenc_get_reconfigure_params_version (void); 66 67 guint32 gst_nvenc_get_preset_config_version (void); 68 69 guint32 gst_nvenc_get_pic_params_version (void); 70 71 guint32 gst_nvenc_get_meonly_params_version (void); 72 73 guint32 gst_nvenc_get_lock_bitstream_version (void); 74 75 guint32 gst_nvenc_get_lock_input_buffer_version (void); 76 77 guint32 gst_nvenc_get_map_input_resource_version (void); 78 79 guint32 gst_nvenc_get_register_resource_version (void); 80 81 guint32 gst_nvenc_get_stat_version (void); 82 83 guint32 gst_nvenc_get_sequence_param_payload_version (void); 84 85 guint32 gst_nvenc_get_event_params_version (void); 86 87 guint32 gst_nvenc_get_open_encode_session_ex_params_version (void); 88 89 gboolean gst_nvenc_load_library (guint * api_major_ver, 90 guint * api_minor_ver); 91 92 #endif /* __GST_NVENC_H_INCLUDED__ */ 93