-
Notifications
You must be signed in to change notification settings - Fork 15
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
Invalid FFI type for return #47
Comments
Any idea what type is causing the error? You would get more information with Also, is this something that used to work with a previous version of Haxe? |
The first time I used the library was when it was first announced and i think the tests worked. I'll use the debug filter and give you feedback |
After adding the debug flag, I got these outputs
It seems to be refering to this class class StellaNative extends Library<"stella"> {
public static function create_stella_demuxer_ptr():ammer.ffi.Alloc<DemuxerNative>;
public static function create_stella_demuxer_cb_ptr():ammer.ffi.Alloc<DemuxerCBNative>;
public static function create_stella_decoder_ptr():ammer.ffi.Alloc<DecoderNative>;
public static function create_stella_decoder_cb_ptr():ammer.ffi.Alloc<DecoderCBNative>;
}
|
@Aurel300 what do you think I might be doing wrong? |
I think I have fixed it... I removed the static functions and used their |
It seems it was a false fix... I am getting this now
Demuxer.hx package stella.backend.av;
import stella.native.StellaNative;
// import stella.native.AppState;
import haxe.Constraints.Function;
import ammer.*;
import ammer.ffi.*;
import haxe.io.Bytes;
import haxe.Int64;
@:ammer.nativePrefix("stella_demuxer_")
@:ammer.struct
class DemuxerCBNative extends Pointer<"stella_demuxer_cb", StellaNative> {
public function set_init_audio_cb(_:This, func:Closure<(channels:Int, rate:Int, _:ClosureDataUse)->Void, "forever">, _:ClosureData<"func">):Void;
public function set_init_video_cb(_:This, func:Closure<(frameWidth:Int, frameHeight:Int,chromaWidth:Int, chromaHeight:Int, fps:Float, picWidth:Int, picHeight:Int, picX:Int, picY:Int, displayWidth:Int, displayHeight:Int, _:ClosureDataUse)->Void, "forever">, _:ClosureData<"func">):Void;
public function set_loaded_metadata_cb(_:This, func:Closure<(videoCodec:String, audioCodec:String, _:ClosureDataUse)->Void, "forever">, _:ClosureData<"func">):Void;
public function set_video_packet_cb(_:This, func:Closure<(buffer:Bytes, len:SizeOf<"buffer">, frameTimestamp:Float, keyframeTimestamp:Float, isKeyframe:Int, _:ClosureDataUse)->Void, "forever">, _:ClosureData<"func">):Void;
public function set_audio_packet_cb(_:This, func:Closure<(buffer:Bytes, len:SizeOf<"buffer">, audioTimestamp:Float, discardPadding:Float, _:ClosureDataUse)->Void, "forever">, _:ClosureData<"func">):Void;
public function set_frame_ready_cb(_:This, func:Closure<(_:ClosureDataUse)->Int, "forever">, _:ClosureData<"func">):Void;
public function set_audio_ready_cb(_:This, func:Closure<(_:ClosureDataUse)->Int, "forever">, _:ClosureData<"func">):Void;
public function set_seek_cb(_:This, func:Closure<(offset:Int64, _:ClosureDataUse)->Void, "forever">):Void;
}
@:ammer.nativePrefix("stella_demuxer_")
@:ammer.struct
class DemuxerNative extends Pointer<"stella_demuxer_t", StellaNative> {
@:ammer.native("mediaType") public var mediaType:String;
@:ammer.native("callbacks") public var callbacks:ammer.ffi.Nested<DemuxerCBNative>;
@:ammer.native("hasVideo") public var hasVideo:Bool;
@:ammer.native("videoTrack") public var videoTrack:UInt;
@:ammer.native("videoCodec") public var videoCodec:Int;
@:ammer.native("videoCodecName") public var videoCodecName:String;
@:ammer.native("videoStream") public var videoStream:Int64;
@:ammer.native("hasAudio") public var hasAudio:Bool;
@:ammer.native("audioTrack") public var audioTrack:UInt;
@:ammer.native("audioCodec") public var audioCodec:Int;
@:ammer.native("audioCodecName") public var audioCodecName:String;
@:ammer.native("audioStream") public var audioStream:Int64;
@:ammer.native("seekTime") public var seekTime:Int64;
@:ammer.native("seekTrack") public var seekTrack:UInt;
@:ammer.native("startPosition") public var startPosition:Int64;
@:ammer.native("lastKeyframeKimestamp") public var lastKeyframeKimestamp:Float;
// @:ammer.native("appState") public var appState:AppState;
public function init(_:This, type:String, callbacks:DemuxerCBNative):Void;
public function receive_buffer(_:This, buffer:Bytes, bufSize:ammer.ffi.SizeOf<"buffer">):Void;
public function process(_:This):Int;
public function destroy(_:This):Void;
public function flush(_:This):Void;
public function media_length(_:This):Int64;
public function media_duration(_:This):Float;
public function seekable(_:This):Int;
public function keypoint_offset(_:This, time_ms:Float):Int64;
public function seek_to_keypoint(_:This, time_ms:Float):Int;
}
|
I tried to build my project with
haxe 4.2.3
I got this errorVerbose
The text was updated successfully, but these errors were encountered: