[vlc-devel] [PATCH] [WIP] mediacodec: implementation of MediaCodec direct rendering based on the work by Martin Storsjö.
Felix Abecassis
felix.abecassis at gmail.com
Tue Nov 12 10:26:50 CET 2013
Thanks for your comments, I'm currently working on a bug with direct
rendering on the Nexus 5. When it is solved I will send an updated version
based the feedbacks I got.
I also forgot that you also need to patch android.git for my patch to
compile:
https://github.com/mstorsjo/vlc-android/commit/43a8a1c217717e5dba627dea46a6900c72d43244.patch
2013/11/6 Rémi Denis-Courmont <remi at remlab.net>
>
> This is not good. The decoder might be destroyed or even replaced while the
> picture is still in flight.
>
To solve this issue I would like to have a counter tracking the number of
pictures that are currently in flight (filled by the decoder but not yet
displayed) and wait on this counter in Close(). Do I have the guarantee
that all pictures that are sent to the vout are actually displayed?
>
> > + uint32_t i_index;
> > + int b_displayed;
> > +};
> > diff --git a/modules/video_output/Modules.am
> > b/modules/video_output/Modules.am index 041dc29..e29c4ec 100644
> > --- a/modules/video_output/Modules.am
> > +++ b/modules/video_output/Modules.am
> > @@ -13,6 +13,7 @@ SOURCES_vout_macosx = macosx.m opengl.h opengl.c
> > SOURCES_vout_coregraphicslayer = coregraphicslayer.m
> > SOURCES_vout_ios2 = ios2.m opengl.h opengl.c
> > SOURCES_android_surface = androidsurface.c
> > +SOURCES_android_surface_opaque = androidsurface_opaque.c
> >
> > if HAVE_DECKLINK
> > libdecklinkoutput_plugin_la_SOURCES = decklink.cpp
> > diff --git a/modules/video_output/androidsurface_opaque.c
> > b/modules/video_output/androidsurface_opaque.c new file mode 100644
> > index 0000000..a8639a4
> > --- /dev/null
> > +++ b/modules/video_output/androidsurface_opaque.c
> > @@ -0,0 +1,203 @@
> >
> +/**************************************************************************
> > *** + * androidsurface_opaque.c: Video output module using direct
> rendering
> > with + * opaque buffers
> > +
> >
> ***************************************************************************
> > ** + * Copyright (C) 2013 Felix Abecassis
> > + *
> > + * Authors: Felix Abecassis <felix.abecassis at gmail.com>
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> it
> > + * under the terms of the GNU Lesser General Public License as
> published by
> > + * the Free Software Foundation; either version 2.1 of the License, or
> + *
> > (at your option) any later version.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> > + * GNU Lesser General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU Lesser General Public
> License
> > + * along with this program; if not, write to the Free Software
> Foundation,
> > + * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. +
> >
> ***************************************************************************
> > **/ +
> > +#ifdef HAVE_CONFIG_H
> > +# include "config.h"
> > +#endif
> > +
> > +#include <vlc_common.h>
> > +#include <vlc_plugin.h>
> > +#include <vlc_vout_display.h>
> > +#include <vlc_picture_pool.h>
> > +#include "../../codec/omxil/android_mediacodec.h"
> > +
> > +static int Open (vlc_object_t *);
> > +static void Close(vlc_object_t *);
> > +
> > +vlc_module_begin()
> > + set_category(CAT_VIDEO)
> > + set_subcategory(SUBCAT_VIDEO_VOUT)
> > + set_shortname("vout_mediacodec")
> > + set_description(N_("Android MediaCodec direct rendering video
> output"))
> > + set_capability("vout display", 200)
> > + set_callbacks(Open, Close)
> > +vlc_module_end()
> > +
> >
> +/**************************************************************************
> > *** + * Local prototypes
> > +
> >
> ***************************************************************************
> > **/ +
> > +static picture_pool_t *Pool (vout_display_t *, unsigned);
> > +static void Display(vout_display_t *, picture_t *,
> subpicture_t
> > *); +static int Control(vout_display_t *, int, va_list);
> > +
> > +struct vout_display_sys_t
> > +{
> > + picture_pool_t *pool;
> > + video_format_t fmt;
>
> Write-only?
>
I'm sorry, I didn't understand. What do you mean?
--
Félix Abecassis
http://felix.abecassis.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20131112/ca100c17/attachment.html>
More information about the vlc-devel
mailing list