Many sound files don't have a full frame's worth of data at EOF, so the
warning messages were a bit too noisy. So we demote them to debug
messages.
Change-Id: I6b617467d687658adca39170a81797a11cc766f6
Cleaned up some of the incorrect uses of fread() and fwrite(), mostly in
the format modules. Neither of these functions will ever return a value
less than 0, which we were checking for in some cases.
I've introduced a fair amount of duplication in the format modules, but
I plan to change how format modules work internally in a subsequent
patch set, so this is simply a stop-gap.
Change-Id: I8ca1cd47c20b2c0b72088bd13b9046f6977aa872
When opening a PCM wave file for reading, we aren't tracking the
frequency of the opened file, so we treat 16khz files as 8khz and do
half reads.
This patch also cleans up some of the data types and an unnecessarily
complex `if` expression.
ASTERISK-26613 #close
Reported by: Vitaly K
Change-Id: I05f8b263058dc573ea8ffe0c62e7964506e11815
On filestream close, we need to clear out the ogg & vorbis data
structures to prevent a memory leak.
ASTERISK-26169 #close
Reported by: Ivan Myalkin
Change-Id: Iee94c5a5d5bdafbf8b181c5c064d15d90ace8274
Sun's Au file format has a minimum data offset 24 bytes, but this
offset is encoded in each .au file. Instead of assuming the minimum,
read the actual value and store it for later use.
ASTERISK-20984 #close
Reported by: Roman S.
Patches:
asterisk-1.8.20.0-au-clicks-2.diff (license #6474) patch
uploaded by Roman S.
Change-Id: I524022fb19ff2fd5af2cc2d669d27a780ab2057c
In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed
to AST_MODULE_LOAD_DECLINE. This prevents asterisk from exiting
if a module can't be loaded. If the user wishes to retain the
FAILURE behavior for a specific module, they can use the "require"
or "preload-require" keyword in modules.conf.
A new API was added to logger: ast_is_logger_initialized(). This
allows asterisk.c/check_init() to print to the error log once the
logger subsystem is ready instead of just to stdout. If something
does fail before the logger is initialized, we now print to stderr
instead of stdout.
Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
all traces of it.
Previously exported symbols removed:
* __ast_register_file
* __ast_unregister_file
* ast_complete_source_filename
This also removes the mtx_prof static variable that was declared when
MTX_PROFILE was enabled. This variable was only used in lock.c so it
is now initialized in that file only.
ASTERISK-26480 #close
Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
Add Ogg/Opus playback support.
This uses libopusfile in order to be able to read .opus files and play
them back.
Writing/recording support is not present at this time.
ASTERISK-26409
Change-Id: I8815d23345108d8ca7c0bd640f6a1ce6b4f56955
(cherry picked from commit daee8bbd5209b4158bc1785eede845a26e6cbeaa)
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.
Specifically, it does the following:
* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
remove passing the version in with the macro. Other facilities
than 'core show file version' make use of the file names, such as
setting a debug level only on a specific file. As such, the act of
registering source files with the Asterisk core still has use. The
macro rename now reflects the new macro purpose.
* main/asterisk:
- Refactor the file_version structure to reflect that it no longer
tracks a version field.
- Remove the "core show file version" CLI command. Without the file
version, it is no longer useful.
- Remove the ast_file_version_find function. The file version is no
longer tracked.
- Rename ast_register_file_version/ast_unregister_file_version to
ast_register_file/ast_unregister_file, respectively.
* main/manager: Remove value from the Version key of the ModuleCheck
Action. The actual key itself has not been removed, as doing so would
absolutely constitute a backwards incompatible change. However, since
the file version is no longer tracked, there is no need to attempt to
include it in the Version key.
* UPGRADE: Add notes for:
- Modification to the ModuleCheck AMI Action
- Removal of the "core show file version" CLI command
Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
Writing to a file in the wav49 format performs rather inefficiently. The
procedure is approximately:
(1) Write GSM frame to the end of the file
(2) Seek to the end of the file
(3) Seek to the header
(4) Update the file size
(5) Seek (again) to the end of the file
(6) Repeat
This pattern negates any attempt to use the stdio buffering setup in
ast_writefile. It also results in many small writes that require a seek going
to the disk each second which translates to poor disk performance on certain
file systems, particularly when there are multiple wav49 files being written
simultaneously.
(closes issue ASTERISK-19595)
Reported by: Byron Clark
Tested by: Byron Clark
patches:
gsm_wav_only_update_header_on_close.patch uploaded by byronclark (License 6157)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396412 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Update title that was left behind many years ago. Used revision 6596 as my guide for what it should be.
(issue ASTERISK-20259)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch fixes numerous doxygen warnings across Asterisk. It also updates
the makefile to regenerate the doxygen configuration on the local system
before running doxygen to help prevent warnings/errors on the local system.
Much thanks to Andrew for tackling one of the Asterisk janitor projects!
(issue ASTERISK-20259)
Reported by: Andrew Latham
Patches:
doxygen_partial.diff uploaded by Andrew Latham (license 5985)
make_progdocs.diff uploaded by Andrew Latham (license 5985)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
A very inappropriate placement of a ')' (introduced in r362151) caused the
maximum size of a file to be set as the result of a comparison operation, as
opposed to the result of the ftello operation. This resulted in seeking being
restricted to the beginning of the file, or 1 byte into the file. Thanks to
the Asterisk Test Suite for properly freaking out about this on at least one
test.
(issue ASTERISK-19655)
Reported by: Matt Jordan
........
Merged revisions 362304 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 362305 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362306 65c4cc65-6c06-0410-ace0-fbb531ad65f3
For the formats that support seek and/or truncate operations, many of
the C library calls used to determine or set the current position indicator
in the file stream were not being checked. In some situations, if an error
occurred, a negative value would be returned from the library call. This
could then be interpreted inappropriately as positional data.
This patch checks the return values from these library calls before
using them in subsequent operations.
(issue ASTERISK-19655)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/1863/
........
Merged revisions 362151 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 362152 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362153 65c4cc65-6c06-0410-ace0-fbb531ad65f3
The principle difference between libvorbisfile v1.1.2 and newer (at least
v1.2.0) is the addition of the predefined callbacks OV_CALLBACKS_xxx in
vorbis/vorbisfile.h used for ov_open_callbacks().
* Updated the configure script to detect if libvorbisfile.h declares
OV_CALLBACKS_NOCLOSE.
* Copied the declaration of OV_CALLBACKS_NOCLOSE from v1.2.0 to allow
v1.1.2 to compile.
(closes issue ASTERISK-19370)
Reported by: Jonn Taylor
........
Merged revisions 355608 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 355620 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355621 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Ogg/vorbis was fairly useless as a voicemail file format because it did
not implement the seek and tell format callbacks among other problems.
Since we were already using the libvorbis and libvorbisenc libraries we
can use libvorbisfile as it is also part of the vorbis library package.
* Made use the libvorbisfile to handle the ogg/vorbis file stream. The
format_ogg_vorbis.c is now mostly a wrapper around libvorbisfile.
(closes issue ASTERISK-16926)
Reported by: sque
Patches:
ogg_vorbis_use_libvorbisfile.patch (license #6108) patch uploaded by sque
........
Merged revisions 355365 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 355375 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355376 65c4cc65-6c06-0410-ace0-fbb531ad65f3
It was inconsistent to have the silk and celt format attribute
modules in the format file interpreter folder.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327116 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-Functional changes
1. Dynamic global format list build by codecs defined in codecs.conf
2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf
3. Negotiation of SILK attributes in chan_sip.
4. SPEEX 32khz with translation
5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation
using codec_resample.c
6. Various changes to RTP code required to properly handle the dynamic format list
and formats with attributes.
7. ConfBridge now dynamically jumps to the best possible sample rate. This allows
for conferences to take advantage of HD audio (Which sounds awesome)
8. Audiohooks are no longer limited to 8khz audio, and most effects have been
updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT.
9. codec_resample now uses its own code rather than depending on libresample.
-Organizational changes
Global format list is moved from frame.c to format.c
Various format specific functions moved from frame.c to format.c
Review: https://reviewboard.asterisk.org/r/1104/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This patch is the foundation of an entire new way of looking at media in Asterisk.
The code present in this patch is everything required to complete phase1 of my
Media Architecture proposal. For more information about this project visit the link below.
https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal
The primary function of this patch is to convert all the usages of format
bitfields in Asterisk to use the new format and format_cap APIs. Functionally
no change in behavior should be present in this patch. Thanks to twilson
and russell for all the time they spent reviewing these changes.
Review: https://reviewboard.asterisk.org/r/1083/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Updated the doxygen \arg line after looking at the file for some other Asterisk documentation
and noticing they weren't up to date. Thanks to seanbright for looking at the code for me :)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257988 65c4cc65-6c06-0410-ace0-fbb531ad65f3
A recent change to app_voicemail made it such that the module now assumes that
all format modules are available while processing voicemail configuration.
However, when autoloading modules, it was possible that app_voicemail was
loaded before the format modules. Since format modules don't depend on
anything, set a module load priority on them to ensure that they get loaded
first when autoloading.
This fix applies to trunk, 1.6.1, and 1.6.2. The fix for 1.4 and 1.6.0 will
require a different approach since the module load priority functionality is
not present in the module API.
(issue #16412)
Reported by: jiddings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@233692 65c4cc65-6c06-0410-ace0-fbb531ad65f3