avssamp again

Hi Guys,

I know ‘avssamp’-related questions were asked in the past but I failed
to find answers on my particular questions:

  1. How can I verify avssamp works? For example, how can I ‘redirect’
    avssamp to pc speakers to ensure it is really playing wav file
    specified? At the moment it looks like it doesn’t even start… I can
    see it in the device manager and I can see something with the same
    GUID (‘20698827-7099-4c4e-861A-4879D639A35F’) in the kxstudio but I
    have no idea how to ‘enable’ this driver.

  2. What needs to be done to convert (or register) avssamp to virtual microphone?

Bonus question: How to search through ‘NTDEV’ list ? :slight_smile:

P.S. I beg pardon for noob questions, to avoid it in future I would
greatly appreciate if anybody could suggest any good books/articles on
AVStream with better explanation than on MSDN.

Alexander Ivash wrote:

  1. How can I verify avssamp works? For example, how can I ‘redirect’
    avssamp to pc speakers to ensure it is really playing wav file
    specified? At the moment it looks like it doesn’t even start… I can
    see it in the device manager and I can see something with the same
    GUID (‘20698827-7099-4c4e-861A-4879D639A35F’) in the kxstudio but I
    have no idea how to ‘enable’ this driver.

Avssamp is a fake combination camera/microphone device. Test it like
you would test any web camera with a microphone. The easiest way is to
use one of the DirectShow tools, like graphedt or AMCap. Look for the
driver in the “Video Capture Sources” category. Render both pins, and
“play”.

  1. What needs to be done to convert (or register) avssamp to virtual microphone?

It is already a virtual microphone. That microphone happens to be tied
to a virtual video camera. If you don’t want the camera, then you need
to remove the video capture pin and the associated code, and tweak the
INF. However, that leaves you with a “filter-centric” filter, which is
normally used only when you have two related pins that operate in
lock-step. The “avshws” sample is a pin-centric filter, where the pins
operate independently. When a filter only has one pin, it doesn’t
really make a difference.

Bonus question: How to search through ‘NTDEV’ list ? :slight_smile:

http://www.osronline.com . There’s a search box in the left margin.

P.S. I beg pardon for noob questions, to avoid it in future I would
greatly appreciate if anybody could suggest any good books/articles on
AVStream with better explanation than on MSDN.

There are no books. KS and AVStream are magical technologies, but they
are learned through experience. A good understanding of DirectShow is
important; many of the concepts in KS and AVStream came from DirectShow.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Thank you, Tim!

> Avssamp is a fake combination camera/microphone device. Test it like
> you would test any web camera with a microphone. The easiest way is to
> use one of the DirectShow tools, like graphedt or AMCap. Look for the
> driver in the “Video Capture Sources” category. Render both pins, and
> “play”.

Ok, cool, I’ll check AMCap (there is no graphedit in windows 10 anymore).

> It is already a virtual microphone. That microphone happens to be tied
> to a virtual video camera. If you don’t want the camera, then you need
> to remove the video capture pin and the associated code, and tweak the
> INF. However, that leaves you with a “filter-centric” filter, which is
> normally used only when you have two related pins that operate in
> lock-step. The “avshws” sample is a pin-centric filter, where the pins
> operate independently. When a filter only has one pin, it doesn’t
> really make a difference.

Ok, yes… But I meant, is it possible to update/register driver in
system in such a way that it will be presented inside recording
devices so it will be possible to select it in skype etc. ?

> There are no books. KS and AVStream are magical technologies, but they
> are learned through experience. A good understanding of DirectShow is
> important; many of the concepts in KS and AVStream came from DirectShow.

Looks like DirectShow books should be good start then…

Thank you again for the quick reply!

Regards, Alexander

> Bonus question: How to search through ‘NTDEV’ list ? :slight_smile:

I just wonder where Mr.Aseltine is - IIRC, he just “loves” questions (and posters) like this…

Anton Bassov

Alexander Ivash wrote:

Ok, cool, I’ll check AMCap (there is no graphedit in windows 10 anymore).

Well, it never was shipped with Windows. It is part of the Platform
SDK. Look in \Program Files (x86)\Windows Kits\10\bin\x64\graphedt.exe.

Ok, yes… But I meant, is it possible to update/register driver in
system in such a way that it will be presented inside recording
devices so it will be possible to select it in skype etc. ?

Have you looked for it? It should already be available in Skype,
although it might fail the minimum resolution requirements for Skype.
avssamp registers itself as a “capture” category device. If you want it
to be seen as a straight audio device, you’ll probably want to regiser
it as an “audio” category. That’s in the INF.

What I’m trying to tell you is that there is nothing magical here. To
Windows, there is no difference between avssamp and your Logitech web
camera with microphone. They’re all treated exactly the same.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

anton bassov wrote:

> Bonus question: How to search through ‘NTDEV’
> list ? :slight_smile:

I just wonder where Mr.Aseltine is - IIRC, he just
“loves” questions (and posters) like this…

Would it be a catch 22 to suggest Googling “search NTDEV”?

> Would it be a catch 22 to suggest Googling “search NTDEV”?

Imagine the following thread:

OP. “I want use Google but it not work. please help.”

Doron. “What are you trying to do?”

OP. “I call KeSetEvent() but it not work. They say use “Google KeSetEvent()” but it not work. please guide me on it”

Truly Yours. “Where is Chris???”

Mr.Burn. “PUBLISH THE NAME OF YOUR COMPANY (etc)…”

Mr.Roberts. “Once again, I have to remind everyone that we were all inexperienced once”

Max. "Google is just pathetic. Use MSN instead of Google. Its search engine is much better, because it uses Windows and SQL Server… "

Truly Yours (ironically). “Yes, the entire architecture of Windows NT has been specifically designed for high performance.”

Peter. “Shut the fuck up, Anton - you are not contributing to the discussion. Thread closed.”

Anton Bassov

Further experiments showed that neither video nor audio ‘part’ of the driver is visible in the skype/graphedt or AMCap.

As I said previously the only place where I can find something looking like avssamp (based on hardware id equality ‘20698827-7099-4c4e-861A-4879D639A35F’) is ‘KS Studio’ tool (I beg pardon for naming it ‘kxstudio’ in the first post’). In particular I see two entries with such device id: one inside KSCATEGORY_CAPTURE Filter Factories, another inside KSCATEGORY_VIDEO Filter Factories.

Moreover, when I try to ‘instantiate’ audio pin - I can see ‘CCaptureFilter::DispatchCreate’ and ‘CCaptureFilter::BindAudioToWaveObject’ entries in the DebugView (I DbgPrint in corresponding places), which means driver is definitely doing something.

But. It is still not clear how to verify it really works. I tried to link audio pin with pc speaker input pin using drag&drop but failed. Probably (most likely!) I’m missing something. Could it be just not ready to Windows 10 64bit? Or could it be the case something is broken in new mechanism of build & deploy (I’m using VS 2015 community edition & provisioned VM).

Another question is why driver is not visible in graphedt / AMCap / skype if it should be visible here? Any hints on what else can I check?

Oh, forgot to ask bout search box in the left margin… I still can’t find it… Could it be the case that this forum/mail list can be accessed in different way than ‘http://www.osronline.com/cf.cfm?PageURL=showThread.CFM?link=276674’ ?

Yup.

Just. Use. Google.

Peter
OSR
@OSRDrivers

xxxxx@gmail.com wrote:

Further experiments showed that neither video nor audio ‘part’ of the driver is visible in the skype/graphedt or AMCap.

As I said previously the only place where I can find something looking like avssamp (based on hardware id equality ‘20698827-7099-4c4e-861A-4879D639A35F’) is ‘KS Studio’ tool (I beg pardon for naming it ‘kxstudio’ in the first post’). In particular I see two entries with such device id: one inside KSCATEGORY_CAPTURE Filter Factories, another inside KSCATEGORY_VIDEO Filter Factories.

But that’s exactly where graphedt (and AMCap) look to find capture
devices. You looked under Video Capture Sources and WDM Streaming
Capture Devices?

