diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2006-04-30 23:08:00 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2006-04-30 23:08:00 -0400 |
commit | 02fcdd405f0481e03cf7f88ceaf7c6fd8b981b49 (patch) | |
tree | bed0dcddfd6b657f806bfe8ab463916ac836c43a /linux/drivers/media/video/cx88/cx88-blackbird.c | |
parent | d87d50340954274680b7a58726fec2a6e97ab847 (diff) | |
download | mediapointer-dvb-s2-02fcdd405f0481e03cf7f88ceaf7c6fd8b981b49.tar.gz mediapointer-dvb-s2-02fcdd405f0481e03cf7f88ceaf7c6fd8b981b49.tar.bz2 |
cx88-blackbird: pause the encoder during frequency change
From: Valentin Zagura <puthre@gmail.com>
Added code to cx88-blackbird.c to treat the VIDIOC_S_FREQUENCY ioctl
to stop mpeg stream before changing the frequency and restart it after.
It seems that the mpeg stream needs to be paused while changing the
channel frequency, otherwise the mpeg encoder enters into a bad state,
producing artifacts.
Signed-off-by: Valentin Zagura <puthre@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-blackbird.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-blackbird.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index 353dff4b4..844115b35 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -1489,6 +1489,20 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file, blackbird_set_params(dev, f); return 0; } + case VIDIOC_S_FREQUENCY: + { + blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0, + BLACKBIRD_END_NOW, + BLACKBIRD_MPEG_CAPTURE, + BLACKBIRD_RAW_BITS_NONE); + + cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook ); + + blackbird_initialize_codec(dev); + cx88_set_scale(dev->core, dev->width, dev->height, + fh->mpegq.field); + return 0; + } default: return cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook ); |