Coder Social home page Coder Social logo

fix video issues about onscripter-ru HOT 32 CLOSED

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024
fix video issues

from onscripter-ru.

Comments (32)

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

this should also clean up any badly implemented packages

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

the text issue is probably due to sdl_gpu

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

it definitely is

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

:trollface: not doing macos or ios because I have no access to any of them

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

also probably not fixing the libepoxy issue either for mingw

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Could you build CI on top of GitHub Actions please?

not doing macos or ios because I have no access to any of them
Also, for macOS and iOS you could go with the CI builds, and I can test both as I use macOS primarily.

also probably not fixing the libepoxy issue either for mingw
What is the issue?

I noticed that you hardcoded chapter names in the engine code. Could you please provide them through the script rather than hardcoding in the game?

Also, it is getting to the point where a lot of stuff starts working. Would you open the PR, so that your changes can be merged upstream?

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024
  1. I will try
  2. I've most likely figured out the fix (edit nvm, its now throwing undefined reference to 'glGetIntegerV')
  3. I will do so, but I doubt there really will be a good way to adapt it to other visual novels
  4. I will probably do so once I've finished off the discord rpc integration (my original goal)

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

@vit9696 do you know of a good position to place a callback run that needs to be constantly refreshed, I've looked at ConstantRefresh.cpp but i cant exactly figure out how to hook into it

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Rather tell me what do you need, since the "position" will vary depending on the desires.

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

So discord requires you to place a callback function on every tick in order for it to send it back to the client,
placing it in a while loop in event.cpp causes a segmentation failure but only running the callbacks on every set presence command causes it to not show up at all.

I think using the constant refresh actions is a good way to overcome it but I do not understand how it works.

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Hmm, and what does/should happen in the callback?

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

it sends the rich presence information to the discord client

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Feels like you can just put it to advanceGameState… But you can also subclass ConstantRefreshAction and add code to advance method. Then you can add it like:

Lock lock(&ons.registeredCRActions);
ons.registeredCRActions.emplace_back(YourAction::create())

Due to the nature of such action (constant callback) I may have to ask you to make discord support optional:

  • Permit not compiling with Discord at all (via a configure option)
  • Do not enable it without an explicit user agreement (via the ons.cfg option)

This seems important to me for privacy reasons.

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

placing it in advanceGameState still seems to cause segmentation faults and the user must use an explicitly patched version of the script for it to even send rpc updates

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Well, hmm, you then need to define what "tick" is. If it needs to be updated like every second, then you could create e.g. a game_fps-based counter that will trigger discord update every second or something like that.

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

Discord themselves did not define it

I believe I've finished making the discord integration optional

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

there also seems to be something wrong with either the subtitles or loading videos
the error message is ***[Warning] Parse Issue at line 568333 (*pam:19) - failed to load the video *** (String buffer: [video/sub/both_eng.ass])

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Does the file exist though?

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

yes, I have rechecked it with the hashes and it returns without error

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

It also does not work even if you disable subtitles in the configuration

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Then ffmpeg or libass (integration) is broken.

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

I have tried reverting both to the original version but it still does not work

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Well, try the actual failure from loadVideo onwards. In my opinion, even if the old version does not work, it changes little. Can be build environment error.

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

running under gdb, overriding the retcontinue, I get Thread 1 "onscripter-ru" received signal SIGSEGV, Segmentation fault. 0x000055555574b570 in MediaProcController::frameSize(SDL_Rect const&, int&, float&, int&, float&, bool) ()

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

I've completely fixed the discord rpc issue, although it is a bit hardcoded
I still have no clue as to what causes the video issue however

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Well, put a bp on movieCommand and find why exactly loadVideo fails.

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

looks like its at if (!hasStream(VideoEntry))

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

Then it means MediaProcController::findDecoder fails. Which likely means your ffmpeg is compiled incorrectly.

from onscripter-ru.

vit9696 avatar vit9696 commented on August 29, 2024

CI fails to build due to enabled tiff codec apparently. Try adding --disable-tiff.

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

I reinstalled my entire os and it seems that the video issue isnt an environment error

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

most likely due to a hacky fix for 5.0 that removed the AVLockOp lockManager entirely

I'll be changing it down to 4.4 for now

from onscripter-ru.

m3t4f1v3 avatar m3t4f1v3 commented on August 29, 2024

I'll attempt to test it on macos by using a virtual machine

from onscripter-ru.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.