summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-08 15:12:19 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-06-11 16:29:07 +0200
commitae2dd5d42b04e287f1200c049db0a6febd229dc0 (patch)
tree68c33baeb7d78d0cc058e3716dd6b0afadba1232 /libavcodec
parent324545d02f702de4c3c73962ef7059f8111c3138 (diff)
avcodec/v4l2_m2m: Remove unused ff_v4l2_m2m_codec_full_reinit
Unused since df701ed0b582a6b5c763310b4225446089cbcfb1. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/v4l2_m2m.c76
1 files changed, 0 insertions, 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;