[vlc-devel] Re: Help: Adding TV Tuner Support

Gildas Bazin gbazin at altern.org
Thu Jun 30 23:56:34 CEST 2005

On Wednesday 29 June 2005 17:11, Brian Wang wrote:
> Hello all,
> What I am trying is to add support for a custom-made DVB-T tuner
> device (not-DirectShow compatible) to VLC.  It would be very cool if
> we can view TV programs with VLC under M$ Windows.
> I have read the developer's manual, which seems a bit outdated, but it
> is still a good reference though. :-)
> I tried playing with the code a bit and added a dummy access module. 
> The GUI code for wxWindows/wxWidgets automagically builds the
> configuration panel for my dummy access
> module.  However, what if I want to have my own fancy configuration
> panel?  Should I add a panel class of my own in gui/wxwindows/ or
> somewhere else?  Also, for viewing DVB-T locally, do I need a nice
> tuner window that allows the user to change the channel or is there
> another way to do this?

If you want to implement a complex panel then you will indeed have to 
implement a separate dialog box in the wxwindows gui.
However if you want to implement simple functionality like switching between 
predefined channels then you can use what we call vlc object variables and 
setup a multiple choice integer one and with proper callbacks. The GUI will 
then display it automatically for you if you add it to the menus list 
(wxwindows/menus.cpp). For instance look at how the "zoom" one is done in 
src/video_output/vout_intf.c and modules/gui/wxwindows/menus.cpp.

> If a tuner window is to be added, where should the code reside,
> without messing up the modular design of VLC?  I know VLC support
> DVB-T devices under Linux, but I do not have a Linux-compatible card
> in hand.  Is there a separate tuner application for V4L?

No, tuning is actually very limited and only done before opening the stream.

> Another question, my dummy access module loads a MPEG-2 TS file from
> the local filesystem, but the video did not play until I gave VLC_TRUE
> to the ACCESS_CAN_CONTROL_PACE query in the Control() function.  It
> gives a bunch of
> "main warning: received buffer in the future (19944543946570574)"
> messages.  What does it mean?  I know for local files, the reading
> pace can be controlled.  However, why doesn't it work when the
> CAN_CONTROL_PACE query gives false?

if you don't enable ACCESS_CAN_CONTROL_PACE, VLC will try to read the data 
as fast as it can (as fast as it receives it), which obviously won't work 
very well for file access since it means as fast as the hard drive can read 
the whole file. This is however very appropriate for real time sources 
where the playing pace needs to be synchronised on the server's sending 


This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html

More information about the vlc-devel mailing list