Roger's woze

July 30, 2010

visual studio unable to register dll

Filed under: Uncategorized — rogerdpack @ 9:48 pm

So, you build your suh-weet dll using visual studio (express 2010 in my case),

looks like

STDAPI DllRegisterServer()

{

return 0;

}

go to register it, and get…

The module “smalld.dll” was loaded but the entry-point DllRegisterServer was not found.

Make sure that “smalld.dll” is a valid DLL or OCX file and then try again.

but you try and make it anything but WINAPI and you get:

: ‘BOOL DllRegisterServer(void)’ : overloaded function differs only by return type from ‘HRESULT DllRegisterServer(void)’

Well turns out that in my case, the problem was *not* that symbols weren’t being exported, it was that my method “DllRegisterServer” was in a .cpp file, not a .c one.

fix: write it like:

extern “C” __declspec(dllexport) HANDLE DllRegisterServer()
{
return 0;
}

gah.

ref: http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvc/thread/ad2fe436-f871-4cd8-89e0-657240775ef5

how to compile directsound using visual studio 2010 express

Filed under: Uncategorized — rogerdpack @ 9:03 pm

Unfortunately it’s a bit painful.

Anyway install visual studio c++ express 2010

install microsoft sdk “latest”

open D:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses using it, build.

Now open your other “real” project, and you have to add those baseclasses include/lib to your project

add D:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses to the *beginning* of your (right click on project) -> properties -> VC++ Directories -> Include directories.

add D:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\multimedia\directshow\baseclasses\Debug to your Library directories. This one can go at the end or the beginning.

visual studio woe

Filed under: Uncategorized — rogerdpack @ 8:48 pm
1>LINK : fatal error LNK1104: cannot open file ‘..\..\BaseClasses\Debug\strmbasd.lib’

meant “you probably need to leave the samples folders where they are since apparently they’re hard coded” or edit your link “inputs” and change the link to strmbasd.lib to not be a relative path anymore.

directsound audio input filter/device example/demo

Filed under: Uncategorized — rogerdpack @ 5:01 pm

Here’s an open source one, I believe:

https://sourceforge.net/projects/maddxshow/

Yikes that was hard to find.

TODO note it on msdn if it wurx out…

unfortunately it’s just a filter, not a device.

open source virtual audio cable clues/thoughts/musings

Filed under: Uncategorized — rogerdpack @ 2:53 pm

I might have to build one eventually…

We all want one, now don’t we?

Some clues:

http://social.msdn.microsoft.com/Forums/en-US/windowspro-audiodevelopment/thread/e725bb7c-607c-410a-a495-9c92987a34c4

http://msdn.microsoft.com/en-us/library/dd316551(VS.85).aspx

Also http://www.totalrecorder.com/tr_drivers.htm said that “windows vista can only use directshow devices” or something so it better be directshow.

http://msdn.microsoft.com/en-us/library/dd316551(VS.85).aspx

VAC itself…

I want a directshow source filter (audio)?

http://tmhare.mvps.org/downloads.htm “wmv source”

http://ac3filter.net/ (maybe bid for them to do it?)

yikes this is terrifying…

how to setup your sound system to record “what you hear”

Filed under: Uncategorized — rogerdpack @ 2:41 pm

turns out to not be too trivial…

Windows XP

Anyway for Windows XP it “might” be available.

To turn it on, right click on the “speaker” in the system try (or run sndvol32), “Open Volume Properties” (or run sndvol32.exe — same effect).

Now select recording devices by going to options [menu] => properties -> radio button select “recording”, make sure wave out is checked, hit ok.

Now make sure the check box under “wave out” is selected.  Now selecting your sound card’s “input” should actually be it’s output. Odd, eh?

Vista:

http://www.downloadsquad.com/2007/01/15/how-to-enable-wave-out-recording-in-vista/

If these steps fail (like the option isn’t there), then this may mean you’re out of luck.

You’ll either have to buy a new sound card, or a cable and connect it from your headphone jack to your linein (or mic) jack, then record using that, or purchase either http://www.shiningmorning.com/VirtualAudioStreaming/index.html or “virtual audio cable” (the former looks less confusing) or http://www.e2esoft.cn/vsc/buy.asp or the like.

