diff options
author | Mike Isely <isely@pobox.com> | 2010-02-06 02:10:38 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 15:11:05 -0300 |
commit | 6e9313755aacdb9fd4eec58cbd9653212e2e2cdc (patch) | |
tree | cb43fe2414bf378c483d36aab3256a8f7472e20c /drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | |
parent | 7cae112ebe10e186c3bdae1f20865941717e37a2 (diff) |
V4L/DVB: pvrusb2: Enforce a 300msec stabilization interval during stream strart
Martin Dauskardt <martin.dauskardt@gmx.de> has determined that the
encoder has a much better chance of starting cleanly if we
deliberately hold off starting it util the video digitizer has had a
chance to run for at least 300msec first. These changes implement an
enforced 300msec wait in the state machine that orchestrates streaming
start / stop.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h index de5485f506b..cb4057bb07a 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h @@ -233,8 +233,9 @@ struct pvr2_hdw { int state_encoder_waitok; /* Encoder pre-wait done */ int state_encoder_runok; /* Encoder has run for >= .25 sec */ int state_decoder_run; /* Decoder is running */ + int state_decoder_ready; /* Decoder is stabilized & streamable */ int state_usbstream_run; /* FX2 is streaming */ - int state_decoder_quiescent; /* Decoder idle for > 50msec */ + int state_decoder_quiescent; /* Decoder idle for minimal interval */ int state_pipeline_config; /* Pipeline is configured */ int state_pipeline_req; /* Somebody wants to stream */ int state_pipeline_pause; /* Pipeline must be paused */ @@ -255,9 +256,16 @@ struct pvr2_hdw { void (*state_func)(void *); void *state_data; - /* Timer for measuring decoder settling time */ + /* Timer for measuring required decoder settling time before we're + allowed to fire it up again. */ struct timer_list quiescent_timer; + /* Timer for measuring decoder stabilization time, which is the + amount of time we need to let the decoder run before we can + trust its output (otherwise the encoder might see garbage and + then fail to start correctly). */ + struct timer_list decoder_stabilization_timer; + /* Timer for measuring encoder pre-wait time */ struct timer_list encoder_wait_timer; |