As a matter of superstition, you might try running “regsvr32” on
ksproxy.ax and kswdmcap.ax, in both system32 and syswow64. Is this a
normal build of Windows 10? It’s not some streamlined, embedded, or IoT
build?

But. It is still not clear how to verify it really works. I tried to link audio pin with pc speaker input pin using drag&drop but failed. Probably (most likely!) I’m missing something.

Ksstudio is a wonderful tool for validating filters, but using it to
construct a complete functional graph requires a level of guruness that
I do not possess.

Could it be just not ready to Windows 10 64bit? Or could it be the case something is broken in new mechanism of build & deploy (I’m using VS 2015 community edition & provisioned VM).

I have not used that mechanism. I still install my drivers by hand, by
copying the drivers packages and installing with something like “devcon
install”.

Another question is why driver is not visible in graphedt / AMCap / skype if it should be visible here? Any hints on what else can I check?

That is an excellent question.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>> As a matter of superstition, you might try running “regsvr32” on

> ksproxy.ax and kswdmcap.ax, in both system32 and syswow64.

Done, but it didn’t help…

> Is this a normal build of Windows 10? It’s not some streamlined, embedded, or IoT build?

Normal desktop 64bit Windows 10 (although on VM, but it shouldn’t matter I suppose)

> You looked under Video Capture Sources and WDM Streaming
Capture Devices?

Yes. Nothing here besides hardware mic under ‘WDM Streaming Capture Devices’

But what is interesting, I can see ‘virtual-audio-capturer’ inside ‘Audio Capture Sources’ and ‘screen-capture-recorder’ inside ‘Video Capture Sources’, which are DirectShow filters from here: https://github.com/rdp/virtual-audio-capture-grabber-device

It means graphedt is functional, there is something wrong with avssamp I’m using… Or with the way I’m deploying…

Just an idea… Guy here http://www.winvistatips.com/threads/problem-with-installing-avssamp-to-audio-capture-sources-category.184898/

… is doing something like the following inside inf file:

[avssamp.RunOnce.AddReg]
HKLM,%RunOnce%,“avssamp.Reader.Capture”,“rundll32.exe
streamci,StreamingDeviceSetup
%avssamp.DeviceId%,%KSNAME_Filter%,%KSCATEGORY_CAPTURE%,%17%\avssamp.inf,avssamp.Reader.Install”
HKLM,%RunOnce%,“avssamp.Reader.Video”,“rundll32.exe
streamci,StreamingDeviceSetup
%avssamp.DeviceId%,%KSNAME_Filter%,%KSCATEGORY_VIDEO%,%17%\avssamp.inf,avssamp.Reader.Install”
HKLM,%RunOnce%,“avssamp.Reader.Audio”,“rundll32.exe
streamci,StreamingDeviceSetup
%avssamp.DeviceId%,%KSNAME_Filter%,%KSCATEGORY_AUDIO%,%17%\avssamp.inf,avssamp.Reader.Install”

It is not clear whether he added this for some purposes or his inf file contained these entries from the very beginning… But if his inf file contained such entries initially, then looks like MS changed something, because I don’t see anything like this in my inf file (from avssamp from github). Could anybody here who has older versions of WDK than WDK 10 paste/attach inf file for avssamp, please?

xxxxx@gmail.com wrote:

Just an idea… Guy here http://www.winvistatips.com/threads/problem-with-installing-avssamp-to-audio-capture-sources-category.184898/

… is doing something like the following inside inf file:

[avssamp.RunOnce.AddReg]
HKLM,%RunOnce%,“avssamp.Reader.Capture”,“rundll32.exe
streamci,StreamingDeviceSetup
%avssamp.DeviceId%,%KSNAME_Filter%,%KSCATEGORY_CAPTURE%,%17%\avssamp.inf,avssamp.Reader.Install”
HKLM,%RunOnce%,“avssamp.Reader.Video”,“rundll32.exe
streamci,StreamingDeviceSetup
%avssamp.DeviceId%,%KSNAME_Filter%,%KSCATEGORY_VIDEO%,%17%\avssamp.inf,avssamp.Reader.Install”
HKLM,%RunOnce%,“avssamp.Reader.Audio”,“rundll32.exe
streamci,StreamingDeviceSetup
%avssamp.DeviceId%,%KSNAME_Filter%,%KSCATEGORY_AUDIO%,%17%\avssamp.inf,avssamp.Reader.Install”

