× Components and Libraries for Audio and Video Development, discussions, problems and suggestions

Question [LAB] pl_Win_DSPack tests

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
9 years 3 months ago #2153 by Sternas Stefanos
[LAB] pl_Win_DSPack tests was created by Sternas Stefanos
We port DSPack Audio/Video package for Windows.
This new package (pl_Win_DSPack) has components to write Windows Multimedia Applications using MS Direct Show and DirectX.

Screen from our video player tests...

PilotLogic Architect and Core Programmer
Attachments:
The following user(s) said Thank You: Miquel Matas, Curt

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #2158 by Adriano Soares
Replied by Adriano Soares on topic Re: [LAB] pl_Win_DSPack tests
Mr. Sternas

That is really great news.
I work developing using DSPack and now with this package in CT all my work will be make in this wonderfull Studio.

Take a look at www.dsp-worx.de/, is about creating and working with Digital Audio Effects in Borland Delphi/Kylix ...

Congratulations with my best regards.

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
9 years 3 months ago #2159 by Sternas Stefanos
Replied by Sternas Stefanos on topic Re: [LAB] pl_Win_DSPack tests
Thanks Sir
we want to make some more tests for pl_Win_DSPack
and we want your help...

PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #2160 by Adriano Soares
Replied by Adriano Soares on topic Re: [LAB] pl_Win_DSPack tests
Ok.

I am here. Say me , how I can help CT team?

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
9 years 3 months ago - 9 years 3 months ago #2161 by Sternas Stefanos
Replied by Sternas Stefanos on topic Re: [LAB] pl_Win_DSPack tests
Simple
here are the new pl_Win_DirectX and pl_Win_DSPack packages
and Win_DSPack.zip with some DSPack Lazarus samples

test, modify and report
oh, and have fun...

PilotLogic Architect and Core Programmer
Last edit: 9 years 3 months ago by Sternas Stefanos.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #2162 by Adriano Soares
Replied by Adriano Soares on topic Re: [LAB] pl_Win_DSPack tests
Work in progress...

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #2163 by Aleksandar
Replied by Aleksandar on topic Re: [LAB] pl_Win_DSPack tests

We port DSPack Audio/Video package for Windows.
This new package (pl_Win_DSPack) has components to write Windows Multimedia Applications using MS Direct Show and DirectX.

Screen from our video player tests...


I need to write some notes since I am very familiar (or maybe too familiar :)) with this package and pl_Win_DirectX that is required by this package.

I see my name in some sources of pl_Win_DirectX, so I see that you use my D2009+ modification of Clootie's DirectX files, but I am not sure where you get them. If they are from songbeamer site, they have some small bugs in few places (nothing too important and mostly not related to directshow). Those bugs were fixed by Embarcadero in latest Delphi versions.

If you find some time, it would be good to compare files from Delphi XE or XE2 with files in this package and to fix those errors.

