summaryrefslogtreecommitdiff
path: root/channels/console_video.c
AgeCommit message (Collapse)Author
2017-12-22Remove as much trailing whitespace as possible.Sean Bright
Change-Id: I873c1c6d00f447269bd841494459efccdd2c19c0
2012-06-15Multiple revisions 369001-369002Kevin P. Fleming
........ r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines Add support-level indications to many more source files. Since we now have tools that scan through the source tree looking for files with specific support levels, we need to ensure that every file that is a component of a 'core' or 'extended' module (or the main Asterisk binary) is explicitly marked with its support level. This patch adds support-level indications to many more source files in tree, but avoids adding them to third-party libraries that are included in the tree and to source files that don't end up involved in Asterisk itself. ........ r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines Add a script to enable finding source files without support-levels defined. ........ Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-06Add missing newlines to CLI loggingKinsey Moore
........ Merged revisions 361471 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 361472 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-01Opaquify ast_channel typedefs, fd arrays, and softhangup flagTerry Wilson
Review: https://reviewboard.asterisk.org/r/1784/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-29Opaquify ast_channel structs and listsTerry Wilson
Review: https://reviewboard.asterisk.org/r/1773/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357542 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-09Replace direct access to channel name with accessor functionsTerry Wilson
There are many benefits to making the ast_channel an opaque handle, from increasing maintainability to presenting ways to kill masquerades. This patch kicks things off by taking things a field at a time, renaming the field to '__do_not_use_${fieldname}' and then writing setters/getters and converting the existing code to using them. When all fields are done, we can move ast_channel to a C file from channel.h and lop off the '__do_not_use_'. This patch sets up main/channel_interal_api.c to be the only file that actually accesses the ast_channel's fields directly. The intent would be for any API functions in channel.c to use the accessor functions. No more monkeying around with channel internals. We should use our own APIs. The interesting changes in this patch are the addition of channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to use accessor functions when ast_channel is really opaque), and some re-working of the way channel iterators/callbacks are handled so as to avoid creating fake ast_channels on the stack to pass in matching data by directly accessing fields (since "name" is a stringfield and the fake channel doesn't init the stringfields, you can't use the ast_channel_name_set() function). I went with ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a setter. The majority of the grunt-work for this change was done by writing a semantic patch using Coccinelle ( http://coccinelle.lip6.fr/ ). Review: https://reviewboard.asterisk.org/r/1655/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-09-02Merged revisions 284597 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r284597 | tilghman | 2010-09-02 00:00:34 -0500 (Thu, 02 Sep 2010) | 29 lines Merged revisions 284593,284595 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r284593 | tilghman | 2010-09-01 17:59:50 -0500 (Wed, 01 Sep 2010) | 18 lines Merged revisions 284478 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r284478 | tilghman | 2010-09-01 13:49:11 -0500 (Wed, 01 Sep 2010) | 11 lines Ensure that all areas that previously used select(2) now use poll(2), with implementations that need poll(2) implemented with select(2) safe against 1024-bit overflows. This is a followup to the fix for the pthread timer in 1.6.2 and beyond, fixing a potential crash bug in all supported releases. (closes issue #17678) Reported by: russell Branch: https://origsvn.digium.com/svn/asterisk/team/tilghman/ast_select Review: https://reviewboard.asterisk.org/r/824/ ........ ................ r284595 | tilghman | 2010-09-01 22:57:43 -0500 (Wed, 01 Sep 2010) | 2 lines Failed to rerun bootstrap.sh after last commit ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-09(closes issue #13557)Steve Murphy
Reported by: nickpeirson Patches: pbx.c.patch uploaded by nickpeirson (license 579) replace_bzero+bcopy.patch uploaded by nickpeirson (license 579) Tested by: nickpeirson, murf 1. replaced all refs to bzero and bcopy to memset and memmove instead. 2. added a note to the CODING-GUIDELINES 3. add two macros to asterisk.h to prevent bzero, bcopy from creeping back into the source 4. removed bzero from configure, configure.ac, autoconfig.h.in git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-14use ast_pthread_create_detached_background() instead of redoingLuigi Rizzo
it with separate calls git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130732 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02plug another panic when the gui cannot be started.Luigi Rizzo
We can still send video, just don't try to use what is not available. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127362 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02prevent a segfault when trying to start the gui without anyLuigi Rizzo
specific configuration in oss.conf (reported by Klaus Darillion on the -video mailing list). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-30implement the 'freeze' function for incoming frames;Luigi Rizzo
fix a bug which caused a crash when a videodevice was specified after startgui=1 in the config file. This also involves a slightly different method to determine if the gui is active or not. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29import the recent additions for video console into trunk,Luigi Rizzo
giving you support for up to 9 video sources (e.g. webcams, or X11 grabbers, etc.) active at once, displaying thumbnails for each of them in the main GUI window, and with the ability to switch between them on the fly during a conversation. The code also implements a 'Picture in Picture' feature, allowing you to select any source as primary or secondary, and move the PiP window by just dragging it with the mouse. The window looks like this: ________________________________________________________________ | ______ ______ ______ ______ ______ ______ ______ | | | tn.1 | | tn.2 | | tn.3 | | tn.4 | | tn.5 | | tn.6 | | tn.7 | | | |______| |______| |______| |______| |______| |______| |______| | | ______ ______ ______ ______ ______ ______ ______ | | |______| |______| |______| |______| |______| |______| |______| | | _________________ __________________ _________________ | | | | | | | | | | | | | | | | | | | | | | | | | | | remote video | | | | local video | | | | | | | | ______ | | | | | | keypad | | | PIP || | | | | | | | |______|| | | |_________________| | | |_________________| | | | | | | | | | | |__________________| | |________________________________________________________________| git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29make this compile after ast_frame's data field changed to a unionLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19Allow users to specify 'startgui=1' in oss.conf so that theLuigi Rizzo
graphic screen for the video console is activated at startup. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10The fixes in this commit are mainly to allow compiling of trunk with ↵Steve Murphy
--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-09Implement keyboard handling, and use it to enterLuigi Rizzo
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-09implement the "console startgui" and "console stopgui"Luigi Rizzo
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-08add support for textareas, used for various dialog windows on the gui.Luigi Rizzo
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-01remove a leftover sleep(1) used for debuggingLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-29Move grabbers definitions to a separate file, vgrabbers.c, so it is easierLuigi Rizzo
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-29virtualize the interface for video grabbers, which shouldLuigi Rizzo
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-28Add a few entries up to 1408x1152 in the table of known video resolutions.Luigi Rizzo
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-28change the interface of video encapsulation routines, they onlyLuigi Rizzo
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-28various rearrangements and renaming of console_video stuffLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-28fix a small bug in printing out geometries - wrong input.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27more localization of gui stuffLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-27Enable building the code even if SDL is not present (similarly,Luigi Rizzo
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-26more localizations around sdl_setupLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26another bunch of gui localizationsLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94817 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26more localization of sdl stuffLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94813 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26move more gui stuff into console_gui.cLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94810 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26more preparation for untangling of the various console_video stuffLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-26Split console_video.c so that video codecs and gui functionsLuigi Rizzo
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-23support sdl_videodriver to send output to x11/aalib/consoleLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94741 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-23move reading info from the keypad to a separate function.Luigi Rizzo
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-23make sure the minimum surface depth is 16bpp so we can create YUVoverlays.Luigi Rizzo
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-22Change the name of config file entries for keypad regionsLuigi Rizzo
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-22Build console_video support by linking in, as opposed to including,Luigi Rizzo
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-20add some macros to simplify parsing the config file,Luigi Rizzo
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-19Add instructions on how to generate your own font.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94002 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-15Bring in video console support for chan_oss (and later chan_alsa too).Luigi Rizzo
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