It is not clear whether he added this for some purposes or his inf file contained these entries from the very beginning… But if his inf file contained such entries initially, then looks like MS changed something, because I don’t see anything like this in my inf file (from avssamp from github). Could anybody here who has older versions of WDK than WDK 10 paste/attach inf file for avssamp, please?

The avssamp.inf from the Windows 7 WDK includes an
[avssamp.RunOnce.AddReg] section that runs streamci for
KSCATEGORY_CAPTURE. Theoretically, that registry manipulation should be
done for you when you call KsInitializeDriver or KsCreateFilterFactory.
The INF in the avshws sample uses an [xxxx.Interfaces] section that
calls AddInterface to serve much the same purpose. That’s what I use in
my capture drivers, and I suggest you copy that into your INF.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I’ve got avssamp.inf file from DDK 7600.16385.0 and compared with the one from github and noticed a few differences. After merging DDK file into WDK’s one I’ve got the following warnings from VS 2015:

‘1>D:\AI\Sandbox\virtualmic\avssamp.inf(53-53): warning 2083: Section [avssamp.installation] not referenced or used.
1>D:\AI\Sandbox\virtualmic\avssamp.inf(56-56): warning 2083: Section [avssamp.runonce.addreg] not referenced or used.
1>D:\AI\Sandbox\virtualmic\avssamp.inf(74-74): warning 2083: Section [avssamp.reader.install] not referenced or used.
1>D:\AI\Sandbox\virtualmic\avssamp.inf(77-77): warning 2083: Section [avssamp.reader.addreg] not referenced or used.’

Could it be the case VS 2015 / Windows 10 doesn’t understand old syntax of ini-files anymore and that’s why MS changed its context? Anyway, I’m going to try merged ini-file as this is the only idea I have at the moment…

xxxxx@gmail.com wrote:

I’ve got avssamp.inf file from DDK 7600.16385.0 and compared with the one from github and noticed a few differences. After merging DDK file into WDK’s one I’ve got the following warnings from VS 2015:

‘1>D:\AI\Sandbox\virtualmic\avssamp.inf(53-53): warning 2083: Section [avssamp.installation] not referenced or used.
1>D:\AI\Sandbox\virtualmic\avssamp.inf(56-56): warning 2083: Section [avssamp.runonce.addreg] not referenced or used.
1>D:\AI\Sandbox\virtualmic\avssamp.inf(74-74): warning 2083: Section [avssamp.reader.install] not referenced or used.
1>D:\AI\Sandbox\virtualmic\avssamp.inf(77-77): warning 2083: Section [avssamp.reader.addreg] not referenced or used.’

Could it be the case VS 2015 / Windows 10 doesn’t understand old syntax of ini-files anymore and that’s why MS changed its context? Anyway, I’m going to try merged ini-file as this is the only idea I have at the moment…

Why don’t you post your modified INF file, and we’ll take a look?


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

I beg pardon for the delay, here it is:

; Copyright (c) Microsoft Corporation. All rights reserved.
;
; avssamp.INF – This file contains installation information for the filter-based
; AVStream sample driver avssamp.sys
;
; Note:
;
; This INF expects the following hierarchy in the installation folder:
;
; \
; avssamp.inf
; avssamp.sys
;

[Version]
Signature=“$Windows NT$”
Class=MEDIA
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider=%ProviderName%
CatalogFile=avssamp.cat
DriverVer=09/30/2004,1.0.0.0

[SourceDisksNames]
1000 = %cdname%,

[SourceDisksFiles]
avssamp.sys = 1000

[ControlFlags]
ExcludeFromSelect=*

[DestinationDirs]
avssamp.CopyFiles=12

[Manufacturer]
%ManufacturerName%=Standard,NTamd64,NTx86

;---------------------------------------------------------------
; The preferred method to install as a Root-enumerated device.
; NOTE: DO NOT INCLUDE THIS FOR A HARDWARE DRIVER!
;---------------------------------------------------------------

;[DeviceInstall32]
;AddDevice = ROOT\SW{20698827-7099-4c4e-861A-4879D639A35F},avssamp_RootEnumInstall

;[avssamp_RootEnumInstall]
;HardwareIds = SW{20698827-7099-4c4e-861A-4879D639A35F}

; from WDK 7600.16385.0
[DefaultInstall]
needs=avssamp.Installation

[avssamp.Installation]
AddReg=avssamp.RunOnce.AddReg

[avssamp.RunOnce.AddReg]
HKLM,%RunOnce%,“avssamp.Reader.Capture”,“rundll32.exe streamci,StreamingDeviceSetup %avssamp.DeviceId%,%KSSTRING_Filter%,%KSCATEGORY_CAPTURE%,%01%\avssamp.inf,avssamp.Reader.Install”
;---------------------------------------------------------------

[Standard.NTx86]
%avssamp.DeviceDesc%=avssamp,SW{20698827-7099-4c4e-861A-4879D639A35F}

[Standard.NTamd64]
%avssamp.DeviceDesc%=avssamp,SW{20698827-7099-4c4e-861A-4879D639A35F}

[avssamp.NT]
include=ks.inf,kscaptur.inf
needs=KS.Registration,KSCAPTUR.Registration.NT
CopyFiles=avssamp.CopyFiles

[avssamp.CopyFiles]
avssamp.sys

[avssamp.Reader.Install]
AddReg=avssamp.Reader.AddReg

[avssamp.Reader.AddReg]
HKR,CLSID,%Proxy.CLSID%
HKR,FriendlyName,%avssamp.Reader.FriendlyName%
HKLM,System\CurrentControlSet\Control\MediaCategories%AudioCapturePinGUID%
HKLM,System\CurrentControlSet\Control\MediaCategories%AudioCapturePinGUID%,Name,%AudioCapturePinName%

[avssamp.NT.Services]
AddService=avssamp, 0x00000002, avssamp.ServiceInstall

[avssamp.ServiceInstall]
DisplayName=%avssamp.DeviceDesc%
ServiceType=%SERVICE_KERNEL_DRIVER%
StartType=%SERVICE_DEMAND_START%
ErrorControl=%SERVICE_ERROR_NORMAL%
ServiceBinary=%12%\avssamp.sys
LoadOrderGroup=ExtendedBase

[Strings]
; non-localizable
RunOnce=“SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce”
Proxy.CLSID=“{17CCA71B-ECD7-11D0-B908-00A0C9223196}”
avssamp.DeviceId=“{20698827-7099-4c4e-861A-4879D639A35F}”
KSCATEGORY_CAPTURE=“{65E8773D-8F56-11D0-A3B9-00A0C9223196}”
KSSTRING_Filter=“{9B365890-165F-11D0-A195-0020AFD156E4}”
AudioCapturePinGUID=“{BA1184B9-1FE6-488a-AE78-6E997B02CAEA}”
AudioCapturePinName=“Audio Capture”

SERVICE_KERNEL_DRIVER=1
SERVICE_DEMAND_START=3
SERVICE_ERROR_NORMAL=1
REG_EXPAND_SZ=0x00020000
REG_DWORD=0x00010001

;localizable
ProviderName=“TODO-Set-Provider”
ManufacturerName=“TODO-Set-Manufacturer”
avssamp.DeviceDesc=“AVStream Filter-Centric Sample Driver”
avssamp.Reader.FriendlyName=“avssamp Source”

cdname=“Disk 1”

xxxxx@gmail.com wrote:

I beg pardon for the delay, here it is:

Then the warnings are ignorable. InfChk doesn’t realize that those
other sections will be referenced by streamci when it runs.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.