Yes I know, it would be best that I do that, but I just do not have time. :(

Please also note that TDSVideoWindowEx2 is buggy, and that it have some memory leaks (in fullscreen mode if i remember correctly). It also removes Aero in Vista and later versions.

That's why I have this in my version of DSPack:

// Use TDSVideoWindowEx2 only if you really need it. It is buggy and removes Aero in Vista and later versions!
{.$DEFINE USE_DSVWEX2}
{$IFDEF USE_DSVWEX2}
// Use TDSVideoWindowEx2 fullscreen only if you do not have any other option
{.$DEFINE USE_DSVWEX2_FS}
{$ENDIF}

I can attach it if you are interested.

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #3051 by mike
Replied by mike on topic Re: [LAB] pl_Win_DSPack tests
G'day,

Firstly - many thanks for porting this to Lazarus. I've been using your DSPack for about a week now. Easily implemented a video player with all the functionality I needed.

A couple of minor points:
I'm running CodeTyphon 2.9 under Windows 8. The Windows 8 may be pertinent. DirectShow was primarily initially Windows XP SDK.
  • Most of the sample apps wouldn't run out of the box for me. SSGIV (or whatever the abbreviation is :-) ). Traced into the code, and it's all when you have FilterGraph.GraphEdit := True. Simply changing this property to false fixed that problem for me. I have no idea if this is a code issue, or if Windows 8 has changed the RunningObjectTable somehow.
  • I'm using form inheritance in my code. Any form with the DS controls on it is unable to be descended. "Control '' has no parent". Solved this easily enough by dynamically creating all the controls at run-time. It's my preferred coding technique anyway, so no real problems there.
  • The SampleGrabber SnapShot code sample simply does not work for me. Tracing into it, the failure is retrieving the SampleGrabber MediaType.
hr := SampleGrabber.GetConnectedMediaType(MediaType);
    if hr <> S_OK then
      Exit;
  • In my own code, using the dynamically created SampleGrabber, code mostly identical to the sample code works just fine. (I pass a created Bitmap - the sample code passes a Image.Picture.Bitmap, can't see that that haven't any effect. I don't use the callback functionality either, but that's easily disabled in the code sample). Just just can't work out why that sample code doesn't work.


As you can see, I've been able to easily work around the issues. Probably helps I've previously spent three years creating DirectShow apps. Back in those days I didn't know the DSPack even existed, so worked my way through the MSDN documentation using the clootie headers.

Many thanks again for bringing this code into the Lazarus world.

Mike Thompson
The following user(s) said Thank You: Glenn Hudson

Please Log in or Create an account to join the conversation.

  • Sonnleitner Norbert
  • Offline
  • New Member
  • New Member
More
8 years 4 months ago #3994 by Sonnleitner Norbert
Replied by Sonnleitner Norbert on topic Re: [LAB] pl_Win_DSPack tests
Hello,

in Win7 and WinXP also the Problem with the GetRunningObjectTable call if the GraphEdit property is true.
According to MSDN the GetRunningObjectTable the IRunningObjectTable should be declared as out in the ActivX header.
But after correcting this, the problem still remains.
So I dig a little bit deeper and tried to create a bindCtx.
var
  BindCtx: IBindCtx;

result:=CreateBindCtx(0, BindCtx);
result := bindCtx.GetRunningObjectTable(ROT);
//   result :=  GetRunningObjectTable(0, ROT);

Also in the RemoveGraphFromRot routine.
OleCheck(CreateBindCtx(0, BindCtx));
result := bindCtx.GetRunningObjectTable(ROT);

The code now produces no exception, but GraphEdit doesn't show the remote graph (even the playback of a Video is running).
Someone has an idea what could be the problem. Since I want do develope a BDA application it would great if the GraphEdit function is working :)

best regards
The following user(s) said Thank You: Glenn Hudson

Please Log in or Create an account to join the conversation.

  • Sonnleitner Norbert
  • Offline
  • New Member
  • New Member
More
8 years 4 months ago #3995 by Sonnleitner Norbert
Replied by Sonnleitner Norbert on topic Re: [LAB] pl_Win_DSPack tests
Hello,

in Win7 and WinXP also the Problem with the GetRunningObjectTable call if the GraphEdit property is true.
According to MSDN the GetRunningObjectTable the IRunningObjectTable should be declared as out in the ActivX header.
But after correcting this, the problem still remains.
So I dig a little bit deeper and tried to create a bindCtx.
var
  BindCtx: IBindCtx;

result:=CreateBindCtx(0, BindCtx);
result := bindCtx.GetRunningObjectTable(ROT);
//   result :=  GetRunningObjectTable(0, ROT);

Also in the RemoveGraphFromRot routine.
OleCheck(CreateBindCtx(0, BindCtx));
result := bindCtx.GetRunningObjectTable(ROT);

The code now produces no exception, but GraphEdit doesn't show the remote graph (even the playback of a Video is running).
Someone has an idea what could be the problem. Since I want do develope a BDA application it would great if the GraphEdit function is working :)

best regards

Please Log in or Create an account to join the conversation.

