[Android] LibVLC: allow to force hw accel on unknow devices

Thomas Guillem thomas at gllm.fr
Thu Mar 23 08:15:22 CET 2017


Hello tommy,



This patch is not related to your issue. I didn't receive your samples.
This week, I'm working on improving mediacodec support, maybe this will
fix your issue (but you should give me your samples just in case).


Regards,





On Wed, Mar 22, 2017, at 18:48, Tommy Tran wrote:

> Thomas,

> 

> Will this address the GPU issue we talked earlier? I sent you 2 sample
> files over a week ago. I got a bounce back email saying it needed
> moderator approval and then nothing after that so I'm not sure if you
> received those sample files.
> 

> -Tommy

> 

> 

> On Wednesday, March 22, 2017 9:38 AM, Thomas Guillem
> <git at videolan.org> wrote:
> 

> 

> vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed
> Mar 22 17:36:38 2017 +0100| [8082f750420a6ea735f9e9c325c9ba0dfd54c541]
> | committer: Thomas Guillem
> 

> LibVLC: allow to force hw accel on unknow devices

> 

> Mainly for 4.2.x devices when the user asked for it.

> 

> > https://code.videolan.org/videolan/vlc-android/commit/8082f750420a6ea735f9e9c325c9ba0dfd54c541
> ---

> 

> libvlc/src/org/videolan/libvlc/Media.java | 9 ++++++---

> 1 file changed, 6 insertions(+), 3 deletions(-)

> 

> diff --git a/libvlc/src/org/videolan/libvlc/Media.java
> b/libvlc/src/org/videolan/libvlc/Media.java
> index 5a48be5..358a8f4 100644

> --- a/libvlc/src/org/videolan/libvlc/Media.java

> +++ b/libvlc/src/org/videolan/libvlc/Media.java

> @@ -735,12 +735,15 @@ public class Media extends
> VLCObject<Media.Event> {
>       * @param force force hw acceleration even for unknown devices

>       */

>      public void setHWDecoderEnabled(boolean enabled, boolean force) {
> -        final HWDecoderUtil.Decoder decoder = enabled ?

> +        HWDecoderUtil.Decoder decoder = enabled ?

>                  HWDecoderUtil.getDecoderFromDevice() :

>                  HWDecoderUtil.Decoder.NONE;

> 

> -        if (decoder == HWDecoderUtil.Decoder.NONE ||

> -                (decoder == HWDecoderUtil.Decoder.UNKNOWN && !force))
>                  {
> +        /* Unknown device but the user asked for hardware
>          acceleration */
> +        if (decoder == HWDecoderUtil.Decoder.UNKNOWN && force)

> +            decoder = HWDecoderUtil.Decoder.ALL;

> +

> +        if (decoder == HWDecoderUtil.Decoder.NONE || decoder ==
>          HWDecoderUtil.Decoder.UNKNOWN) {
>              addOption(":codec=all");

>              return;

>          }

> 

> _______________________________________________

> Android mailing list

> Android at videolan.org

> https://mailman.videolan.org/listinfo/android

> 

> _________________________________________________

> Android mailing list

> Android at videolan.org

> https://mailman.videolan.org/listinfo/android


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20170323/6ac801c5/attachment.html>


More information about the Android mailing list