Closed TomYU6 closed 6 years ago
Hope to have a complete demo program for ALVideoPlayerSurface component. thank you.
can you post the file of the project somewhere that i can test it ? ex on http://www.filedropper.com/ and gave the link here
this is my project code.
Did you receive the above attachment? Can you compile and run the attachment project?
yes i receive, i just need to find an old android 4 device to test it, maybe i will find one this week end
thanks! One thing to note is that the video feature in the included your demo project is normal on my android 4.4.4.
Test project can't run on android version 7.7.1
Ok, it's not because of android version, it's because you didn't include in your project the modified delphi source file! the error message I have is "06-24 00:12:30.528: I/info(600): FMX: TestAlVideoPlayer: [Context Exception]: Cannot find shader variable 'texture0'."
Delphi don't handle GL_TEXTURE_EXTERNAL_OES texture and you need to modify the source code of delphi to handle those texture! (https://quality.embarcadero.com/browse/RSP-16830)
you need to update this unit: FMX.Canvas.GPU.Helpers.pas
you can find the modification you need to do in \demos\ALFmxControls_source\embarcadero\tokyo\ but thoses modification are based on delphi tokyo 10.2.2 so you will "probably" (maybe not as you was able to compile and run alfmxcontrols) need to compare original file and modified file to find out the modification and migrate them to delphi tokyo 10.2.3
series of not reading documents
ALVideoPlayerSurface is not working it's not showing video please help here is small code ALVideoPlayerSurface1.VideoPlayer.setLooping(true); ALVideoPlayerSurface1.VideoPlayer.prepare('v.avi',True); ALVideoPlayerSurface1.VideoPlayer.Start;
I download The Components. first of all Demos dont Run The need a componet something like cxLabel. I run compileAll.bat i select Sidney then I run embarcadero\sidney\10_4_2\update.bat Nothing Happen ( sydney is installed on default dir anyway ) Then i took the files from folders fmx rtl and i replace The files in c:\programm files (x86) \embarcadero etc
Then i installed the BpL then i try to create procedure TForm1.Button1Click(Sender: TObject); begin if ALVideoPlayerSurface1.VideoPlayer.state in [vpsIdle] then begin ALVideoPlayerSurface1.VideoPlayer.setLooping(true); ALVideoPlayerSurface1.VideoPlayer.prepare('https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4',true); //ALVideoPlayerSurface1.VideoPlayer.start; end;
video doesnt play
I think i jhave destroyed my delphi and i need to reinstall it
Nothing works you just break delphi source. Give up and try to learn Visual Basic it fits you better.
sorry @icinemagr, I can understand your frustration, I m sorry :( I just read your last post, Alcinoe is not working anymore in Sydney, you must have Alexandria 11.3. some demo use DevExpress (ie cxLabel)
You can not destroy your delphi, you can simply uninstall the BPL.
You are destroying the delphi if you copy the modified *.pas fmx and rtl in delphi directory. You are not very clear if we copy the patched files to delphi dir or leave it on directory Alexandria\11_3 now. Somewhere you have to make a disclamer that is not compatible with windows 7, windows server 2008 r2. powershell in windows 7 has no Expand-Archive command. But you can tell to us to Unzip it on Library and REM this line and continue. powershell -command "Expand-Archive -Force '%OutPutPath%\tmp.zip' '%OutPutPath%'" even if you do all those Demo is Running but the main function which is the Playing Mp4 direct ( the reason i try 2 years now to use your component ) is not working i am getting something line numbers on left side and no video.
All those in Delphi 11.3 on windows server 2008 R2 by the way delphi runs just fine. Bpl Is installed jus fine bute after each time i close my delphi IDE i get AV have nothing else installed is a clean install
we are not modifying anything in the delphi source code. all the patched libraries are located in https://github.com/MagicFoundation/Alcinoe/tree/master/Embarcadero/Alexandria/11_3 and build from scratch with the command line https://github.com/MagicFoundation/Alcinoe/blob/master/Embarcadero/Alexandria/11_3/Update.bat. again nothing is chanched inside the original delphi libraries
regarding : Somewhere you have to make a disclamer that is not compatible with windows 7, windows server 2008 r2. powershell in windows 7 has no Expand-Archive command.
I wasn't aware :( I do not have windows 7 but if you have it you can feel free to update the batch to make it compatible with windows 7 and post here your modification. Alcinoe is an open source project !
regarding the video, you must first try to run the demo https://github.com/MagicFoundation/Alcinoe/tree/master/Demos/ALFmxControls/_Source to see if it's work. if not then it's probably something wrong in the way you do
the https://github.com/MagicFoundation/Alcinoe/tree/master/Demos/ALFmxControls/_Source does compile does install on my samsung phone. eveyrthing works expect the video.
steps for windows 7.
1) download http://libarchive.org/downloads/libarchive-v3.6.2-amd64.zip extract the files from bin folder to Alcinoe-master/ root folder the files are bsdtar.exe bsdcpio.exe bsdcat.exe archive.dll 2)Rename bsdtar.exe to tar.exe
now for the Unzip Routine inside the compileJar.bat 3) rem the line around 354 --> rem powershell -command "Expand-Archive -Force '%OutPutPath%\tmp.zip' '%OutPutPath%'" add teh follow lines
Call :UnZipFile "%OutPutPath%\tmp.zip" "%OutPutPath%"
exit /b
:UnZipFile
%vbs% echo Set fso = CreateObject("Scripting.FileSystemObject")
%vbs% echo If NOT fso.FolderExists(%1) Then %vbs% echo fso.CreateFolder(%1) %vbs% echo End If %vbs% echo set objShell = CreateObject("Shell.Application") %vbs% echo set FilesInZip=objShell.NameSpace(%2).items %vbs% echo objShell.NameSpace(%1).CopyHere(FilesInZip) %vbs% echo Set fso = Nothing %vbs% echo Set objShell = Nothing cscript //nologo %vbs% if exist %vbs% del /f /q %vbs% IF ERRORLEVEL 1 goto ERROR
1) Alexandria 2) Sydney (deprecated) Enter number to select a compiler (Empty to auto select): 1
Download libraries (Y/N, default=Y)?:
?[36mDownload https://github.com/facebook/facebook-ios-sdk/releases/download/v15.1.0/FacebookSDK-Static_XCFramework.zip?[0m % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 37.6M 100 37.6M 0 0 4989k 0 0:00:07 0:00:07 --:--:-- 5694k
?[36mDownload https://github.com/firebase/firebase-ios-sdk/releases/download/10.2.0/Firebase.zip?[0m % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 236M 100 236M 0 0 5480k 0 0:00:44 0:00:44 --:--:-- 5692k
iOS libraries downloaded successfully
Android libraries downloaded successfully
?[36mMSBuild DProjNormalizer.dproj /p:config=Release /p:Platform=Win64?[0m Microsoft (R) Build Engine version 4.8.3761.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved.
Embarcadero Delphi for Win64 compiler version 35.0 Copyright (c) 1983,2022 Embarcadero Technologies, Inc. 36247 lines, 1.14 seconds, 1682024 bytes code, 218144 bytes data.
?[36mMSBuild UnitNormalizer.dproj /p:config=Release /p:Platform=Win64?[0m Microsoft (R) Build Engine version 4.8.3761.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved.
Embarcadero Delphi for Win64 compiler version 35.0 Copyright (c) 1983,2022 Embarcadero Technologies, Inc. 25961 lines, 1.62 seconds, 1590992 bytes code, 212724 bytes data.
Skipped C:\comp11\Alcinoe-master\Demos\ALJsonDoc_Source\dwsJSON.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Demos\ALJsonDoc_Source\dwsUtils.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Demos\ALJsonDoc_Source\dwsXPlatform.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Demos\ALJsonDoc_Source\superdate.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Demos\ALJsonDoc_Source\superobject.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Demos\ALJsonDoc_Source\supertimezone.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Demos\ALJsonDoc_Source\superxmlparser.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Source\Alcinoe.FBX.Base.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Source\Alcinoe.FBX.Lib.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Source\Grijjy.ErrorReporting.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Source\Grijjy.SymbolTranslator.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Source\ZLibEx.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Source\ZLibExApi.pas (FilesToIgnore) Skipped C:\comp11\Alcinoe-master\Source\ZLibExGZ.pas (FilesToIgnore)
Run tests (Y/N, default=Y)?:
now if you press yes you get
Could Not Find C:\comp11\Alcinoe-master\Tests*.identcache Could Not Find C:\comp11\Alcinoe-master\Tests*.dproj.local Could Not Find C:\comp11\Alcinoe-master\Tests*.groupproj.local Could Not Find C:\comp11\Alcinoe-master\Tests*.deployproj.local
?[36mMSBuild ALTests.dproj /p:config=Debug /p:Platform=Win32?[0m Microsoft (R) Build Engine version 4.8.3761.0 [Microsoft .NET Framework, version 4.0.30319.42000] Copyright (C) Microsoft Corporation. All rights reserved.
Embarcadero Delphi for Win32 compiler version 35.0 Copyright (c) 1983,2022 Embarcadero Technologies, Inc. ALTests.dpr(161): error F2613: Unit 'DUnitX.Loggers.Console' not found. [C:\comp11\Alcinoe-master\Tests_Source\ALTests.dproj] Press any key to continue . . .
C:\comp11\Alcinoe-master>
I try again without running all tests.
Run all tests answer No ( otherwise errros) Build Jars Answer NO (otherwise errors) Build tools Answer YES Build demos (Y/N, default=Y)?: N ( do not press yes )
Finished Press any key to continue . . .
here is some errors if you press Build demos
C:\Program Files (x86)\Embarcadero\Studio\22.0\Bin\CodeGear.Delphi.Targets(412,5): error MSB6004: The specified task executable location "C:\Program Files (x86)\Embarcadero\Studio \22.0\bin\dcciosarm64.exe" is invalid. [C:\comp11\Alcinoe-master\Demos\ALConfetti_Source\ALConfettiDemo.dproj]
pas(7): error F2613: Unit 'cxStyles' not found. [C:\comp11\Alcinoe-master\Demos\ALDatabaseBenchmark_Source\ALDatabaseBenchmark.dproj] right (c) 1983,2022 Embarcadero Technologies, Inc.
pas(7): error F2613: Unit 'cxStyles' not found. [C:\comp11\Alcinoe-master\Demos\ALDatabaseBenchmark_Source\ALDatabaseBenchmark.dproj]
the https://github.com/MagicFoundation/Alcinoe/tree/master/Demos/ALFmxControls/_Source does compile does install on my samsung phone. eveyrthing works expect the video.
Can you see in the android log what error you have ?
the https://github.com/MagicFoundation/Alcinoe/tree/master/Demos/ALFmxControls/_Source does compile does install on my samsung phone. eveyrthing works expect the video.
Can you see in the android log what error you have ?
I did all the follow and i try to compile the allFmx conrols demo I have added the alcinoe-master/source to my Library Path botho on 64 android and 32 bit android
i remove those 3 lines {$IFNDEF ALDPK} procedure ChildrenMouseDown(const AObject: TControl; Button: TMouseButton; Shift: TShiftState; X, Y: Single); override; procedure ChildrenMouseMove(const AObject: TControl; Shift: TShiftState; X, Y: Single); override; procedure ChildrenMouseUp(const AObject: TControl; Button: TMouseButton; Shift: TShiftState; X, Y: Single); override; procedure ChildrenMouseLeave(const AObject: TControl); override; {$ENDIF} from Alinoe.FLX.layouts
I also removed from alcinoe.fmx.TabControl
And is Compiled and Installed On my samsung. I have not change the source of the video i am checking now and come back.
Update
Installed on my phone
Everything WOrks but the video
i change to
ALVideoPlayerSurface1.VideoPlayer.prepare('http://techslides.com/demos/samples/sample.mp4', True);
And i see if is working now.
Ok i give up its been 2 years now :) Video doesnt play its shows strange lines maybe a demo with only a videoPlayerSurface component and a remote mp4 file to simple play would be nice.
my form: unit main;
interface
uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, ALFmxObjects, ALVideoPlayer, FMX.Controls.Presentation, FMX.StdCtrls;
type TForm3 = class(TForm) ALVideoPlayerSurface1: TALVideoPlayerSurface; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form3: TForm3;
implementation
{$R *.fmx}
procedure TForm3.Button1Click(Sender: TObject); begin if ALVideoPlayerSurface1.VideoPlayer.state in [vpsIdle] then begin ALVideoPlayerSurface1.VideoPlayer.setLooping(true); ALVideoPlayerSurface1.VideoPlayer.prepare('http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4', True{AutoStartWhenPrepared}); // << no sound on ios, don't know why :( end; end; end.
//and add Libraries in project Manager: alcinoe.jar exoplayer-core.jar exoplayer-hls.jar
//press Button1, App crashed
Delphi 10.2.3 and android 4.4.4 Demo is working fine.
Need to publish other jar files?
Error Log:
06-21 11:46:12.777: E/jdwp(18808): Failed sending reply to debugger: Broken pipe 06-21 11:46:13.797: E/libEGL(18808): call to OpenGL ES API with no current context (logged once per thread) 06-21 11:46:13.797: E/libEGL(18808): call to OpenGL ES API with no current context (logged once per thread) 06-21 11:46:13.797: E/libEGL(18808): validate_display:254 error 3008 (EGL_BAD_DISPLAY) 06-21 11:46:13.797: E/libEGL(18808): call to OpenGL ES API with no current context (logged once per thread) 06-21 11:46:13.857: E/dalvikvm(18808): Could not find class 'com.google.android.exoplayer2.video.MediaCodecVideoRenderer$OnFrameRenderedListenerV23', referenced from method com.google.android.exoplayer2.video.MediaCodecVideoRenderer.clearRenderedFirstFrame 06-21 11:46:13.857: E/dalvikvm(18808): Could not find class 'com.google.android.exoplayer2.video.MediaCodecVideoRenderer$OnFrameRenderedListenerV23', referenced from method com.google.android.exoplayer2.video.MediaCodecVideoRenderer.configureCodec 06-21 11:46:13.867: E/dalvikvm(18808): Could not find class 'android.media.AudioAttributes$Builder', referenced from method com.google.android.exoplayer2.audio.DefaultAudioSink.createAudioTrackV21 06-21 11:46:13.867: E/dalvikvm(18808): Could not find class 'android.media.AudioFormat$Builder', referenced from method com.google.android.exoplayer2.audio.DefaultAudioSink.createAudioTrackV21 06-21 11:46:13.877: E/dalvikvm(18808): Could not find class 'android.media.AudioAttributes$Builder', referenced from method com.google.android.exoplayer2.audio.AudioAttributes.getAudioAttributesV21 06-21 11:47:05.077: E/OMXMaster(18808): A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one. 06-21 11:47:05.077: E/OMXNodeInstance(18808): OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed 06-21 11:47:05.087: E/OMXMaster(18808): A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one. 06-21 11:47:05.187: E/OMXMaster(18808): A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one. 06-21 11:47:05.477: E/libEGL(18808): eglMakeCurrent:730 error 3009 (EGL_BAD_MATCH)