More
8 years 2 months ago #4323 by Glenn Hudson
Replied by Glenn Hudson on topic Re: [LAB] pl_Win_DSPack tests
It is not a Windows 8 issue. I have the same problem with Windows 7 or 8 x86/x64. I believe there is a problem with the TFilter class in the pl_WinDSPack component set. When you click on the TFilter component's BaseFilter property ellipsis it should trigger the BaseFilterEditor form to open in order for you to select the filter settings. However, when the BaseFilter ellipsis is clicked, an error occurs that there is no input source instead of popping up the form. Any thoughts on how to get this fixed? I'm new to Code Typhon and it's forums. I just found this wonderful project after a 16 year C++ Bulder5 career. Pascal is quite different but appears extremely powerful.

Please Log in or Create an account to join the conversation.

  • Sonnleitner Norbert
  • Offline
  • New Member
  • New Member
More
8 years 2 months ago #4333 by Sonnleitner Norbert
Replied by Sonnleitner Norbert on topic Re: [LAB] pl_Win_DSPack tests
I have modified the Routins for AddGraphToRot and RemoveGraphFromRot. I build the graphs now with source code. Using MonoGraphStudio I can also connect remote.
You need the ComObj unit too... Also the functions us a ID as DWORD which is also different to the DSPack.

Happy using :)
//----------------------------------------------------------------------------
  // Enable Graphedit to connect with your filter graph
  //----------------------------------------------------------------------------
  function AddGraphToRot(Graph: IFilterGraph; out ID: DWORD): HRESULT;
  var
    Moniker: IMoniker;
    ROT    : IRunningObjectTable;
    wsz    : WideString;
    BindCtx: IBindCtx;
  begin
    result:=CreateBindCtx(0, BindCtx);
    result := bindCtx.GetRunningObjectTable(ROT);
//    result := GetRunningObjectTable(0, ROT);
    if (result <> S_OK) then exit;
    wsz := format('FilterGraph %p pid %x',[pointer(graph),GetCurrentProcessId()]);
    result  := CreateItemMoniker('!', PWideChar(wsz), Moniker);
    if (result <> S_OK) then exit;
    result  := ROT.Register(0, Graph, Moniker, ID);
    Moniker := nil;
  end;            



  //----------------------------------------------------------------------------
  // Disable Graphedit to connect with your filter graph
  //----------------------------------------------------------------------------
  function RemoveGraphFromRot(ID: DWORD): HRESULT;
  var ROT: IRunningObjectTable;
    BindCtx: IBindCtx;
  begin
    OleCheck(CreateBindCtx(0, BindCtx));
    result := bindCtx.GetRunningObjectTable(ROT);
//    result := GetRunningObjectTable(0, ROT);
    if (result <> S_OK) then exit;
    result := ROT.Revoke(ID);
    ROT := nil;
  end;           
            
The following user(s) said Thank You: mike

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago - 6 years 7 months ago #6834 by Carmelo
Replied by Carmelo on topic Re: [LAB] pl_Win_DSPack tests
Hello
I have problems:
1) with properties BaseFilter click (TBaseFilter).
2) FilterGraph1 GraphichEdit: = True (error in run)
graphedt.exe not see my video files to run the application.
I have installed:
pl_Win_DirectX.zip (824KB) and pl_Win_DSPack.zip (270KB) of Mr. Sternas,
I have installed and tried WindowsSDK 8.1 or WindowsSDK 7.1 .
I have win7 32bit



Last edit: 6 years 7 months ago by Carmelo.

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
6 years 7 months ago #6835 by Sternas Stefanos
Replied by Sternas Stefanos on topic Re: [LAB] pl_Win_DSPack tests
Sir
Is this Lazarus IDE ?
My suggestion is to post the problem to Lazarus forum here
Typhon IDE is NOT the same with Lazarus IDE

PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #6838 by Carmelo
Replied by Carmelo on topic Re: [LAB] pl_Win_DSPack tests
Ok. sorry, I'm new with Lazarus and CT.

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago - 6 years 7 months ago #6841 by mike
Replied by mike on topic Re: [LAB] pl_Win_DSPack tests

