Jump to content

loki5100

Members
  • Content Count

    6
  • Joined

  • Last visited

Everything posted by loki5100

  1. loki5100

    Weak reference is dangerous

    @vfbb yes FPiette is right, your code is false 😞 you must do Tmonitor.Enter before modifying a variable that is accessed by several threads ! it's not a bug
  2. loki5100

    Weak reference is dangerous

    Ouuch, this is quite serious and this could probably explain my bug: https://stackoverflow.com/questions/64829275/android-memory-corruption I just open a report on quality central: https://quality.embarcadero.com/browse/RSP-31858
  3. loki5100

    iOS handle incoming url

    Right now you can not handle universal link in ios APP, embarcadero need to implement func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([Any]?) -> Void) -> Bool
  4. In Objective-c header I have this : - (void)offerForConstraints:(RTCMediaConstraints *)constraints completionHandler:(nullable void (^)(RTCSessionDescription *_Nullable sdp, NSError *_Nullable error))completionHandler; That I translate like this: type TWebRTCPeerConnectionOfferForConstraintsCompletionHandler = procedure(sdp: RTCSessionDescription; error: NSError) of object; procedure offerForConstraints( constraints: RTCMediaConstraints; completionHandler: TWebRTCPeerConnectionOfferForConstraintsCompletionHandler); cdecl; But every time I call offerForConstraints I Have : Any idea what going wrong?
  5. loki5100

    How to draw a YUV texture with delphi?

    As far as I Know, YUV texture is a composition of 2 textures (the Y and the UV). Those 2 textures must be drawn on the canvas using a shader like this one : #version 100 precision mediump float; varying vec2 vUV; uniform sampler2D SamplerY; uniform sampler2D SamplerUV; void main() { mediump vec3 yuv; lowp vec3 rgb; yuv.x = texture2D(SamplerY, vUV).r; yuv.yz = texture2D(SamplerUV, vUV).rg - vec2(0.5, 0.5); // Using BT.709 which is the standard for HDTV rgb = mat3( 1, 1, 1, 0, -.18732, 1.8556, 1.57481, -.46813, 0) * yuv; gl_FragColor = vec4(rgb, 1); } I know how to use a shader with one texture (for example overridden TFilterBaseFilter), however, I don't know how I can use a shader with 2 textures in parameters (finality is to draw my YUV texture on a canvas)
  6. loki5100

    How to draw a YUV texture with delphi?

    Thanks, Dalija, however, I m not sure I can use this to draw my YUV frame to a Canvas 😞 In Delphi, we have this, but I didn't find a way to make it work 😞 procedure TCustomContextOpenGL.DoSetShaderVariable(const Name: string; const Texture: TTexture); var Variable: TContextShaderVariable; begin if Valid then begin if FCurrentProgram <> nil then begin if FCurrentProgram.Variables.TryGetValue(Name, Variable) then begin glActiveTexture(GL_TEXTURE0 + Variable.TextureUnit); if Texture = nil then glBindTexture(GL_TEXTURE_2D, 0) else glBindTexture(GL_TEXTURE_2D, Texture.Handle); glUniform1i(Variable.Index, Variable.TextureUnit); glActiveTexture(GL_TEXTURE0); end; end; if GLHasAnyErrors then RaiseContextExceptionFmt(@SCannotFindShaderVariable, [Name]); end; end;
×