mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
nvenc: Remove unused member variables
Supported interlace-mode and codec profiles are checked during plugin init and those values are never used.
This commit is contained in:
parent
eba4e7e989
commit
b43d0f785c
5 changed files with 0 additions and 64 deletions
|
@ -97,10 +97,6 @@ typedef struct {
|
|||
* while we wait */
|
||||
GThread *bitstream_thread;
|
||||
|
||||
/* supported interlacing input modes.
|
||||
* 0 = none, 1 = fields, 2 = interleaved */
|
||||
gint interlace_modes;
|
||||
|
||||
void *display; /* GstGLDisplay */
|
||||
void *other_context; /* GstGLContext */
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@ gst_nv_h264_enc_finalize (GObject * obj)
|
|||
static gboolean
|
||||
gst_nv_h264_enc_open (GstVideoEncoder * enc)
|
||||
{
|
||||
GstNvH264Enc *nvenc = GST_NV_H264_ENC (enc);
|
||||
GstNvBaseEnc *base = GST_NV_BASE_ENC (enc);
|
||||
|
||||
if (!GST_VIDEO_ENCODER_CLASS (gst_nv_h264_enc_parent_class)->open (enc))
|
||||
|
@ -117,31 +116,12 @@ gst_nv_h264_enc_open (GstVideoEncoder * enc)
|
|||
}
|
||||
}
|
||||
|
||||
/* query supported input formats */
|
||||
nvenc->supported_profiles =
|
||||
gst_nv_enc_get_supported_codec_profiles (base->encoder,
|
||||
NV_ENC_CODEC_H264_GUID);
|
||||
if (!nvenc->supported_profiles) {
|
||||
GST_WARNING_OBJECT (nvenc, "No supported encoding profiles");
|
||||
gst_nv_h264_enc_close (enc);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_nv_h264_enc_close (GstVideoEncoder * enc)
|
||||
{
|
||||
GstNvH264Enc *nvenc = GST_NV_H264_ENC (enc);
|
||||
|
||||
GST_OBJECT_LOCK (nvenc);
|
||||
if (nvenc->supported_profiles)
|
||||
g_value_unset (nvenc->supported_profiles);
|
||||
g_free (nvenc->supported_profiles);
|
||||
nvenc->supported_profiles = NULL;
|
||||
GST_OBJECT_UNLOCK (nvenc);
|
||||
|
||||
return GST_VIDEO_ENCODER_CLASS (gst_nv_h264_enc_parent_class)->close (enc);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,16 +37,6 @@
|
|||
|
||||
typedef struct {
|
||||
GstNvBaseEnc base_nvenc;
|
||||
|
||||
/* the supported input formats */
|
||||
GValue * supported_profiles; /* OBJECT LOCK */
|
||||
|
||||
GstVideoCodecState *input_state;
|
||||
gboolean gl_input;
|
||||
|
||||
/* supported interlacing input modes.
|
||||
* 0 = none, 1 = fields, 2 = interleaved */
|
||||
gint interlace_modes;
|
||||
} GstNvH264Enc;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -94,7 +94,6 @@ gst_nv_h265_enc_finalize (GObject * obj)
|
|||
static gboolean
|
||||
gst_nv_h265_enc_open (GstVideoEncoder * enc)
|
||||
{
|
||||
GstNvH265Enc *nvenc = GST_NV_H265_ENC (enc);
|
||||
GstNvBaseEnc *base = GST_NV_BASE_ENC (enc);
|
||||
|
||||
if (!GST_VIDEO_ENCODER_CLASS (gst_nv_h265_enc_parent_class)->open (enc))
|
||||
|
@ -118,31 +117,12 @@ gst_nv_h265_enc_open (GstVideoEncoder * enc)
|
|||
}
|
||||
}
|
||||
|
||||
/* query supported input formats */
|
||||
nvenc->supported_profiles =
|
||||
gst_nv_enc_get_supported_codec_profiles (base->encoder,
|
||||
NV_ENC_CODEC_HEVC_GUID);
|
||||
if (!nvenc->supported_profiles) {
|
||||
GST_WARNING_OBJECT (nvenc, "No supported encoding profiles");
|
||||
gst_nv_h265_enc_close (enc);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_nv_h265_enc_close (GstVideoEncoder * enc)
|
||||
{
|
||||
GstNvH265Enc *nvenc = GST_NV_H265_ENC (enc);
|
||||
|
||||
GST_OBJECT_LOCK (nvenc);
|
||||
if (nvenc->supported_profiles)
|
||||
g_value_unset (nvenc->supported_profiles);
|
||||
g_free (nvenc->supported_profiles);
|
||||
nvenc->supported_profiles = NULL;
|
||||
GST_OBJECT_UNLOCK (nvenc);
|
||||
|
||||
return GST_VIDEO_ENCODER_CLASS (gst_nv_h265_enc_parent_class)->close (enc);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,16 +38,6 @@
|
|||
|
||||
typedef struct {
|
||||
GstNvBaseEnc base_nvenc;
|
||||
|
||||
/* the supported input formats */
|
||||
GValue * supported_profiles; /* OBJECT LOCK */
|
||||
|
||||
GstVideoCodecState *input_state;
|
||||
gboolean gl_input;
|
||||
|
||||
/* supported interlacing input modes.
|
||||
* 0 = none, 1 = fields, 2 = interleaved */
|
||||
gint interlace_modes;
|
||||
} GstNvH265Enc;
|
||||
|
||||
typedef struct {
|
||||
|
|
Loading…
Reference in a new issue