putting i18n in place for plugins

Original commit message from CVS:
putting i18n in place for plugins
parent 4cb7d639
2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org>
* autogen.sh:
adding autopoint invocation
* Makefile.am:
* configure.ac:
* gst-libs/gst/gettext.h:
adding gettext bits
* ext/audiofile/gstafsink.c: (gst_afsink_plugin_init):
* ext/audiofile/gstafsrc.c: (gst_afsrc_plugin_init):
* ext/gnomevfs/gstgnomevfs.c: (plugin_init):
* ext/gnomevfs/gstgnomevfssink.c: (gst_gnomevfssink_open_file),
(gst_gnomevfssink_close_file):
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_open_file):
* ext/sndfile/gstsf.c: (gst_sf_loop), (plugin_init):
* gst-libs/gst/gst-i18n-plugin.h:
* gst/avi/gstavi.c: (plugin_init):
* sys/dxr3/dxr3init.c: (plugin_init):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_write_data):
* sys/oss/gstossaudio.c: (plugin_init):
* sys/oss/gstosselement.c: (gst_osselement_open_audio):
* sys/v4l/gstv4l.c: (plugin_init):
* sys/v4l/v4l_calls.c: (gst_v4l_open):
* sys/v4l2/gstv4l2.c: (plugin_init):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_fill_lists), (gst_v4l2_get_norm), (gst_v4l2_set_norm),
(gst_v4l2_get_input), (gst_v4l2_set_input), (gst_v4l2_get_output),
(gst_v4l2_set_output), (gst_v4l2_get_frequency),
(gst_v4l2_set_frequency), (gst_v4l2_signal_strength),
(gst_v4l2_get_attribute), (gst_v4l2_set_attribute):
make sure locale and translation domain are set
fix translated strings
* po/.cvsignore:
* po/LINGUAS:
* po/Makevars:
* po/POTFILES.in:
* po/nl.po:
put translation files into place
* sys/xvideo/imagetest.c: (main):
* ext/dv/demo-play.c: (main):
fix unnecessary translations
2004-01-19 Thomas Vander Stichele <thomas (at) apestaart (dot) org>
* ext/sndfile/gstsf.c:
......
......@@ -22,6 +22,7 @@ SUBDIRS=gst-libs \
tools \
$(GCONF_DIR) \
testsuite \
po \
pkgconfig
DIST_SUBDIRS=gst-libs \
......@@ -30,6 +31,7 @@ DIST_SUBDIRS=gst-libs \
tools \
gconf \
testsuite \
po \
pkgconfig
EXTRA_DIST=gst-plugins.spec depcomp \
......
......@@ -35,6 +35,8 @@ version_check "autoconf" "$AUTOCONF autoconf autoconf-2.54 autoconf-2.53 autocon
"ftp://ftp.gnu.org/pub/gnu/autoconf/" 2 52 || DIE=1
version_check "automake" "$AUTOMAKE automake automake-1.7 automake-1.6 automake-1.5" \
"ftp://ftp.gnu.org/pub/gnu/automake/" 1 6 || DIE=1
version_check "autopoint" "autopoint" \
"ftp://ftp.gnu.org/pub/gnu/gettext/" 0 11 4 || DIE=1
version_check "libtoolize" "$LIBTOOLIZE libtoolize libtoolize14" \
"ftp://ftp.gnu.org/pub/gnu/libtool/" 1 4 0 || DIE=1
version_check "pkg-config" "" \
......@@ -59,6 +61,28 @@ fi
toplevel_check $srcfile
# autopoint
# older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
if test -e mkinstalldirs; then rm mkinstalldirs; fi
# first remove patch if necessary, then run autopoint, then reapply
if test -f po/Makefile.in.in;
then
patch -p0 -R < common/gettext.patch
fi
tool_run "$autopoint"
patch -p0 < common/gettext.patch
# autopoint
# older autopoint (< 0.12) has a tendency to complain about mkinstalldirs
if test -e mkinstalldirs; then rm mkinstalldirs; fi
# first remove patch if necessary, then run autopoint, then reapply
if test -f po/Makefile.in.in;
then
patch -p0 -R < common/gettext.patch
fi
tool_run "$autopoint"
patch -p0 < common/gettext.patch
tool_run "$aclocal" "-I m4 -I common/m4 $ACLOCAL_FLAGS"
tool_run "$libtoolize" "--copy --force"
tool_run "$autoheader"
......
......@@ -46,6 +46,20 @@ AM_PROG_CC_STDC
AM_PROG_AS
AS="${CC}"
dnl the gettext stuff needed
AM_GNU_GETTEXT_VERSION(0.11.4)
AM_GNU_GETTEXT([external])
GETTEXT_PACKAGE=gst-plugins-$GST_MAJORMINOR
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], "$GETTEXT_PACKAGE",
[gettext package name])
dnl define LOCALEDIR in config.h
AS_AC_EXPAND(LOCALEDIR, $datadir/locale)
AC_DEFINE_UNQUOTED([LOCALEDIR], "$LOCALEDIR",
[gettext locale dir])
dnl decide on error flags
AS_COMPILER_FLAG(-Wall, GST_WALL="yes", GST_WALL="no")
......@@ -1695,6 +1709,7 @@ tools/Makefile
tools/gst-launch-ext
gconf/Makefile
pkgconfig/Makefile
po/Makefile.in
)
AC_OUTPUT
......
......@@ -36,7 +36,7 @@ main (int argc,char *argv[])
src = gst_element_factory_make ("dv1394src", "src");
} else {
src = gst_element_factory_make ("filesrc", "src");
gtk_object_set(GTK_OBJECT(src),"location",argv[1],"bytesperread",480,NULL);
g_object_set(G_OBJECT(src),"location",argv[1],"bytesperread",480,NULL);
}
dvdec = gst_element_factory_make ("dvdec", "decoder");
if (!dvdec) fprintf(stderr,"no dvdec\n"),exit(1);
......@@ -44,7 +44,7 @@ main (int argc,char *argv[])
deint = gst_element_factory_make ("deinterlace", "deinterlace");
videosink = gst_element_factory_make ("xvideosink", "videosink");
if (!videosink) fprintf(stderr,"no dvdec\n"),exit(1);
gtk_object_set(GTK_OBJECT(videosink),"width",720,"height",576,NULL);
g_object_set(G_OBJECT(videosink),"width",720,"height",576,NULL);
gst_bin_add(GST_BIN(bin),GST_ELEMENT(src));
gst_bin_add(GST_BIN(bin),GST_ELEMENT(dvdec));
......@@ -62,7 +62,7 @@ main (int argc,char *argv[])
vbox1 = gtk_vbox_new (FALSE, 0);
gtk_widget_show (vbox1);
button = gtk_button_new_with_label(_("test"));/*_with_label (_("chup")); */
button = gtk_button_new_with_label("test");
gtk_widget_show (button);
gtk_box_pack_start (GTK_BOX (vbox1), button, FALSE, FALSE, 0);
......
......@@ -23,6 +23,8 @@
#include "config.h"
#endif
#include "gst/gst-i18n-plugin.h"
#include "gstavidemux.h"
#include "gstavimux.h"
......@@ -32,6 +34,12 @@ plugin_init (GstPlugin *plugin)
if (!gst_library_load ("riff"))
return FALSE;
#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
textdomain (GETTEXT_PACKAGE);
#endif /* ENABLE_NLS */
return (gst_element_register (plugin, "avidemux",
GST_RANK_PRIMARY,
GST_TYPE_AVI_DEMUX) &&
......
*.gmo
remove-potcdate.sed
stamp-po
POTFILES
cat-id-tbl.c
gstreamer-*.pot
Makefile.in.in
Makevars.template
Rules-quot
boldquot.sed
en@boldquot.header
en@quot.header
insert-header.sin
quot.sed
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(GETTEXT_PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER =
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = http://bugzilla.gnome.org/
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
ext/audiofile/gstafsink.c
ext/audiofile/gstafsrc.c
ext/gnomevfs/gstgnomevfssrc.c
ext/gnomevfs/gstgnomevfssink.c
ext/sndfile/gstsf.c
gst/avi/gstavimux.c
sys/dxr3/dxr3audiosink.c
sys/dxr3/dxr3audiosink.c
sys/dxr3/dxr3videosink.c
sys/oss/gstosselement.c
sys/oss/gstossmixer.c
sys/v4l/v4l_calls.c
sys/v4l/v4l_calls.h
sys/v4l2/v4l2_calls.c
sys/v4l2/v4l2src_calls.c
# GStreamer plugins translated strings
# Copyright (C) 2003,2004 GStreamer core team
# This file is distributed under the same license as the GStreamer package.
# Thomas Vander Stichele <thomas@apestaart.org>, 2004.
#
msgid ""
msgstr ""
"Project-Id-Version: gst-plugins\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-01-19 16:09+0100\n"
"PO-Revision-Date: 2004-01-13 12:03+0100\n"
"Last-Translator: Thomas Vander Stichele <thomas@apestaart.org>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ext/audiofile/gstafsink.c:345 ext/sndfile/gstsf.c:601
#, c-format
msgid "Could not open file \"%s\" for writing"
msgstr "Kon bestand \"%s\" niet openen voor schrijven"
#: ext/audiofile/gstafsink.c:368 ext/audiofile/gstafsrc.c:372
#, c-format
msgid "Error closing file \"%s\""
msgstr "Kon bestand \"%s\" niet sluiten"
#: ext/audiofile/gstafsrc.c:314
#, c-format
msgid "Could not open file \"%s\" for reading"
msgstr "Kon bestand \"%s\" niet openen voor lezen"
#: ext/gnomevfs/gstgnomevfssrc.c:1055 ext/gnomevfs/gstgnomevfssrc.c:1078
#, c-format
msgid "Could not open vfs file \"%s\" for reading"
msgstr "Kon vfs-bestand \"%s\" niet openen voor lezen"
#: ext/gnomevfs/gstgnomevfssink.c:286
#, c-format
msgid "Could not open vfs file \"%s\" for writing"
msgstr "Kon vfs-bestand \"%s\" niet openen voor schrijven"
#: ext/gnomevfs/gstgnomevfssink.c:311
#, c-format
msgid "Could not close vfs file \"%s\""
msgstr "Kon vfs-bestand \"%s\" niet sluiten"
#: ext/sndfile/gstsf.c:563
msgid "No filename specified"
msgstr "Geen bestandsnaam gegeven"
#: ext/sndfile/gstsf.c:793
#, c-format
msgid "Could not write to file \"%s\""
msgstr "Kon niet schrijven naar bestand \"%s\""
#: gst/avi/gstavimux.c:989
msgid "No or invalid input audio, AVI stream will be corrupt"
msgstr "Geen of foutief invoergeluid, AVI zal corrupt zijn"
#: sys/dxr3/dxr3audiosink.c:313
#, c-format
msgid "Could not open audio device \"%s\" for writing"
msgstr "Kon audio-apparaat \"%s\" niet openen voor schrijven"
#: sys/dxr3/dxr3audiosink.c:325 sys/dxr3/dxr3videosink.c:292
#, c-format
msgid "Could not open control device \"%s\" for writing"
msgstr "Kon controle-apparaat \"%s\" niet openen voor schrijven"
#: sys/dxr3/dxr3audiosink.c:359
#, c-format
msgid "Could not configure audio device \"%s\""
msgstr "Kon audio-apparaat \"%s\" niet configureren"
#: sys/dxr3/dxr3audiosink.c:373 sys/dxr3/dxr3audiosink.c:410
#, c-format
msgid "Could not set audio device \"%s\" to %d Hz"
msgstr "Kon audio-apparaat \"%s\" niet instellen op %d Hz"
#: sys/dxr3/dxr3audiosink.c:438
#, c-format
msgid "Could not close audio device \"%s\""
msgstr "Kon audio-apparaat \"%s\" niet sluiten"
#: sys/dxr3/dxr3audiosink.c:445 sys/dxr3/dxr3videosink.c:319
#, c-format
msgid "Could not close control device \"%s\""
msgstr "Kon controle-apparaat \"%s\" niet sluiten"
#: sys/dxr3/dxr3videosink.c:280
#, c-format
msgid "Could not open video device \"%s\" for writing"
msgstr "Kon video-apparaat \"%s\" niet openen voor schrijven"
#: sys/dxr3/dxr3videosink.c:311
#, c-format
msgid "Could not close video device \"%s\""
msgstr "Kon video-apparaat \"%s\" niet sluiten"
#: sys/dxr3/dxr3videosink.c:467 sys/v4l2/v4l2src_calls.c:121
#, c-format
msgid "Could not write to device \"%s\""
msgstr "Kon niet schrijven naar apparaat \"%s\""
#: sys/oss/gstosselement.c:684
#, c-format
msgid "OSS device \"%s\" is already in use by another program"
msgstr "OSS-apparaat \"%s\" is al in gebruik door een ander programma"
#: sys/oss/gstosselement.c:690 sys/oss/gstosselement.c:693
#, c-format
msgid "Could not access device \"%s\", check its permissions"
msgstr "Kon geen toegang krijgen tot apparaat \"%s\", controleer de permissies"
#: sys/oss/gstosselement.c:699
#, c-format
msgid "Device \"%s\" does not exist"
msgstr "Apparaat \"%s\" bestaat niet"
#: sys/oss/gstosselement.c:705
#, c-format
msgid "Could not open device \"%s\" for writing"
msgstr "Kon apparaat \"%s\" niet openen voor schrijven"
#: sys/oss/gstosselement.c:708
#, c-format
msgid "Could not open device \"%s\" for reading"
msgstr "Kon apparaat \"%s\" niet openen voor lezen"
#: sys/oss/gstossmixer.c:86
msgid "Volume"
msgstr "Volume"
#: sys/oss/gstossmixer.c:87
msgid "Bass"
msgstr "Lage Tonen"
#: sys/oss/gstossmixer.c:88
msgid "Treble"
msgstr "Hoge Tonen"
#: sys/oss/gstossmixer.c:89
msgid "Synth"
msgstr "Synthesizer"
#: sys/oss/gstossmixer.c:90
msgid "PCM"
msgstr "PCM"
#: sys/oss/gstossmixer.c:91
msgid "Speaker"
msgstr "Luidspreker"
#: sys/oss/gstossmixer.c:92
msgid "Line-in"
msgstr "Lijningang"
#: sys/oss/gstossmixer.c:93
msgid "Microphone"
msgstr "Microfoon"
#: sys/oss/gstossmixer.c:94
msgid "CD"
msgstr "CD"
#: sys/oss/gstossmixer.c:95
msgid "Mixer"
msgstr "Mixer"
#: sys/oss/gstossmixer.c:96
msgid "PCM-2"
msgstr "PCM-2"
#: sys/oss/gstossmixer.c:97
msgid "Record"
msgstr "Opname"
#: sys/oss/gstossmixer.c:98
msgid "In-gain"
msgstr "Invoer-volume"
#: sys/oss/gstossmixer.c:99
msgid "Out-gain"
msgstr "Uitvoer-volume"
#: sys/oss/gstossmixer.c:100
msgid "Line-1"
msgstr "Lijningang 1"
#: sys/oss/gstossmixer.c:101
msgid "Line-2"
msgstr "Lijningang 2"
#: sys/oss/gstossmixer.c:102
msgid "Line-3"
msgstr "Lijningang 3"
#: sys/oss/gstossmixer.c:103
msgid "Digital-1"
msgstr "Digitaal 1"
#: sys/oss/gstossmixer.c:104
msgid "Digital-2"
msgstr "Digitaal 2"
#: sys/oss/gstossmixer.c:105
msgid "Digital-3"
msgstr "Digitaal 3"
#: sys/oss/gstossmixer.c:106
msgid "Phone-in"
msgstr "Telefoon-ingang"
#: sys/oss/gstossmixer.c:107
msgid "Phone-out"
msgstr "Koptelefoon-uitgang"
#: sys/oss/gstossmixer.c:108
msgid "Video"
msgstr "Video"
#: sys/oss/gstossmixer.c:109
msgid "Radio"
msgstr "Radio"
#: sys/oss/gstossmixer.c:110
msgid "Monitor"
msgstr "Monitor"
#: sys/v4l/v4l_calls.c:115
msgid "No device specified"
msgstr "Geen apparaat gegeven"
#: sys/v4l/v4l_calls.c:124 sys/v4l2/v4l2_calls.c:413
#, c-format
msgid "Could not open device \"%s\" for reading and writing"
msgstr "Kon apparaat \"%s\" niet openen voor lezen en schrijven"
#: sys/v4l/v4l_calls.h:47
msgid "Device is not open"
msgstr "Apparaat is niet open"
#: sys/v4l/v4l_calls.h:56
msgid "Device is open"
msgstr "Apparaat is open"
#: sys/v4l2/v4l2_calls.c:427
#, c-format
msgid "Device \"%s\" is not a capture device"
msgstr "Apparaat \"%s\" is geen opname-apparaat"
#: sys/v4l2/v4l2src_calls.c:249
#, c-format
msgid "Could not get buffers from device \"%s\""
msgstr "Kon geen buffers lezen van apparaat \"%s\""
#: sys/v4l2/v4l2src_calls.c:256
#, c-format
msgid "Could not get enough buffers from device \"%s\""
msgstr "Kon niet genoeg buffers lezen van apparaat \"%s\""
......@@ -21,6 +21,8 @@
#include "config.h"
#endif
#include "gst/gst-i18n-plugin.h"
#include "gstosselement.h"
#include "gstosssink.h"
#include "gstosssrc.h"
......@@ -45,6 +47,13 @@ plugin_init (GstPlugin *plugin)
}
GST_DEBUG_CATEGORY_INIT (oss_debug, "oss", 0, "OSS elements");
#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
textdomain (GETTEXT_PACKAGE);
#endif /* ENABLE_NLS */
return TRUE;
}
......
......@@ -681,22 +681,22 @@ gst_osselement_open_audio (GstOssElement *oss)
switch (errno) {
case EBUSY:
gst_element_error (oss, RESOURCE, BUSY,
(_("OSS device %s is already in use by another program."), oss->device), NULL);
(_("OSS device \"%s\" is already in use by another program"), oss->device), NULL);
break;
case EACCES:
case ETXTBSY:
if (mode == GST_OSSELEMENT_WRITE)
gst_element_error (oss, RESOURCE, OPEN_WRITE,
(_("Could not access device %s, check it's permissions"), oss->device), GST_ERROR_SYSTEM);
(_("Could not access device \"%s\", check its permissions"), oss->device), GST_ERROR_SYSTEM);
else
gst_element_error (oss, RESOURCE, OPEN_READ,
(_("Could not access device %s, check it's permissions"), oss->device), GST_ERROR_SYSTEM);
(_("Could not access device \"%s\", check its permissions"), oss->device), GST_ERROR_SYSTEM);
break;
case ENXIO:
case ENODEV:
case ENOENT:
gst_element_error (oss, RESOURCE, NOT_FOUND,
(_("Device %s does not exist"), oss->device), GST_ERROR_SYSTEM);
(_("Device \"%s\" does not exist"), oss->device), GST_ERROR_SYSTEM);
break;
default:
/* FIXME: strerror is not threadsafe */
......
......@@ -40,6 +40,12 @@ plugin_init (GstPlugin *plugin)
GST_RANK_NONE, GST_TYPE_V4L2SRC))
return FALSE;
#ifdef ENABLE_NLS
setlocale (LC_ALL, "");
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
textdomain (GETTEXT_PACKAGE);
#endif /* ENABLE_NLS */
return TRUE;
}
......
......@@ -55,7 +55,7 @@ gst_v4l2_get_capabilities (GstV4l2Element *v4l2element)
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_QUERYCAP, &(v4l2element->vcap)) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Error getting %s capabilities: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -99,7 +99,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in input enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
......@@ -122,7 +122,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
vtun.index = input.tuner;
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER,
&vtun) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get tuner %d settings on %s: %s",
input.tuner,
v4l2element->device,
......@@ -161,7 +161,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in output enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
......@@ -200,7 +200,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in norm enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
......@@ -237,7 +237,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
else
break;
} else {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in control enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
......@@ -289,7 +289,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL)
break; /* end of enumeration */
else {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get %d in menu enumeration for %s: %s",
n, v4l2element->device,
g_strerror (errno)));
......@@ -492,7 +492,7 @@ gst_v4l2_get_norm (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_STD, norm) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get the current norm for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -517,7 +517,7 @@ gst_v4l2_set_norm (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_STD, &norm) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set norm 0x%llx for device %s: %s",
norm, v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -543,7 +543,7 @@ gst_v4l2_get_input (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_INPUT, &n) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get current input on device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -570,7 +570,7 @@ gst_v4l2_set_input (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_INPUT, &input) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set input %d on device %s: %s",
input, v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -596,7 +596,7 @@ gst_v4l2_get_output (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_OUTPUT, &n) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get current output on device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -623,7 +623,7 @@ gst_v4l2_set_output (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_OUTPUT, &output) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set output %d on device %s: %s",
output, v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -651,7 +651,7 @@ gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
freq.tuner = tunernum;
if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQUENCY, &freq) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get current tuner frequency for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -686,7 +686,7 @@ gst_v4l2_set_frequency (GstV4l2Element *v4l2element,
freq.frequency = frequency;
if (ioctl(v4l2element->video_fd, VIDIOC_S_FREQUENCY, &freq) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to set tuner frequency to %lu for device %s: %s",
frequency, v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -714,7 +714,7 @@ gst_v4l2_signal_strength (GstV4l2Element *v4l2element,
tuner.index = tunernum;
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &tuner) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get signal strength for device %s: %s",
v4l2element->device, g_strerror(errno)));
return FALSE;
......@@ -746,7 +746,7 @@ gst_v4l2_get_attribute (GstV4l2Element *v4l2element,
control.id = attribute_num;
if (ioctl(v4l2element->video_fd, VIDIOC_G_CTRL, &control) < 0) {
gst_element_error (v4l2element, RESOURCE, SETTINGS, NULL,
gst_element_error (v4l2element, RESOURCE, SETTINGS, (""),
("Failed to get value for control %d on device %s: %s",