Commit Graph

27 Commits

Author SHA1 Message Date
Steve Murphy 71ad27409c The fixes in this commit are mainly to allow compiling of trunk with --enable-dev-mode, mutex profiling, lock debugging, etc. Mainly, the version.c needs to be in the OBJS line; asterisk.h was chosen to have the prototypes for ast_get_version, ast_get_version_num; and the ASTERISK_FILE_VERSION macro needs to be used after including asterisk.h in a few files. I hope I did the right thing. If not, let me know.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97656 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:50:39 +00:00
Luigi Rizzo aaddb77f42 Implement keyboard handling, and use it to enter
a number to dial in the 'message' area under the
keypad.

Now you can make calls using the keypad as a regular phone
(or the keyboard for chars not present on the keypad)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97488 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 16:44:20 +00:00
Luigi Rizzo b4fbb1916d implement the "console startgui" and "console stopgui"
commands so you can start and stop the gui even outside
of a call. This is convenient for testing, and also for
using the keypad to pick up a call, and to dial a number
(the latter not yet implemented, but should be close).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 12:23:18 +00:00
Luigi Rizzo 11c492aaec add support for textareas, used for various dialog windows on the gui.
The main code to implement the textarea is in console_board.c,
and uses a simple png image with the font, blitting characters
on the designated areas of the main screen.
Additionally we provide some annotations in the image used
as a skin to indicate which areas are used for text messages.
(images will be committed separately).
At the moment the dialog area is only used to display a running
counter, just as a proof of concept.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-08 23:09:44 +00:00
Luigi Rizzo 38c1dbb39a remove a leftover sleep(1) used for debugging
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-01 23:53:43 +00:00
Luigi Rizzo d6d39dfee9 Move grabbers definitions to a separate file, vgrabbers.c, so it is easier
to add more entries. This required moving struct grab_desc to the common
header, and adding an entry in the Makefile.

On passing, cleanup some comments and file headers (some are still missing).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-29 02:02:03 +00:00
Luigi Rizzo f2702ec721 virtualize the interface for video grabbers, which should
make it easier to add support for more grabbers (V4L2,
firewire, and so on).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-29 01:10:14 +00:00
Luigi Rizzo a799456578 Add a few entries up to 1408x1152 in the table of known video resolutions.
This makes it very convenient to enlarge images using the right-click
on the video window.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 23:15:11 +00:00
Luigi Rizzo 6b33a01692 change the interface of video encapsulation routines, they only
need the buffer and mtu as input.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95263 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 23:04:04 +00:00
Luigi Rizzo 14c09c5bea various rearrangements and renaming of console_video stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 22:37:40 +00:00
Luigi Rizzo 77dd3c1b3f fix a small bug in printing out geometries - wrong input.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28 08:57:01 +00:00
Luigi Rizzo b634b8ccca more localization of gui stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 17:26:16 +00:00
Luigi Rizzo bda73977fa Enable building the code even if SDL is not present (similarly,
SDL is also detected at runtime).
Now we should be able to stream video even without a rendering device
(useful for remote monitoring).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94822 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27 00:21:02 +00:00
Luigi Rizzo 4fe5e46cc3 more localizations around sdl_setup
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 23:40:23 +00:00
Luigi Rizzo fa928c14c7 another bunch of gui localizations
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 22:29:45 +00:00
Luigi Rizzo 250f064851 more localization of sdl stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 22:10:32 +00:00
Luigi Rizzo fe050b42b6 move more gui stuff into console_gui.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 21:10:42 +00:00
Luigi Rizzo a2b091b664 more preparation for untangling of the various console_video stuff
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 20:01:16 +00:00
Luigi Rizzo add967dccf Split console_video.c so that video codecs and gui functions
are in separate files (still #include'd because of tangling in the data
structures, but this is going to be cleaned up).

