[Android] LibVLC: media: re-indent before next commit

Thomas Guillem git at videolan.org
Tue Jan 21 09:36:52 CET 2020


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jan 16 16:25:11 2020 +0100| [dbf1e3392163ecad06a5df8a06da001e16a3d5d0] | committer: Thomas Guillem

LibVLC: media: re-indent before next commit

No functional changes

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

 libvlc/src/org/videolan/libvlc/Media.java | 78 +++++++++++++++----------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/libvlc/src/org/videolan/libvlc/Media.java b/libvlc/src/org/videolan/libvlc/Media.java
index 748171fa7..68da9f0ae 100644
--- a/libvlc/src/org/videolan/libvlc/Media.java
+++ b/libvlc/src/org/videolan/libvlc/Media.java
@@ -449,54 +449,54 @@ public class Media extends VLCObject<IMedia.Event> implements IMedia {
      * @param force force hw acceleration even for unknown devices
      */
     public void setHWDecoderEnabled(boolean enabled, boolean force) {
-        HWDecoderUtil.Decoder decoder = enabled ?
-                HWDecoderUtil.getDecoderFromDevice() :
-                HWDecoderUtil.Decoder.NONE;
+            HWDecoderUtil.Decoder decoder = enabled ?
+                    HWDecoderUtil.getDecoderFromDevice() :
+                    HWDecoderUtil.Decoder.NONE;
 
-        /* Unknown device but the user asked for hardware acceleration */
-        if (decoder == HWDecoderUtil.Decoder.UNKNOWN && force)
-            decoder = HWDecoderUtil.Decoder.ALL;
+            /* 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;
-        }
+            if (decoder == HWDecoderUtil.Decoder.NONE || decoder == HWDecoderUtil.Decoder.UNKNOWN) {
+                addOption(":codec=all");
+                return;
+            }
 
-        /*
-         * Set higher caching values if using iomx decoding, since some omx
-         * decoders have a very high latency, and if the preroll data isn't
-         * enough to make the decoder output a frame, the playback timing gets
-         * started too soon, and every decoded frame appears to be too late.
-         * On Nexus One, the decoder latency seems to be 25 input packets
-         * for 320x170 H.264, a few packets less on higher resolutions.
-         * On Nexus S, the decoder latency seems to be about 7 packets.
-         */
-        if (!mFileCachingSet)
-            addOption(":file-caching=1500");
-        if (!mNetworkCachingSet)
-            addOption(":network-caching=1500");
-
-        final StringBuilder sb = new StringBuilder(":codec=");
-        if (decoder == HWDecoderUtil.Decoder.MEDIACODEC || decoder == HWDecoderUtil.Decoder.ALL)
-            sb.append(getMediaCodecModule()).append(",");
-        if (force && (decoder == HWDecoderUtil.Decoder.OMX || decoder == HWDecoderUtil.Decoder.ALL))
-            sb.append("iomx,");
-        sb.append("all");
-
-        addOption(sb.toString());
+            /*
+             * Set higher caching values if using iomx decoding, since some omx
+             * decoders have a very high latency, and if the preroll data isn't
+             * enough to make the decoder output a frame, the playback timing gets
+             * started too soon, and every decoded frame appears to be too late.
+             * On Nexus One, the decoder latency seems to be 25 input packets
+             * for 320x170 H.264, a few packets less on higher resolutions.
+             * On Nexus S, the decoder latency seems to be about 7 packets.
+             */
+            if (!mFileCachingSet)
+                addOption(":file-caching=1500");
+            if (!mNetworkCachingSet)
+                addOption(":network-caching=1500");
+
+            final StringBuilder sb = new StringBuilder(":codec=");
+            if (decoder == HWDecoderUtil.Decoder.MEDIACODEC || decoder == HWDecoderUtil.Decoder.ALL)
+                sb.append(getMediaCodecModule()).append(",");
+            if (force && (decoder == HWDecoderUtil.Decoder.OMX || decoder == HWDecoderUtil.Decoder.ALL))
+                sb.append("iomx,");
+            sb.append("all");
+
+            addOption(sb.toString());
     }
 
     /**
      * Enable HWDecoder options if not already set
      */
     public void setDefaultMediaPlayerOptions() {
-        boolean codecOptionSet;
-        synchronized (this) {
-            codecOptionSet = mCodecOptionSet;
-            mCodecOptionSet = true;
-        }
-        if (!codecOptionSet)
-            setHWDecoderEnabled(true, false);
+            boolean codecOptionSet;
+            synchronized (this) {
+                codecOptionSet = mCodecOptionSet;
+                mCodecOptionSet = true;
+            }
+            if (!codecOptionSet)
+                setHWDecoderEnabled(true, false);
 
         /* dvdnav need to be explicitly forced for network playbacks */
         if (mUri != null && mUri.getScheme() != null && !mUri.getScheme().equalsIgnoreCase("file") &&



More information about the Android mailing list