Author Topic: DirectShow transform  (Read 729 times)

Siekmanski

  • Member
  • *****
  • Posts: 1094
Re: DirectShow transform
« Reply #15 on: July 01, 2017, 12:56:37 AM »
Thanks aw27,

It didn't work on my wife's laptop either, have some debugging to do this weekend.

jj2007

  • Member
  • *****
  • Posts: 7559
  • Assembler is fun ;-)
    • MasmBasic
Re: DirectShow transform
« Reply #16 on: July 01, 2017, 01:13:56 AM »
In case it helps... stuck at this call:
Code: [Select]
CPU Disasm
Address           Hex dump                     Command                            Comments
004014DD          ³.  E8 2AFBFFFF              call <jmp.&kernel32.MultiByteToWid ; ÀKERNEL32.MultiByteToWideChar
004014E2          ³.  8B15 50404000            mov edx, [404050]
004014E8          ³.  8B12                     mov edx, [edx]
004014EA          ³.  68 54404000              push offset 00404054
004014EF          ³.  68 78404000              push offset 00404078               ; UNICODE "Source"
004014F4          ³.  68 60494000              push offset 00404960               ; UNICODE "sample.avi"
004014F9          ³.  FF35 50404000            push dword ptr [404050]
004014FF          ³.  FF52 38                  call near [edx+38] <<<<<<<<<<<<<<<<<<<<<<<
00401502          ³.  83F8 00                  cmp eax, 0

Siekmanski

  • Member
  • *****
  • Posts: 1094
Re: DirectShow transform
« Reply #17 on: July 01, 2017, 05:08:25 PM »
Did some debugging and hope it works now.
The return messages for connecting the filters are shown first for debugging purposes.

In case it doesn't show the video on screen, could you post the error codes please?

The error code for "Connect SourceFilter: 40242" is normal because the audio stream is not decoded.

jj2007

  • Member
  • *****
  • Posts: 7559
  • Assembler is fun ;-)
    • MasmBasic
Re: DirectShow transform
« Reply #18 on: July 01, 2017, 05:49:30 PM »
Now the video shows, with error 40242 for the audio part :t

Siekmanski

  • Member
  • *****
  • Posts: 1094
Re: DirectShow transform
« Reply #19 on: July 01, 2017, 08:48:28 PM »
Some internet streams of different formats.
I'll update the sources when it works all fine on your computers, some feedback from you guys would be nice.  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 7559
  • Assembler is fun ;-)
    • MasmBasic
Re: DirectShow transform
« Reply #20 on: July 01, 2017, 08:56:24 PM »
12:11:06  works fine
12:23:48  works fine
12:27:14  works fine, takes a bit longer
12:38:20  crashes in RtlFreeHeap called by the first CoTaskMemFree

TWell

  • Member
  • ****
  • Posts: 748
Re: DirectShow transform
« Reply #21 on: July 01, 2017, 09:58:54 PM »
DShowGrabber.exe
DShowGrabber2.exe
Quote
Connecting Error.
No combination of intermediate filters could be found to make the connection.

DShowGrabber3.exe
Quote
AddSourceFilter Error.
AddSourceFilter Error; 800c0008

DShowGrabber4.exe
Shows a video.

aw27

  • Member
  • ****
  • Posts: 709
Re: DirectShow transform
« Reply #22 on: July 02, 2017, 12:07:00 AM »
DShowGrabber.exe - no combination of intermediate filters can be found to make the connection
DShowGrabber2.exe - Video OK
DShowGrabber3.exe - no combination of intermediate filters can be found to make the connection
DShowGrabber4.exe - Video OK

HSE

  • Member
  • ****
  • Posts: 533
  • <AMD>< 7-32>
Re: DirectShow transform
« Reply #23 on: July 02, 2017, 12:15:15 AM »
0,3 and 4    -->   Ok
 
2                 --> no combination etc. On close Olly say: Entry Point Alert :Module 'Netvideo' has entry point outside the code (as specified in the PE header)

Siekmanski

  • Member
  • *****
  • Posts: 1094
Re: DirectShow transform
« Reply #24 on: July 02, 2017, 02:08:00 PM »
Thanks guys for testing.  :t

Updated the sources in Reply #7

Placed the AM_MEDIA_TYPE structure and the VIDEOINFOHEADER structure in memory allocated by CoTaskMemAlloc as suggested by Microsoft.
Replaced the sse2 SIMD vertex fill routine by a simpler routine. ( my wife's laptop choked in the previous one )
Removed the SetSamplerState,0,D3DRS_DITHERENABLE,TRUE. ( Not all video-cards have it implemented and black out the texture )
Added some error handling.

You have to install additional DirectShow Video Codecs if certain video formats refuse to work on your PC.

http://www.codecguide.com/download_kl.htm

Marinus
« Last Edit: July 02, 2017, 03:17:39 PM by Siekmanski »

jj2007

  • Member
  • *****
  • Posts: 7559
  • Assembler is fun ;-)
    • MasmBasic
Re: DirectShow transform
« Reply #25 on: July 02, 2017, 05:46:22 PM »
Thanks guys for testing.  :t

With pleasure. There is great interest, it seems :biggrin:

Quote
You have to install additional DirectShow Video Codecs if certain video formats refuse to work on your PC.

http://www.codecguide.com/download_kl.htm

The best I had so far was http://www.windows7codecs.com/

I've now installed K-Lite. Codecs are incredibly messy, and all these packages are competing and blaming other packages for problems. K-Lite asked to uninstall all other packages present on my machine... which I did. Now 3gp videos have started working  :biggrin: but swf stopped working :(

P.S.: WARNING: Google for k-lite codec pack web companion - definitely not Marinus' fault, but I was a bit shocked to see Micros**t Bang appear as my "homepage". Reminds me of the windows 10 marketing disaster :eusa_boohoo:

See e.g. K-Lite now bundled with web companion that changes your home page and search provider:
Quote
I uninstalled it in Programs and Features in Windows 10 but it leaves .dlls in System 32 and Syswow64 that if removed will terminate one's internet connection . their forum says to all it's users to run a command prompt of "netsh winsock reset"

Apparently, you need "netsh winsock reset" to make de-installation of this crap possible.

Here, the Admin (apparently working for K-Lite) is blaming the stupid users:
Quote
The official installer can show an offer during installation. It is clearly labelled as such, as the page is named "Additional Software Offer", plus the page explains that it is optional and can either be declined or accepted. The actual software isn't included. It is only downloaded once the offer has been accepted. The installer never installs anything that is potentially unwanted without permission from the user. So anyone that claims something got installed while they clicked decline is just lying to cover up their own mistake of blindly clicking through the installer without reading anything.

So I must be one of those stupid dumb users who blindly click on everything, thank you so much, K-Lite :icon14:

Another little GREAT nuisance: Either K-Lite or the "Web Companion" grab the video file extensions, and set them to Media Player Classic :icon_redface:

In short: 3gp videos have started working, which is a great plus (it seems a standard on Android phones), but be extremely cautious when installing K-Lite.

jj2007

  • Member
  • *****
  • Posts: 7559
  • Assembler is fun ;-)
    • MasmBasic
Re: DirectShow transform
« Reply #26 on: July 02, 2017, 07:13:52 PM »
Back on topic: There is a little problem with the notification icons of codecs, see screenshot of the "personalise" option below. This happens both with Marinus' and my own player. Sometimes the area is flooded with this crap, they disappear when you hover over them with the mouse. Probably some COM interface needs to be released properly to prevent this.

Siekmanski

  • Member
  • *****
  • Posts: 1094
Re: DirectShow transform
« Reply #27 on: July 02, 2017, 07:31:07 PM »
jj2007, thanks for the warning.

Microsoft has more surprises for us:

CoTaskMemFree,

void CoTaskMemFree(
  void pv
);

Passing into this function any invalid and, under some circumstances, NULL pointers result in unexpected termination of the application.

And it does, if I free the VIDEO_INFO.pBitMapBuffer and pass NULL to it, it result in unexpected termination of the application.
So, I removed this.

The result is when no codec is found ( "No combination of intermediate filters could be found to make the connection." ) to play the movie, the application now terminates in a normal way.

Also corrected a sloppy mistake at the end of the VideoGrabber routine, mov eax,S_FALSE ( was cmp eax,S_FALSE )   

Updated the sources in Reply #7 again...

sinsi

  • Member
  • ****
  • Posts: 996
Re: DirectShow transform
« Reply #28 on: July 02, 2017, 07:35:33 PM »
Off topic, the best codec pack I have found is the shark007 pack, both 32 and 64 bit.
I can walk on water but stagger on beer.

Siekmanski

  • Member
  • *****
  • Posts: 1094
Re: DirectShow transform
« Reply #29 on: July 03, 2017, 11:24:23 PM »
Found an interesting DirectShow codecs download site.  8)

http://www.free-codecs.com/video_codecs.htm

Here you can find codecs and download/install them separately.

This one is awesome: http://www.free-codecs.com/3dyd-youtube-source_download.htm  :t

Direct download link: http://www.free-codecs.com/download_soft.php?d=198626d75c1ab40d05ba49ded72db0e7&s=954&r=&f=3dyd-youtube-source.htm

I have installed it and now I can watch YouTube movies in my own application.
It works perfectly.  :biggrin:

Thinking of writing an audio grabber to save the music as a wav or mp3 file ripped from a YouTube movie.