Since Pion's webrtc v3.0.13 and this fix if both peers have some fmtp set then codecs should match exactly. By default Pion defines a list of supported codecs with fmtp set but different browsers set their own fmtp values by default as well therefore they may not match.
To fix this we can define our own list of codecs on the server with empty fmtp so it will match any client codecs.
See: e5c8c659ca/rtpcodec.go (L99)
(experimental feature)
Before a worker can start, it should have a configuration file. In case if such a file is not found it may request configuration from the coordinator to which it connected.
Added example logic if a worker is needed to be blocked until a successful packet exchange with a coordinator is being made.
* Add error return for config loader
* Add config loaded flag to worker
* Add zone flag
* Add a custom mutex lock with timout
* Refactor worker runtime
* Refactor internal api
* Extract monitoring server config
* Extract worker HTTP(S) server
* Add generic sub-server interface
* Add internal coordinator API
* Add internal routes and handlers to worker
* Add internal worker API
* Refactor worker run
* Migrate serverId call to new API
* Add packet handler to cws
* Extract handlers for internal worker routes in coordinator
* Pass worker to the worker internal heandlers
* Cleanup worker handlers in coordinator
* Add closeRoom packet handler to the API
* Add GetRoom packet handler to the API
* Add RegisterRoom packet handler to the API
* Add IceCandidate packet handler to the API (internal and browser)
* Add Heartbeat packet handler to the API (internal and browser)
* Rename worker routes init function
* Extract worker/coordinator internal ws handlers
* Update timed locker
* Allow sequential timed locks
* Add config request from workers
* Add nil check for the route registration functions
* Add initial external configuration files support.
These external configuration files allow changing app params at the runtime without recompilation.
* Find config files with specified directory in the tests
* Add aspect ratio recalculation config
* Clean code
* Add new configuration files into the Docker container image
* Add shared core and config paths into the Libretro cores config
* Split ROM <-> Emulator mapping between workers and coordinators
* Extract coordinator config
* Add shared worker/coordinator server config
* Add explicit embedded shared worker/coordinator struct for auto-config reflection fill
* Remove default stun/turn servers from the config
* Extract and add new ice servers config structures
* Update coordinator config params
* Add auto emulation lib loader based on the runtime OS/arch
* Update configuration structures
* Remove shared config embedding
* Add missing network config params
* Add game library external config
* Remove unused config parameters
* Add WebRTC encoder external options
* Add user dir for config search
* Update config loader
* Update config
* Add generic downloader with Grab lib implementation
* Add a simple file downloader backed by the grab lib
* Add initial Libretro core repos abstractions
* Expose compression info for Libretro cores repository records
* Add pipe-based abstract file downloader
* Refactor downloader
* Refactor Libretro repos
* Add worker coresync stubs
* Add multiprocess-safe HTTP-based core manager implementation
* Remove Libretro cores from the repo
* Keep custom N64 cores in te repo for now
* Add Libretro cores repo select in the config
* Fix http manager repo switch
* Cleanup code
* Add greedy Libretro lib loader
* Don't crash when arch map is not set
* Disable dynamic recompiler for pcsx core by default since it's could cause a crash
* Use global Libretro dynalib handler
* Shorten the default Libretro cores store path
* Update zip extractor implementation
* Remove explicit fig lib field markings
* Add config note to the README file
* Add GitHub repo backend for the core downloader
* Fix GitHub repo param list in the manager factory
* Add env variables reader with CLOUD_GAME prefix
* Re-optimize ice server info struct custom marshaler
* Allow HTTP access to Raspberry Pi over local network
Lower audio buffer maximum theoretical size to get the worker code to compile on Raspberry Pi
* Add https port flag to run https worker and coordinator on the same machine
Add https chain and key flags to allow to use an existing certificate and bypass letsencrypt
Note the ping address resolution is still broken with this configuration
* Add option to define a ping server in the coordinator
This is useful when it is not predicatable what address and port the worker will be runnning at
This only works when there is a single worker
* Free temporarily allocated CStrings
Store constant CString
* Only load core once and unload it when done
* Add Nintendo 64 support!
Disclaimer: only tested with Mupen64plus and Mupen64plusNext on Raspberry Pi.
It probably needs more work to run on every system and with other OpenGL libretro libraries.
Input controls are hacked together, it really needs analog stick and remapping support to play in a nicer way.
I am worried there might be a memory leak when unloading Mupen64plus but this needs further investigation.
* Add analog sticks + R2,L2,R3,L3 support
* Add client logic to control left analog stick via keyboard and touch
Add client logic to toggle between dpad mode and analog mode (even for joystick)
Might need to revisit if and when remapping is implemented
Tocuh sensitivity of analog stick is pretty high, might need tweaking
* Add cores for Raspberry Pi
Add N64 core for linux x86_64
* Reset use OpenGL flag on nanoarch shutdown (line lost in refactoring)
- All voice is fan-in and broadcasted.
- Currently, voice is sent in the same game track. TODO: send voice in different track (Having issue with dynamically addTrack after offer and answer)
* Add stat module initial example
* Add stats module help overlay overlap handling
* Add generic graph canvas image builder
* Add more generic graphing module
* Clean up the code
* Some fixes
* Change graphing styles
* Clean some stats module code
* Move to RAF rendering to burn your CPU
* Add not standardized memory stats module
* Fix initial stats visibility flag handle
* Refactor input poll to make it x2-3 faster (0.4ms+ -> 0.1ms)
* If Server is sendrecv transceiver, client needs to be sendrecv on Firefox.
c641b530a0
Co-authored-by: giongto35 <giongto35@yahoo.com>