[MPlayer-dev-eng] [RFC] TV support under Win32 using DirectShow

Vladimir Voroshilov voroshil at gmail.com
Tue Jan 16 09:16:41 CET 2007


Hi, All

Some time ago i have started to developing subj.
And now i have got some usable results.

Current status: working, but some code cleanup (and probably rewriting
some not obvious parts) is required.

Implementation:
Driver consist of two parts:
1. DirectShow  filter with one video and one audio input pin to grab
media samples from live source (almost finished)
2. tvi_dshow - tv.c subdriver, which initializes DirectShow graph,
adds my filter and starts/controls capture/preview process (work in
progress, needs cleanup/simplification).

Abilities:
  * Watching TV under Win32 using WDM Capture driver and DirectShow
either immediate or noimmediate mode.
  * Grabbing synchronized audio/video with mencoder (synchronization
is beeing done by DirectShow)
Disadvantages:
   * Audio only capture does not supported (MPlayer's limitation).
   * Pausing or moving video windows causes buffer overflow (no pause
callback exists for tv subsystem in MPlayer and i'm afraid the same
issue can be  applyed to the linux TV code).
   * Sets channels only by it's number, not by freq (probably device
driver's limitation) that requires some not fine workaround.
   * Strange behaviour in picture width/height request (system hangup
when requesting exact dimensions, if exact dimension are not requested
all works fine)

TODO:
   * Rewrite channels selecting subroutine
   * Improve grabbing subsystem
   * Review and finish initialization code (proper interact with tv.c)

For function properly my code required extending of
loader/dshow/output.c functionality (realization some of currently
unimplemented methods) so, to avoid breaking something in dshow/* i
suggest following way (if you will agree to continue developing and
starting some discussion, of course):

1. doxygenize loader/dshow/output.c
2. fix debug messages and methods' names which  does not comply with
methods behaviour.
3. extends functionality of loader/dshow/output.c to level
 requied by my driver --
4.add to guids.* declaration of additional DirectShow interfaces,
which is used by new driver
5.add driver (grabber and tvi_dshow)

Steps 1-2 would not break any functionality (almost cosmetics), so can
be easily reviewed and safely applied even now.
3 and others (espesially tvi_dshow.c) requires additional work and
discussion so should be done after next RC release, i think.

What will you say?
Should i post first patches?
If anybody will be interesting in testing it i can upload prebuilded
binaries+source anywhere in Web to make testing more easy.

Regards,
Vladimir Voroshilov     mailto:voroshil at gmail.com
JID: voroshil at jabber.ru
ICQ: 95587719



More information about the MPlayer-dev-eng mailing list