none
specific filter Direct Show to play HTML RRS feed

  • Question

  • Hello,

    I am searching a filter direct show that work like a browser to play HTML, javascript, Flash...

     

    Have you any idea ?

     

    Thanks a lot

     

    Wednesday, June 23, 2010 3:05 PM

Answers

  • Is it possible to handdle through a directshow filter as sort of encapsulation of a browser, in order to be able to display it through directshow. Maybe catching its original system rendering screen and reenter it into a directshow filter then display it through graphedit.

    You can manage all sort of weird stuff if you waste enough time on it. But why would you want to waste weeks, if not months, to do that?

    Frankly I don't understand why you want to force the drawing of the web page through a DirectShow renderer instead of the browser's own rendering engine. I could understand it if you wanted to feed the images to something other than the display.

    If you really want to wrap the page rendering into a DS filter, write a CBaseFilter-derived component with 0 inputs, 0 outputs that implements IFileSourceFilter and IVideoWindow and wraps an embedded web browser control.

    But that still requires you to embed the browser and writing the DS wrapper will take more time than embedding the browser directly.

    If you want a push source filter that feeds a separate renderer, you will have to embed the browser in a push source and give it a hidden window to draw to, then periodically grab the contents of the window (very slow) or hook the drawing primitives so that you can redirect them to your own bitmap (AFAIK there is no system-supported way to do it and you need a lot of API hooking and hacking).

     


    MVP :: DirectShow / MediaFoundation http://www.riseoftheants.com/mmx/faq.htm
    Monday, June 28, 2010 5:10 PM

