Author Topic: BassVideo  (Read 340003 times)

radio42

  • Posts: 4574
Re: BassVideo Beta
« Reply #75 on: 27 Feb '08 - 12:49 »
A new version of BASS.NET (2.4 final) is available for download and includes the latest BassVideo functions.

firemen

  • Posts: 151
Re: BassVideo Beta
« Reply #76 on: 1 Mar '08 - 10:10 »
You would not could to rotin the example of conclusion over video of any text or picture in overlay?
Similarly it would be not bad to realize support of outsourcings video, type of video camera, TV tuner...


kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #77 on: 1 Mar '08 - 10:23 »
of course i will support create a capture stream, but after i complete support tempo, decode flags.

SoundMike

  • Posts: 331
Re: BassVideo Beta
« Reply #78 on: 1 Mar '08 - 10:52 »
Quote from: RevG on 8 Feb '08 - 19:15
Quote from: kenshin1101 on  8 Feb '08 - 06:39
i had try to write API for VB6 but it doesn't work. I got error when try to send string from VB to BassVideo

The problem is that by default Visual Basic passes all variables by reference, including strings. So when Visual Basic passes a string by reference it is actually passing a pointer to a pointer to a string. Your code probably just expects a pointer to a string which won't work.

Here is a Microsoft article explaining all you need to know to pass strings between vb and C/C++/or any other win32 language.
http://support.microsoft.com/default.aspx?scid=kb;en-us;187912

Any progress on a VB6 interface, particularly with the functions that require strings to be passed? The other functions are easy enough to create 'declares' for. An alternative for me is to call BassVideo from my own C++ DLL, but I'm not very familiar with C++.

Mike

kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #79 on: 1 Mar '08 - 14:28 »
i had test in my dll, the problem is not in the vb string but the callback

kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #80 on: 1 Mar '08 - 17:18 »
here is my new VB API for BassVideo , please test it

http://kenshin1101.googlepages.com/BassVideo.bas

« Last Edit: 1 Mar '08 - 17:50 by kenshin1101 »

SoundMike

  • Posts: 331
Re: BassVideo Beta
« Reply #81 on: 5 Mar '08 - 11:41 »
Sorry for the delay in replying regarding the VB API - my laptop packed up and I only got it back from the repairers today.

A couple of things about the BassVideo.bas file:
1. The constant BassVideo_EndStream is missing, so I added that.
2. In BassVideo_SetVideoWindow you have "ByVal" for VideoRect but that needs to be "ByRef" in order to compile.

I put together a simple test program but I can't get the video to display. I get audio but no video. I don't have a Window callback like your WndProc in the Delphi DemoFull, so I don't know if that is the reason. Basically, these are the Bass and BassVideo calls:

BassVideo_Init (returned true)
BassVideo_SetConfig(BassVideo_Config_Renderer, BassVideo_Overlay)
BASS_Init(1, 44100, 0, Me.hWnd, 0) (returned BASSTRUE)
BassVideo_StreamCreateFile(<filename>, 0, 0, AddressOf myVideoProc, 0)
myVideoProc action: FoundVideo (Handle=-1342177277)
BassVideo_SetWindow(-1342177277, frmVideoDisplay.hwnd, rRect, 0) (rRect is setup with Left=0, Top=0, Right=window width, Bottom=window depth)
myVideoProc action: OpenDone (Handle=-1342177277)
BassVideo_Play(-1342177277, False)

The audio played but no video appeared.
At the end of the audio the following event occurred:
myVideoProc action: EndStream

I also tried other BassVideo_Config_Renderer options, but none of them displayed the video. Is there something I've overlooked?

Another thing, I'm running this under Vista and when the BassVideo stream is created and the SetWindow has been issued, I get a message from Vista advising that the color scheme has been changed to Windows Vista Basic.

Your demo looks great - hopefully we can get the VB procedures sorted out.

Mike

kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #82 on: 5 Mar '08 - 13:34 »
sorry, i'm not a good VB coder :(

