Antonio Ospite [Tue, 22 May 2012 14:21:25 +0000 (16:21 +0200)]
am7xxx-play: check if sigaction is available
If sigaction is not available just stub out the set_signal_handler()
function.
Antonio Ospite [Tue, 22 May 2012 14:16:15 +0000 (16:16 +0200)]
am7xxx-play: add a fallback definition for ENOTSUP
Antonio Ospite [Tue, 22 May 2012 13:42:26 +0000 (15:42 +0200)]
am7xxx-play: get the framerate from the video stream
When setting the output codec get the time_base (which indicates the
framerate) from the video stream, not from the input codec context, this
is the correct way to do it.
On some systems (Windows) the time_base from the input codec context is
set different from the one of the video stream, and timebase.num ends up
being 0 which results in the output codec initialization failing with
the message "framerate not set".
Antonio Ospite [Tue, 22 May 2012 13:29:55 +0000 (15:29 +0200)]
mingw_cross_toolchain.cmake: set the MINGW variable to True
Setting MINGW to True is important to let cmake set some variables such
as CMAKE_FIND_LIBRARY_PREFIXES and CMAKE_FIND_LIBRARY_SUFFIXES from
Platform/Windows-GNU.cmake
I wasted a lot of time on this with find_library() not finding libav
libraries compiled for MingW whith the ".dll.a" suffix.
Antonio Ospite [Tue, 15 May 2012 08:35:05 +0000 (10:35 +0200)]
HACKING.asciidoc: add info about getting and building libam7xxx
Some Ubuntu user asked for a step by step guide.
Antonio Ospite [Mon, 14 May 2012 12:42:44 +0000 (14:42 +0200)]
README.asciidoc: add Royaltek PJU-2100 to the AM7XXX based devices list
The drivers for this device look like the same "EZ Display" bundle as
some other models.
Richard Wisenoecker [Sun, 13 May 2012 08:25:52 +0000 (10:25 +0200)]
am7xxx: add support for Acer C112
Antonio Ospite [Fri, 11 May 2012 19:52:29 +0000 (21:52 +0200)]
README.asciidoc document how to get libam7xx running on MS Windows
Antonio Ospite [Fri, 11 May 2012 19:50:36 +0000 (21:50 +0200)]
Add a simple usb_mode_switch clone for am7xxx devices
Add am7xxx_mode_switch, this is will be used on systems where
usb_mode_switch is not easily available (e.g. MS Windows).
Antonio Ospite [Thu, 10 May 2012 15:00:27 +0000 (17:00 +0200)]
TODO: mention the plan about GStreamer
Antonio Ospite [Thu, 10 May 2012 14:02:16 +0000 (16:02 +0200)]
Merge branch 'mingw-port'
Antonio Ospite [Thu, 10 May 2012 13:46:47 +0000 (15:46 +0200)]
HACKING.asciidoc: add a section to explain Windows cross compilation
Antonio Ospite [Thu, 10 May 2012 13:29:56 +0000 (15:29 +0200)]
Add a CMAKE_TOOLCHAIN_FILE to compile with MinGW
This is inspired by this blog post by Sylvain Beucler:
http://blog.beuc.net/posts/Cross-compiling_with_CMake/
Antonio Ospite [Thu, 10 May 2012 12:58:26 +0000 (14:58 +0200)]
Don't set -pedantic-errors in CMAKE_C_FLAGS, it breaks check_symbol_exists()
Set -pedantic-errors in more specific variables like
CMAKE_C_FLAGS_DEBUG, CMAKE_C_FLAGS_RELEASE and
CMAKE_C_FLAGS_RELWITHDEBINFO.
See also http://public.kitware.com/Bug/view.php?id=13208
Antonio Ospite [Thu, 10 May 2012 10:13:03 +0000 (12:13 +0200)]
picoproj: replace mmap() with more portable file stream operations
This makes picoproj compile for Windows, for instance.
Antonio Ospite [Thu, 10 May 2012 10:11:33 +0000 (12:11 +0200)]
picoproj: fix a typo
We have no am7xxx_get_info(), maybe this is a leftover of some older
unreleased API version.
Antonio Ospite [Thu, 10 May 2012 10:10:45 +0000 (12:10 +0200)]
picoproj: issue a warning when passing "-f" more than once
Antonio Ospite [Thu, 10 May 2012 07:34:01 +0000 (09:34 +0200)]
am7xxx: don't look for the math library when compiling for Windows
Antonio Ospite [Thu, 10 May 2012 07:01:40 +0000 (09:01 +0200)]
am7xxx: MinGW does not have endian.h, provide fallbacks
Provide fallbacks only for the functions used in the code, and assume
Windows is always using little endian.
Antonio Ospite [Thu, 10 May 2012 06:16:04 +0000 (08:16 +0200)]
am7xxx: fix setting the USB configuration
libusb_set_configuration() expects the bConfigurationValue of the
configuration we wish to activate as the second parameter.
The am7xxx devices we know have bConfigurationValue=2 for the first and
only configuration available in the descriptor, use this value.
While the libusb linux back-end looks forgiving on this one, without this
change the WinUSB back-end will fail with an error like:
C:\Documents and Settings\Administrator\Desktop\win>picoproj.exe -f image.jpg -F 1 -l 5 -W 800 -H 480
JPEG format
scan_devices: am7xxx device found, index: 0, name: Acer C110
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
[ 0.000000] [
00000eb0] libusbx: warning [winusb_submit_control_transfer] cannot set configuration other than the default one
[ 0.031250] [
00000eb0] libusbx: warning [winusb_submit_control_transfer] cannot set configuration other than the default one
[ 0.046875] [
00000eb0] libusbx: error [winusb_submit_bulk_transfer] unable to match endpoint to an open interface - cancelling transfer
read_data[281]: ret: -5 transferred: 0 (expected 24)
am7xxx_get_info: No such file or directory
Antonio Ospite [Thu, 10 May 2012 06:11:14 +0000 (08:11 +0200)]
am7xxx: use hex notation for USB endpoints
This is for consistency with other uses.
Antonio Ospite [Thu, 10 May 2012 05:57:01 +0000 (07:57 +0200)]
picoproj: use MAP_PRIVATE in the mmap call
There is no need to allow sharing the mapped region with other
processes.
Antonio Ospite [Thu, 10 May 2012 05:49:46 +0000 (07:49 +0200)]
HACKING.asciidoc: fix cmake invocation examples
Put the path to the source dir last, like the cmake manual says:
cmake [options] <path-to-source>
Also put a space between the -D option and the configuration setting it
modifies, this is more readable.
Antonio Ospite [Thu, 10 May 2012 13:57:19 +0000 (15:57 +0200)]
Merge remote-tracking branch 'origin/rettichschnidi' into mingw-port
Antonio Ospite [Sun, 6 May 2012 21:24:40 +0000 (23:24 +0200)]
picoproj: add a note about image dimensions and native resolution
Also print a warning when the user supplies a big image, picoproj does
not perform any rescale so the device may just display a wrong picture
or even hang.
Reto Schneider [Sun, 8 Apr 2012 12:24:43 +0000 (14:24 +0200)]
Fix usage of FIND_PATH, allow $FFMPEG_DIR to be used.
Reto Schneider [Sat, 7 Apr 2012 10:39:43 +0000 (12:39 +0200)]
Stop CMake if function avformat_open_input not available,
print an error message. Prevents compile errors later on.
Reto Schneider [Sat, 7 Apr 2012 06:39:33 +0000 (08:39 +0200)]
Make example programs optional.
Antonio Ospite [Wed, 28 Mar 2012 11:37:00 +0000 (13:37 +0200)]
Release version 0.1.2
This fixes the handling of DESTDIR and should finally make packaging
easier.
Antonio Ospite [Wed, 28 Mar 2012 11:08:23 +0000 (13:08 +0200)]
doc: fix the "custom install targets" to handle DESTDIR
Stuff has to be installed/copied in an actual "install" target for Cmake
to handle DESTDIR sanely, a custom target is not enough.
So the story now is:
- add a component-local install rule
- make the "custom install target" invoke it
- make sure the custom target has been executed at install time
Maybe all this is not even worth the effort anymore and the "custom
install targets" could go away altogether, their point was to have
_them_ invoke at install time end exploit the dependencies chain.
Antonio Ospite [Wed, 28 Mar 2012 08:55:14 +0000 (10:55 +0200)]
Release version 0.1.1
This release adds some improvements which should ease packaging, we also
ship a changelog (generated with "make changelog") because some
distributions like to ship some form of upstream history in their
packages.
Antonio Ospite [Wed, 28 Mar 2012 08:43:04 +0000 (10:43 +0200)]
doc: use ${DOC_OUTPUT_PATH} in the targets once we have it defined
Antonio Ospite [Wed, 28 Mar 2012 08:31:22 +0000 (10:31 +0200)]
examples: keep the -h option as the last one in am7xxx-play
This is the Unix tradition AFAICT. Also, options in the geopt() loop
usually follow the order in which they appear in the usage message.
Antonio Ospite [Wed, 28 Mar 2012 08:27:12 +0000 (10:27 +0200)]
examples: add power level setting to picoproj
Antonio Ospite [Wed, 28 Mar 2012 08:11:54 +0000 (10:11 +0200)]
TODO: remove the entry about signals and picoproj
picoproj is a minimal example and it is just meant to illustrate the API
and run and exit quickly, it is not worth adding signal handling in it,
that would just make the code more noisy.
Antonio Ospite [Wed, 28 Mar 2012 08:09:08 +0000 (10:09 +0200)]
cosmetics: remove some trailing spaces
Antonio Ospite [Wed, 28 Mar 2012 08:02:03 +0000 (10:02 +0200)]
am7xxx: control shared library symbols visibility
Export as public symbols only those really needed, without this change
some symbols from serialize.c (get_8, get_le32, put_8, put_le32) were
public too.
Use -fvisibility=hidden so we don't need to explicitly mark symbols as
local.
Antonio Ospite [Wed, 28 Mar 2012 07:11:51 +0000 (09:11 +0200)]
doc: make sure docs have been generated when installing
This is done in three steps:
- first a "custom install target" is created for each custom target
which builds documentation;
- then dependencies between those custom install targets and the
correspondent "build" targets are added;
- finally some code is added to ensure those "custom install targets"
are called when the builtin install target is executed.
Antonio Ospite [Mon, 26 Mar 2012 11:50:05 +0000 (13:50 +0200)]
Increase project number to 0.1.0
Version 0.1.0 is going to be the first libam7xxx stable release.
Antonio Ospite [Mon, 26 Mar 2012 11:49:31 +0000 (13:49 +0200)]
Merge branch 'unstable'
Antonio Ospite [Mon, 26 Mar 2012 11:27:43 +0000 (13:27 +0200)]
TODO: remove the entry about documenting the API with Doxygen
Antonio Ospite [Fri, 23 Mar 2012 23:25:57 +0000 (00:25 +0100)]
doc: add generation of man pages from asciidoc sources
Antonio Ospite [Fri, 23 Mar 2012 23:01:25 +0000 (00:01 +0100)]
doc: add a link to the public API on the main page
Antonio Ospite [Fri, 23 Mar 2012 23:26:59 +0000 (00:26 +0100)]
examples: rephrase picoproj example description
This is to avoid repeating 'show' two times in the same sentence.
Antonio Ospite [Fri, 23 Mar 2012 22:32:59 +0000 (23:32 +0100)]
examples: make picoproj usage look more like am7xxx-play one
Antonio Ospite [Fri, 23 Mar 2012 21:01:45 +0000 (22:01 +0100)]
doc: add examples to the Doxygen documentation
Antonio Ospite [Fri, 23 Mar 2012 16:03:36 +0000 (17:03 +0100)]
sm7xxx-play: add missing newline on some error messages
Antonio Ospite [Wed, 21 Mar 2012 13:47:20 +0000 (14:47 +0100)]
am7xxx: round scaled_height and scaled_width
Round when converting from float to int, this is more like what the user
expects about image dimensions.
Antonio Ospite [Wed, 21 Mar 2012 11:06:16 +0000 (12:06 +0100)]
cmake: make stricter compilation checks conditional
On some systems building with options like -Werror is just impractical.
Antonio Ospite [Wed, 21 Mar 2012 10:45:36 +0000 (11:45 +0100)]
Merge remote-tracking branch 'origin/rettichschnidi' into unstable
Conflicts:
examples/am7xxx-play.c
Antonio Ospite [Tue, 20 Mar 2012 21:59:03 +0000 (22:59 +0100)]
examples: set proper return codes in am7xxx-play
Set the return codes explicitly on the error path of functions not
returning an int error value.
Antonio Ospite [Mon, 19 Mar 2012 21:13:04 +0000 (22:13 +0100)]
examples: add a -l option to am7xxx-play
Allow setting the verbosity level of log messages.
Reto Schneider [Tue, 20 Mar 2012 22:39:05 +0000 (23:39 +0100)]
Fix typo: dimesions -> dimensions
Reto Schneider [Tue, 20 Mar 2012 22:36:20 +0000 (23:36 +0100)]
All modes above LOW need both connectors to be plugged in.
Reto Schneider [Tue, 20 Mar 2012 22:33:50 +0000 (23:33 +0100)]
Fix typo: architechtures -> architectures
Reto Schneider [Tue, 20 Mar 2012 22:32:46 +0000 (23:32 +0100)]
Remove douled semicolons
Reto Schneider [Tue, 20 Mar 2012 20:16:14 +0000 (21:16 +0100)]
Check the user submitted value for the rescaling method.
Reto Schneider [Tue, 20 Mar 2012 20:15:29 +0000 (21:15 +0100)]
Fix the wording of the help message for the rescaling method.
Reto Schneider [Tue, 20 Mar 2012 20:06:30 +0000 (21:06 +0100)]
Update the help message to make it clear that the quality argument needs
a parameter.
Reto Schneider [Tue, 20 Mar 2012 19:53:38 +0000 (20:53 +0100)]
Let the user set the power mode via the switch '-p <power mode>'
Reto Schneider [Tue, 20 Mar 2012 18:55:27 +0000 (19:55 +0100)]
Merge remote-tracking branch 'origin/unstable' into rettichschnidi
Antonio Ospite [Mon, 19 Mar 2012 21:07:16 +0000 (22:07 +0100)]
cmake: disable optimizations in debug builds
Reto Schneider [Sun, 18 Mar 2012 22:45:48 +0000 (23:45 +0100)]
Link to all ffmpeg libraries, not just to avdevice.
Antonio Ospite [Sat, 17 Mar 2012 09:17:19 +0000 (10:17 +0100)]
am7xxx: fix a typo, s/it's/its/
Reto Schneider [Fri, 16 Mar 2012 19:46:29 +0000 (20:46 +0100)]
Merge branch 'unstable' into rettichschnidi
Reto Schneider [Fri, 16 Mar 2012 19:36:05 +0000 (20:36 +0100)]
Purely cosmetic change: add missing newline
Reto Schneider [Fri, 9 Mar 2012 18:47:54 +0000 (19:47 +0100)]
Use commas to separate different pico projector names.
Antonio Ospite [Thu, 15 Mar 2012 14:30:28 +0000 (15:30 +0100)]
examples: add a am7xxx-play example program
am7xxx-play is a simple player based on ffmpeg/libav which displays the
output on a am7xxx device. It can be used to capture the desktop screen,
or video from a v4l2 device, or from any other device supported by
libavdevice including video files.
However it is to note that am7xxx-play displays the output as fast as it
can so it is not reliable when used to display video files directly.
Antonio Ospite [Thu, 15 Mar 2012 13:11:28 +0000 (14:11 +0100)]
am7xxx: cosmetics, remove some useless double spaces
Antonio Ospite [Thu, 15 Mar 2012 13:05:25 +0000 (14:05 +0100)]
am7xxx: add am7xxx_calc_scaled_image_dimensions()
This function is useful to calculate the dimensions of an image which
will be sent with am7xxx_send_image() in a way that keeps the original
image aspect ratio.
Antonio Ospite [Thu, 8 Mar 2012 13:35:36 +0000 (14:35 +0100)]
contrib: add PicoPix 1020 USB IDs to 55-am7xxx.rules
Antonio Ospite [Thu, 8 Mar 2012 13:22:20 +0000 (14:22 +0100)]
picoproj: move it to an example/ directory
We plan on adding some more useful examples in the future, so it is
better to have them all in their separate directory in order to make the
project structure easier to understand.
Antonio Ospite [Wed, 7 Mar 2012 22:32:29 +0000 (23:32 +0100)]
cmake: split out the maintenance targets to a new cmake module
This makes the top level CMakeLists.txt easier to follow.
Antonio Ospite [Wed, 7 Mar 2012 22:12:30 +0000 (23:12 +0100)]
doc: add an install target
For now only Unix-style destinations are supported, we will abstract
them out when the need raises.
Antonio Ospite [Wed, 7 Mar 2012 16:48:49 +0000 (17:48 +0100)]
am7xxx, doc: add Doxygen documentation for the public API
Antonio Ospite [Tue, 6 Mar 2012 16:28:57 +0000 (17:28 +0100)]
am7xxx: rename the 'size' argument of am7xxx_send_image() to 'image_size'
Antonio Ospite [Thu, 1 Mar 2012 22:47:00 +0000 (23:47 +0100)]
cosmetics: remove some unneeded white spaces
Antonio Ospite [Thu, 1 Mar 2012 22:05:50 +0000 (23:05 +0100)]
CmakeLists.txt: add some hardening options to CMAKE_C_FLAGS
These options (-fstack-protector --param=ssp-buffer-size=4) should not
affect the current code but it is useful to have them here for
reference.
Antonio Ospite [Thu, 1 Mar 2012 20:52:06 +0000 (21:52 +0100)]
am7xxx: introduce a new am7xxx_device_info type
This is in order to abstract the properties of an am7xxx device, for now
only native_width and native_height are supported.
Antonio Ospite [Wed, 29 Feb 2012 22:54:22 +0000 (23:54 +0100)]
HACKING.asciidoc: mention how to use valgrind
Antonio Ospite [Wed, 29 Feb 2012 22:31:14 +0000 (23:31 +0100)]
picoproj: add an option to set the log level
Antonio Ospite [Wed, 29 Feb 2012 22:29:12 +0000 (23:29 +0100)]
am7xxx: use the logging infrastructure
Also make debug_dump_devinfo_header() and trace_dump_buffer() stubbed
out at compile time when DEBUG is not defined, just to save some cycles
in the data sending routines when in production.
Antonio Ospite [Tue, 28 Feb 2012 22:51:37 +0000 (23:51 +0100)]
am7xxx: add a simple logging infrastructure
Antonio Ospite [Tue, 28 Feb 2012 21:37:06 +0000 (22:37 +0100)]
am7xxx: track the context in am7xxx_device
This will be used to retrieve the context in functions operating on
devices, in order to use the log calls which are going to be added.
Antonio Ospite [Tue, 28 Feb 2012 20:57:45 +0000 (21:57 +0100)]
am7xxx: pass the context to add_new_device() and find_device()
This is preparation for when we will track the context in am7xxx_device
as well, and as a side effect those functions now look more consistent
with the other ones.
Antonio Ospite [Tue, 28 Feb 2012 20:44:34 +0000 (21:44 +0100)]
am7xxx: silent a warning enabled by 'sparse' about an uninitialized variable
src/am7xxx.c:423:6: warning: ‘ret’ may be used uninitialized in this function [-Wuninitialized]
If libusb_get_device_list() returned 0 we didn't have 'ret' properly
initialized.
Antonio Ospite [Wed, 29 Feb 2012 22:33:13 +0000 (23:33 +0100)]
TODO: remove the entry about multi-device support
This is done now, even if not tested with actual hardware...
Antonio Ospite [Thu, 23 Feb 2012 17:05:48 +0000 (18:05 +0100)]
am7xxx: add multi-device support
Allow operating on more than one am7xxx device at the same time.
Antonio Ospite [Thu, 23 Feb 2012 15:23:41 +0000 (16:23 +0100)]
TODO: handle signals in picoproj and do the proper cleanup
Antonio Ospite [Wed, 22 Feb 2012 12:14:24 +0000 (13:14 +0100)]
am7xxx: support other devices which talk the same protocol
Add support for the Philips/Sagemcom PicoPix 1020, which has different
USB IDs.
Antonio Ospite [Tue, 21 Feb 2012 13:48:06 +0000 (14:48 +0100)]
cmake: fix libusb search
Adjust cmake test for libusb library so that the compatible libusb for
freebsd can be found. Since freebsd's libusb header are located in
a different place from libusb-1.0, the includes in the source code must
be adjusted using #include <libusb.h>. Actually those new include
statements are those that libusb-1.0 really expects to be used (see
libusb-1.0.pc cflags to verify this).
Taken from libfreenect commit
8219750df3a13501626a7f7f54d24afb8e64ec3f
https://github.com/OpenKinect/libfreenect/commit/
8219750df3a13501626a7f7f54d24afb8e64ec3f
Antonio Ospite [Tue, 21 Feb 2012 12:19:28 +0000 (13:19 +0100)]
am7xxx: change am7xx_device definition, better buffer handling
Add a new data type for am7xxx devices and make it hold a buffer, this
way allocating a new buffer for each communication can be avoided; also
move this definition to am7xxx.c to avoid exposing details about libusb
in am7xxx.h.
Antonio Ospite [Thu, 23 Feb 2012 14:26:44 +0000 (15:26 +0100)]
am7xxx: initialize the 'transferred' variable before USB transfers
This makes sure the subsequent error messages print a sane value when
libusb fails without touching the variable.
Antonio Ospite [Tue, 21 Feb 2012 18:55:24 +0000 (19:55 +0100)]
README.asciidoc: Acer C120 is not based on AM7XXX
Dhanraj Rajput has one of these and he figured out that the
communication here is based on the SCSI Pass-Trough protocol, not on
plain USB bulk transfers.
Antonio Ospite [Mon, 20 Feb 2012 20:31:36 +0000 (21:31 +0100)]
README.asciidoc: rephrase the part about USB IDs
Those devices does not always use the Actions Micro Vendor ID in display
mode, some Philips ones don't for instance, so tell that the IDs
mentioned are just examples.
Also mention that usb-modeswitch perform the mode change automatically
now.
Antonio Ospite [Mon, 20 Feb 2012 16:51:11 +0000 (17:51 +0100)]
README.asciidoc: fix a typo s/trasfers/transfers/
Antonio Ospite [Mon, 20 Feb 2012 16:50:06 +0000 (17:50 +0100)]
README.asciidoc: mention Thomas Baquet's project and fix some style
Antonio Ospite [Mon, 20 Feb 2012 12:44:23 +0000 (13:44 +0100)]
contrib: add some udev rules to let normal users access the devices
Make any user in the "plugdev" group be able to use an am7xxx device,
not just the root user like it is now.
Antonio Ospite [Mon, 20 Feb 2012 12:28:29 +0000 (13:28 +0100)]
README.asciidoc: highlight USB IDs by using an unformatted style
Antonio Ospite [Wed, 25 Jan 2012 14:50:41 +0000 (15:50 +0100)]
Don't use fixed size integer types in the public header
The rationale behind this is that a user of the library is interested in
the meaning of the data passed, not on its storage size.