I sometimes get an error when i try to take a picture within my uwp app. This error is very hard to reproduce and happend a few min ago on desktop platform. I used a hovercam to retrieve the imagebuffer. public async Task<IBuffer> TakePhotoAsync() { Debug.WriteLine("taking picture..."); using (var stream [...] read more
I want to play live video stream RTSP protocol using MediaElement in Universal Windows Platform (UWP) app platform. I am trying to this way but it now working. <MediaElement x:Name="mediaPlayer" /> Code Behind var streamUri = new Uri("rtsp://X.X.X.X:1027/h264/ch1.2"); var streamResponse = await AdaptiveMediaSource.CreateFromUriAsync(streamUri); if (streamResponse.Status == AdaptiveMediaSourceCreationStatus.Success) { mediaPlayer.SetMediaStreamSource(streamResponse.MediaSource); } [...] read more
I'm attempting to play the audio track from an mp4 file to my speaker. I know Media Foundation is able to decode the audio stream as I can play it with the TopoEdit tool. In the sample code below I'm not using a media session or topology. I'm attempting to [...] read more
I am using Media Foundation to create a webcam viewer. Critical to this application is that the webcam stream is horizontally mirrored. I am using the Video Processor MFT to achieve this. Here's the relevant code to add the MFT: void tryMirror(IMFPMediaPlayer* pPlayer) { IMFTransform* pMFT = NULL; IMFVideoProcessorControl* pVPC [...] read more
I want to record screen audio using AppRecordingManager in UWP. I found StartRecordingToFileAsync function in AppRecordingManager Class to write audio and video content in UWP. Here is the official document URL about this function: https://docs.microsoft.com/en-us/uwp/api/windows.media.apprecording.apprecordingmanager.startrecordingtofileasync#Windows_Media_AppRecording_AppRecordingManager_StartRecordingToFileAsync_Windows_Storage_StorageFile_ Although I try to use this function to record audio, I always keep getting this [...] read more
Like the title says,when i use _mediaCapture.StartPreviewAsync() func ,it throws an exception "System.Runtime.InteropServices.COMException (0xC00D36B2)" read more
The IMFCapturePreviewSink doc (https://msdn.microsoft.com/en-us/library/windows/desktop/hh447865(v=vs.85).aspx) says it supports audio and video. I've got video working using MF_CAPTURE_ENGINE_PREFERRED_SOURCE_STREAM_FOR_VIDEO_PREVIEW However there is no audio equivalent in mfcaptureengine.h. I tried adding the streams directly for (DWORD i = 0; i < streamCount; i++) { CComPtr<IMFMediaType> pMediaType = NULL; if (SUCCEEDED_Xb(hr)) { hr = pSource->GetCurrentDeviceMediaType(i, [...] read more