Commit 30846e41 authored by Alessio Treglia's avatar Alessio Treglia

Imported Upstream version 1.2.0~dfsg

parent cec9ca2d
......@@ -215,8 +215,11 @@ JPEG_REQUIRED = @JPEG_REQUIRED@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCDDB_REQUIRED = @LIBCDDB_REQUIRED@
LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@
LIBEXIF_LIBS = @LIBEXIF_LIBS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -269,6 +272,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQLITE3_LIBS = @SQLITE3_LIBS@
STRIP = @STRIP@
TEXINFO = @TEXINFO@
TIFF_CFLAGS = @TIFF_CFLAGS@
......
......@@ -17,11 +17,11 @@ else
alsamixer_subdirs =
endif
if HAVE_CAMELOT
camelot_subdirs = camelot
else
camelot_subdirs =
endif
#if HAVE_CAMELOT
#camelot_subdirs = camelot
#else
#camelot_subdirs =
#endif
if HAVE_TRANSCODER
transcoder_subdirs = transcoder
......@@ -53,11 +53,19 @@ else
thumbnailer_subdirs =
endif
if HAVE_NMJEDIT
nmjedit_subdirs = nmjedit
else
nmjedit_subdirs =
endif
SUBDIRS = $(player_subdirs) \
cmdlineplayer \
cmdlinerecorder \
$(plugincfg_subdirs) \
$(alsamixer_subdirs) \
$(nmjedit_subdirs) \
$(camelot_subdirs) \
$(recorder_subdirs) \
$(transcoder_subdirs) \
......
......@@ -65,8 +65,9 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = player cmdlineplayer plugincfg alsamixer camelot \
recorder transcoder thumbnailer kbd visualizer
DIST_SUBDIRS = player cmdlineplayer cmdlinerecorder plugincfg \
alsamixer nmjedit recorder transcoder thumbnailer kbd \
visualizer
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
......@@ -174,8 +175,11 @@ JPEG_REQUIRED = @JPEG_REQUIRED@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCDDB_REQUIRED = @LIBCDDB_REQUIRED@
LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@
LIBEXIF_LIBS = @LIBEXIF_LIBS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -228,6 +232,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQLITE3_LIBS = @SQLITE3_LIBS@
STRIP = @STRIP@
TEXINFO = @TEXINFO@
TIFF_CFLAGS = @TIFF_CFLAGS@
......@@ -310,9 +315,13 @@ top_srcdir = @top_srcdir@
@HAVE_PLUGINCFG_TRUE@plugincfg_subdirs = plugincfg
@HAVE_ALSAMIXER_FALSE@alsamixer_subdirs =
@HAVE_ALSAMIXER_TRUE@alsamixer_subdirs = alsamixer
@HAVE_CAMELOT_FALSE@camelot_subdirs =
@HAVE_CAMELOT_TRUE@camelot_subdirs = camelot
@HAVE_TRANSCODER_FALSE@transcoder_subdirs =
#if HAVE_CAMELOT
#camelot_subdirs = camelot
#else
#camelot_subdirs =
#endif
@HAVE_TRANSCODER_TRUE@transcoder_subdirs = transcoder
@HAVE_RECORDER_FALSE@recorder_subdirs =
@HAVE_RECORDER_TRUE@recorder_subdirs = recorder
......@@ -322,10 +331,14 @@ top_srcdir = @top_srcdir@
@HAVE_VISUALIZER_TRUE@visualizer_subdirs = visualizer
@HAVE_THUMBNAILER_FALSE@thumbnailer_subdirs =
@HAVE_THUMBNAILER_TRUE@thumbnailer_subdirs = thumbnailer
@HAVE_NMJEDIT_FALSE@nmjedit_subdirs =
@HAVE_NMJEDIT_TRUE@nmjedit_subdirs = nmjedit
SUBDIRS = $(player_subdirs) \
cmdlineplayer \
cmdlinerecorder \
$(plugincfg_subdirs) \
$(alsamixer_subdirs) \
$(nmjedit_subdirs) \
$(camelot_subdirs) \
$(recorder_subdirs) \
$(transcoder_subdirs) \
......
......@@ -184,8 +184,11 @@ JPEG_REQUIRED = @JPEG_REQUIRED@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCDDB_REQUIRED = @LIBCDDB_REQUIRED@
LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@
LIBEXIF_LIBS = @LIBEXIF_LIBS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -238,6 +241,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQLITE3_LIBS = @SQLITE3_LIBS@
STRIP = @STRIP@
TEXINFO = @TEXINFO@
TIFF_CFLAGS = @TIFF_CFLAGS@
......
......@@ -216,7 +216,7 @@ alsa_card_t * alsa_card_create(int index)
if(num_strings)
{
label = (char*)0;
label = NULL;
for(i = 0; i < num_strings; i++)
{
label = bg_strcat(label, strings[i]);
......@@ -274,7 +274,7 @@ alsa_card_t * alsa_card_create(int index)
return card;
fail:
alsa_card_destroy(card);
return (alsa_card_t *)0;
return NULL;
}
void alsa_card_destroy(alsa_card_t * c)
......
......@@ -183,8 +183,7 @@ card_widget_t * card_widget_create(alsa_card_t * c, bg_cfg_section_t * section)
if(ret->num_upper_controls)
{
scrolledwin =
gtk_scrolled_window_new((GtkAdjustment*)0,
(GtkAdjustment*)0);
gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_NEVER);
......@@ -219,8 +218,7 @@ card_widget_t * card_widget_create(alsa_card_t * c, bg_cfg_section_t * section)
{
lower_cols = ((ret->num_lower_controls+LOWER_ROWS-1)/LOWER_ROWS);
scrolledwin =
gtk_scrolled_window_new((GtkAdjustment*)0,
(GtkAdjustment*)0);
gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_AUTOMATIC,
GTK_POLICY_NEVER);
......@@ -544,7 +542,7 @@ void card_widget_tearoff_control(card_widget_t * c, control_widget_t * w)
void card_widget_tearon_control(card_widget_t * c, control_widget_t * w)
{
own_window_t * win = (own_window_t *)0;
own_window_t * win = NULL;
GList * item;
int index;
......@@ -676,7 +674,7 @@ void card_widget_configure(card_widget_t * c)
G_CALLBACK(config_button_callback), win);
gtk_widget_show(win->close_button);
scrolledwindow = gtk_scrolled_window_new((GtkAdjustment*)0, (GtkAdjustment*)0);
scrolledwindow = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow),
GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
......
......@@ -29,7 +29,7 @@
#define LOG_DOMAIN "g_control"
#include <gui_gtk/aboutwindow.h>
#include <gui_gtk/gtkutils.h>
#if GTK_MINOR_VERSION >= 4
#define GTK_2_4
......@@ -49,12 +49,12 @@
#define TYPE_VOLUME 16
#define TYPE_TONE 17
static bg_gtk_about_window_t * about_window = (bg_gtk_about_window_t*)0;
static bg_gtk_about_window_t * about_window = NULL;
static void about_window_close_callback(bg_gtk_about_window_t * w,
void * data)
{
about_window = (bg_gtk_about_window_t*)0;
about_window = NULL;
}
static GtkWidget * create_pixmap_toggle_button(const char * filename)
......@@ -457,8 +457,6 @@ static void init_array(widget_array_t * ret, alsa_mixer_control_t * c,
gtk_widget_set_size_request(ret->widgets[i].w, req_width, SLIDER_HEIGHT);
gtk_range_set_inverted(GTK_RANGE(ret->widgets[i].w), TRUE);
gtk_range_set_update_policy(GTK_RANGE(ret->widgets[i].w),
GTK_UPDATE_CONTINUOUS);
ret->widgets[i].id = g_signal_connect(G_OBJECT(ret->widgets[i].w),
"value_changed",
......@@ -493,8 +491,6 @@ static void init_array(widget_array_t * ret, alsa_mixer_control_t * c,
gtk_widget_set_size_request(ret->widgets[i].w, req_width, SLIDER_HEIGHT);
gtk_range_set_inverted(GTK_RANGE(ret->widgets[i].w), TRUE);
gtk_range_set_update_policy(GTK_RANGE(ret->widgets[i].w),
GTK_UPDATE_CONTINUOUS);
ret->widgets[i].id = g_signal_connect(G_OBJECT(ret->widgets[i].w),
"value_changed",
......@@ -529,14 +525,14 @@ static void init_array(widget_array_t * ret, alsa_mixer_control_t * c,
for(i = 0; i < ret->num; i++)
{
#ifdef GTK_2_4
ret->widgets[i].w = gtk_combo_box_new_text();
ret->widgets[i].w = bg_gtk_combo_box_new_text();
ret->widgets[i].handler_widget = ret->widgets[i].w;
for(j = 0; j < num_items; j++)
{
snd_ctl_elem_info_set_item(info,j);
snd_hctl_elem_info(hctl,info);
gtk_combo_box_append_text(GTK_COMBO_BOX(ret->widgets[i].w),
bg_gtk_combo_box_append_text(ret->widgets[i].w,
snd_ctl_elem_info_get_item_name(info));
}
ret->widgets[i].id =
......@@ -702,7 +698,7 @@ static void menu_callback(GtkWidget * w, gpointer data)
VERSION,
"mixer_icon.png",
about_window_close_callback,
(void*)0);
NULL);
}
else if(w == wid->menu.help)
bg_display_html_help("userguide/Alsamixer.html");
......@@ -1290,10 +1286,7 @@ static gboolean button_press_callback(GtkWidget * w, GdkEventButton * evt,
else
gtk_widget_set_sensitive(wid->menu.about, 1);
gtk_menu_popup(GTK_MENU(wid->menu.menu),
(GtkWidget *)0,
(GtkWidget *)0,
(GtkMenuPositionFunc)0,
(gpointer)0,
NULL, NULL, NULL, NULL,
3, evt->time);
return TRUE;
}
......@@ -1321,7 +1314,7 @@ control_widget_t * control_widget_create(alsa_mixer_group_t * c,
{
snd_ctl_elem_info_t * info;
control_widget_t * ret = (control_widget_t *)0;
control_widget_t * ret = NULL;
snd_ctl_elem_type_t type;
/* Check for volume controls */
......
......@@ -40,7 +40,7 @@ alsa_mixer_t * alsa_mixer_create()
if(!ret->num_cards)
{
free(ret);
return (alsa_mixer_t*)0;
return NULL;
}
ret->cards = calloc(ret->num_cards, sizeof(*ret->cards));
......
plugindir=$(pkglibdir)/plugins
INCLUDES = -I$(top_srcdir)/include
AM_CFLAGS = \
@XML2_CFLAGS@ \
@GTK_CFLAGS@ \
-DLOCALE_DIR=\"$(localedir)\" \
-DPLUGIN_DIR=\"$(plugindir)\" \
-DDOC_DIR=\"$(docdir)\" \
-DDATA_DIR=\"$(pkgdatadir)\"
Desktopdir = $(datadir)/applications
Desktop_DATA = gmerlin-camelot.desktop
if HAVE_V4L
vloopback_sources = vloopback.c
else
vloopback_sources =
endif
bin_PROGRAMS = camelot
camelot_SOURCES = webcam.c webcam_window.c main.c $(vloopback_sources)
camelot_LDADD = \
$(top_builddir)/lib/gtk/libgmerlin_gtk.la \
$(top_builddir)/lib/libgmerlin.la
noinst_HEADERS = webcam.h webcam_window.h webcam_priv.h vloopback.h
EXTRA_DIST = gmerlin-camelot.desktop
[Desktop Entry]
Name=Camelot
Name[de]=Camelot
Comment=Gmerlin webcam application
Comment[de]=Gmerlin Webcam Programm
Exec=camelot
Icon=gmerlin-camelot
Type=Application
Categories=AudioVideo;AudioVideoEditing;
This diff is collapsed.
This diff is collapsed.
/*****************************************************************
* gmerlin - a general purpose multimedia framework and applications
*
* Copyright (c) 2001 - 2011 Members of the Gmerlin project
* gmerlin-general@lists.sourceforge.net
* http://gmerlin.sourceforge.net
*
* 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
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* *****************************************************************/
#include <gmerlin/msgqueue.h>
/* Messages from the webcam */
#define MSG_FRAMERATE 0 /* Current capture rate (float) */
#define MSG_FRAME_COUNT 1 /* Frame counter (int) */
#define MSG_ERROR 2 /* Something went wrong */
/* Commands to the webcam */
#define CMD_SET_MONITOR 0 /* ARG 0: int */
#define CMD_SET_MONITOR_PLUGIN 1 /* ARG 0: plugin_handle */
#define CMD_SET_INPUT_PLUGIN 3 /* ARG 0: plugin_handle */
#define CMD_SET_CAPTURE_PLUGIN 4 /* ARG 0: plugin_handle */
#define CMD_SET_CAPTURE_AUTO 5 /* ARG 0: int */
#define CMD_SET_CAPTURE_INTERVAL 6 /* ARG 0: float */
#define CMD_SET_CAPTURE_DIRECTORY 7 /* ARG 0: string */
#define CMD_SET_CAPTURE_NAMEBASE 8 /* ARG 0: string */
#define CMD_SET_CAPTURE_FRAME_COUNTER 9 /* ARG 0: int */
#define CMD_DO_CAPTURE 10 /* No args */
#define CMD_INPUT_REOPEN 11 /* No args */
#define CMD_QUIT 12 /* No args */
#define CMD_SET_VLOOPBACK 13 /* ARG 0: int */
/* ARG 1: string */
typedef struct gmerlin_webcam_s gmerlin_webcam_t;
gmerlin_webcam_t * gmerlin_webcam_create(bg_plugin_registry_t * plugin_reg);
void gmerlin_webcam_get_message_queues(gmerlin_webcam_t *,
bg_msg_queue_t ** cmd_queue,
bg_msg_queue_t ** msg_queue);
void gmerlin_webcam_run(gmerlin_webcam_t *);
void gmerlin_webcam_quit(gmerlin_webcam_t *);
void gmerlin_webcam_destroy(gmerlin_webcam_t *);
const bg_parameter_info_t * gmerlin_webcam_get_filter_parameters(gmerlin_webcam_t *);
void gmerlin_webcam_set_filter_parameter(void * data, const char * name,
const bg_parameter_value_t * val);
#ifdef HAVE_V4L
const bg_parameter_info_t * gmerlin_webcam_get_vloopback_parameters(gmerlin_webcam_t *);
void gmerlin_webcam_set_vloopback_parameter(void * data, const char * name,
const bg_parameter_value_t * val);
#endif
const bg_parameter_info_t *
gmerlin_webcam_get_parameters(gmerlin_webcam_t * w);
void
gmerlin_webcam_set_parameter(void * data, const char * name,
const bg_parameter_value_t * val);
This diff is collapsed.
......@@ -180,8 +180,11 @@ JPEG_REQUIRED = @JPEG_REQUIRED@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBCDDB_REQUIRED = @LIBCDDB_REQUIRED@
LIBEXIF_CFLAGS = @LIBEXIF_CFLAGS@
LIBEXIF_LIBS = @LIBEXIF_LIBS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -234,6 +237,7 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SQLITE3_LIBS = @SQLITE3_LIBS@
STRIP = @STRIP@
TEXINFO = @TEXINFO@
TIFF_CFLAGS = @TIFF_CFLAGS@
......
This diff is collapsed.
......@@ -56,19 +56,19 @@ bg_player_t * player;
bg_plugin_registry_t * plugin_reg;
bg_cfg_registry_t * cfg_reg;
bg_plugin_handle_t * input_handle = (bg_plugin_handle_t*)0;
bg_plugin_handle_t * input_handle = NULL;
int display_time = 1;
bg_plugin_handle_t * oa_handle = (bg_plugin_handle_t*)0;
bg_plugin_handle_t * ov_handle = (bg_plugin_handle_t*)0;
bg_plugin_handle_t * oa_handle = NULL;
bg_plugin_handle_t * ov_handle = NULL;
char ** gmls = (char **)0;
char ** gmls = NULL;
int gml_index = 0;
/* Sections from the plugin registry */
bg_cfg_section_t * oa_section = (bg_cfg_section_t*)0;
bg_cfg_section_t * ov_section = (bg_cfg_section_t*)0;
bg_cfg_section_t * i_section = (bg_cfg_section_t*)0;
bg_cfg_section_t * oa_section = NULL;
bg_cfg_section_t * ov_section = NULL;
bg_cfg_section_t * i_section = NULL;
/* Sections from the player */
bg_cfg_section_t * audio_section;
......@@ -76,10 +76,10 @@ bg_cfg_section_t * video_section;
bg_cfg_section_t * osd_section;
bg_cfg_section_t * input_section;
char * input_plugin_name = (char*)0;
char * input_plugin_name = NULL;
const bg_plugin_info_t * ov_info = (const bg_plugin_info_t*)0;
char * window_id = (char*)0;
const bg_plugin_info_t * ov_info = NULL;
char * window_id = NULL;
/* Set up by registry */
static bg_parameter_info_t oa_parameters[] =
......@@ -129,7 +129,7 @@ const bg_parameter_info_t * video_parameters;
const bg_parameter_info_t * input_parameters;
char * track_spec = (char*)0;
char * track_spec = NULL;
char * track_spec_ptr;
/*
......@@ -167,7 +167,7 @@ static void opt_oa(void * data, int * argc, char *** _argv, int arg)
if(!bg_cmdline_apply_options(oa_section,
set_oa_parameter,
(void*)0,
NULL,
oa_parameters,
(*_argv)[arg]))
exit(-1);
......@@ -212,7 +212,7 @@ static void opt_ov(void * data, int * argc, char *** _argv, int arg)
}
if(!bg_cmdline_apply_options(ov_section,
set_ov_parameter,
(void*)0,
NULL,
ov_parameters,
(*_argv)[arg]))
exit(-1);
......@@ -236,7 +236,7 @@ static void opt_i(void * data, int * argc, char *** _argv, int arg)
if(!bg_cmdline_apply_options(i_section,
set_i_parameter,
(void*)0,
NULL,
i_parameters,
(*_argv)[arg]))
exit(-1);
......@@ -334,7 +334,7 @@ static void opt_vol(void * data, int * argc, char *** _argv, int arg)
fprintf(stderr, "Option -vol requires an argument\n");
exit(-1);
}
bg_player_set_volume(player, strtod((*_argv[arg]), (char**)0));
bg_player_set_volume(player, strtod((*_argv[arg]), NULL));
bg_cmdline_remove_arg(argc, _argv, arg);
}
......@@ -376,7 +376,6 @@ static void opt_v(void * data, int * argc, char *** _argv, int arg)
// static void opt_help(void * data, int * argc, char *** argv, int arg);
static bg_cmdline_arg_t global_options[] =
{
{
......@@ -513,7 +512,7 @@ static int set_track_from_spec()
static int play_track(bg_player_t * player, const char * gml,
const char * plugin_name)
{
const bg_plugin_info_t * info = (const bg_plugin_info_t *)0;
const bg_plugin_info_t * info = NULL;
bg_input_plugin_t * plugin;
bg_track_info_t * track_info;
......@@ -535,11 +534,11 @@ static int play_track(bg_player_t * player, const char * gml,
if(input_handle)
{