24 May '13 - 03:47 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: 1 ... 85 86 [87] 88 89 ... 135
  Reply  |  Print  
Author Topic: BASS_DSHOW Video Library  (Read 271885 times)
zmmaj
Posts: 80


« Reply #1720 on: 7 Sep '11 - 07:07 »
Reply with quoteQuote

hi...
A have several isue...
First:
xVideo_DVDGetProperty(chan,prop,val)
I can got total duration, but current position do not work...
Please Help file is terrible bad for this function.
(I don't believe that you have double function for same thing for' prop' duration/ position).
This do not work neither in demoDVD.exe
One question, how to change result of measure( secconds, milisec, etc)?

Seccond
xVideo_MIX_StreamCreateFile is NOT in *.h file
So, I can't use them.
If you make that function work, please explain me how to add LPCSTR file to void mstr[0].. Sad
With File_add i have flickering of added file...
It will help if you explain me what that function do... and layer stuff, you haven't any explantation about layers anywhere. Sad

3:
 Can you give mi code i C or C++ how to retrieve decoders and devices from system?
   I can't understand delphi example( Actually I understand, but I must Export every single encoder/decoder/device to GM one by one... I can't see, how to do that from example).
Bass dlll have similar function's and forks fine for me.I need something similar.
  
4: Please write somewhere what work in lite version, and what do NOT.

5: Please, please try to avoid result's in void or HEX... I can't retrieve them well.
 everything else is good ( double, DWORD,string). This is due GM restrictions ( reals and null terminated strings)

6: You haven't function to LOAD bitmap as resource. I can't to do that in GM.
    ( Truth is that I can, but my result is not valid for C or C++),
    So everything related to overload Bitmaps not work for me


And at last.. I was added in example ResourceFree Smiley

P.S. If you make function who will return X/Y cords, you can make to return just cords of active window itself Top_X and Top_Y in pixels , since I can find mouse position on desktop in pixels. Smiley
« Last Edit: 7 Sep '11 - 08:31 by zmmaj » Logged
Ionut Cristea
Posts: 1376


« Reply #1721 on: 7 Sep '11 - 10:46 »
Reply with quoteQuote

  I suggest looking over http://surodev.com/downloads/xVideo1.2.zip update.

The xVideo_MIX_StreamCreateFIle was removed. A easy function was added, so that you can add a new mix channel.

Quote
Chan :=xVideo_StreamCreateFile(PChar(file1),0,panel1.Handle,0);
   if chan<>0 then
   begin
    xVideo_ChannelAddFile(chan,Pchar(file2),0);
    xVideo_ChannelAddFile(chan,Pchar(file3),0);
    xVideo_ChannelAddFile(chan,Pchar(file4),0);
  end;
  xVideo_ChannelPlay(chan);


You can add up to 15 new videos to mix to a channel. A HSTREAM mixer will be added soon, so that you can mix and control each stream individual.
Also, i suggest looking over the DVDDemo
Logged
zmmaj
Posts: 80


« Reply #1722 on: 7 Sep '11 - 10:59 »
Reply with quoteQuote

Ok i will download update...
I hope and xVideo_DVDGetProperty(chan,prop,val) will work as well... Sad

I was download update... DVDDemo are a same... Nothing different... or I miss something Sad
there is no example for xVideo_DVDGetProperty(chan,prop,val) function Sad
« Last Edit: 7 Sep '11 - 11:52 by zmmaj » Logged
Ionut Cristea
Posts: 1376


« Reply #1723 on: 7 Sep '11 - 11:47 »
Reply with quoteQuote

Quote
procedure TFormPlayer.SetTitlesInfo;
var
  titlecount: integer;
  I: Integer;
  item: TmenuItem;
  item2: TmenuItem;
  chapcount: Integer;
  J: Integer;
begin
  PopUpMenu1.Items.Items[3].Clear;
  titlecount:= xVideo_DVDGetProperty(Chan, xVideo_DVDTitles,0);
  if(titlecount<0) then exit;
  for I := 1 to titlecount do
  begin
    item:= Tmenuitem.Create(FormPlayer.popupmenu1);
    item.Caption:='Title '+inttostr(i);
    item.OnClick:=formplayer.PlayTitleClick;
    PopupMenu1.Items.Items[3].Add(item);
        //get the title number of chapters
    chapcount:= xVideo_DVDGetProperty(Chan, xVideo_DVDTitleChapters,i);
    for J := 1 to chapcount do
    begin
     item2:= Tmenuitem.Create(FormPlayer.popupmenu1);
     item2.Caption:='Chapter '+inttostr(J);
     item2.OnClick:=formplayer.PlayChapterClick;
     PopupMenu1.Items.Items[3].Items[i-1].Add(item2);
    end;
  end;
