C++ DirectShow in Rendering Behavior - rendering

Does anyone know how to display DirectShow video in HTML container (e.h. DIV) instead of separate pop-up-like window.
Already I did all the things needed to run custom Rendering Behavior, it includes all interfaces and events handling, but cannot find anything related with my problem neither in the Internet nor in books I have.
Anyone can give me a hint what I need to do?
P.S.
MSDN articles mention only DirectDraw and Direct3D when setting IFlags on IHTMLPainter - but maybe it's a wrong place I'm looking for :-)
Regards.

In general, this is sort of a messy topic. As far as I know, your options are a custom activex control (yuck...in general, this approach is a logistical nightmare) or leveraging an existing player like Silverlight or Flash.
Silverlight doesn't give you control on a DirectShow level, but it does have additional support through the MediaStreamSource that may meet your needs. And once your audio/video is in Silverlight, you have all sorts of options for advanced overlays and interface elements.

I won't comment on Silverlight, as I have no experience of it, but I wouldn't agree with kidjan's summary of using an ActiveX control.
A custom ActiveX control has served our company well for many uses - including native apps, managed apps, web pages ...
The beauty of using an ActiveX control is that you have total control over the code in your player, stream authentication mechanisms, rendering capabilities etc.
I wrote an entire player in less than a month (network code included), then wrapped it in a COM control in less than a week.
Be under no illusion though, DirectShow and COM programming isn't easy. It's all about trade off - a Flash or Silverlight solution will probably get you going quickly. An ActiveX ctrl will give you total control.
I also read that HTML5 standard will include support for embedding video content(!) Might be worth looking into, although I don't know how many browsers support the (emerging) standard.

Related

What is a good Silverlight resource for finding out what controls are available and what they're for?

I'm used to winforms development, haven't done any WPF and I'm starting a Silverlight project. I understand xaml and all (and I've got some resources for learning it) but I'm wondering if there's any resources available that shows what controls are used in what kinds of situations.
For instance, if you look at the BusinessApplication template in vs2010, they use a border or a grid in cases where I would think of a panel. Things like that.
I'm looking for more of a 'tips' kind of thing than a tutorial or reference. References normally just say what a control is; not when, where or why you would use a particular control.
These two should help you out...
http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/#/?sref=HomePage
http://www.silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html

Any good free skinable vb.net tab controls?

I've been googling and googling for vb.net examples with nice looking tabs.
I really really like this example (slide #4):
http://www.dotnetmagic.com/features_tabbedMDI.html
Has anyone come across any similar free vb.net tab controls with examples? I don't really need the control to be open source, just free :)
DevExpress is probably the best free controls library. And you can find a great TabControl in it. You will have to add it manually to the toolbox.
You have to register for a free license to download it. The download page is still online and working as of 2012-03-22, but cannot be reached by navigation on their website any more:
Free DevExpress Controls download
(In an email response they stated this was because they significantly changed their website.
Also, they said these controls can be used royalty-free even in commercial applications, and without having to include any copyright notices.)
Its name is XtraTabControl
Namespace: DevExpress.XtraTab
Assembly: DevExpress.XtraEditor.vXX.X (where XX.X is the version of the XtraEditor, mine is 11.1)
Although you could google the answer, there's some links to get you started:
The Code Project, check under desktop development.
Telerik is a known control developer, offers some controls for free.
Component Factory is another good option.
As of Developer Express v2011 vol 2 (at least, probably earlier), the Tab Control is not free. Used to, you could put it on a form and run without a nag screen. Not the case now.
This is the best free one I could find:
http://www.codeproject.com/KB/tabs/KRBTabControl.aspx

How does Javascript use affect 508 Compliance?

As background, I currently develop for a university, and we have problems with departments demanding "web 2.0 content" and accessibility requirements.
How do really big sites that are JavaScript based deal with 508 Compliance? Some sites degrade, and others require enabling JavaScript. How much impact does one decision have versus the other?
Also, in a realistic sense, how much development time should be devoted the accessible versions of sites versus the "main" versions?
I'm a blind developer and find it possible to use many Web 2.0 sites - this is most certainly possible.
Firstly, I strongly advise against making a separae accessible site, regardless of how many people advise you to do this. This is bad practice and will end up being more work, even if it initialy seems simpler.
Next, try to use progressive enhancement (particularly if this is a new site). Code the site without any Javascript; it's not just accessibility which benefits. Then, in your OnLoad() go through and attach Click events to the anchor tags; this way if you have Javascript you'll see the Ajax version, otherwise you will have a full page refresh and see another HTML page.
Luckily, there is a new standard, WAI-Aria (www.w3.org/WAI/intro/aria.php) which makes this much simpler. You attach attributes to HTML tags to identify the semantics of an Ajax control, for example. The only problem with Aria is that it only works with newer screen readers and web browsers. The university may well require the site be accessible to people running older software.
I'm a screen reader user and often use Javascript enabled sites. Javascript is not an accessibility issue, the way it is used can be. For example if the site uses javascript that requires the use of a mouse and doesn't have keyboard alternatives it will not be 508 compliant. An example of a site that uses Javascript and is accessible is stackoverflow.com. The only feature that isn't accessible is the ability to determine if you have accepted an answer to a question. I would take a look at the links in Annie's answer. All the blind college students I know use a fairly modern browser with Javascript enabled, Lynx is no longer popular in the blind community. If you want to try using a screen reader a good open source one for windows can be found at
http://www.nvda-project.org/
and it works well with firefox. If you want to try using the web with out Javascript install the Noscript addin.
Sites don't have to disable JavaScript to be accessible. Many sites use ARIA roles to work better with screen readers. There's a giant list of articles on accessible AJAX applications here. You could try something like AxsJAX.

Free schedule/timetable GUI library for .NET

Does anyone know of any good free libraries providing Windows Forms controls for displaying schedules/timetables in .NET? I'm really looking for something similar to what the guy who asked this question was seeking, with a couple of differences:
I don't need any help organizing the underlying data or generating the schedule (that's all set) -- I just want a clean way of displaying it.
I'm actually looking for a custom control in Windows Forms, not an ASP.NET control.
One thing I've considered doing is just using a TableLayoutPanel control, but ideally I'm looking for something that will be more straightforward code-wise (as in, something actually designed for displaying a timetable) and sharper-looking visually.
How about this control? It is very similar to the calendar in Outlook. It does come with source code, so if it's not quite what you need you could maybe use this as a base for your own implementation.
Download the source code for http://www.monocalendar.com
He built a control (CalWidget) that you can easily recompile in your own project that's pretty nice. I recompiled it in .net 4.0 with little problems.

Beginning XUL & XPCOM development with XULRunner?

I am planning to design an application XUL & XPCOM for proprietary system. So i have decided to use C/C++ but how can I start the development as a beginner in this field
I cannot find a good guide to start around. It will be good if you can give some links
and books. I also would like to know how to prevent the user from modifying the code specially in the view part because the logic can be done in XPCOM.
XUL explorer is a tool that lets you drag and drop XUL. It's good for mocking up an interface or starting to learn about the various elements you can use.
xulrunner is Mozilla's binary that allows you to run XUL/XPCOM/javascript applications.
The Mozilla Developer Center is your friend.
If you use IRC, check out #xulrunner on irc.mozilla.org . They are fairly tolerant of some questions from beginners.
I don't think there's going to be away around allowing the user to see (or potentially modify) the actually XUL interface. There are some paths for trying to secure JavaScript in some way (some surface level, like obscuring, minifying, but then some possible secure loading methods). XPCOM can be written in C++ or JavaScript, to name a few, if you put more of your code in XPCOM it should be more secure, I think.
A fun start for seeing what you can do in XUL is to check out the XUL Periodic Table.
Preventing the user from modifying your code is futile, as they will always be able to do this.
You could of course ship a modified build of xulrunner (containing some required XPCOM as well) which only loads jars signed by some key, but they could trivially hack around that by modifying the binary or the image in memory.
So don't bother trying to stop people modifying your code - you can't - unless you're on a trusted platform such as a games console - and even then it's not guaranteed.
This helped me to create my first XPCOM.