Revision: 6534
http://playerstage.svn.sourceforge.net/playerstage/?rev=6534&view=rev
Author: gbiggs
Date: 2008-06-10 20:05:55 -0700 (Tue, 10 Jun 2008)
Log Message:
-----------
Fixed jpeg inclusion/exclusion
Modified Paths:
--------------
code/player/trunk/client_libs/libplayerc/CMakeLists.txt
code/player/trunk/client_libs/libplayerc/dev_camera.c
code/player/trunk/cmake/internal/SearchForStuff.cmake
code/player/trunk/config.h.in
code/player/trunk/libplayerjpeg/CMakeLists.txt
code/player/trunk/rtk2/rtk_canvas.c
code/player/trunk/server/drivers/base/imagebase.cc
code/player/trunk/server/drivers/blobfinder/cmvision/P2CMV.cc
code/player/trunk/server/libplayerdrivers/CMakeLists.txt
Modified: code/player/trunk/client_libs/libplayerc/CMakeLists.txt
===================================================================
--- code/player/trunk/client_libs/libplayerc/CMakeLists.txt 2008-06-11
02:46:25 UTC (rev 6533)
+++ code/player/trunk/client_libs/libplayerc/CMakeLists.txt 2008-06-11
03:05:55 UTC (rev 6534)
@@ -54,10 +54,10 @@
PLAYER_ADD_LIBRARY (playerc ${playercSrcs})
ADD_DEPENDENCIES (playerc player_interfaces playerxdr_src)
TARGET_LINK_LIBRARIES (playerc playerxdr playerutils playererror
${PLAYERC_EXTRA_LINK_LIBRARIES})
-IF (HAVE_LIBJPEG)
+IF (HAVE_JPEG)
TARGET_LINK_LIBRARIES (playerc playerjpeg)
PLAYERC_ADD_LINK_LIB (jpeg)
-ENDIF (HAVE_LIBJPEG)
+ENDIF (HAVE_JPEG)
IF (HAVE_GEOS)
TARGET_LINK_LIBRARIES (playerc ${GEOS_LIBS})
ENDIF (HAVE_GEOS)
Modified: code/player/trunk/client_libs/libplayerc/dev_camera.c
===================================================================
--- code/player/trunk/client_libs/libplayerc/dev_camera.c 2008-06-11
02:46:25 UTC (rev 6533)
+++ code/player/trunk/client_libs/libplayerc/dev_camera.c 2008-06-11
03:05:55 UTC (rev 6534)
@@ -42,9 +42,9 @@
* Date: 26 May 2002
* CVS: $Id$
**************************************************************************/
-#include "config.h"
+#include <config.h>
-#if HAVE_JPEGLIB_H
+#if HAVE_JPEG
#include "libplayerjpeg/playerjpeg.h"
#endif
@@ -132,7 +132,7 @@
if (device->compression == PLAYER_CAMERA_COMPRESS_RAW)
return;
-#if HAVE_JPEGLIB_H
+#if HAVE_JPEG
int dst_size;
unsigned char *dst;
Modified: code/player/trunk/cmake/internal/SearchForStuff.cmake
===================================================================
--- code/player/trunk/cmake/internal/SearchForStuff.cmake 2008-06-11
02:46:25 UTC (rev 6533)
+++ code/player/trunk/cmake/internal/SearchForStuff.cmake 2008-06-11
03:05:55 UTC (rev 6534)
@@ -26,6 +26,10 @@
CHECK_LIBRARY_EXISTS (dns_sd DNSServiceRefDeallocate "" HAVE_DNS_SD)
ENDIF (HAVE_DNS_SD)
+IF (HAVE_LIBJPEG AND HAVE_JPEGLIB_H)
+ SET (HAVE_JPEG TRUE)
+ENDIF (HAVE_LIBJPEG AND HAVE_JPEGLIB_H)
+
# Endianess check
INCLUDE (TestBigEndian)
TEST_BIG_ENDIAN (WORDS_BIGENDIAN)
Modified: code/player/trunk/config.h.in
===================================================================
--- code/player/trunk/config.h.in 2008-06-11 02:46:25 UTC (rev 6533)
+++ code/player/trunk/config.h.in 2008-06-11 03:05:55 UTC (rev 6534)
@@ -9,56 +9,22 @@
/* enable TCP_NODELAY */
#cmakedefine ENABLE_TCP_NODELAY 1
-/* Define to 1 if you have the `getaddrinfo' function. */
#cmakedefine HAVE_GETADDRINFO 1
-
-/* Define to 1 if you have the <jpeglib.h> header file. */
-#cmakedefine HAVE_JPEGLIB_H 1
-
-/* Define to 1 if you have the GL library (-lGL). */
+//#cmakedefine HAVE_JPEGLIB_H 1
+//#cmakedefine HAVE_LIBJPEG 1
+#cmakedefine HAVE_JPEG 1
#cmakedefine HAVE_LIBGL 1
-
-/* Define to 1 if you have the GLU library (-lGLU). */
#cmakedefine HAVE_LIBGLU 1
-
-/* Define to 1 if you have the GLUT library (-lGglut). */
#cmakedefine HAVE_LIBGLUT 1
-
-/* Define to 1 if you have the jpeg library (-ljpeg). */
-#cmakedefine HAVE_LIBJPEG 1
-
-/* Define to 1 if you have the z library (-lz). */
#cmakedefine HAVE_LIBZ 1
-
-/* Define to 1 if you have the <linux/joystick.h> header file. */
#cmakedefine HAVE_LINUX_JOYSTICK_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
#cmakedefine HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
#cmakedefine HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
#cmakedefine HAVE_STRING_H 1
-
-/* Define to 1 if you have the <sys/filio.h> header file. */
#cmakedefine HAVE_SYS_FILIO_H 1
-
-/* Define to 1 if you have the <sys/soundcard.h> header file. */
#cmakedefine HAVE_SYS_SOUNDCARD_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
#cmakedefine HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
#cmakedefine HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the <zlib.h> header file. */
#cmakedefine HAVE_ZLIB_H 1
-
-/* Define to 1 if the system is big endian. */
#cmakedefine WORDS_BIGENDIAN 1
\ No newline at end of file
Modified: code/player/trunk/libplayerjpeg/CMakeLists.txt
===================================================================
--- code/player/trunk/libplayerjpeg/CMakeLists.txt 2008-06-11 02:46:25 UTC
(rev 6533)
+++ code/player/trunk/libplayerjpeg/CMakeLists.txt 2008-06-11 03:05:55 UTC
(rev 6534)
@@ -1,6 +1,10 @@
-SET (playerjpegSrcs playerjpeg.c)
+IF (HAVE_JPEG)
+ SET (playerjpegSrcs playerjpeg.c)
-PLAYER_ADD_LIBRARY (playerjpeg ${playerjpegSrcs})
-TARGET_LINK_LIBRARIES (playerjpeg jpeg)
-PLAYER_ADD_LINK_LIB (jpeg)
-PLAYER_INSTALL_HEADERS (playerjpeg playerjpeg.h)
\ No newline at end of file
+ PLAYER_ADD_LIBRARY (playerjpeg ${playerjpegSrcs})
+ TARGET_LINK_LIBRARIES (playerjpeg jpeg)
+ PLAYER_ADD_LINK_LIB (jpeg)
+ PLAYER_INSTALL_HEADERS (playerjpeg playerjpeg.h)
+ELSE (HAVE_JPEG)
+ MESSAGE (STATUS "JPEG support not included.")
+ENDIF (HAVE_JPEG)
\ No newline at end of file
Modified: code/player/trunk/rtk2/rtk_canvas.c
===================================================================
--- code/player/trunk/rtk2/rtk_canvas.c 2008-06-11 02:46:25 UTC (rev 6533)
+++ code/player/trunk/rtk2/rtk_canvas.c 2008-06-11 03:05:55 UTC (rev 6534)
@@ -35,7 +35,7 @@
#include <math.h>
#include <gdk/gdkkeysyms.h>
-#if HAVE_JPEGLIB_H
+#if HAVE_JPEG
#include <jpeglib.h>
#endif
@@ -60,7 +60,7 @@
int sizex, int sizey, uint8_t *image);
-// Mouse modes
+// Mouse modes
enum {MOUSE_NONE, MOUSE_PAN, MOUSE_ZOOM, MOUSE_TRANS, MOUSE_ROT, MOUSE_SCALE};
// Mouse events
@@ -86,7 +86,7 @@
// Append canvas to linked list
RTK_LIST_APPEND(app->canvas, canvas);
-
+
canvas->app = app;
canvas->sizex = 0;
canvas->sizey = 0;
@@ -109,11 +109,11 @@
pthread_key_create(&canvas->key, NULL);
pthread_mutex_init(&canvas->mutex, NULL);
*/
-
+
// Initialise mouse handling
canvas->zoom_fig = NULL;
canvas->mouse_mode = MOUSE_NONE;
- canvas->mouse_over_fig = NULL;
+ canvas->mouse_over_fig = NULL;
canvas->mouse_selected_fig = NULL;
// Create a top-level window
@@ -126,7 +126,7 @@
// Create menu bar
canvas->menu_bar = gtk_menu_bar_new();
-
+
// Put it all together
gtk_container_add(GTK_CONTAINER(canvas->frame), canvas->layout);
gtk_box_pack_start(GTK_BOX(canvas->layout), canvas->menu_bar, FALSE, FALSE,
0);
@@ -151,17 +151,17 @@
// Connect gtk signal handlers
gtk_signal_connect(GTK_OBJECT(canvas->frame), "destroy",
GTK_SIGNAL_FUNC(rtk_on_destroy), canvas);
- gtk_signal_connect(GTK_OBJECT(canvas->canvas), "configure_event",
+ gtk_signal_connect(GTK_OBJECT(canvas->canvas), "configure_event",
GTK_SIGNAL_FUNC(rtk_on_configure), canvas);
- gtk_signal_connect(GTK_OBJECT(canvas->canvas), "expose_event",
+ gtk_signal_connect(GTK_OBJECT(canvas->canvas), "expose_event",
GTK_SIGNAL_FUNC(rtk_on_expose), canvas);
- gtk_signal_connect(GTK_OBJECT(canvas->canvas), "button_press_event",
+ gtk_signal_connect(GTK_OBJECT(canvas->canvas), "button_press_event",
GTK_SIGNAL_FUNC(rtk_on_press), canvas);
- gtk_signal_connect(GTK_OBJECT(canvas->canvas), "motion_notify_event",
+ gtk_signal_connect(GTK_OBJECT(canvas->canvas), "motion_notify_event",
GTK_SIGNAL_FUNC(rtk_on_motion), canvas);
- gtk_signal_connect(GTK_OBJECT(canvas->canvas), "button_release_event",
+ gtk_signal_connect(GTK_OBJECT(canvas->canvas), "button_release_event",
GTK_SIGNAL_FUNC(rtk_on_release), canvas);
- gtk_signal_connect(GTK_OBJECT(canvas->frame), "key-press-event",
+ gtk_signal_connect(GTK_OBJECT(canvas->frame), "key-press-event",
GTK_SIGNAL_FUNC(rtk_on_key_press), canvas);
// Set the event mask
@@ -191,7 +191,7 @@
// Finish any movies
if (canvas->movie_context)
rtk_canvas_movie_stop(canvas);
-
+
// Get rid of any figures we still have
count = 0;
while (canvas->fig)
@@ -204,15 +204,15 @@
// Clear the dirty regions
rtk_region_destroy(canvas->fg_dirty_region);
-
+
// Remove ourself from the linked list in the app
RTK_LIST_REMOVE(canvas->app->canvas, canvas);
// Destroy the frame
gtk_widget_hide(GTK_WIDGET(canvas->frame));
gtk_widget_destroy(GTK_WIDGET(canvas->frame));
-
- // fontname was strdup()ed
+
+ // fontname was strdup()ed
if (canvas->fontname)
free(canvas->fontname);
@@ -273,7 +273,7 @@
void rtk_canvas_size(rtk_canvas_t *canvas, int sizex, int sizey)
{
GtkRequisition size;
-
+
// Interpret the given size as the size of the drawing area, and use
// this to compute the default window size. There must be a less hacky way
// to do this.
@@ -326,7 +326,7 @@
{
canvas->sx = sx;
canvas->sy = sy;
-
+
// Re-calculate all the figures.
rtk_canvas_calc(canvas);
}
@@ -401,46 +401,46 @@
// the figure will be shown until rtk_canvas_flash_update() is called
// [duration] times. if [kill] is non-zero, the fig will
// also be destroyed when its counter expires.
-void rtk_canvas_flash( rtk_canvas_t* canvas, rtk_fig_t* fig, int duration,
+void rtk_canvas_flash( rtk_canvas_t* canvas, rtk_fig_t* fig, int duration,
int kill )
{
rtk_flasher_t* flasher = malloc( sizeof(rtk_flasher_t) );
-
+
// force the fig visible
rtk_fig_show( fig, 1 );
-
+
flasher->fig = fig;
flasher->duration = duration;
flasher->kill = kill;
-
+
RTK_LIST_APPEND( canvas->flashers, flasher );
}
void rtk_canvas_flash_update( rtk_canvas_t* canvas )
{
- rtk_flasher_t* flasher = canvas->flashers;
-
+ rtk_flasher_t* flasher = canvas->flashers;
+
while( flasher != NULL )
{
- //rtk_fig_t* fig = flasher->fig;
+ //rtk_fig_t* fig = flasher->fig;
flasher->duration--;
-
+
// if it's time to flip, flip
if( flasher->duration < 1 )
{
rtk_flasher_t* doomed = flasher;
-
+
// force the fig invisible
if( doomed->kill )
rtk_fig_and_descendents_destroy( doomed->fig );
else
rtk_fig_show( doomed->fig, 0);
-
- flasher = flasher->next;
+
+ flasher = flasher->next;
RTK_LIST_REMOVE( canvas->flashers, doomed );
continue;
}
-
+
flasher = flasher->next;
}
}
@@ -448,10 +448,10 @@
void rtk_canvas_layer_show( rtk_canvas_t* canvas, int layer, char show )
{
canvas->layer_show[layer] = show;
-
+
// invalidate the whole window
rtk_canvas_calc(canvas);
-}
+}
// end rtv experimental
@@ -459,7 +459,7 @@
void rtk_canvas_calc(rtk_canvas_t *canvas)
{
rtk_fig_t *fig;
-
+
rtk_canvas_lock(canvas);
// The whole window is dirty
@@ -472,7 +472,7 @@
// Update all the figures
for (fig = canvas->fig; fig != NULL; fig = fig->sibling_next)
rtk_fig_calc(fig);
-
+
rtk_canvas_unlock(canvas);
return;
}
@@ -497,13 +497,13 @@
rtk_canvas_calc(canvas);
canvas->calc_deferred = 0;
}
-
+
rtk_canvas_lock(canvas);
// Set the canvas color
gdk_color_alloc(canvas->colormap, &canvas->bgcolor);
gdk_gc_set_foreground(canvas->gc, &canvas->bgcolor);
-
+
// See if there is anything in the background.
// TODO: optimize
bg_count = 0;
@@ -551,7 +551,7 @@
clipbox.x, clipbox.y, clipbox.x, clipbox.y,
clipbox.width, clipbox.height);
rcount = 0;
-
+
// Render all figures, in order of layer
for (fig = canvas->layer_fig; fig != NULL; fig = fig->layer_next)
{
@@ -581,7 +581,7 @@
rtk_region_set_empty(canvas->fg_dirty_region);
gdk_colormap_free_colors(canvas->colormap, &canvas->bgcolor, 1);
-
+
rtk_canvas_unlock(canvas);
}
@@ -592,12 +592,12 @@
void rtk_canvas_export_image(rtk_canvas_t *canvas, const char *filename, int
format)
{
uint8_t *image;
-
+
// Get an image in canonical 24-bit RGB format
image = rtk_canvas_get_image_rgb24(canvas);
if (!image)
return;
-
+
switch (format)
{
case RTK_IMAGE_FORMAT_JPEG:
@@ -607,7 +607,7 @@
rtk_canvas_save_ppm(canvas, filename, canvas->sizex, canvas->sizey,
image);
break;
}
-
+
free(image);
return;
}
@@ -640,7 +640,7 @@
// Create an image buffer
image = malloc(canvas->sizex * canvas->sizey * 2);
-
+
// Copy the data to an RGB16 buffer.
pixel = image;
for (iy = 0; iy < sizey; iy++)
@@ -652,7 +652,7 @@
*pixel = c;
else if (im->depth == 24) {
unsigned char r,g,b;
- r = c & 0xf8;
+ r = c & 0xf8;
g = (c >> 8) & 0xfc;
b = (c >> 16) & 0xf8;
*pixel = (r >> 3 | g << 3 | b << 8);
@@ -694,7 +694,7 @@
// Create an image buffer
image = malloc(canvas->sizex * canvas->sizey * 3);
-
+
// Copy the data to an RGB32 buffer.
pixel = image;
for (iy = 0; iy < canvas->sizey; iy++)
@@ -734,7 +734,7 @@
{
int wx, wy;
rtk_fig_t *fig;
-
+
canvas->file = fopen(filename, "w+");
if (canvas->file == NULL)
{
@@ -743,7 +743,7 @@
}
rtk_canvas_lock(canvas);
-
+
// Write header info
fprintf(canvas->file, "#FIG 3.2\n");
fprintf(canvas->file, "Portrait\nCenter\nInches\nLetter\n100.00\nSingle\n");
@@ -764,7 +764,7 @@
// Clean up
fclose(canvas->file);
canvas->file = NULL;
-
+
rtk_canvas_unlock(canvas);
return 0;
@@ -781,7 +781,7 @@
PRINT_ERR("export filename is NULL; ignoring");
return -1;
}
-
+
file = fopen(filename, "w+");
if (!file)
{
@@ -803,20 +803,20 @@
int rtk_canvas_save_jpeg(rtk_canvas_t *canvas, const char *filename,
int sizex, int sizey, uint8_t *image)
{
-#if HAVE_JPEGLIB_H
+#if HAVE_JPEG
FILE *file;
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
JSAMPROW jrow[1];
-
+
// Now save it to a file
if (!filename)
{
PRINT_ERR("export filename is NULL; ignoring");
return -1;
}
-
+
file = fopen(filename, "w+");
if (!file)
{
@@ -901,9 +901,9 @@
{
double px, py, pa, rd, rl;
rtk_fig_t *fig;
-
+
if (event == EVENT_PRESS)
- {
+ {
// See of there are any moveable figures at this point
fig = rtk_canvas_pick_fig(canvas, x, y);
@@ -931,13 +931,13 @@
}
// rtv - fixed and reinstated scroll wheel support 1/7/03
- // rtv - handle the mouse scroll wheel for rotating objects
+ // rtv - handle the mouse scroll wheel for rotating objects
else if( button == 4 && (fig->movemask & RTK_MOVE_ROT))
{
rtk_fig_dirty(fig);
rtk_fig_origin_global(fig, fig->dox, fig->doy, fig->doa + 0.2 );
rtk_fig_on_mouse(fig, RTK_EVENT_PRESS, canvas->mouse_mode);
-
+
return;
}
else if( button == 5 && (fig->movemask & RTK_MOVE_ROT))
@@ -947,7 +947,7 @@
rtk_fig_on_mouse(fig, RTK_EVENT_PRESS, canvas->mouse_mode);
return;
}
-
+
}
// Else translate and scale the canvas...
@@ -970,7 +970,7 @@
// Create a figure for showing the zoom
//assert(canvas->zoom_fig == NULL);
if( canvas->zoom_fig == NULL )
- {
+ {
canvas->zoom_fig = rtk_fig_create(canvas, NULL,
RTK_CANVAS_LAYERS-1);
px = LX(canvas->sizex / 2);
py = LY(canvas->sizey / 2);
@@ -998,7 +998,7 @@
}
if (event == EVENT_MOTION)
- {
+ {
if (canvas->mouse_mode == MOUSE_TRANS)
{
// Translate the selected figure
@@ -1011,7 +1011,7 @@
}
else if (canvas->mouse_mode == MOUSE_ROT)
{
- // Rotate the selected figure
+ // Rotate the selected figure
fig = canvas->mouse_selected_fig;
px = LX(x) - fig->dox;
py = LY(y) - fig->doy;
@@ -1023,7 +1023,7 @@
else if (canvas->mouse_mode == MOUSE_PAN)
{
// Infer the translation that will map the current physical mouse
- // point to the original logical mouse point.
+ // point to the original logical mouse point.
canvas->ox = canvas->mouse_start_x -
(+x - canvas->sizex / 2) * canvas->sx;
canvas->oy = canvas->mouse_start_y -
@@ -1039,7 +1039,7 @@
px = canvas->mouse_start_x - canvas->ox;
py = canvas->mouse_start_y - canvas->oy;
rl = sqrt(px * px + py * py);
- canvas->sy = rl / rd * canvas->sy / canvas->sx;
+ canvas->sy = rl / rd * canvas->sy / canvas->sx;
canvas->sx = rl / rd;
}
else if (canvas->mouse_mode == MOUSE_NONE)
@@ -1080,7 +1080,7 @@
rtk_fig_destroy(canvas->zoom_fig);
canvas->zoom_fig = NULL;
}
-
+
// Reset mouse mode
canvas->mouse_mode = MOUSE_NONE;
canvas->mouse_selected_fig = NULL;
@@ -1088,11 +1088,11 @@
else
{
fig = canvas->mouse_selected_fig;
-
+
// Reset mouse mode
canvas->mouse_mode = MOUSE_NONE;
canvas->mouse_selected_fig = NULL;
-
+
// Do callbacks
if (fig)
{
@@ -1116,9 +1116,9 @@
void rtk_on_configure(GtkWidget *widget, GdkEventConfigure *event,
rtk_canvas_t *canvas)
{
GdkColor color;
-
+
rtk_canvas_lock(canvas);
-
+
canvas->sizex = event->width;
canvas->sizey = event->height;
@@ -1126,7 +1126,7 @@
canvas->gc = gdk_gc_new(canvas->canvas->window);
if (canvas->colormap == NULL)
canvas->colormap = gdk_colormap_get_system();
-
+
// Create offscreen pixmaps
if (canvas->bg_pixmap != NULL)
gdk_pixmap_unref(canvas->bg_pixmap);
@@ -1146,7 +1146,7 @@
0, 0, canvas->sizex, canvas->sizey);
gdk_draw_rectangle(canvas->fg_pixmap, canvas->gc, TRUE,
0, 0, canvas->sizex, canvas->sizey);
-
+
// Re-calculate all the figures since the coord transform has
// changed.
canvas->calc_deferred++;
@@ -1176,7 +1176,7 @@
dx = canvas->sizex * canvas->sx;
dy = canvas->sizey * canvas->sy;
scale = 1.5;
-
+
switch (event->keyval)
{
case GDK_Left:
Modified: code/player/trunk/server/drivers/base/imagebase.cc
===================================================================
--- code/player/trunk/server/drivers/base/imagebase.cc 2008-06-11 02:46:25 UTC
(rev 6533)
+++ code/player/trunk/server/drivers/base/imagebase.cc 2008-06-11 03:05:55 UTC
(rev 6534)
@@ -1,7 +1,7 @@
/*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey et al
- * [EMAIL PROTECTED]
+ * [EMAIL PROTECTED]
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,7 +32,8 @@
#include <assert.h>
#include "imagebase.h"
#include <libplayerxdr/playerxdr.h>
-#if HAVE_JPEGLIB_H
+#include <config.h>
+#if HAVE_JPEG
#include <libplayerjpeg/playerjpeg.h>
#endif
@@ -51,7 +52,7 @@
if (cf->ReadDeviceAddr(&this->camera_addr, section, "requires",
PLAYER_CAMERA_CODE, -1, NULL) != 0)
{
- this->SetError(-1);
+ this->SetError(-1);
return;
}
@@ -70,7 +71,7 @@
if (cf->ReadDeviceAddr(&this->camera_addr, section, "requires",
PLAYER_CAMERA_CODE, -1, NULL) != 0)
{
- this->SetError(-1);
+ this->SetError(-1);
return;
}
@@ -108,7 +109,7 @@
int ImageBase::Shutdown()
{
StopThread();
-
+
camera_driver->Unsubscribe(InQueue);
return 0;
@@ -132,7 +133,7 @@
this->stored_data.width = (compdata->width);
this->stored_data.height = (compdata->height);
this->stored_data.fdiv = (compdata->fdiv);
-#if HAVE_JPEGLIB_H
+#if HAVE_JPEG
if (compdata->compression != PLAYER_CAMERA_COMPRESS_JPEG)
{
#endif
@@ -155,7 +156,7 @@
assert(this->stored_data.image);
memcpy(this->stored_data.image, compdata->image,
this->stored_data.image_count);
}
-#if HAVE_JPEGLIB_H
+#if HAVE_JPEG
} else
{
this->stored_data.compression = PLAYER_CAMERA_COMPRESS_RAW;
@@ -179,7 +180,7 @@
jpeg_decompress(reinterpret_cast<unsigned char
*>(this->stored_data.image),
this->stored_data.image_count,
reinterpret_cast<unsigned char
*>(compdata->image),
- compdata->image_count);
+ compdata->image_count);
}
}
#endif
@@ -196,11 +197,11 @@
for(;;)
{
pthread_testcancel();
-
+
InQueue->Wait();
-
+
ProcessMessages();
-
+
Lock();
if (HaveData)
{
@@ -211,5 +212,5 @@
}
Unlock();
}
-
+
}
Modified: code/player/trunk/server/drivers/blobfinder/cmvision/P2CMV.cc
===================================================================
--- code/player/trunk/server/drivers/blobfinder/cmvision/P2CMV.cc
2008-06-11 02:46:25 UTC (rev 6533)
+++ code/player/trunk/server/drivers/blobfinder/cmvision/P2CMV.cc
2008-06-11 03:05:55 UTC (rev 6534)
@@ -117,7 +117,7 @@
#include <libplayercore/playercore.h>
#include <libplayercore/error.h>
-#if HAVE_JPEGLIB_H
+#if HAVE_JPEG
#include <libplayerjpeg/playerjpeg.h>
#endif
@@ -429,7 +429,7 @@
assert(camera_data);
-#if !HAVE_JPEGLIB_H
+#if !HAVE_JPEG
if (camera_data->compression == PLAYER_CAMERA_COMPRESS_JPEG)
{
PLAYER_ERROR("No support for jpeg decompression");
@@ -453,7 +453,7 @@
ptr = camera_data->image;
if (camera_data->compression == PLAYER_CAMERA_COMPRESS_JPEG)
{
-#if HAVE_JPEGLIB_H
+#if HAVE_JPEG
jpeg_decompress((unsigned char*)mTmp,
mWidth*mHeight*3,
camera_data->image,
Modified: code/player/trunk/server/libplayerdrivers/CMakeLists.txt
===================================================================
--- code/player/trunk/server/libplayerdrivers/CMakeLists.txt 2008-06-11
02:46:25 UTC (rev 6533)
+++ code/player/trunk/server/libplayerdrivers/CMakeLists.txt 2008-06-11
03:05:55 UTC (rev 6534)
@@ -55,9 +55,9 @@
# Actually add the target
PLAYER_ADD_LIBRARY (playerdrivers ${driver_config_h} ${driverregistry_cc}
${driversSrcs})
TARGET_LINK_LIBRARIES (playerdrivers playercore playererror)
-IF (HAVE_LIBJPEG)
+IF (HAVE_JPEG)
TARGET_LINK_LIBRARIES (playerdrivers playerjpeg)
-ENDIF (HAVE_LIBJPEG)
+ENDIF (HAVE_JPEG)
# Set C flags on source files that need them
FOREACH (driverName ${PLAYER_BUILT_DRIVERS})
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit