Chromium Embedded Framework cannot access system audio with getDisplayMedia - chromium-embedded

Is it possible to capture system screen & audio with chromium embedded framework using getUserMedia or getDisplayMedia? I've managed to get a video only stream of the system so far, but i cannot get audio capture to work.
In standard Chrome you can get the system audio by using:
navigator.mediaDevices.getDisplayMedia({ video: true, audio: true })
This results in a popup where you can tick a checkbox to enable audio capture. The stream has an audio track labeled as "System Audio".
In cef this popup-dialog does not exist (but can be skipped using a launch-config flag). When calling getDisplayMedia in the web-application, you get an audio track aswell, but the track is labeled as "Fake audio". It seems that this track is actually the sound of a microphone and not the system audio.
Any idea why this does not work? Is it actually implemented in the Cef core? I wasn't able to find any info on this. Thanks in advance!

This is supported with the Chrome runtime.
Run your app with the key --enable-chrome-runtime or set chrome_runtime CEF setting to true (1).

Related

How to enable audio when using VideoCapturePlayer?

I am trying to integrate a live feed in my WPF application using DirectShow device. Both audio and video is working fine in VLC.
I have integrated VideoCapturePlayer from the WPF-MediaKit in a simple application and i am able to see live video feed from the device, but i am unable to get the audio. I am not 100% sure that it is possible to capture both audio and video using the VideoCapturePlayer.
Any help in getting the audio to work will be appreciated.
Probably there's no Audio renderer set up in VideoCapturePlayer. Try to pull up the MediaUriBase.InsertAudioRenderer into the MediaPlayerBase and use it for the VideoCapturePlayer. If you succeed, open a new PR with your code.

Playing video on PEPPER's tablet using Choregraphe

Whenever I try to play a video (on PEPPERS tablet), that is locally saved, I encounter the following problem - on the PEPPER's tablet the error message "Video could not be played" is displayed. I am using Choregraphe and its standard 'play video' box.
Here is a screenshot of the project
EDITED
I think the problem may occur because:
The path to the video is not set correctly, but I highly doubt this is the case.
The video formats I have tested are mp4 and mov, that are converted from random youtube videos.
So my question is why the video can not be played on the PEPPER's tablet this way?
Try with just the name my_video.mp4 as parameter, no quote or "/".
Recommended format is mp4 container, video codec H.264, audio codec AAC...
Also, disconnect the output, otherwise as soon as you video starts, it will be required to stop ;-)

Present IMFSample

I'm working on a WPF project that need to use Media Foundation to capture video from webcam.
Now I can get IMFsample from webcam everytime I want, I had used SLimDX to get IMFMediaBuffer (get it from IMFSample) to IDirect3DSurface9 pointer and set it to back buffer of D3DImage. It's work great on PC but windows Tablet.
This is the error message I got when run on Tablet:
The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
So Do you know another way to present IMFSample to UI.
Thanks.

iOS 6 Audio multi-route - use external microphone AND internal speaker simultaneously

This presentation: http://www.slideshare.net/invalidname/core-audioios6portland on Core Audio in iOS6 seems to suggest (slide 87) that it is possible to over-ride the automatic output / input of audio devices using Av Session.
So, specifically, it is possible to have an external mic.plugged into an iOS6 device and output sound through the internal speaker ? I've seen this asked before on this site: iOS: Route audio-IN thru jack, audio-OUT thru inbuilt speaker but no answer was forthcoming.
Many thanks !
According to Apple's documentation:
https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/Reference/Reference.html#//apple_ref/occ/instm/AVAudioSession/overrideOutputAudioPort:error:
https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/Reference/Reference.html#//apple_ref/doc/c_ref/AVAudioSessionPortOverride
You can override to the speaker, but if you look more closely at the C based Audio Session services (which is actually being deprecated, but still has helpful information) reference:
https://developer.apple.com/library/ios/documentation/AudioToolbox/Reference/AudioSessionServicesReference/Reference/reference.html#//apple_ref/doc/constant_group/Audio_Session_Property_Identifiers
If a headset is plugged in at the time you set this property’s value
to kAudioSessionOverrideAudioRoute_Speaker, the system changes the
audio routing for input as well as for output: input comes from the
built-in microphone; output goes to the built-in speaker.
I would suggest looking at the documentation for iOS 7 to see if they've added any new functionality. I'd also suggest running tests with external devices like iRiffPort or USB based inputs (if you have an iPad with CCK).

WP7 MediaElement download problems

I'm running into problems on the WP7 with MediaElement downloading a 128kbps mp3 stream from a web service for a music player app that i'm working on. The file downloads correctly when the wp7 is on a wifi connection, but downloading sometimes stops when off of wifi. The problem is that i'm not getting any errors or exceptions when the downloading fails and the MediaElement state is "playing". MediaElement runs right past the downloaded portion of the stream and acts like it is playing, but there is nothing to play since the download stopped. I can somewhat replicate this issue based upon my location and using the 3g instead of wifi, so i believe it is due to a low connection. I don't believe any code needs to be shown in this instance, but i try to post something. I want to know if I have any control over this? Are there any other events I could use to detect when the download has failed? Is there another way I could download a mp3 stream that is more reliable and play it? Is there another player/component I should try?
Thanks in advance
You could always use MediaStreamSource to try to handle the download and implement streaming, to some extent. It is a more "painful" way of doing this since you will have to work with an extra media layer, but it pays off by improving playback stability.
Here is a starter example by Tim Heuer. Take a look specifically at how he takes advantage of a custom implementation of MediaStreamSource. Here is a more complex sample.
If streaming is not a requirement, you could download the file (and store it in the Isolated Storage) and then play from there.

Resources