Reputation: 7620
I am working On Audio/Video capturing from a Web Camera and this is targeted On Windows 8 Metro Style Not on Desktop Mode. I planning to Write a Library for this So that any application can use this library to Stream Video. Windows 8 provides Direct X and Win RT for metro mode of Windows 8. I am bit confused which one to use it for this. Is Win RT Alone is Sufficient for Detecting Camera and Capturing Audio/Video ?? Does Direct X Involvement is required here?
Upvotes: 4
Views: 4167
Reputation: 1989
There are audio/video capture APIs available in WinRT itself, under Windows.Media.Capture
namespace. You don't need to go for DirectX. The following C# code records video with sound and saves to the 'Videos' folder of current user.
var settings = new MediaCaptureInitializationSettings();
settings.StreamingCaptureMode = StreamingCaptureMode.AudioAndVideo;
var capture = new MediaCapture();
await capture.InitializeAsync(settings);
var profile = MediaEncodingProfile.CreateMp4(VideoEncodingQuality.Auto);
var file = await KnownFolders.VideosLibrary.CreateFileAsync("captured.mp4", CreationCollisionOption.GenerateUniqueName);
await capture.StartRecordToStorageFileAsync(profile, file);
For audio-only capture, use StreamingCaptureMode.Audio
and MediaEncodingProfile.CreateM4a()
Upvotes: 1
Reputation: 7620
I found out this on the Internet.So the Win RT Alone is sufficient for this.
http://code.msdn.microsoft.com/Media-Capture-Sample-adf87622.
Upvotes: 2