Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 9 of 9
  1. #1
    Join Date
    Mar 2005
    Posts
    130

    MediaInfo Advanced dll question

    I found a open source dll that can give you all info of a audio or video file
    its a great addition to ams and to my media player but
    i could not manage to use it sins all documentation that came with it are for vc++,vc,vb...

    im new to dlls i just managed to run those made by worms (they rock)
    but please any help here will be very apprecied. i long searched for something like this.

  2. #2
    Join Date
    Oct 2005
    Location
    American Dubai
    Posts
    629
    Hi. Didn't a PDF or ReadMe file come along with it? You need to know the function names, and what parameters could be passed when calling each DLL Function.

  3. #3
    Join Date
    Feb 2006
    Posts
    16
    Use DLL Export Viewer to get the function names

  4. #4
    Join Date
    Oct 2005
    Location
    American Dubai
    Posts
    629
    Quote Originally Posted by aisudhiasudhias92564
    Use DLL Export Viewer to get the function names
    perfeito!
    agradecimentos!

  5. #5
    Join Date
    Mar 2005
    Posts
    130
    i read the documentation with mediainfo dll everything is explained
    (however for microsoft c++ c# and vb)
    all functions are well explained in the help file.
    but the problem i got is by using it with ams
    somehow it look like ams close the dll after it load & pass the command to it

    but i need to pass 2 functions and 2 parameter for each action (i dunno how to do that on ams)

    first function should be the "MediaInfo_open" and parameter the file path of the media file Ex: "C:\exemple.ogg"
    THEN i sould pass a second parameter so i can get the info from the media file "MediaInfo_Get" and Ex: "filesize" as parameter

    so that i can get the file size of the exemple.ogg file
    but the dll dont return the size of the file but something else as if just forget my first call dll

    either im calling dll twice or it get closed after the first call so it no longer remember the first function & parameter i passed to it
    This is not a problem of the dll because it work well for vb tested it.
    i dont undestand how should i use it in ams
    so plz anyone help with some code...

  6. #6
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    One thing to be aware of is that AMS can only pass parameters ByVal not ByRef. And it can only pass numeric, or string values. If the DLL doesn't return the values you are looking for as the Result, you'll need to write your own wrapper to do this for you.

  7. #7
    Join Date
    Mar 2005
    Posts
    130
    Code:
    resultA = DLL.CallFunction(_SourceFolder.."\\Autoplay\\Docs\\MediaInfo.dll", "MediaInfo_Open", _SourceFolder.."\\Autoplay\\Docs\\video.avi", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
    
    resultB = DLL.CallFunction(_SourceFolder.."\\Autoplay\\Docs\\MediaInfo.dll", "MediaInfo_Count_Get", "handle, Stream_Audio, -1", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
    
    
    --re = Dialog.Message("Notice", resultA, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    re = Dialog.Message("Notice", resultB, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    thats the code im using to retrive the number of audio streams of the video file video.avi
    the video.avi has 3 audio stream but the dll return 0 everytime.
    Last edited by goukilord10; 04-16-2006 at 10:10 AM.

  8. #8
    Join Date
    Mar 2005
    Posts
    130
    Code:
    resultA = DLL.CallFunction(_SourceFolder.."\\Autoplay\\Docs\\MediaInfo.dll", "MediaInfo_Open", _SourceFolder.."\\Autoplay\\Docs\\video.avi", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
    
    resultB = DLL.CallFunction(_SourceFolder.."\\Autoplay\\Docs\\MediaInfo.dll", "MediaInfo_Get", "handle, Stream_General, 0, \"FileSize\", Info_Text, Info_Name", DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL);
    
    
    re = Dialog.Message("Notice", resultB, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
    im sorry but i couldent edit the last post
    however thats another script i used, but the size the dll is not the correct
    of the media file i opned.
    One thing to be aware of is that AMS can only pass parameters ByVal not ByRef. And it can only pass numeric, or string values. If the DLL doesn't return the values you are looking for as the Result, you'll need to write your own wrapper to do this for you.
    i guess its ok to work with this dll with numeric and string values
    I think im only misusing it with ams
    plz look in my script and tell me if this is the correct way to work with dlls
    because im using 2 DLL.CallFunction
    and if is like if the dll ignore the first DLL.CallFunction as soon i use the second DLL.CallFunction

    The reason i need to use this dll is to allow my media player project to get the hight and width of a video file so it can resize its window size to show the video at its original size.
    if anyone one know of a different way to do this without this dll it will be very apprecied

  9. #9
    Join Date
    Mar 2005
    Posts
    130
    there is no way to get movies height and width in a invisible way to users ?

Similar Threads

  1. DLL question
    By Friethoe in forum AutoPlay Media Studio 6.0
    Replies: 5
    Last Post: 03-17-2006, 04:01 PM
  2. Official Release Of SetMask DLL
    By Worm in forum AutoPlay Media Studio 5.0
    Replies: 23
    Last Post: 01-24-2005, 09:00 PM
  3. Question on DLL Function Call
    By Martin_SBT in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 11-10-2003, 04:03 PM
  4. Calling a DLL
    By matrix in forum Setup Factory 6.0
    Replies: 1
    Last Post: 12-26-2001, 07:47 PM
  5. SUF6 - Call DLL action
    By Romahe in forum Setup Factory 5.0
    Replies: 1
    Last Post: 11-27-2001, 06:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts