source: trunk/IpVideoSource/Sample/.NET/PlayJpegLocationSharp/Program.cs @ 367

Last change on this file since 367 was 367, checked in by roman, 9 years ago

Renamed C#.NET -> .NET because of # issues with Trac

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using DirectShowLib;
6using AlaxInfoIpVideoSource;
7
8namespace PlayJpegLocationSharp
9{
10    class Program
11    {
12        [STAThread]
13        static void Main(string[] args)
14        {
15            FilterGraph filterGraph = new FilterGraph();
16            IJpegVideoSourceFilter sourceFilter = Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid("{A8DA2ECB-DEF6-414D-8CE2-E651640DBA4F}"))) as IJpegVideoSourceFilter;
17            IBaseFilter sourceBaseFilter = sourceFilter as IBaseFilter;
18            (filterGraph as IFilterGraph2).AddFilter(sourceBaseFilter, "Source");
19            //sourceFilter.Location = @"http://p.viewnetcam.com:60001/nphMotionJpeg?Resolution=640x480&Quality=Standard";
20            //sourceFilter.Width = 640;
21            //sourceFilter.Height = 480;
22            sourceFilter.Location = @"http://192.168.88.52/nph-jpeg.cgi";
23            sourceFilter.Width = 1280;
24            sourceFilter.Height = 960;
25            IPin pin = DsFindPin.ByDirection(sourceBaseFilter, PinDirection.Output, 0);
26            (filterGraph as IFilterGraph2).Render(pin);
27            (filterGraph as IMediaControl).Run();
28            EventCode eventCode;
29            (filterGraph as IMediaEvent).WaitForCompletion(-1, out eventCode);
30        }
31    }
32}
Note: See TracBrowser for help on using the repository browser.