All replies

  • You do realize those are not multimedia formats but in the most general terms, don't you?

    Anyway, if you explain what you want to do, maybe somebody can suggest a solution.

    If what you want to do is create a video of the rendered web page, then open it in a web browser and grab its window's client area (see the PushSourceDesktop sample or use a third-party screen grabber, e.g. SnagIt or Camtasia, which may even provide some programmabke component).


    MVP :: DirectShow / MediaFoundation http://www.riseoftheants.com/mmx/faq.htm
    Wednesday, June 23, 2010 3:46 PM
  • Thanks for your prompt answer.

    Sorry if i ve not expressed myself clearer.

    What i would like to achieve is to use directshow to play all kind of content. Video, Images, Flash, Html WebSite (html, javascript...).

    Through directshow filters i did achieve yet to play the first 3 of the list.

    Remains HTML.

    I don t want to create a video of the webpage and then display it, rather i would like to use a directshow filter to "reroute" the display of the HTML (like it has been done with Flash directshow filter i guess) and to have something like a Internet Browser Filter which could render its content on the regular RENDERER.

    Correct me if i m wrong and if possible ways to achieve this.

    Thanks a lot.

     

    Wednesday, June 23, 2010 4:00 PM
  • As far as Flash is concerned, there are Flash videos (FLV, MP4 or SWF with embedded video) and Flash presentations (SWF). The latter usually require human interaction and can not just be played.

    HTML is similar to SWF. Why don't you just use an embedded web browser to render it? It will not use a DirectShow renderer, but what difference does it make? Unless you want to use a custom renderer for purpose other than on-screen presentation, the result will be the same whether you display the HTML page using a DirectShow renderer or the web browser.


    MVP :: DirectShow / MediaFoundation http://www.riseoftheants.com/mmx/faq.htm
    Thursday, June 24, 2010 5:54 PM
  • Thanks for your response.

    But I need to create only a directshow filter to play a web page (html, javascript...).

    In the same manner it exist a directshow filter to play flash file, I need a directshow filter to play web file.

     

    Thanks

     

    Sunday, June 27, 2010 1:49 PM
  • Michael Gourion wrote:
    >
    >But I need to create only a directshow filter to play a web page (html, javascript...).
    >
    >In the same manner it exist a directshow filter to play flash file, I need a directshow filter to play web file.
     
    I don't think you really understand how nutty this sounds.
     
    Video files and Flash movies do streaming. They change over time. There
    will be a frame, then another frame to replace it, then another frame, etc.
    That's what DirectShow does -- it "streams" those frames, one at a time,
    down to a renderer.
     
    Web pages don't do that. They are static. They don't change. You fetch
    the HTML, you render it, and that's it. The job is done. There is no
    "next frame". There is nothing to "play".
     
    Now, perhaps you are thinking of the Real Player, which has the ability to
    display an HTML page (of advertisements, for example) before it plays a
    movie. What they probably do is include an HTML browser control in their
    application that displays into their window. Then, when it's time to play
    a movie, they "hide" the browser control, and "show" the graph renderer
    control.
     
    Two controls sharing the same window. Very common, very practical. But
    you don't feed the rendered page into DirectShow. That's silly.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, DDK MVP
    Sunday, June 27, 2010 10:58 PM
  • Hi Tim,

    thanks for your answer.

    Indeed you are right it really sounds nutty :-)

    However, just to make evrything clearer if possible, when you display a JPG through Graphedit with the Colorspace Converter filter to your renderer, there is no Next frame neither previous. However Directshow can handdle it.

    The things is that when you look a bit closer to a webpage you might find some movements, of course not related directly to HTML as it is static. Rather related to other component that are in this same web page.

    For example a webpage that encapsulates a Flash component.

    Now, the thing i would like to know if achievable or not is as follows :

    Is it possible to handdle through a directshow filter as sort of encapsulation of a browser, in order to be able to display it through directshow. Maybe catching its original system rendering screen and reenter it into a directshow filter then display it through graphedit.

    Home my question is a bit clearer now in order to help me a bit on this topic.

    Thanks

     Michael

     

    Monday, June 28, 2010 10:55 AM
  • Is it possible to handdle through a directshow filter as sort of encapsulation of a browser, in order to be able to display it through directshow. Maybe catching its original system rendering screen and reenter it into a directshow filter then display it through graphedit.

    You can manage all sort of weird stuff if you waste enough time on it. But why would you want to waste weeks, if not months, to do that?

    Frankly I don't understand why you want to force the drawing of the web page through a DirectShow renderer instead of the browser's own rendering engine. I could understand it if you wanted to feed the images to something other than the display.

    If you really want to wrap the page rendering into a DS filter, write a CBaseFilter-derived component with 0 inputs, 0 outputs that implements IFileSourceFilter and IVideoWindow and wraps an embedded web browser control.

    But that still requires you to embed the browser and writing the DS wrapper will take more time than embedding the browser directly.

    If you want a push source filter that feeds a separate renderer, you will have to embed the browser in a push source and give it a hidden window to draw to, then periodically grab the contents of the window (very slow) or hook the drawing primitives so that you can redirect them to your own bitmap (AFAIK there is no system-supported way to do it and you need a lot of API hooking and hacking).

     


    MVP :: DirectShow / MediaFoundation http://www.riseoftheants.com/mmx/faq.htm
    Monday, June 28, 2010 5:10 PM
  • Michael Gourion wrote:
    >
    >Now, the thing i would like to know if achievable or not is as follows :
    >
    >Is it possible to handdle through a directshow filter as sort of
    >encapsulation of a browser, in order to be able to display it
    >through directshow. Maybe catching its original system rendering
    >screen and reenter it into a directshow filter then display it
    >through graphedit.
     
    You should sit down in a room with a pad of paper and think about what this
    would require. You would need a fully functional web browser, including a
    complete Javascript interpreter, and including a fully functional plug-in
    mechanism, so that you can run Flash movies (and Silverlight extensions and
    whatever other miscellaneous web page things can move over time). That
    browser would need to render into an offscreen bitmap, AND let you know
    every time it makes changes to that bitmap.
     
    Is that POSSIBLE? Probably, but I'm not sure how I would do it.
    CLSID_InternetExplorer wants to render to a window, not a bitmap. The
    Mozilla engine is available in source form, but it's not going to be easy.
    The minor browsers that are in source form don't handle Flash plugins.
     
    Overall, this is simply the wrong way to accomplish your task. Just create
    a browser object, and let it take over the render window. When you're
    done, hide the browser and make the graph render window visible.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, DDK MVP
    Wednesday, June 30, 2010 5:44 AM
  • Hello,

     

    I am super interested in this topic.

     

    I have been investigating on how to get the contents rendered by the layout engine of a browser in RGBA format but still not sure if it can be done.

     

    Michael, is there any updated information on this topic?

    Saturday, October 23, 2010 3:33 PM
  • Sure it can be done, there are plenty of screen grabbers that can do that. And there is no trick: it is just plain old slow screen grabbing.

    MVP :: DirectShow / MediaFoundation <http://www.riseoftheants.com/mmx/faq.htm>
    Monday, October 25, 2010 8:33 PM
  • Hi Michael,

    I think I'm on the same path you are on (from reading your questions). I too am looking for a DirectShow filter that works as a browser.

    I hope you would share ~

     

    Thanks so much!

    Andrew J. Polcha

    Friday, November 12, 2010 2:04 AM