* 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 */
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))
}
}
- /* 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);
}
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 {
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))
}
}
- /* 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);
}
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 {