Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggested patch to clean-up unused & duplicates #41

Open
muman613 opened this issue Oct 20, 2017 · 1 comment
Open

Suggested patch to clean-up unused & duplicates #41

muman613 opened this issue Oct 20, 2017 · 1 comment

Comments

@muman613
Copy link

Hello,

I appreciate the speedy and efficient responses to the communities suggestions. Let me say I am very impressed with this project. Only last year I would not have imagined a video analyzer written in JavaScript. But my opinion of NodeJS and Electron has speedily changed.

I have been working with this analyzer for a couple of months now and am pretty familiar with it and have made a branch where we are developing AVS2 analysis using this projects framework (Emscripten to compile the reference decoder providing the JSON in the callback).

In the process I have discovered only a couple of issues which should be patched in the original project.

I will post the patch and attach it to this message if anyone would like to review the changes. Two unused variables and duplication of 'noImplicitAny' and 'sourceMap' in the tsconfig.json...

diff --git a/index.js b/index.js
index a834529..540199c 100644
--- a/index.js
+++ b/index.js
@@ -48,7 +48,6 @@ function createWindow() {
     return "file://" + path.resolve(x);
   }
   var mainScreen = require('electron').screen.getPrimaryDisplay();
-  var dimensions = mainScreen.size;
   var width = 1366;
   var height = 768;
 
@@ -61,6 +60,7 @@ function createWindow() {
   //   3% = 1024x768
   // 4.4% < 1024x768
 
+  // var dimensions = mainScreen.size;
   // if (dimensions.width >= 1680 && dimensions.height >= 1050) {
   //   width = 1366;
   //   height = 768;
diff --git a/src/components/analyzerTools.ts b/src/components/analyzerTools.ts
index 5e8b8a0..ffed141 100644
--- a/src/components/analyzerTools.ts
+++ b/src/components/analyzerTools.ts
@@ -662,7 +662,7 @@ export class Decoder {
   worker: Worker;
   workerCallbacks = [];
   workerInfo: any = {};
-  decoder: string;
+//decoder: string;
   buffer: Uint8Array;
   frames: AnalyzerFrame[] = [];
   frameRate: number = 30;
diff --git a/tsconfig.json b/tsconfig.json
index 657c761..13bbb13 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -2,14 +2,12 @@
     "compilerOptions": {
         "outDir": "./dist/",
         "sourceMap": true,
-        "noImplicitAny": true,
+        "noImplicitAny": false,
         "module": "commonjs",
         "target": "es5",
         "jsx": "react",
         "baseUrl": "src",
         "moduleResolution": "node",
-        "noImplicitAny": false,
-        "sourceMap": true,
         "allowSyntheticDefaultImports": true,
 	    "lib": ["dom", "es6"]
     },

Once again a big thank you to all involved in this project. I would love to contribute more if I could. I'm still coming up to speed on some of the JS technology (I've mostly been a C/C++ and assembly guy)...

Thank you,
Michael Uman

aomanalyzer-patch-171020.txt

@mbebenita
Copy link
Collaborator

Hi Michael,

I'm glad you find this project useful. Our goal is to make a tool that can be used with a variety of codecs, but at the moment we've only been using it with AV1. If you can share more about the design of your codec, we could perhaps design a more generic interface to the analyzer.

I've also been surprised about how far you can get with JavaScript these days. :)

The general approach in Github to contributing patches is to first fork the project, and then submit a pull request.

Thanks,
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants