I just started using Gtk# with MonoDevelop on Raspbian, and i need to enable video playing in my application. I was thinking of making a widget (or use an existing one) to add to my window. Found some documentation on MPlayer but could not get it to work.
To rephrase my question, the task is just for my app to play a video, that could also be done by opening up a new window and playing it there.
After installing Omxplayer, since Mplayer was too slow, i did some research and found a simple solution that suited my needs. Calling the Omxplayer as a process before the initialisation of my app:
System.Diagnostics.Process.Start("omxplayer", "testVideo.mp4");
By default the video is played fullscreen, which was also what i was looking for.
Related
I'm working on a wave file playback system, but I'm having trouble getting proper playback output using winmm.dll
The problems I'm experiencing are:
The playback stops abruptly.
The playback speeds up or breaks up or both.
There is no playback at all.
The 'Stop' method causes the system to hang on a Thread.Join call.
I do realize that there are alternatives to playing sound files in C#, WPF, but I'm trying to achieve it through winmm.dll with .wav files specifically because it will allow me *(I hope) to build specific features such as: Wave File Visualization and Sound Effect Filters.
I have looked at this Code Project link:
Programming Audio Effects in C#
It's very insightful, but I'm unable to achieve similar results in WPF. I'm not sure if the problems have to do with Garbage Collection that works differently from Windows Forms to WPF.
Here's my project on GitHub:
Wave Player - Base - WPF and Windows Forms
The solution has 2 projects: One is Windows Forms and the other is WPF.
The Windows Forms project works fine, the WPF doesn't. Both the projects, however, uses the same winmm.dll code logic.
I've also found this Microsoft link on 'Waveform Audio' :
Microsoft - About Waveform Audio
Any help or advice will be appreciated.
I was looking for examples of how to make a screenshot of an inactive window, but I did not find it. I want to take a screenshot of the game that works in the window, and not in full screen mode.
Which can be blocked by other windows.
I found some examples on the Internet, but could not implement in my project.
Could you set an example of how to do this with the help of EasyHook and SharpDX (or SlimDX) on language C#?
I'll be very grateful!
I created an example project for this on GitHub, https://github.com/spazzarama/Direct3DHook
Allows screen capture and drawing an overlay into the Direct3D target application using C#, EasyHook and SharpDX.
Keep in mind that some games will employ anti-injection/hooking techniqiues that may block EasyHook.
In addition this usually won’t work for minimised applications as it is best practice to pause your render loop when minimised.
I am trying to make an application that would play an audio stream (mp3) from the following URL http://icecast6.play.cz/radio1-128.mp3. I am struggling to get it working. Is there any default support for cases like these? That the content is continuously streamed?
I have tried to use Background Audio Agent and set Media Element but none of that has been working for me. Would Background Audio Streamer be an option for me? I would be happy for any similar example that I would use to my advantage.
Thank you
I found phonesm project on codeplex that provides great examples and functionality for implementing internet audio streaming.
You need to use BackgroundAudioPlayer by creating another project and adding its reference to your project.
Check this link:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202978%28v=vs.105%29.aspx
You can use Microsoft player framework.
For more details Player Framework
I have been struggling with an issue with my media player windows phone (7) application. The problem is that I can't seem to implement playlists.
What I want to do is play songs from the media library. This article seems pointless.
I've tried getting into the SongCollection class and figure out how to create more of these things. It appears to be impossible (no constructor, can't cast it, can't inherit it).
After that I tried getting an object on the process running the background audio agent that existed in my app (until I discovered it was redundant), and feed the media player one song at a time.
Problem is, I don't know when the media player stopped playing. It works ok as long as my app is in the foreground, but when it is not, everything stops working, only the media player keeps going.
Is there a way I haven't figured out? In the article above they suggest there is a link between the Zune Media Queue, which I presume is the MediaPlayer.Queue property, and various things I can implement, but I just can't figure a way to make it go.
You should give up since building your own media player is an impossible mission (been there, done that). You cannot create playlists or edit any information, you cannot replace default event handlers for on-screen music controls, you don't get events for music change in your application unless it is currently running.
Basically, it is really limited in what you can do right now and the situation isn't much better with WP8.
I hope that it will be less read-only by the time we get Windows Phone 9.
Take a look at the UWP samples from Microsoft:
https://github.com/Microsoft/Windows-universal-samples
The sample contains play/pause/playlists explanation.
This was already possible in Windows phone 7.5/8/8.1
I have a c#/xaml app. I'd like to play instruction sounds, but if the user is playing background music, I'd like to mute it, or lower the volume temporarily while the sounds are being played.
Currently, I'm using xaudio2 to play my audio in C++, and using some delegates to make calls into C# where I'm using the MediaPlayer class from the xna framework to mute the background media.
However, after pausing the music, when I go to play my instruction through xaudio2, I get System.InvalidOperationException exception from the xna framework. If I comment out the line for playing the sound, there is no exception.
I suppose it's worth noting that this is not happening on the UI thread...
Am I going about this the right way? I can't find any links to information on how to accomplish this - I'm grasping at straws.
It turns out I wasn't calling FrameworkDispatcher.Update() before I called MediaPlayer.Pause(). But this is possible to do if your app requires it.