Hello,
in Win7 and WinXP also the Problem with the GetRunningObjectTable call if the GraphEdit property is true.
According to MSDN the GetRunningObjectTable the IRunningObjectTable should be declared as out in the ActivX header.
...
The code now produces no exception, but GraphEdit doesn't show the remote graph (even the playback of a Video is running).
Someone has an idea what could be the problem. Since I want do develope a BDA application it would great if the GraphEdit function is working :)


Took me a long time to get around to this. In truth I was hoping someone else would deal with this...

I've submitted a patch to the fpc team for the missing out declaration...
bugs.freepascal.org/view.php?id=27555

UPDATE: ?? @SonnyBoyXXL - I completely missed your post where you posted the full solution. Ahh... Many thanks...
Last edit: 6 years 7 months ago by mike. Reason: Missed information first time...

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
6 years 7 months ago - 6 years 7 months ago #6842 by Sternas Stefanos
Replied by Sternas Stefanos on topic Re: [LAB] pl_Win_DSPack tests
For your info
we update pl_Win_DSPack to ver 5.3.4
and we fix more errors...

Typhon IDE for Win32 and for Win64 give same results on Windows7 64bits (screen1 and 2).

My Suggestion:
We can work together to fix any problem of pl_Win_DSPack
with common reference the current LAB CT 5.3 rev 005230

For this reason, I can give the task to our lab and release tomorrow the current LAB CT

PilotLogic Architect and Core Programmer
Last edit: 6 years 7 months ago by Sternas Stefanos.

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #6901 by mike
Replied by mike on topic Re: [LAB] pl_Win_DSPack tests

For your info
we update pl_Win_DSPack to ver 5.3.4
and we fix more errors...
Typhon IDE for Win32 and for Win64 give same results on Windows7 64bits (screen1 and 2).
My Suggestion:
We can work together to fix any problem of pl_Win_DSPack
with common reference the current LAB CT 5.3 rev 005230
For this reason, I can give the task to our lab and release tomorrow the current LAB CT


Many thanks for the offer.

The underlying cause was in fpc. I've posted a patch for that that has been accepted, so subsequent fpc releases should be fine.
bugs.freepascal.org/view.php?id=27555

@SonnyBoyXXL's code was a workaround for the fpc bug. But in all honesty, a perfectly valid workaround.

However, despite that fact that both scenario's now fully compile (your original code + fpc fix AND @SonnyBoyXXL workaround with original fpc) and run without error, I'm personally unable to connect to the graph in GraphEdt. I know @SonnyBoyXXL reported success, but so far I've been unable to reproduce. I *think* that's because I'm on 64bit, and I'm *guessing* @SonnyBoyXXL was on 32bit.

However, while your offer of working together is on the table, there are two minor changes I always make to the code after I get an update from you. I suspect both of them are due to the fact that I'm more used to dealing with DirectShow than the DSPack, however I'd like to submit them for consideration. What's the appropriate channel for that discussion?

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar Topic Author
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
6 years 7 months ago #6902 by Sternas Stefanos
Replied by Sternas Stefanos on topic Re: [LAB] pl_Win_DSPack tests
Simple Sir
zip and attach modified file here

This forum has 2Terabytes disk to our web server...
From CT 6.x we plan our SVN Server for this reason

PilotLogic Architect and Core Programmer
The following user(s) said Thank You: mike

Please Log in or Create an account to join the conversation.

More
5 years 11 months ago #8568 by Sven Hakansson
Replied by Sven Hakansson on topic [LAB] pl_Win_DSPack tests
I am trying to use pl_Win_DSPack without success. I have read all the comments and implemented all the suggested changes and still can't make it work.
Specifically SampleGrabberBuffer and Snapshot in the example. Has any body been able to grab a frame or make the SampleGrabber example work?

Please Log in or Create an account to join the conversation.