Page view counter
Creating my own MediaElement-like component
Last post 08-21-2008 2:31 PM by Bill Reiss. 4 replies.
Sort Posts:
08-21-2008 1:45 AM
Creating my own MediaElement-like component

Hi,

I would like to build a component like the MediaElement class which comes with SilverLight.  My component will support my proprietary media formats and streaming.  Is this kind of task possible on SilverLight platform?  For example, is it viable to derive from System.Windows.FrameworkElement for this purpose?

 Thanks

Junmin

haojunmin

Loading...
Joined on 08-21-2008
Posts 2
08-21-2008 8:39 AM
Re: Creating my own MediaElement-like component

It's viable as long as you can convert your format to VC-1 for video or PNG or JPG for images or MP3 or WMA for audio on the client side so that you can provide a stream to an embedded mediaelement of image, otherwise I don't think you have low enough level access to the graphics and audio layers to make this work without getting it into one of the supported formats.


Bill Reiss, Coauthor of Hello! Silverlight 2
My blog (rss feed)

Bill Reiss

Loading...
Joined on 05-01-2007
Tampa, FL
Posts 861
08-21-2008 10:39 AM
Re: Re: Creating my own MediaElement-like component

 And you must use TCP for video transmition, becase UDP not allowed :S

__________________________________________________

За траву и кров
Меж дерев молись,
За чужую кровь,
Сломанную жизнь,

И за смерть от стрел...
Помолись в лесу.
За свою печаль,
За твою слезу.

Alexander Manenko

Loading...
Joined on 08-12-2008
Kyiv
Posts 156
08-21-2008 2:24 PM
Re: Creating my own MediaElement-like component

Bill Reiss:

It's viable as long as you can convert your format to VC-1 for video or PNG or JPG for images or MP3 or WMA for audio on the client side so that you can provide a stream to an embedded mediaelement of image, otherwise I don't think you have low enough level access to the graphics and audio layers to make this work without getting it into one of the supported formats.

I don't want to use the MediaElement object. 

MediaElement is a ordinary class derived from FrameworkElement, and FrameworkElement *should* be media ignorant.  Thus as long as MediaElement can somehow draw the decoded frame onto the graphics layer, my class derived from FrameworkElement should be able to also.

haojunmin

Loading...
Joined on 08-21-2008
Posts 2
08-21-2008 2:31 PM
Marked as Answer
Re: Creating my own MediaElement-like component

haojunmin:

I don't want to use the MediaElement object. 

MediaElement is a ordinary class derived from FrameworkElement, and FrameworkElement *should* be media ignorant.  Thus as long as MediaElement can somehow draw the decoded frame onto the graphics layer, my class derived from FrameworkElement should be able to also.

That's the point, you don't have direct access to the graphics layer. If you find a way to do this, I'd be thrilled, but as far as I know it is currently impossible.


Bill Reiss, Coauthor of Hello! Silverlight 2
My blog (rss feed)

Bill Reiss

Loading...
Joined on 05-01-2007
Tampa, FL
Posts 861
Microsoft Communities