however the channel display is < 0 ( i don't know that because channel is DWORD and always > 0, may be VB turn this to integer)
you don't have to declare the wndproc, just use the event when form resize to set the video window.

"the color scheme has been changed to Windows Vista Basic." because the video display is Overlay Mixer, you can turn it to VMR9 by use BassVideo_SetConfig

see my example below, it show the video window (not in the form but it show :D)

if you want to know how to get the WndProc, may be you can try the example i add in the BassVideo documents -> BassVideo_Repaint
use GetWindowLong/SetWindowLong to override the WNDPROC
« Last Edit: 5 Mar '08 - 13:37 by kenshin1101 »

SoundMike

  • Posts: 331
Re: BassVideo Beta
« Reply #83 on: 6 Mar '08 - 08:33 »
Not having much luck with this. Here's what I've found:

  • If I call BassVideo_SetVideoWindow in the BassVideo_FoundVideo callback event then I do not see the video (I just get audio), but if I do NOT call BassVideo_SetVideoWindow then the video is displayed, but in a window with the title "ActiveMovie Window".
  • If I call BassVideo_SetConfig with value BassVideo_VMR9 and ALSO call BassVideo_SetVideoWindow then I get the message from Vista about changing to the basic color scheme (even though the video doesn't get displayed).
  • If I call BassVideo_SetConfig with value BassVideo_VMR9_Windowless then the BassVideo_FoundVideo callback event is not raised.

I've also tried sub-classing the window and putting what I believe to be correct code in the WM_SIZE, WM_MOVE and WM_PAINT events, but even though the events fire I still don't see the video.

The problem seems to be primarily related to the BassVideo_SetVideoWindow API call. As I mentioned in my previous posting, I did have to change the "ByVal VideoRect as Rect" to "ByRef VideoRect as Rect" because otherwise where the function is called I get a compilation error "User-defined type may not be passed ByVal". This also applies to the Declares for BassVideo_WindowResize and BassVideo_AddVideo.

In my VideoProc under the BassVideo_FoundVideo event I have:

Dim rc as Rect
GetClientRect frmVideoDisplay.hWnd, rc
Call BassVideo_SetVideoWindow(handle, frmVideoDisplay.hWnd, rc, 0)

The form frmVideoDisplay is a exclusively for displaying the video.

btw, the channel display < 0 is OK - all my BASS channels have numbers like that.

Any clues as to why my videos are not displaying?

Mike

big_gun

  • Posts: 352
Re: BassVideo Beta
« Reply #84 on: 8 Mar '08 - 06:54 »
Hey Kenshin1101,

Is there any time frame for when creating a decoding stream to use with FX will be released?

Thanks,

Rick

kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #85 on: 8 Mar '08 - 13:29 »
i don't understand your question.
I'm preparing to release a new version. Say it more clear and i will try

big_gun

  • Posts: 352
Re: BassVideo Beta
« Reply #86 on: 13 Mar '08 - 09:49 »
when can i use decoded stream from your dll to add sound fx (compressor, equalizer) etc.?

kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #87 on: 13 Mar '08 - 10:00 »
i thinks there no limit, you can use bass_fx effect if they don't change the buffer size

ken

  • Posts: 739
Re: BassVideo Beta
« Reply #88 on: 12 Apr '08 - 13:13 »
kenshin

How is the progress of BassVideo, any news?

kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #89 on: 13 Apr '08 - 19:19 »
kenshin

How is the progress of BassVideo, any news?

hi!
the next version i'll release soon,
auto resize, repaint, auto move, capture, support VB,
i'm currently work in color control

MikeV

  • Posts: 147
Re: BassVideo Beta
« Reply #90 on: 13 Apr '08 - 19:22 »
I am most interested to see what you are making!

Michael2005

  • Posts: 94
Re: BassVideo Beta
« Reply #91 on: 16 Apr '08 - 08:47 »
Will there be an x64 version of your library?

kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #92 on: 16 Apr '08 - 13:16 »
i don't think delphi can create x64 app

HunterOfDeath

  • Posts: 28
Re: BassVideo Beta
« Reply #93 on: 17 Apr '08 - 11:36 »
 kenshin1101 Can you check if you can change the position of the video file, if when a flv files is playing ?  I know that you didn't made support for flv files, but it seems to work fine with ffdshow codec, the only thing is that when I try to change to video position, there is a sound delay !



kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #94 on: 18 Apr '08 - 09:43 »
please send that file to my mail box
kenshin1101@gmail.com

HunterOfDeath

  • Posts: 28
Re: BassVideo Beta
« Reply #95 on: 18 Apr '08 - 11:54 »
Sent !

kenshin1101

  • Posts: 545
Re: BassVideo Beta
« Reply #96 on: 21 Apr '08 - 04:20 »
Sent !

I found no problem when play that file.
Please try with the new version

riesm

  • Posts: 51
Re: BassVideo Beta
« Reply #97 on: 21 Apr '08 - 09:57 »
When I use the BASS.NET example and run it, I get this error message:

Code: [Select]
Unable to find an entry point named 'BASSVideo_SetVideoWindow' in DLL 'BassVideo.dll'.
I use the latest BASS.NET and the latest BassVideo.dll. Something not sync'd?

radio42

  • Posts: 4574
Re: BassVideo Beta
« Reply #98 on: 21 Apr '08 - 10:03 »
Not that I know of.

riesm

  • Posts: 51
Re: BassVideo Beta
« Reply #99 on: 21 Apr '08 - 10:44 »
I overrode the BASS.NET call into:
Code: [Select]
<System.Runtime.InteropServices.DllImport("BassVideo.dll", EntryPoint:="BASSVideo_SetVideoWindow", CharSet:=System.Runtime.InteropServices.CharSet.Auto)> _
    Public Overloads Shared Sub BASSVideo_SetVideoWindow(ByVal Handle As Integer, ByVal videoWindowHandle As System.IntPtr, ByVal videorect As System.Drawing.Rectangle, ByVal videonum As Integer)
    End Sub

But still the same error. What am I doing wrong?