[FFmpeg-cvslog] avcodec/v4l2_m2m: Remove unused ff_v4l2_m2m_codec_full_reinit
Andreas Rheinhardt
git at videolan.org
Sat Jun 11 23:52:59 EEST 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Jun 8 15:12:19 2022 +0200| [ae2dd5d42b04e287f1200c049db0a6febd229dc0] | committer: Andreas Rheinhardt
avcodec/v4l2_m2m: Remove unused ff_v4l2_m2m_codec_full_reinit
Unused since df701ed0b582a6b5c763310b4225446089cbcfb1.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae2dd5d42b04e287f1200c049db0a6febd229dc0
---
libavcodec/v4l2_m2m.c | 76 ---------------------------------------------------
1 file changed, 76 deletions(-)
diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
index 3178ef06b8..51932baf84 100644
--- a/libavcodec/v4l2_m2m.c
+++ b/libavcodec/v4l2_m2m.c
@@ -244,82 +244,6 @@ int ff_v4l2_m2m_codec_reinit(V4L2m2mContext *s)
return 0;
}
-int ff_v4l2_m2m_codec_full_reinit(V4L2m2mContext *s)
-{
- void *log_ctx = s->avctx;
- int ret;
-
- av_log(log_ctx, AV_LOG_DEBUG, "%s full reinit\n", s->devname);
-
- /* wait for pending buffer references */
- if (atomic_load(&s->refcount))
- while(sem_wait(&s->refsync) == -1 && errno == EINTR);
-
- ret = ff_v4l2_context_set_status(&s->output, VIDIOC_STREAMOFF);
- if (ret) {
- av_log(log_ctx, AV_LOG_ERROR, "output VIDIOC_STREAMOFF\n");
- goto error;
- }
-
- ret = ff_v4l2_context_set_status(&s->capture, VIDIOC_STREAMOFF);
- if (ret) {
- av_log(log_ctx, AV_LOG_ERROR, "capture VIDIOC_STREAMOFF\n");
- goto error;
- }
-
- /* release and unmmap the buffers */
- ff_v4l2_context_release(&s->output);
- ff_v4l2_context_release(&s->capture);
-
- /* start again now that we know the stream dimensions */
- s->draining = 0;
- s->reinit = 0;
-
- ret = ff_v4l2_context_get_format(&s->output, 0);
- if (ret) {
- av_log(log_ctx, AV_LOG_DEBUG, "v4l2 output format not supported\n");
- goto error;
- }
-
- ret = ff_v4l2_context_get_format(&s->capture, 0);
- if (ret) {
- av_log(log_ctx, AV_LOG_DEBUG, "v4l2 capture format not supported\n");
- goto error;
- }
-
- ret = ff_v4l2_context_set_format(&s->output);
- if (ret) {
- av_log(log_ctx, AV_LOG_ERROR, "can't set v4l2 output format\n");
- goto error;
- }
-
- ret = ff_v4l2_context_set_format(&s->capture);
- if (ret) {
- av_log(log_ctx, AV_LOG_ERROR, "can't to set v4l2 capture format\n");
- goto error;
- }
-
- ret = ff_v4l2_context_init(&s->output);
- if (ret) {
- av_log(log_ctx, AV_LOG_ERROR, "no v4l2 output context's buffers\n");
- goto error;
- }
-
- /* decoder's buffers need to be updated at a later stage */
- if (s->avctx && !av_codec_is_decoder(s->avctx->codec)) {
- ret = ff_v4l2_context_init(&s->capture);
- if (ret) {
- av_log(log_ctx, AV_LOG_ERROR, "no v4l2 capture context's buffers\n");
- goto error;
- }
- }
-
- return 0;
-
-error:
- return ret;
-}
-
static void v4l2_m2m_destroy_context(void *opaque, uint8_t *context)
{
V4L2m2mContext *s = (V4L2m2mContext*)context;
More information about the ffmpeg-cvslog
mailing list