Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
QEdit.cs
Package: capsample_src.zip [view]
Upload User: wuming6209
Upload Date: 2013-06-06
Package Size: 161k
Code Size: 3k
Category:
Video Capture
Development Platform:
Visual C++
- /******************************************************
- DirectShow .NET
- netmaster@swissonline.ch
- *******************************************************/
- // QEdit
- // Extended streaming interfaces, ported from qedit.idl
- using System;
- using System.Runtime.InteropServices;
- namespace DShowNET
- {
- [ComVisible(true), ComImport,
- Guid("6B652FFF-11FE-4fce-92AD-0266B5D7C78F"),
- InterfaceType( ComInterfaceType.InterfaceIsIUnknown )]
- public interface ISampleGrabber
- {
- [PreserveSig]
- int SetOneShot(
- [In, MarshalAs(UnmanagedType.Bool)] bool OneShot );
- [PreserveSig]
- int SetMediaType(
- [In, MarshalAs(UnmanagedType.LPStruct)] AMMediaType pmt );
- [PreserveSig]
- int GetConnectedMediaType(
- [Out, MarshalAs(UnmanagedType.LPStruct)] AMMediaType pmt );
- [PreserveSig]
- int SetBufferSamples(
- [In, MarshalAs(UnmanagedType.Bool)] bool BufferThem );
- [PreserveSig]
- int GetCurrentBuffer( ref int pBufferSize, IntPtr pBuffer );
- [PreserveSig]
- int GetCurrentSample( IntPtr ppSample );
- [PreserveSig]
- int SetCallback( ISampleGrabberCB pCallback, int WhichMethodToCallback );
- }
- [ComVisible(true), ComImport,
- Guid("0579154A-2B53-4994-B0D0-E773148EFF85"),
- InterfaceType( ComInterfaceType.InterfaceIsIUnknown )]
- public interface ISampleGrabberCB
- {
- [PreserveSig]
- int SampleCB( double SampleTime, IMediaSample pSample );
- [PreserveSig]
- int BufferCB( double SampleTime, IntPtr pBuffer, int BufferLen );
- }
- [StructLayout(LayoutKind.Sequential), ComVisible(false)]
- public class VideoInfoHeader // VIDEOINFOHEADER
- {
- public DsRECT SrcRect;
- public DsRECT TargetRect;
- public int BitRate;
- public int BitErrorRate;
- public long AvgTimePerFrame;
- public BitmapInfoHeader BmiHeader;
- }
- [StructLayout(LayoutKind.Sequential), ComVisible(false)]
- public class VideoInfoHeader2 // VIDEOINFOHEADER2
- {
- public DsRECT SrcRect;
- public DsRECT TargetRect;
- public int BitRate;
- public int BitErrorRate;
- public long AvgTimePerFrame;
- public int InterlaceFlags;
- public int CopyProtectFlags;
- public int PictAspectRatioX;
- public int PictAspectRatioY;
- public int ControlFlags;
- public int Reserved2;
- public BitmapInfoHeader BmiHeader;
- };
- [StructLayout(LayoutKind.Sequential), ComVisible(false)]
- public class WaveFormatEx
- {
- public short wFormatTag;
- public short nChannels;
- public int nSamplesPerSec;
- public int nAvgBytesPerSec;
- public short nBlockAlign;
- public short wBitsPerSample;
- public short cbSize;
- }
- } // namespace DShowNET