1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-07-12 22:30:17 +02:00

Update to CEF 81.2.16

Removed unused uCEFAudioHandler unit
This commit is contained in:
Salvador Díaz Fau
2020-04-11 11:23:24 +02:00
parent 3de53a0376
commit 02ef32b474
5 changed files with 7 additions and 254 deletions

View File

@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador D
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file. CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
CEF4Delphi uses CEF 81.2.15 which includes Chromium 81.0.4044.92. CEF4Delphi uses CEF 81.2.16 which includes Chromium 81.0.4044.92.
The CEF binaries used by CEF4Delphi are available for download at spotify : The CEF binaries used by CEF4Delphi are available for download at spotify :
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_81.2.15%2Bge07275d%2Bchromium-81.0.4044.92_windows32.tar.bz2) * 32 bits not available at this moment.
* 64 bits not available at this moment. * [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_81.2.16%2Bgdacda4f%2Bchromium-81.0.4044.92_windows64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 10.3.3 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 10.3.3 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.

View File

@ -21,7 +21,7 @@
</CompilerOptions> </CompilerOptions>
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/> <Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
<License Value="MPL 1.1"/> <License Value="MPL 1.1"/>
<Version Major="81" Minor="2" Release="15"/> <Version Major="81" Minor="2" Release="16"/>
<Files Count="156"> <Files Count="156">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@ -62,7 +62,7 @@ uses
const const
CEF_SUPPORTED_VERSION_MAJOR = 81; CEF_SUPPORTED_VERSION_MAJOR = 81;
CEF_SUPPORTED_VERSION_MINOR = 2; CEF_SUPPORTED_VERSION_MINOR = 2;
CEF_SUPPORTED_VERSION_RELEASE = 15; CEF_SUPPORTED_VERSION_RELEASE = 16;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = 81; CEF_CHROMEELF_VERSION_MAJOR = 81;

View File

@ -1,247 +0,0 @@
// ************************************************************************
// ***************************** CEF4Delphi *******************************
// ************************************************************************
//
// CEF4Delphi is based on DCEF3 which uses CEF to embed a chromium-based
// browser in Delphi applications.
//
// The original license of DCEF3 still applies to CEF4Delphi.
//
// For more information about CEF4Delphi visit :
// https://www.briskbard.com/index.php?lang=en&pageid=cef
//
// Copyright � 2020 Salvador Diaz Fau. All rights reserved.
//
// ************************************************************************
// ************ vvvv Original license and comments below vvvv *************
// ************************************************************************
(*
* Delphi Chromium Embedded 3
*
* Usage allowed under the restrictions of the Lesser GNU General Public License
* or alternatively the restrictions of the Mozilla Public License 1.1
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* Unit owner : Henri Gourvest <hgourvest@gmail.com>
* Web site : http://www.progdigy.com
* Repository : http://code.google.com/p/delphichromiumembedded/
* Group : http://groups.google.com/group/delphichromiumembedded
*
* Embarcadero Technologies, Inc is not permitted to use or redistribute
* this source code without explicit permission.
*
*)
unit uCEFAudioHandler;
{$IFDEF FPC}
{$MODE OBJFPC}{$H+}
{$ENDIF}
{$IFNDEF CPUX64}{$ALIGN ON}{$ENDIF}
{$MINENUMSIZE 4}
{$I cef.inc}
interface
uses
uCEFBaseRefCounted, uCEFInterfaces, uCEFTypes;
type
TCefAudioHandlerOwn = class(TCefBaseRefCountedOwn, ICefAudioHandler)
protected
procedure OnAudioStreamStarted(const browser: ICefBrowser; audio_stream_id, channels: integer; channel_layout: TCefChannelLayout; sample_rate, frames_per_buffer: integer); virtual;
procedure OnAudioStreamPacket(const browser: ICefBrowser; audio_stream_id: integer; const data : PPSingle; frames: integer; pts: int64); virtual;
procedure OnAudioStreamStopped(const browser: ICefBrowser; audio_stream_id: integer); virtual;
procedure RemoveReferences; virtual;
public
constructor Create; virtual;
end;
TCustomAudioHandler = class(TCefAudioHandlerOwn)
protected
FEvents : Pointer;
procedure OnAudioStreamStarted(const browser: ICefBrowser; audio_stream_id, channels: integer; channel_layout: TCefChannelLayout; sample_rate, frames_per_buffer: integer); override;
procedure OnAudioStreamPacket(const browser: ICefBrowser; audio_stream_id: integer; const data : PPSingle; frames: integer; pts: int64); override;
procedure OnAudioStreamStopped(const browser: ICefBrowser; audio_stream_id: integer); override;
procedure RemoveReferences; override;
public
constructor Create(const events : IChromiumEvents); reintroduce; virtual;
destructor Destroy; override;
end;
implementation
uses
{$IFDEF DELPHI16_UP}
System.SysUtils,
{$ELSE}
SysUtils,
{$ENDIF}
uCEFMiscFunctions, uCEFLibFunctions, uCEFBrowser;
procedure cef_audio_handler_on_audio_stream_started(self : PCefAudioHandler;
browser : PCefBrowser;
audio_stream_id : integer;
channels : integer;
channel_layout : TCefChannelLayout;
sample_rate : integer;
frames_per_buffer : integer); stdcall;
var
TempObject : TObject;
begin
TempObject := CefGetObject(self);
if (TempObject <> nil) and (TempObject is TCefAudioHandlerOwn) then
TCefAudioHandlerOwn(TempObject).OnAudioStreamStarted(TCefBrowserRef.UnWrap(browser),
audio_stream_id,
channels,
channel_layout,
sample_rate,
frames_per_buffer);
end;
procedure cef_audio_handler_on_audio_stream_packet( self : PCefAudioHandler;
browser : PCefBrowser;
audio_stream_id : integer;
const data : PPSingle;
frames : integer;
pts : int64); stdcall;
var
TempObject : TObject;
begin
TempObject := CefGetObject(self);
if (TempObject <> nil) and (TempObject is TCefAudioHandlerOwn) then
TCefAudioHandlerOwn(TempObject).OnAudioStreamPacket(TCefBrowserRef.UnWrap(browser),
audio_stream_id,
data,
frames,
pts);
end;
procedure cef_audio_handler_on_audio_stream_stopped(self : PCefAudioHandler;
browser : PCefBrowser;
audio_stream_id : integer); stdcall;
var
TempObject : TObject;
begin
TempObject := CefGetObject(self);
if (TempObject <> nil) and (TempObject is TCefAudioHandlerOwn) then
TCefAudioHandlerOwn(TempObject).OnAudioStreamStopped(TCefBrowserRef.UnWrap(browser),
audio_stream_id);
end;
constructor TCefAudioHandlerOwn.Create;
begin
inherited CreateData(SizeOf(TCefAudioHandler));
with PCefAudioHandler(FData)^ do
begin
on_audio_stream_started := {$IFDEF FPC}@{$ENDIF}cef_audio_handler_on_audio_stream_started;
on_audio_stream_packet := {$IFDEF FPC}@{$ENDIF}cef_audio_handler_on_audio_stream_packet;
on_audio_stream_stopped := {$IFDEF FPC}@{$ENDIF}cef_audio_handler_on_audio_stream_stopped;
end;
end;
procedure TCefAudioHandlerOwn.OnAudioStreamStarted(const browser : ICefBrowser;
audio_stream_id : integer;
channels : integer;
channel_layout : TCefChannelLayout;
sample_rate : integer;
frames_per_buffer : integer);
begin
//
end;
procedure TCefAudioHandlerOwn.OnAudioStreamPacket(const browser : ICefBrowser;
audio_stream_id : integer;
const data : PPSingle;
frames : integer;
pts : int64);
begin
//
end;
procedure TCefAudioHandlerOwn.OnAudioStreamStopped(const browser : ICefBrowser;
audio_stream_id : integer);
begin
//
end;
procedure TCefAudioHandlerOwn.RemoveReferences;
begin
//
end;
// TCustomAudioHandler
constructor TCustomAudioHandler.Create(const events : IChromiumEvents);
begin
inherited Create;
FEvents := Pointer(events);
end;
destructor TCustomAudioHandler.Destroy;
begin
RemoveReferences;
inherited Destroy;
end;
procedure TCustomAudioHandler.RemoveReferences;
begin
FEvents := nil;
end;
procedure TCustomAudioHandler.OnAudioStreamStarted(const browser : ICefBrowser;
audio_stream_id : integer;
channels : integer;
channel_layout : TCefChannelLayout;
sample_rate : integer;
frames_per_buffer : integer);
begin
if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnAudioStreamStarted(browser,
audio_stream_id,
channels,
channel_layout,
sample_rate,
frames_per_buffer);
end;
procedure TCustomAudioHandler.OnAudioStreamPacket(const browser : ICefBrowser;
audio_stream_id : integer;
const data : PPSingle;
frames : integer;
pts : int64);
begin
if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnAudioStreamPacket(browser,
audio_stream_id,
data,
frames,
pts);
end;
procedure TCustomAudioHandler.OnAudioStreamStopped(const browser : ICefBrowser;
audio_stream_id : integer);
begin
if (FEvents <> nil) then
IChromiumEvents(FEvents).doOnAudioStreamStopped(browser,
audio_stream_id);
end;
end.

View File

@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 117, "InternalVersion" : 118,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "81.2.15.0" "Version" : "81.2.16.0"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {