gkv311 / sview

Stereoscopic media player
GNU General Public License v3.0
93 stars 34 forks source link

wnt: Select input format in browser plugin #84

Open JackDesBwa opened 4 years ago

JackDesBwa commented 4 years ago

Context: Stereopix.net is a website to share stereo photographs with an in-browser viewer showing various formats. Some visitors want to use their nVidia 3D Vision system with it and the website uses sView web plugin (which is only possible with old 32-bits browsers, and these users know it) for this purpose.

Question: Is there a way to indicate to the plugin which input format to use? If not, would it be hard to add?

Current workaround: The website sends the JPG fallback version of the image with JPS metadata set to parallel SBS because it is the native format of the platform. However, it has to use the image/mpo type as the image/jps assumes it is a crossed image ignoring the metadata. It would be better to send the normal WEBP version of the website (which does not have metadata) and precise which input type it is (here parallel format). Furthermore, it is planned to add possibility to display images that are not under the control of this website, and thus that would probably not have the metadata included.

gkv311 commented 4 years ago

which is only possible with old 32-bits browsers

This is incorrect - sView provides both 32-bit and 64-bit NPAPI plugins, so that old 64-bit browsers should work too. However, as NPAPI / ActiveX have been killed by all Browsers, there is no reason supporting specific plugins on web-sites.

Is there a way to indicate to the plugin which input format to use?

Stereoscopic format is detected from known MIME types (jps/pns which are expected to be Right-Left side by side pair) or from srcFormat argument accepting values auto, mono, parallelPair, crossEyed, overUnderLR, overUnderRL, interlaceRow, frameSequential (as sView.exe, see sView.exe --help).

JackDesBwa commented 4 years ago

sView provides both 32-bit and 64-bit NPAPI plugins, so that old 64-bit browsers should work too.

OK. I thought my test environment started to work when I installed a 32bits browser, but as I did several things, my statement might come from a confusion.

However, as NPAPI / ActiveX have been killed by all Browsers, there is no reason supporting specific plugins on web-sites.

Actually, several people owning a nVidia 3D Vision system were complaining that the website did not provide support for this platform which is their preferred way of viewing. They specifically keep an old browser version to view 3D photos in their browser with the few website providing it. I hope (and advised) that they do use an up-to-date browser for regular navigation.

or from srcFormat argument accepting [...]

It works (not tested with webp yet). Thank you.

JackDesBwa commented 4 years ago

Sorry, I reopen the issue because the users say that it does not work for IE. I can confirm by trying with IE11: srcFormat is not used, neither is the JPS metadata, so that the image is displayed as if it was cross input.

I understand that you do not want to bother with it, so I tried to fix it myself, but I am a totally newbie in Windows and I am stuck. Compiling on my Linux was straightforward but in Windows I have no background to help me. I could probably manage to do it with time, but I have already spent too much time for a so small bug.

Thus I expose the bug here and I am sure you will fix it in an eye blink. I can test the produced DLL if you do not have a testing environment for it anymore.

In my understanding, in the ActiveX part, the aDrawerArgs of StActiveXCtrl::OnCreate is not populated and thus the srcFormat logic works on an empty value. There is probably a line to add in StActiveXCtrl::DoPropExchange to fill a class variable then used to populate the args map (or use it directly in the right spot).

gkv311 commented 4 years ago

I cannot test it. but you can try a blind fix here: http://download.sview.ru/win/sViewSetup_v.20.04_3.exe

JackDesBwa commented 4 years ago

Unfortunately, your change has no apparent effect.

I uninstalled the previous version and restarted the system to be sure that the new version was loaded. The about menu confirmed, and the addons list of IE gives the right new version too.

Let me know if I can help more.