How to use VLC as a free open source alternative to playon.tv

Filed under: Uncategorized — rogerdpack @ 1:19 pm

Basically setup your VLC to stream your desktop + audio, here:

http://betterlogic.com/roger/?p=3058

If this works, then now let’s try it on the console.

To access it from your console, browse to that url (the 1.2.3.4 one) and, with luck, it might play. Note that different consoles have different input capabilities, so you may have to tweak it a bit, but it should play.  So you should probably tweak the “Transcoding settings” (wrench button) so that it outputs in something compatible with your console device.

You could also use this similarly to play existing media files on your computer (just stream those files instead of streaming capture devices).

how to use VLC to stream your desktop live (windows) with audio

Filed under: Uncategorized — rogerdpack @ 12:38 pm

Turns out that you can…I think so anyway.

Basically you setup VLC to stream from your desktop+audio, then use your console device to tune into that stream.

Sound easy? It does take a few steps to get setup.  I should make it easy and market it :)

VLC by default comes with a “screen input” option, to capture the desktop.  Unfortunately it appears there’s a bug and currently it cannot use that option along with audio.

So we will have to use an alternative input, called DirectShow.  With Directshow, you can choose your video and your audio input device.

So first go and download a direct show screen capture input: http://betterlogic.com/roger/?p=3059

Next setup your sound card to “capture” wave out: http://betterlogic.com/roger/?p=3073

Now open VLC, Media [menu] -> Streaming -> Capture Device tab -> Set video device name as “media looks screen capture” (may need to hit refresh list first), and set audio device name as whatever device is capturing your wave out (probably your default sound card name).

Now click on stream, click on “Destinations”, change destination to http, click add, change url to “/go.mpg”

Now you’ll want to stream it using mp3 audio output, so click the wrench to edit the output options -> audio codec tab -> change it to mp3, hit save.

Now hit “Stream”

It should say “streaming” on the bottom.

Now to test your setup, let’s test the stream by viewing that same stream within VLC.

open up another instance of VLC, and open up that very stream, like

Media [menu] -> Open Network Stream -> type in http://localhost:8080/go.mpg (replace 1.2.3.4 with your IP Address).

If this works, you are half way there.

Now let’s discover our IP address:

First find out your IP by running the “ipconfig” program.  Open the “run” box by hitting windows + r key, now type in “cmd /c ipconfig && pause”

Looks for a line like “IP Address …… 1.2.3.4″ (your IP address if the 1.2.3.4). (in vista it will say IPv4 Address).

open it with a new instance of VLC, like

Media [menu] -> Open Network Stream -> type in http://1.2.3.4:8080/go.mpg (replace 1.2.3.4 with your IP Address).

And you’re live.  At least you could theoretically go to other computers on your local network and “screen share” your desktop and audio now.

If you wanted to watch it live from “anywhere on the internet” you’d probably have to setup appropriate port forwarding, which is a topic for another day.

Comments welcome.

list of available directshow screen capture filters

Filed under: Uncategorized — rogerdpack @ 12:26 pm

VLC itself has a “capture desktop” mode though apparently it doesn’t work with sound.  It feels a tidge slower than (if you’re on Windows) using a directshow input source that captures the desktop.

Here’s a list of the ones I’ve found that are free to download.

http://www.umediaserver.net/umediaserver/download.html uscreencapture, works ok.

http://wiki.medialooks.com/Screen_Capture_DirectShow_Filter seems quickest to me, of the available, though I haven’t looked at them too closely.

http://betterlogic.com/roger/?p=3046 shows the source code for one, though I don’t believe it comes pre-built so you’d have to build your own.

http://www.splitmedialabs.com/vh-video-sdk/vh-screen-capture

how to stream from vlc (input) to ps3 media server ps3ms

Filed under: Uncategorized — rogerdpack @ 12:10 pm

Turns out that you *can* though with a few steps.

Basically you setup an “rss feed” file somewhere that points to your streaming instance of VLC.

See http://ps3mediaserver.org/forum/viewtopic.php?f=6&t=5534

You might also be able to stream to a file (like out.mpg) and have PS3MS play that file:

http://ps3mediaserver.org/forum/viewtopic.php?f=6&t=728

Older Posts »

Powered by WordPress