end;
Logged
zmmaj
Posts: 80


« Reply #1724 on: 7 Sep '11 - 12:00 »
Reply with quoteQuote

My bad...
I have problem with
xVideo_DVDGetProperty( chan,xVideo_CurrentDVDTitle,xVideo_DVDCurrentTitlePosition);
Is that same as
xVideo_DVDGetProperty( chan,xVideo_DVDCurrentTitlePosition ,0); Huh

from nether I can't got a value.
Function
xVideo_DVDGetProperty( chan,xVideo_CurrentDVDTitle,xVideo_DVDCurrentTitle);
works, and return some value, but I don't know what that value represent ( secconds, miliseconds etc);

As I say help for this function is very messy...

xVideo_ChannelGetPosition(HSTREAM chan,DWORD mode);
DON'T work neither in DVD demo. For that is simple reason.
Every chapter have different length and result chan is one for any chapter.
So this function for DVD with several chapters will always return 0.
I must say this function work well for single  *.vob file.
« Last Edit: 7 Sep '11 - 13:02 by zmmaj » Logged
Ionut Cristea
Posts: 1376


« Reply #1725 on: 7 Sep '11 - 12:03 »
Reply with quoteQuote

  The position values are always in miliseconds. I will update the CHM.
Logged
zmmaj
Posts: 80


« Reply #1726 on: 7 Sep '11 - 22:41 »
Reply with quoteQuote

Tnx man, now function
xVideo_DVDGetProperty( chan,xVideo_CurrentDVDTitle,xVideo_DVDCurrentTitlePosition);
works, but result is in seconds as I can see... that is OK for me Smiley

but with
Chan :=xVideo_StreamCreateFile(PChar(file1),0,panel1.Handle,0);
   if chan<>0 then
   begin
    xVideo_ChannelAddFile(chan,Pchar(file2),0);
    xVideo_ChannelAddFile(chan,Pchar(file3),0);
    xVideo_ChannelAddFile(chan,Pchar(file4),0);
  end;
  xVideo_ChannelPlay(chan);
I can see only first loaded video...
If I set to windowless I have masive flickering of playing 2 videos...
Logged
Emil Weiss
Posts: 107


« Reply #1727 on: 8 Sep '11 - 04:47 »
Reply with quoteQuote

oops.. changed
« Last Edit: 8 Sep '11 - 05:51 by Emil Weiss » Logged
Ionut Cristea
Posts: 1376


« Reply #1728 on: 8 Sep '11 - 07:16 »
Reply with quoteQuote

Quote
but with
Chan :=xVideo_StreamCreateFile(PChar(file1),0,panel1.Handle,0);
   if chan<>0 then
   begin
    xVideo_ChannelAddFile(chan,Pchar(file2),0);
    xVideo_ChannelAddFile(chan,Pchar(file3),0);
    xVideo_ChannelAddFile(chan,Pchar(file4),0);
  end;
  xVideo_ChannelPlay(chan);

This because you don't resize the videos streams. If you don't do that , the videos will be displayed on full video window.
Use something like this:
Quote
xVideo_MIXChannelResize(chan,combobox2.ItemIndex,rect1.Left,rect1.top,rect1.Right,rect1.Bottom);
2nd paramaeter is the stream mix index(0-first, 1- 2nd....)

Logged
zmmaj
Posts: 80


« Reply #1729 on: 8 Sep '11 - 11:22 »
Reply with quoteQuote

tnx, I will try this your way..
 I was try with second way..
AddWindow , and then resize Window.. and I got PIcture in picture with flickering..

YES !!! work without flickering in your way:)
but I must to initialize all with windowLess attribute, But OK...

What else work for sure from MIX stuff?
« Last Edit: 8 Sep '11 - 17:24 by zmmaj » Logged
Ionut Cristea
Posts: 1376


« Reply #1730 on: 8 Sep '11 - 19:00 »
Reply with quoteQuote

I'm glad that you make it to work. Setting alpha value of a stream will work, resizing also will work Smiley
Logged
zmmaj
Posts: 80


« Reply #1731 on: 8 Sep '11 - 19:33 »
Reply with quoteQuote

hm... since we hear sound from all new added video to channel, I thing we need some function for sound control for each layer. At least to mute/unmute sound from specific layer.
Logged
Ionut Cristea
Posts: 1376


« Reply #1732 on: 8 Sep '11 - 20:02 »
Reply with quoteQuote

  That is not available with xVideo_ChannelAddFile function. What you want can be achieve with the xVideo_STREAM_MIX flag at stream creation.
Logged
zmmaj
Posts: 80


« Reply #1733 on: 8 Sep '11 - 20:39 »
Reply with quoteQuote

I can't understand how, but OK, maybe in future you will release some C++ example how to do that.

I have pproblem with
GM_xVideo_ChannelSetAttribute(chan,xVideo_ATTRIB_PAN,value)  after settings new value, I got very strange results.
for example 0 is start position (left=rigt), after I do pan+=2, with
GM_xVideo_ChannelSetAttribute(chan,xVideo_ATTRIB_PAN) I got 1000 or -1000 (with pan-=2).

Is this my wrapper error ?
I was double check, all is ok...
Both functions work well with Volume flag.

One more.
I was ask about working MIX functions
You said that will alfa working BUT, you havent xVideo_MIX_ChannelAlpha(HSTREAM chan,int alpha) in *.h file Sad
if you mean on  xVideo_ChannelSetAttribute  that is OK, but this function can't change alpha value of eg. layer 2 Sad
« Last Edit: 8 Sep '11 - 23:25 by zmmaj » Logged
zmmaj
Posts: 80


« Reply #1734 on: 9 Sep '11 - 07:20 »
Reply with quoteQuote

Can you help me with device enumerations and callback stuff?

Can you make that functions easier?
eg.  GetAudiodevices(device_index); just as is in Bass.dll

This your way is simply to confused. Sad
I can't understand Delphi example code at all... Sad

example..
in almost every delphi example you have next function
 xVideo_ChannelGetConnectedFilters
but that function is NOT in *.chm... I don't know usage of this, or what they work Sad
Especially I don't understand how callback's works.
please one C or C++ example, or,  at least write me what exactly callbacks return as result...
And example how to use arguments of that calls...
Reason is Simple,I cant make to work thry wrapper such calls , so I must make something what will return similar results in main function itself.


I was update wraper for GameMaker...
Now work multimedia, DVD, and Movie Mix...
here it is Link
http://www.host-a.net/u/zmmaj/gmDVD%20ver%201comma1.zip
I was also use MaxWinapi gex extension, you will need them
Link for used Gex extension
http://www.host-a.net/u/zmmaj/maxwinapi2.gex
« Last Edit: 9 Sep '11 - 11:53 by zmmaj » Logged
zmmaj
Posts: 80


« Reply #1735 on: 10 Sep '11 - 09:49 »
Reply with quoteQuote

uh.. Nothing about callbacks yet Sad
Logged
Ionut Cristea
Posts: 1376


« Reply #1736 on: 10 Sep '11 - 10:35 »
Reply with quoteQuote

Quote
BOOL CALLBACK CallBackFilters(void * Filter, PCHAR FilterName,BOOL pp,void* user)
{
   ///do something with values received
}

.......

xVideo_ChannelGetConnectedFilters(chan,&CallBackFilters,NULL);


I hope this helps.
Logged
zmmaj
Posts: 80


« Reply #1737 on: 10 Sep '11 - 11:25 »
Reply with quoteQuote

Umgh...
That functions return BOOL, if I am right...
and please give me example for "FilterName", and"Filter". From where I got that names( filter and Filter name)?

I only can to do next in wrapper
xVideo_ChannelGetConnectedFilters(chan,CallBackFilters(void * Filter, PCHAR FilterName,BOOL pp,void* user),NULL);

But this wont work...
« Last Edit: 10 Sep '11 - 11:30 by zmmaj » Logged
Ionut Cristea
Posts: 1376


« Reply #1738 on: 10 Sep '11 - 11:37 »
Reply with quoteQuote

  What you want to do is not not correct. The second parameter should be the a pointer adress of a callback function. Maybe should i implement a function similar to BASS?   
Logged
zmmaj
Posts: 80


« Reply #1739 on: 10 Sep '11 - 11:46 »
Reply with quoteQuote

Yesss if they will be like in bass that will be great:)

Make it simple... Return name/id/attributes/etc(index, Video/audio/recording) to get names/index, atributes,capabilities etc... I will make loop outside wrapper.. Smiley
 I am stuck here Sad
For all calback is same Sad
or give me example of that names... Maybe I understand at last what they are and from where comes... Sad
« Last Edit: 10 Sep '11 - 12:30 by zmmaj » Logged
Pages: 1 ... 85 86 [87] 88 89 ... 135
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines