Hi Guys,

I have a project using embind that I have been able to compile to 
javascript and test.  When I compile with -s WASM=1, and run in Chrome I'm 
getting a strange binding error:

BindingError {name: "BindingError", message: "No dynCall invoker for 
signature: ", stack: "BindingError: No dynCall invoker for signature:


The callstack looks like this:

throwBindingError @ ATPlayer.js:5953
embind__requireFunction @ ATPlayer.js:6614
__embind_register_value_object @ ATPlayer.js:7498
__ZN46EmscriptenBindingInitializer_ATPlayer_BindingsC2Ev @ 
wasm-00a7c106-225:9
__GLOBAL__sub_I_Bindings_cpp @ wasm-00a7c106-262:3
Module.__GLOBAL__sub_I_Bindings_cpp @ ATPlayer.js:14777
func @ ATPlayer.js:1864
callRuntimeCallbacks @ ATPlayer.js:1313
ensureInitRuntime @ ATPlayer.js:1347
doRun @ ATPlayer.js:15104
(anonymous) @ ATPlayer.js:15120
setTimeout (async)
run @ ATPlayer.js:15116
runCaller @ ATPlayer.js:15076
removeRunDependency @ ATPlayer.js:1507
(anonymous) @ ATPlayer.js:1521
worker.onmessage @ ATPlayer.js:2122


The interesting thing I noticed here was that It's trying to register a 
value object.  If I move anything else to the front of my 
EMSCRIPTEN_BINDINGS it errors out there.  Why can't I bind when I build 
WASM, Javascript works just fine?  Here are my bindings if that helps:

EMSCRIPTEN_BINDINGS(ATPlayer_Bindings) {
   // register_vector<std::string>("VectorStrings");
   // register_vector<Arris::BPS>("VectorBitrates");

   value_object<Arris::VersionInfo>("VersionInfo")
   .field("major", &Arris::VersionInfo::major)
   .field("minor", &Arris::VersionInfo::minor)
   .field("maintenance", &Arris::VersionInfo::maintenance)
   .field("build", &Arris::VersionInfo::build);
      
   class_<Arris::StatusInfo>("StatusInfo")
   .property("bitrate", &Arris::StatusInfo::bitrate)
   .property("networkthroughput", &Arris::StatusInfo::networkthroughput)
   .property("optimalbitrate", &Arris::StatusInfo::optimalbitrate)
   .property("droppedframes", &Arris::StatusInfo::droppedframes)
   .property("stalls", &Arris::StatusInfo::stalls)
   .property("decodeFPS", &Arris::StatusInfo::decodeFPS)
   .property("renderFPS", &Arris::StatusInfo::renderFPS)
   .property("audiosegments", &Arris::StatusInfo::audiosegments)
   .property("videosegments", &Arris::StatusInfo::videosegments)
   .property("h264frames", &Arris::StatusInfo::h264frames)
   .property("rgbframes", &Arris::StatusInfo::rgbframes)
   .property("pcmframes", &Arris::StatusInfo::pcmframes)
   .property("seconds", &Arris::StatusInfo::seconds)
   .property("duration", &Arris::StatusInfo::duration)
   .property("cacheduration", &Arris::StatusInfo::cacheduration)
   .property("playerstate", &Arris::StatusInfo::playerstate)
   .property("frontendrunning", &Arris::StatusInfo::frontendrunning)
   .property("audiodemuxerrunning", &Arris::StatusInfo::audiodemuxerrunning)
   .property("videodemuxerrunning", &Arris::StatusInfo::videodemuxerrunning)
   .property("decoderrunning", &Arris::StatusInfo::decoderrunning)
   .property("audiorendererrunning", 
&Arris::StatusInfo::audiorendererrunning)
   .property("videorendererrunning", 
&Arris::StatusInfo::videorendererrunning)
   .property("lasterror", &Arris::StatusInfo::lasterror);

   value_object<Arris::ProgramInfo>("ProgramInfo")
   .field("duration", &Arris::ProgramInfo::duration) 
   .field("startposition", &Arris::ProgramInfo::startposition);
   
   class_<Arris::Color>("Color")
   .property("red", &Arris::Color::red)
   .property("green", &Arris::Color::green)
   .property("blue", &Arris::Color::blue)
   .property("alpha", &Arris::Color::alpha);

   enum_<Arris::PlayerState>("PlayerState")
   .value("PlayerStateStopped", Arris::PlayerState::PlayerStateStopped)
   .value("PlayerStateReadyToPlay", 
Arris::PlayerState::PlayerStateReadyToPlay)
   .value("PlayerStatePlaying", Arris::PlayerState::PlayerStatePlaying)
   .value("PlayerStatePaused", Arris::PlayerState::PlayerStatePaused)
   .value("PlayerStateSeeking", Arris::PlayerState::PlayerStateSeeking)
   .value("PlayerStateResetting", Arris::PlayerState::PlayerStateResetting)
   .value("PlayerStateChangingLanguage", 
Arris::PlayerState::PlayerStateChangingLanguage)
   .value("PlayerStateBuffering", Arris::PlayerState::PlayerStateBuffering)
   .value("PlayerStateStopping", Arris::PlayerState::PlayerStateStopping)
   .value("PlayerStateEndOfMovie", 
Arris::PlayerState::PlayerStateEndOfMovie)
   .value("PlayerStateError", Arris::PlayerState::PlayerStateError);
   
   enum_<Arris::PlayerError>("PlayerError")
   .value("PlayerErrorFontStorageFull", 
Arris::PlayerError::PlayerErrorFontStorageFull)
   .value("PlayerErrorFontStorageFailed", 
Arris::PlayerError::PlayerErrorFontStorageFailed)
   .value("PlayerErrorFontReadFailed", 
Arris::PlayerError::PlayerErrorFontReadFailed)
   .value("PlayerErrorFontInstallFailed", 
Arris::PlayerError::PlayerErrorFontInstallFailed)
   .value("PlayerErrorNoFontsInstalled", 
Arris::PlayerError::PlayerErrorNoFontsInstalled)
   .value("PlayerErrorFontNotInstalled", 
Arris::PlayerError::PlayerErrorFontNotInstalled)
   .value("PlayerErrorChunkDecryptionFailed", 
Arris::PlayerError::PlayerErrorChunkDecryptionFailed)
   .value("PlayerErrorBitrateTooHigh", 
Arris::PlayerError::PlayerErrorBitrateTooHigh)
   .value("PlayerErrorAudioBufferEmpty", 
Arris::PlayerError::PlayerErrorAudioBufferEmpty)
   .value("PlayerErrorPlatformAudioAPIFailure", 
Arris::PlayerError::PlayerErrorPlatformAudioAPIFailure)
   .value("PlayerErrorAudioRendererCouldNotStart", 
Arris::PlayerError::PlayerErrorAudioRendererCouldNotStart)
   .value("PlayerErrorInvalidADTSFrequencyIndexOutOfRange", 
Arris::PlayerError::PlayerErrorInvalidADTSFrequencyIndexOutOfRange)
   .value("PlayerErrorUnsupportedAudioFrequency", 
Arris::PlayerError::PlayerErrorUnsupportedAudioFrequency)
   .value("PlayerErrorInvalidAudioDuration", 
Arris::PlayerError::PlayerErrorInvalidAudioDuration)
   .value("PlayerErrorAudioDecoderError", 
Arris::PlayerError::PlayerErrorAudioDecoderError)
   .value("PlayerErrorOutputFramesOutOfOrder", 
Arris::PlayerError::PlayerErrorOutputFramesOutOfOrder)
   .value("PlayerErrorUnsupportedVideoProfile", 
Arris::PlayerError::PlayerErrorUnsupportedVideoProfile)
   .value("PlayerErrorVideoDecodeError", 
Arris::PlayerError::PlayerErrorVideoDecodeError)
   .value("PlayerErrorEmptyManifest", 
Arris::PlayerError::PlayerErrorEmptyManifest)
   .value("PlayerErrorManifestSyntaxIncorrect", 
Arris::PlayerError::PlayerErrorManifestSyntaxIncorrect)
   .value("PlayerErrorDuplicateLanguage", 
Arris::PlayerError::PlayerErrorDuplicateLanguage)
   .value("PlayerErrorDuplicateName", 
Arris::PlayerError::PlayerErrorDuplicateName)
   .value("PlayerErrorAmbiguousDefault", 
Arris::PlayerError::PlayerErrorAmbiguousDefault)
   .value("PlayerErrorAmbiguousType", 
Arris::PlayerError::PlayerErrorAmbiguousType)
   .value("PlayerErrorFileNotFound", 
Arris::PlayerError::PlayerErrorFileNotFound)
   .value("PlayerErrorNetworkDown", 
Arris::PlayerError::PlayerErrorNetworkDown)
   .value("PlayerErrorServerUnreachable", 
Arris::PlayerError::PlayerErrorServerUnreachable)
   .value("PlayerErrorTimeout", Arris::PlayerError::PlayerErrorTimeout)
   .value("PlayerErrorDemuxerStopped", 
Arris::PlayerError::PlayerErrorDemuxerStopped)
   .value("PlayerErrorVideoRendererStopped", 
Arris::PlayerError::PlayerErrorVideoRendererStopped)
   .value("PlayerErrorAudioRendererStopped", 
Arris::PlayerError::PlayerErrorAudioRendererStopped)
   .value("PlayerErrorVideoDecoderStopped", 
Arris::PlayerError::PlayerErrorVideoDecoderStopped)
   .value("PlayerErrorOutOfRange", 
Arris::PlayerError::PlayerErrorOutOfRange)
   .value("PlayerErrorInternalInconsistency", 
Arris::PlayerError::PlayerErrorInternalInconsistency)
   .value("PlayerErrorUnalignedFrameData", 
Arris::PlayerError::PlayerErrorUnalignedFrameData)
   .value("PlayerErrorInvalidOperation", 
Arris::PlayerError::PlayerErrorInvalidOperation)
   .value("PlayerErrorUnimplemented", 
Arris::PlayerError::PlayerErrorUnimplemented)
   .value("PlayerErrorInvalidParameter", 
Arris::PlayerError::PlayerErrorInvalidParameter)
   .value("PlayerErrorInternal", Arris::PlayerError::PlayerErrorInternal)
   .value("PlayerErrorInternalAllocationFailed", 
Arris::PlayerError::PlayerErrorInternalAllocationFailed)
   .value("PlayerErrorAccessDenied", 
Arris::PlayerError::PlayerErrorAccessDenied)
   .value("PlayerErrorUnrecognizedData", 
Arris::PlayerError::PlayerErrorUnrecognizedData)
   .value("PlayerErrorConnectionFailure", 
Arris::PlayerError::PlayerErrorConnectionFailure)
   .value("PlayerErrorNone", Arris::PlayerError::PlayerErrorNone)
   .value("Success", Arris::PlayerError::Success);

   enum_<Arris::MSC::MSC_RESULT>("MSC_RESULT")
   .value("MSC_SUCCESSFUL", Arris::MSC::MSC_RESULT::MSC_SUCCESSFUL)
   .value("MSC_SUCCESS", Arris::MSC::MSC_RESULT::MSC_SUCCESS)
   .value("MSC_ERROR", Arris::MSC::MSC_RESULT::MSC_ERROR)
   .value("MSC_INTERNAL_ERROR", Arris::MSC::MSC_RESULT::MSC_INTERNAL_ERROR)
   .value("MSCERR_INTERNAL_ERROR", 
Arris::MSC::MSC_RESULT::MSCERR_INTERNAL_ERROR)
   .value("MSC_NOT_INITIALIZED", 
Arris::MSC::MSC_RESULT::MSC_NOT_INITIALIZED)
   .value("MSC_COMMUNICATION_FAILURE", 
Arris::MSC::MSC_RESULT::MSC_COMMUNICATION_FAILURE)
   .value("MSCERR_COMMUNICATION_FAILURE", 
Arris::MSC::MSC_RESULT::MSCERR_COMMUNICATION_FAILURE)
   .value("MSC_INVALID_INPUT_PARAMETER", 
Arris::MSC::MSC_RESULT::MSC_INVALID_INPUT_PARAMETER)
   .value("MSC_DUPLICATE_REGISTRATION", 
Arris::MSC::MSC_RESULT::MSC_DUPLICATE_REGISTRATION)
   .value("MSC_NOT_REGISTERED", Arris::MSC::MSC_RESULT::MSC_NOT_REGISTERED)
   .value("MSC_INSUFFICIENT_RIGHTS", 
Arris::MSC::MSC_RESULT::MSC_INSUFFICIENT_RIGHTS)
   .value("MSC_DEVICE_TIME_OUT_OF_SYNC_WITH_SERVER", 
Arris::MSC::MSC_RESULT::MSC_DEVICE_TIME_OUT_OF_SYNC_WITH_SERVER)
   .value("MSCERR_MALFORMED_URL", 
Arris::MSC::MSC_RESULT::MSCERR_MALFORMED_URL)
   .value("MSCERR_ROOTED_DEVICE", 
Arris::MSC::MSC_RESULT::MSCERR_ROOTED_DEVICE)
   .value("MSC_REGISTERED", Arris::MSC::MSC_RESULT::MSC_REGISTERED)
   .value("MSCERR_FileNotFound", 
Arris::MSC::MSC_RESULT::MSCERR_FileNotFound)
   .value("MSC_INIT_ERROR", Arris::MSC::MSC_RESULT::MSC_INIT_ERROR);

   class_<Arris::MediaPlayer>("MediaPlayer").constructor<>()
   .function("setPlayerContext", &Arris::MediaPlayer::setPlayerContext, 
allow_raw_pointers())
   .function("play", &Arris::MediaPlayer::play)
   .function("pause", &Arris::MediaPlayer::pause)
   .function("paused", &Arris::MediaPlayer::paused)
   .function("togglePlayback", &Arris::MediaPlayer::togglePlayback)
   .function("resume", &Arris::MediaPlayer::resume)
   .function("stop", &Arris::MediaPlayer::stop)
   .function("getCurrentPosition", &Arris::MediaPlayer::getCurrentPosition)
   .function("getStatus", &Arris::MediaPlayer::getStatus)
   .function("getPlaybackRate", &Arris::MediaPlayer::getPlaybackRate)
   .function("setPlaybackRate", &Arris::MediaPlayer::setPlaybackRate)
   .function("seek", &Arris::MediaPlayer::seek)
   .function("areCaptionsEnabled", &Arris::MediaPlayer::areCaptionsEnabled)
   .function("enableClosedCaption", 
&Arris::MediaPlayer::enableClosedCaption)
   .function("areSubtitlesEnabled", 
&Arris::MediaPlayer::areSubtitlesEnabled)
   .function("enableSubtitle", &Arris::MediaPlayer::enableSubtitle)
   .function("setVolume", &Arris::MediaPlayer::setVolume)
   .function("muteVolume", &Arris::MediaPlayer::muteVolume)
   .function("getVersion", &Arris::MediaPlayer::getVersion)
   .function("getDuration", &Arris::MediaPlayer::getDuration)
   .function("getAudioLanguages", &Arris::MediaPlayer::getAudioLanguages)
   .function("getSubtitlesLanguages", 
&Arris::MediaPlayer::getSubtitlesLanguages)
   .function("setAudioLanguage", &Arris::MediaPlayer::setAudioLanguage)
   .function("getCurrentAudioLanguage", 
&Arris::MediaPlayer::getCurrentAudioLanguage)
   .function("getCurrentSubtitlesLanguage", 
&Arris::MediaPlayer::getCurrentSubtitlesLanguage)
   .function("setCaptionsFont", &Arris::MediaPlayer::setCaptionsFont)
   .function("getCaptionsFont", &Arris::MediaPlayer::getCaptionsFont)
   .function("getCaptionsFontSize", 
&Arris::MediaPlayer::getCaptionsFontSize)
   .function("setCaptionsFontSize", 
&Arris::MediaPlayer::setCaptionsFontSize)
   .function("getCaptionsFontColor", 
&Arris::MediaPlayer::getCaptionsFontColor)
   .function("setCaptionsFontColor", 
&Arris::MediaPlayer::setCaptionsFontColor)
   .function("getCaptionsBackgroundColor", 
&Arris::MediaPlayer::getCaptionsBackgroundColor)
   .function("setCaptionsBackgroundColor", 
&Arris::MediaPlayer::setCaptionsBackgroundColor)
   .function("setSubtitlesLanguage", 
&Arris::MediaPlayer::setSubtitlesLanguage)
   .function("setSubtitlesFont", &Arris::MediaPlayer::setSubtitlesFont)
   .function("getSubtitlesFont", &Arris::MediaPlayer::getSubtitlesFont)
   .function("getSubtitlesFontSize", 
&Arris::MediaPlayer::getSubtitlesFontSize)
   .function("setSubtitlesFontSize", 
&Arris::MediaPlayer::setSubtitlesFontSize)
   .function("getSubtitlesFontColor", 
&Arris::MediaPlayer::getSubtitlesFontColor)
   .function("setSubtitlesFontColor", 
&Arris::MediaPlayer::setSubtitlesFontColor)
   .function("getSubtitlesBackgroundColor", 
&Arris::MediaPlayer::getSubtitlesBackgroundColor)
   .function("setSubtitlesBackgroundColor", 
&Arris::MediaPlayer::setSubtitlesBackgroundColor)
   .function("installFont", &Arris::MediaPlayer::installFont)
   .function("listFonts", &Arris::MediaPlayer::listFonts)
   .function("setMaxBitrate", &Arris::MediaPlayer::setMaxBitrate)
   .function("getAvailableBitrates", 
&Arris::MediaPlayer::getAvailableBitrates);

   function("Init", &Arris::MSC::MSC::Init);
   function("Close", &Arris::MSC::MSC::Close);
   function("SDKInfo", &Arris::MSC::MSC::SDKInfo);
   function("OTT_Register", &Arris::MSC::MSC::OTT_Register);
   function("OTT_UnRegister", &Arris::MSC::MSC::OTT_UnRegister);
   function("OTT_CheckRegistration", 
&Arris::MSC::MSC::OTT_CheckRegistration);
   function("OTT_GetRegistrationInfo", 
&Arris::MSC::MSC::OTT_GetRegistrationInfo);
   function("SetupNetworkPlayback", &Arris::MSC::MSC::SetupNetworkPlayback);
   function("OTT_Status", &Arris::MSC::MSC::OTT_Status);
}



Also, on a side note, I am getting an error compiling my WASM module:

wasm streaming compile failed: TypeError: Failed to execute 'compile' on 
'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
falling back to ArrayBuffer instantiation


The app continues on after this, until I get the BindingError, so I don't 
know if this is normal or not.

Help?

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to