[Spice-devel] [PATCH v6 16/26] server: Give up after a while if GStreamer cannot handle the video
Francois Gouget
fgouget at codeweavers.com
Mon Oct 26 07:26:18 PDT 2015
On Thu, 22 Oct 2015, Christophe Fergeau wrote:
[...]
> > @@ -1136,6 +1157,13 @@ static int gst_encoder_encode_frame(VideoEncoder *video_encoder,
> > if (rc == VIDEO_ENCODER_FRAME_ENCODE_DONE) {
> > rc = pull_compressed_buffer(encoder, video_buffer);
> > #ifdef DO_ZERO_COPY
> > + if (rc != VIDEO_ENCODER_FRAME_ENCODE_DONE) {
> > + /* The input buffer will be stuck in the pipeline, preventing later
> > + * ones from being processed. So reset the pipeline.
> > + */
> > + reset_pipeline(encoder);
> > + encoder->errors++;
>
> Maybe increase the errors in pull_compressed_buffer() ?
All the encoding errors eventually bubble up to
gst_encoder_encode_frame() which is where they are caught, tallied and
dealt with. So I think it makes more sense to keep that line here.
--
Francois Gouget <fgouget at codeweavers.com>
More information about the Spice-devel
mailing list