yashketkar/video-player

View on GitHub

Showing 108 of 144 total issues

Method getThumbnail has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

      public static Bitmap getThumbnail(Context ctx, ContentResolver cr, long origId, int kind, BitmapFactory.Options options) {
Severity: Minor
Found in vitamio/src/io/vov/vitamio/provider/MediaStore.java - About 35 mins to fix

    Method transform has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      private static Bitmap transform(Matrix scaler, Bitmap source, int targetWidth, int targetHeight, int options) {
    Severity: Minor
    Found in vitamio/src/io/vov/vitamio/ThumbnailUtils.java - About 35 mins to fix

      Method onLayout has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        protected void onLayout(boolean changed, int l, int t, int r, int b) {
      Severity: Minor
      Found in vitamio/src/io/vov/vitamio/widget/CenterLayout.java - About 35 mins to fix

        Method audioTrackWrite has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          private void audioTrackWrite(byte[] audioData, int offsetInBytes, int sizeInBytes) {
            if (mAudioTrack != null && mAudioTrack.getPlayState() == AudioTrack.PLAYSTATE_PLAYING) {
              int written;
              while (sizeInBytes > 0) {
                written = sizeInBytes > mAudioTrackBufferSize ? mAudioTrackBufferSize : sizeInBytes;
        Severity: Minor
        Found in vitamio/src/io/vov/vitamio/MediaPlayer.java - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method parseSubstring has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private int parseSubstring(String s, int start, int defaultValue) {
              int length = s.length();
              if (start == length)
                return defaultValue;
        
        
        Severity: Minor
        Found in vitamio/src/io/vov/vitamio/MediaScanner.java - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method onInfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

            private void onInfo(Message msg) {
                switch (msg.arg1) {
                    case MediaPlayer.MEDIA_INFO_BUFFERING_START:
                        {
                            //Log.i("MiuiVideo: receive buffer start, isplaying " + isPlaying());
        Severity: Minor
        Found in vitamio/src/io/vov/vitamio/MediaPlayer.java - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method createVideoThumbnail has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          public static Bitmap createVideoThumbnail(Context ctx, String filePath, int kind) {
            if (!Vitamio.isInitialized(ctx)) {
              return null;
            }
            Bitmap bitmap = null;
        Severity: Minor
        Found in vitamio/src/io/vov/vitamio/ThumbnailUtils.java - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Method postscan has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
        Open

          private void postscan(String[] directories) throws RemoteException {
            Iterator<FileCacheEntry> iterator = mFileCache.values().iterator();
        
            while (iterator.hasNext()) {
              FileCacheEntry entry = iterator.next();
        Severity: Minor
        Found in vitamio/src/io/vov/vitamio/MediaScanner.java - About 35 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Avoid too many return statements within this method.
        Open

                        return false;
        Severity: Major
        Found in vitamio/src/io/vov/vitamio/utils/Base64.java - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return;
          Severity: Major
          Found in vitamio/src/io/vov/vitamio/MediaPlayer.java - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                            return false;
            Severity: Major
            Found in vitamio/src/io/vov/vitamio/utils/Base64.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return true;
              Severity: Major
              Found in vitamio/src/io/vov/vitamio/utils/Base64.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                          return;
                Severity: Major
                Found in vitamio/src/io/vov/vitamio/MediaPlayer.java - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                            return;
                  Severity: Major
                  Found in vitamio/src/io/vov/vitamio/MediaPlayer.java - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                              return;
                    Severity: Major
                    Found in vitamio/src/io/vov/vitamio/MediaPlayer.java - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                              return false;
                      Severity: Major
                      Found in vitamio/src/io/vov/vitamio/utils/Base64.java - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                  return;
                        Severity: Major
                        Found in vitamio/src/io/vov/vitamio/MediaPlayer.java - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                                  return false;
                          Severity: Major
                          Found in vitamio/src/io/vov/vitamio/utils/Base64.java - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                      return;
                            Severity: Major
                            Found in vitamio/src/io/vov/vitamio/MediaPlayer.java - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return true;
                              Severity: Major
                              Found in vitamio/src/io/vov/vitamio/utils/Base64.java - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language