mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-14 05:12:09 +00:00
v4l2videoenc: remove unnecessary processing variable and dead code
"processing" is only set to FALSE and never set to TRUE. Therefore, the code that depends on processing to be TRUE is never executed. Remove the dead code. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7543>
This commit is contained in:
parent
ee925c506c
commit
5d310062e8
2 changed files with 0 additions and 23 deletions
|
@ -222,7 +222,6 @@ gst_v4l2_video_enc_stop (GstVideoEncoder * encoder)
|
||||||
|
|
||||||
/* Should have been flushed already */
|
/* Should have been flushed already */
|
||||||
g_assert (g_atomic_int_get (&self->active) == FALSE);
|
g_assert (g_atomic_int_get (&self->active) == FALSE);
|
||||||
g_assert (g_atomic_int_get (&self->processing) == FALSE);
|
|
||||||
|
|
||||||
gst_v4l2_object_stop (self->v4l2output);
|
gst_v4l2_object_stop (self->v4l2output);
|
||||||
gst_v4l2_object_stop (self->v4l2capture);
|
gst_v4l2_object_stop (self->v4l2capture);
|
||||||
|
@ -317,19 +316,6 @@ gst_v4l2_video_enc_flush (GstVideoEncoder * encoder)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Flushing");
|
GST_DEBUG_OBJECT (self, "Flushing");
|
||||||
|
|
||||||
/* Ensure the processing thread has stopped for the reverse playback
|
|
||||||
* iscount case */
|
|
||||||
if (g_atomic_int_get (&self->processing)) {
|
|
||||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
|
||||||
|
|
||||||
gst_v4l2_object_unlock_stop (self->v4l2output);
|
|
||||||
gst_v4l2_object_unlock_stop (self->v4l2capture);
|
|
||||||
gst_pad_stop_task (encoder->srcpad);
|
|
||||||
|
|
||||||
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
self->output_flow = GST_FLOW_OK;
|
self->output_flow = GST_FLOW_OK;
|
||||||
|
|
||||||
gst_v4l2_object_unlock_stop (self->v4l2output);
|
gst_v4l2_object_unlock_stop (self->v4l2output);
|
||||||
|
@ -744,7 +730,6 @@ beach:
|
||||||
|
|
||||||
gst_buffer_replace (&buffer, NULL);
|
gst_buffer_replace (&buffer, NULL);
|
||||||
self->output_flow = ret;
|
self->output_flow = ret;
|
||||||
g_atomic_int_set (&self->processing, FALSE);
|
|
||||||
gst_v4l2_object_unlock (self->v4l2output);
|
gst_v4l2_object_unlock (self->v4l2output);
|
||||||
gst_pad_pause_task (encoder->srcpad);
|
gst_pad_pause_task (encoder->srcpad);
|
||||||
}
|
}
|
||||||
|
@ -752,12 +737,6 @@ beach:
|
||||||
static void
|
static void
|
||||||
gst_v4l2_video_enc_loop_stopped (GstV4l2VideoEnc * self)
|
gst_v4l2_video_enc_loop_stopped (GstV4l2VideoEnc * self)
|
||||||
{
|
{
|
||||||
if (g_atomic_int_get (&self->processing)) {
|
|
||||||
GST_DEBUG_OBJECT (self, "Early stop of encoding thread");
|
|
||||||
self->output_flow = GST_FLOW_FLUSHING;
|
|
||||||
g_atomic_int_set (&self->processing, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "Encoding task destroyed: %s",
|
GST_DEBUG_OBJECT (self, "Encoding task destroyed: %s",
|
||||||
gst_flow_get_name (self->output_flow));
|
gst_flow_get_name (self->output_flow));
|
||||||
|
|
||||||
|
@ -911,7 +890,6 @@ start_task_failed:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
GST_ELEMENT_ERROR (self, RESOURCE, FAILED,
|
||||||
(_("Failed to start encoding thread.")), (NULL));
|
(_("Failed to start encoding thread.")), (NULL));
|
||||||
g_atomic_int_set (&self->processing, FALSE);
|
|
||||||
ret = GST_FLOW_ERROR;
|
ret = GST_FLOW_ERROR;
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,6 @@ struct _GstV4l2VideoEnc
|
||||||
/* State */
|
/* State */
|
||||||
GstVideoCodecState *input_state;
|
GstVideoCodecState *input_state;
|
||||||
gboolean active;
|
gboolean active;
|
||||||
gboolean processing;
|
|
||||||
GstFlowReturn output_flow;
|
GstFlowReturn output_flow;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue