More samplegrabber chages

Made some changes in samplegrabber and IGetFrame interface now you can define target position and target type, so new IGetFrame:

[ComVisible(true), ComImport,
Guid("2B21644A-D405-4E27-A51C-A4812bE0CE4C"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IGetFrame
{
[PreserveSig]
int getFrame(IntPtr pBuff);

[PreserveSig]
int getSize([Out] out long size);

[PreserveSig]
int getFrameParams(
[Out] out int width,
[Out] out int height,
[Out] out RawFrameFormat format);

[PreserveSig]
int drawText(
[In] IntPtr ptr,
[In] int height,
[In] int width);

[PreserveSig]
int stopDraw();

[PreserveSig]
int getGrayScale(IntPtr ptr);

[PreserveSig]
int getRgb(IntPtr ptr);

[PreserveSig]
int drawTarget(Rect rect, int type);

[PreserveSig]
int […]

Samplegrabber Changes

I made some changes in native part of library (Samplegrabber) now we can use up to 3 samplegrabbers in the same time and now you can PIvoke for samplegrabber like in bellow code:

[DllImport("DirectShowNETCF.Native.dll")]
private static extern IntPtr GetBaseFilter(int index);

[DllImport("DirectShowNETCF.Native.dll")]
private static extern void DeleteBaseFilter(int index);

also interface IBaseFrame has been changed:

[ComVisible(true), ComImport,
Guid("2B21644A-D405-4E27-A51C-A4812bE0CE4C"),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IGetFrame
{
[PreserveSig]
int getFrame(IntPtr pBuff);

[PreserveSig]
int getSize([Out] out […]

DirectShow.NETCF sources

I received a lot of requests for share sources of library…
First of all, sorry guys i`m not going to open sources for free, but if somebody really need em for some reasons (sign library, add changes, learn something so on) i ready to sell it. you will have to sign NDA and then you can […]

[Windows Mobile]Draw Text on preview or SampleGrabber and DirectShow.NETCF

If you ever used DirectShow under windows then you know that if you want draw text on preview you can use VMRRenderer, but windows mobile dont provide any way to draw text on preview
I see there only 1 way to solve it - Draw text directly on stream, so we need SampleGrabber to […]

[Windows Mobile] Capturing Raw Frames or SampleGrabber and DirectShow.NETCF

What is SampleGrabber? this is filter (as a rule Transform or TransInPlace) that goes after filter which samples we are going to grab.
Why do we need SampleGrabber?
1. In windows mobile this is the fastest way to still images, more than that we still uncompressed images (so we dont loose time for encoding/decoding)
2. We can use […]

[Windows Mobile] Changing still image resolution or DirectShow.NETCF part IV

Most of us who was trying to use DirectShowNETCF found that resolution of stilled image smaller that it could be, for example my device (Samsung i710) got default resolution on still pin 320×240, but i know that it supports resolutions up to 2Mpx. So that should be fixed
What do we need to change […]

[Windows Mobile]Stilling images from Camera C# or DirectShow .NETCF part III

Ok, most popular question for last week was: “How to still images from windows mobile camera?”
I finished my project little bit earlier that i was planing, so i have free time again and looking for job too
So what do we need? tons extra com interfaces (Ipin, IEnumPins, IEnumFilters, IFileSinkFilter, IAMVideoControl and so on).
Also […]

[Windows Mobile] Capturing video from device camera C# or DirectShow.NET CF Part II

In previous post i explained how to play video or audio on Windows Mobile devices using DirectShow.
I`ve received some emails with request to explain how preview video from device camera.
First of all in Windows Mobile SDK in examples you can find C++ exmaple. I`ve seen examples that suggest  to compile example from SDK to dll […]

[Windows Mobile] How to play audio/video C# or DirectShow.NET CF Part I

“DirectShow is a multimedia framework and API produced by Microsoft for software developers to perform various operations with media files or streams.” (c) Wikipedia
I`m not sure what earliest version of Windows Mobile that supports DirectShow, but i`m totally sure that Windows Mobile 5.0 and higher definitly suppor DirectShow.
So if you developing you application on C++ […]

[Windows Mobile] Connection Manager API C#

Some posts ago i wrote about using RAS to establish internet connection in that post i mentioned about Connection Manager API. Full description you can find on MSDN, but in most cases developers use 2 functions:
ConnMgrEstablishConnection
ConnMgrReleaseConnection
So to establish connection we need just fill one struct and call ConnMgrEstablishConnection. Thats easy, isnt it?

public bool Connect()
{
ConnectionInfo connInfo_ […]