Does gtk support display multiple videos with gstreamer? - c

I've been working on a project that requires me to display multiple videos at the same time.
It's the first time I use gstreamer.
At first, I tried to use videosink to display one and use opencv and cairo to display other one,
but this failed.
And I tried to add more drawing area and use same video sink, but it came out that videos were displayed on same drawing area widget.
I also tried to add more gstvideooverlay, but this could not work.
Is it possible to display multiple videos on different drawing area widgets at the same time?

but this could not work.
is not very descriptive. It sounds like you are doing something wrong here.
On the other hand if you are developing a GTK gui application I would use gtksink or gtkglsink respectively. With these you can simply set GtkWidgets into your GUI.

Related

Is there a way to correctly use an Image in XNA and windows forms...?

I just don't quite know how to handle this situation I'm dealing with.
I have a image of terrain tiles. In fact, here is a picture of it:
I've been working on my Map Editor for my game which has some windows forms in it like this:
Now, the problem is that both the XNA and the Windows Forms needs the image of the sprite tiles. Is there a way to handle this nicely or am I going to have to have two copies of the image (one for the WinForms and one for the XNA)?
Thanks for the help!
You don't need two copies of the image. Have you looked at the WinForms examples on AppHub?
http://create.msdn.com/education/catalog/sample/winforms_series_2

Is there a way to animate the edges of an image in WPF?

We have a few icons in our WPF application. We want to do an animation, pretty much like a small beacon of light going around the edges of the animation, just endlessly going around it, and following the silhouette of the icons. We found a way to do it by manually creating a path around the icons and have the beacon follow that path (which matches the silhouette), but it's too much manual work because we have a lot of different shaped icons. We're wondering if there's a way for WPF to do this automatically, so we just have to program it once, and then using on the rest of the icons.
Any suggestion very welcome.
Thanks.
Edit
Something like this.
Gee. Isn't that overkill to use wpf animation capabilities for that? Can't you just create a bunch of small animations in Photoshop or using something else and just put them in?
Like animated .GIFs. the only problem would be that: if I'm remembering it right, WPF have problems with animating .GIFs as embedded resources. So you have to load them from the disk. Or you can have them as embedded resources, but you have to extract them temporarily to the disk and then load them into your app's window.
If you are using .NET 3.5 SP1 or greater and you are requiring a code solution instead of the animated GIFs, my suggestion would be a Pixel Shader. You would need to write your own Pixel Shader that does the following:
Detect the edges. http://www.codeproject.com/KB/openGL/EdgeDetection.aspx
Takes an input parameter that can be animated with a storyboard that indicates the position of the beacon. http://www.codeproject.com/KB/dialog/WpfParentWindowShader.aspx
Highlights the edge that is indicated by the beacon position parameter and returns the original color for all other points in the image.
If you haven't worked with Pixel Shaders I would recommend downloading the Shazzam Tool, http://shazzam-tool.com/. It includes an interactive development environment to create and test your shader on simple images and also includes a decent number of Pixel Shaders with source code to help you learn about them.

Render Silverlight Animation to video file

I need to be able to render a silverlight storyboard animation to video. The animated content itself could be simple UIElements, Images or even two or more videos playing at the same time.
Several ideas came to mind like RenderTargetBitmap on a single frame basis, but:
1) I've never tested this against video embedded content
2) Don't know how to actually compose the video from the generated images.
Expression Encoder was also on my mind, but I don't know if it's possible to integrate it in a Silverlight/XBAP app to fulfill what's expected from it.
What's your opinion on this?
Your best bet if you just need to capture this sort of thing would be to use the Expression Encoder 4's screen recording feature, or a tool like TechSmith Camtasia.

How to show a picture using GDI?

it is possible to display a picture on a window created by winmain i mean using GDI,
i want do create a window that captures my whole screen i have done that by using GDI but unable to show an image on it how can i do so?
There are lots of good tutorials on the web.

Drawing directly to the screen via GTK or GDK

I am working on a demo application for a library me and two colleagues are writing to allow GNOME applications that run audio events though libCanberra to allow users to select visual events to replace them. This is an accessibility-minded effort to help both visually and aurally impaired users gain the benefits of audio alerts and such.
For our first demo we're simply trying to make the entire screen flash with a color when a button is pressed in our simple GTK sample app. I've been looking at the GTK documentation and all drawing that I've seen has had to do with drawing directly to a window or other widget. I want to control the entire screen's hue. Would this be a GDK thing? Am I completely off base?
Any links/help will be much appreciated! Thanks.
PS: This is being written in C, though functions should be the same between languages with proper bindings, I assume.
You cannot. Your application has access only to its own window, and does not (and should not) know anything about other windows, or the screen. The "screen" is managed by whatever back-end GTK uses (X? Win32? DirectFB?).
That said, you could try to create a "full-screen" window that covers the entire screen area. That is the way full-screen apps are implemented in most windowing systems.
GTK doesn't have such option AFAIK, you probably want to use the backend: Xlib (or Xcb) for that.

Resources