The video grabbing functions still need to be moved to a separate file.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26 10:14:11 +00:00
Luigi Rizzo d508cf1a07 support sdl_videodriver to send output to x11/aalib/console
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23 14:51:00 +00:00
Luigi Rizzo c5e36e822e move reading info from the keypad to a separate function.
Remove an unused keypad field and some debugging messages.
Adjust formatting on config file parsing


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94736 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23 14:34:17 +00:00
Luigi Rizzo 2f592c52bd make sure the minimum surface depth is 16bpp so we can create YUVoverlays.
With this change we can do

	setenv SDL_VIDEODRIVER aalib

and output to an ascii window (which is still in an X11 window).
If you also do

	unsetenv DISPLAY

then the output goes into the main asterisk window, unfortunately
it interferes with the normal output so you don't see much.

In any case, i don't think we are very far away from having a working
xterm videophone!




git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23 12:36:32 +00:00
Luigi Rizzo 67a704503b Change the name of config file entries for keypad regions
from 'keypad_entry' to 'region'. Fix the example file accordingly.
Also make some fixes in the code do reset entries on reload of the keypad.

The recently committed kpad2.jpg has the correct names.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-22 22:44:31 +00:00
Luigi Rizzo 7a1dcff6a6 Build console_video support by linking in, as opposed to including,
console_video.c

This will ease the task of splitting console_video.c into its components
(V4L and X11 grabbers, various video codecs and packetizers, SDL),
as well as ease future extensions (e.g. additional video sources,
codecs and rendering engines).

For the time being nothing changes for users: video support is off by
default, and requires -DHAVE_VIDEO_CONSOLE on the command line to be included
(if SDL and FFMPEG are available).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-22 18:28:40 +00:00
Luigi Rizzo b7adaa023c add some macros to simplify parsing the config file,
see description in config.h .

They are a variant of the set of macros i used in chan_oss.c,
structured in a way to be more robust to the presence of
spurious ';' - basically, they define wrappers for 'do {'
and '} while (0)', plus some helper functions to deal with simple
cases such as ast_copy_string, ast_malloc, strtoul, ast_true ...

The prefix (CV_ as 'Config Variable') tries to be easy to remember
and has been chosen to not conflict with other existing macros in the tree.

For the time being, I have only updated the three source files in the
tree that used the old M_* macros. Hopefully, more files will be
converted.

NOTE:

    I understand that inventing my own dialect of C is generally wrong;
    however, the lack of adequate support in the language encourages
    lazy programming practices (such as ignoring errors, bounds, etc.)
    and this increases the chance of vulnerability in the code, especially
    because we are parsing user input here.
    Hopefully, these macros and the use of ast_parse_arg (in config.h)
    should encourage the programmer to write more robust code.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94191 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-20 12:56:07 +00:00
Luigi Rizzo 5e84c0554e Add instructions on how to generate your own font.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-19 17:58:39 +00:00
Luigi Rizzo 573d94759d Bring in video console support for chan_oss (and later chan_alsa too).
This is disabled in the default build, you need to explicitly enable it
compiling with

	make COPTS=-DHAVE_VIDEO_CONSOLE

In return, you will be able to do a video call with chan_oss, using
the webcam (or X11 grabbing) as local source, and rendering the
incoming stream on your screen. Currently supported formats are
h261, h263, h263+, h264, mpeg4 (all through the avcodec lib, part
of ffmpeg).

Incoming video is on the left, outgoing video is on the right,
while the center displays a keypad (if configured so).

Right clicking on the video windows increases the size,
center clicking reduces the size.
Dragging the mouse (with the left key) on the right window
while the X11 grabber is active moves the grab area.

This is the result of work by Sergio Fadda, Marta Carbone
and myself, all properly disclaimed to digium.

Note, there is a lot of work left to do in this module,
including adding support for Video4LinuxV2 (I have patches
from Matteo Brancaleoni which should be integrated),
and making the GUI a lot more friendly than it is now
(e.g. supporting merging or switching among multiple sources,
a text window, and more).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93144 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-15 00:30:15 +00:00