5,545,925 members and growing! (17,911 online)
Email Password   helpLost your password?
Multimedia » DirectX » General     Intermediate

Change Video Signal Format with DirectX library

By hpAng

An enhancement for the DirectX video stream and frame capture sample.
C#.NET 1.0, .NET 1.1, WinXP, Windows, .NET, DirectX, Visual Studio, VS.NET2002, VS.NET2003, Dev

Posted: 23 Feb 2005
Updated: 23 Feb 2005
Views: 53,025
Bookmarked: 16 times
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
6 votes for this Article.
Popularity: 2.85 Rating: 3.67 out of 5
1 vote, 16.7%
1
0 votes, 0.0%
2
1 vote, 16.7%
3
2 votes, 33.3%
4
2 votes, 33.3%
5

Sample Image

Introduction

I posted an article DirectX Video Stream and Frame Capture a few months before, and I got a few feedbacks. Please refer to the article for more information. As a response to many requests, I added again some examples on how to use the video capture library.

In this example, I added a sample code to change the video format from NTSC to PAL and vice versa. A code piece to change the brightness, and the old, grasp a frame from video and finally save to a video file.

Actually this example is prepared in a rush, so I would hope anyone to send me any comments so that I can update it again. Thanks.

Using the code

To change to PAL_B standard:

private void button2_Click(object sender, System.EventArgs e)
{
    capture.VideoFormat= DShowNET.AnalogVideoStandard.PAL_B;
}

To set brightness:

void button2_Click_1(object sender, System.EventArgs e)
{
    VideoProcAmp_prop Brightness;
    Brightness= 
      capture.Get_VideoProcAmpProp(
      DShowNET.VideoProcAmpProperty.VideoProcAmp_Brightness);
    capture.Set_VideoProcAmpProp(
      DShowNET.VideoProcAmpProperty.VideoProcAmp_Brightness,5106);
}

To capture a frame:

void button1_Click(object sender, System.EventArgs e)
{
    capture.FrameEvent2 += new Capture.HeFrame(CaptureDone);
    capture.GrapImg();
}

Points of Interest

Thanks for everyone who gave me suggestions for adding these functions to the code. I am sorry that this is not a robust sample, I created it just for demo purpose. Please tell me if you have any questions and suggestions.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

hpAng


Please visit my website www.mbwebcreator.com for more web site information.
Occupation: Web Developer
Location: Malaysia Malaysia

Other popular DirectX articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 22 of 22 (Total in Forum: 22) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralChange VideoSignal and VideoSourcememberhaxmaxx3:55 14 Sep '06  
GeneralNice article!memberalmere10922:31 2 Mar '06  
QuestionCan't get it to work!memberPeaver11:30 15 Nov '05  
Generalit doesnt work for ATI VGA+Capturemembersohrabi12:56 21 Oct '05  
GeneralRe: it doesnt work for ATI VGA+Capturesusssohrabi12:59 21 Oct '05  
GeneralRe: it doesnt work for ATI VGA+Capturemembersandinog2617:30 29 Nov '05  
GeneralProblem changing Frame Sizemembermaihuaz16:26 8 May '05  
GeneralRe: Problem changing Frame SizesussAnonymous1:16 10 May '05  
Generaldont have capture device ?memberChrono_man11:12 7 May '05  
GeneralRe: dont have capture device ?memberhpAng1:19 10 May '05  
GeneralVideoProcAmp Problemmemberyoda_2069a20:46 2 May '05  
GeneralRe: VideoProcAmp ProblemmemberhpAng1:20 10 May '05  
Generaldesktop capturememberAnmar-xe23:40 11 Apr '05  
GeneralRe: desktop capturememberhpAng1:21 10 May '05  
GeneralBrightness change in a video.memberMarsWalker8:59 11 Apr '05  
GeneralSeem REAL interesting, but does it workmemberregispoulin10:43 31 Mar '05  
GeneralRe: Seem REAL interesting, but does it workmemberhpAng1:23 10 May '05  
GeneralInteresting.sussAnonymous8:37 14 Mar '05  
GeneralRe: Interesting.memberhpAng4:38 15 Mar '05  
GeneralRe: Interesting.memberRenecito7:45 18 Mar '05  
GeneralRe: Interesting.memberhpAng1:26 10 May '05  
GeneralLooks interesting but...memberPoolbeer1:51 24 Feb '05  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 23 Feb 2005
Editor: Smitha Vijayan
Copyright 2005 by hpAng
Everything else Copyright © CodeProject, 1999-2008
Web08 | Advertise on the Code Project