summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/cdrom/gstcdplayer.h42
-rw-r--r--sys/cdrom/gstcdplayer_ioctl.c16
-rw-r--r--sys/cdrom/gstcdplayer_ioctl.h20
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_bsd.h516
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_irix.h66
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_solaris.h264
-rw-r--r--sys/dxr3/dxr3audiosink.c4
-rw-r--r--sys/dxr3/dxr3audiosink.h6
-rw-r--r--sys/dxr3/dxr3spusink.c2
-rw-r--r--sys/dxr3/dxr3spusink.h16
-rw-r--r--sys/dxr3/dxr3videosink.c2
-rw-r--r--sys/dxr3/dxr3videosink.h28
-rw-r--r--sys/qcam/dark.c58
-rw-r--r--sys/qcam/gstqcamsrc.c26
-rw-r--r--sys/v4l2/gstv4l2colorbalance.h8
-rw-r--r--sys/v4l2/gstv4l2element.h110
-rw-r--r--sys/v4l2/gstv4l2src.h92
-rw-r--r--sys/v4l2/gstv4l2tuner.h14
-rw-r--r--sys/v4l2/gstv4l2xoverlay.h6
-rw-r--r--sys/v4l2/v4l2_calls.c6
-rw-r--r--sys/v4l2/v4l2_calls.h102
-rw-r--r--sys/v4l2/v4l2src_calls.c6
-rw-r--r--sys/v4l2/v4l2src_calls.h42
-rw-r--r--sys/vcd/vcdsrc.h10
24 files changed, 731 insertions, 731 deletions
diff --git a/sys/cdrom/gstcdplayer.h b/sys/cdrom/gstcdplayer.h
index 7c6c4bf9..70f0c973 100644
--- a/sys/cdrom/gstcdplayer.h
+++ b/sys/cdrom/gstcdplayer.h
@@ -25,40 +25,40 @@
#include "gstcdplayer_ioctl.h"
-#define GST_TYPE_CDPLAYER (cdplayer_get_type())
-#define CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDPLAYER,CDPlayer))
-#define CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDPLAYER,CDPlayerClass))
-#define GST_IS_CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDPLAYER))
-#define GST_IS_CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDPLAYER))
+#define GST_TYPE_CDPLAYER (cdplayer_get_type())
+#define CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDPLAYER,CDPlayer))
+#define CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDPLAYER,CDPlayerClass))
+#define GST_IS_CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDPLAYER))
+#define GST_IS_CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDPLAYER))
typedef struct _CDPlayer CDPlayer;
typedef struct _CDPlayerClass CDPlayerClass;
struct _CDPlayer {
- GstBin element;
-
- /* properties */
- gchar *device;
- gint num_tracks;
- gint start_track;
- gint end_track;
- gint current_track;
- guint32 cddb_discid;
+ GstBin element;
+
+ /* properties */
+ gchar *device;
+ gint num_tracks;
+ gint start_track;
+ gint end_track;
+ gint current_track;
+ guint32 cddb_discid;
- /* private */
- struct cd cd;
- gboolean paused;
+ /* private */
+ struct cd cd;
+ gboolean paused;
};
struct _CDPlayerClass {
- GstBinClass parent_class;
+ GstBinClass parent_class;
- /* signal callbacks */
- void (*track_change) (GstElement *element,guint track);
+ /* signal callbacks */
+ void (*track_change) (GstElement *element,guint track);
};
GType cdplayer_get_type(void);
-#endif
+#endif
diff --git a/sys/cdrom/gstcdplayer_ioctl.c b/sys/cdrom/gstcdplayer_ioctl.c
index 8cb3891b..abcab5c9 100644
--- a/sys/cdrom/gstcdplayer_ioctl.c
+++ b/sys/cdrom/gstcdplayer_ioctl.c
@@ -51,14 +51,14 @@ irix cdaudio works quite a bit differently than ioctl(), so its not ready
#endif
/* these headers define low level functions:
- gboolean cd_init(struct cd *cd,const gchar *device);
- gboolean cd_start(struct cd *cd,gint start_track,gint end_track);
- gboolean cd_pause(struct cd *cd);
- gboolean cd_resume(struct cd *cd);
- gboolean cd_stop(struct cd *cd);
- CDStatus cd_status(struct cd *cd);
- gint cd_current_track(struct cd *cd);
- gboolean cd_close(struct cd *cd);
+ gboolean cd_init(struct cd *cd,const gchar *device);
+ gboolean cd_start(struct cd *cd,gint start_track,gint end_track);
+ gboolean cd_pause(struct cd *cd);
+ gboolean cd_resume(struct cd *cd);
+ gboolean cd_stop(struct cd *cd);
+ CDStatus cd_status(struct cd *cd);
+ gint cd_current_track(struct cd *cd);
+ gboolean cd_close(struct cd *cd);
*/
#if defined(HAVE_CDROM_SOLARIS)
#include "gstcdplayer_ioctl_solaris.h"
diff --git a/sys/cdrom/gstcdplayer_ioctl.h b/sys/cdrom/gstcdplayer_ioctl.h
index 65bc2c66..ac560976 100644
--- a/sys/cdrom/gstcdplayer_ioctl.h
+++ b/sys/cdrom/gstcdplayer_ioctl.h
@@ -29,23 +29,23 @@
#define CDPLAYER_MAX_TRACKS 128
typedef enum {
- CD_PLAYING,
- CD_COMPLETED,
- CD_ERROR
+ CD_PLAYING,
+ CD_COMPLETED,
+ CD_ERROR
} CDStatus;
struct cd_msf {
- guint8 minute;
- guint8 second;
- guint8 frame;
+ guint8 minute;
+ guint8 second;
+ guint8 frame;
- gboolean data_track;
+ gboolean data_track;
};
struct cd {
- gint fd;
- gint num_tracks;
- struct cd_msf tracks[CDPLAYER_MAX_TRACKS];
+ gint fd;
+ gint num_tracks;
+ struct cd_msf tracks[CDPLAYER_MAX_TRACKS];
};
diff --git a/sys/cdrom/gstcdplayer_ioctl_bsd.h b/sys/cdrom/gstcdplayer_ioctl_bsd.h
index f8a94cd7..ce575d49 100644
--- a/sys/cdrom/gstcdplayer_ioctl_bsd.h
+++ b/sys/cdrom/gstcdplayer_ioctl_bsd.h
@@ -23,323 +23,323 @@
#endif
gboolean cd_init(struct cd *cd,const gchar *device)
{
- struct ioc_toc_header toc_header;
- struct ioc_read_toc_entry toc_entry;
- struct cd_toc_entry toc_entry_data;
- guint i;
-
- cd->fd = open(device,O_RDONLY | O_NONBLOCK);
-
- if (cd->fd == -1) {
- return FALSE;
- }
-
- /* get the toc header information */
- if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- /* read each entry in the toc header */
- for (i = 1; i <= toc_header.ending_track; i++) {
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = i;
- toc_entry.data = &toc_entry_data;
- toc_entry.data_len = sizeof(toc_entry_data);
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[i].minute = toc_entry.data->addr.msf.minute;
- cd->tracks[i].second = toc_entry.data->addr.msf.second;
- cd->tracks[i].frame = toc_entry.data->addr.msf.frame;
- cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
- }
-
- /* read the leadout */
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = 0xAA; /* leadout */
- toc_entry.data = &toc_entry_data;
- toc_entry.data_len = sizeof(toc_entry_data);
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[LEADOUT].minute = toc_entry.data->addr.msf.minute;
- cd->tracks[LEADOUT].second = toc_entry.data->addr.msf.second;
- cd->tracks[LEADOUT].frame = toc_entry.data->addr.msf.frame;
-
- cd->num_tracks = toc_header.ending_track;
-
- return TRUE;
+ struct ioc_toc_header toc_header;
+ struct ioc_read_toc_entry toc_entry;
+ struct cd_toc_entry toc_entry_data;
+ guint i;
+
+ cd->fd = open(device,O_RDONLY | O_NONBLOCK);
+
+ if (cd->fd == -1) {
+ return FALSE;
+ }
+
+ /* get the toc header information */
+ if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ /* read each entry in the toc header */
+ for (i = 1; i <= toc_header.ending_track; i++) {
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = i;
+ toc_entry.data = &toc_entry_data;
+ toc_entry.data_len = sizeof(toc_entry_data);
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[i].minute = toc_entry.data->addr.msf.minute;
+ cd->tracks[i].second = toc_entry.data->addr.msf.second;
+ cd->tracks[i].frame = toc_entry.data->addr.msf.frame;
+ cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
+ }
+
+ /* read the leadout */
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = 0xAA; /* leadout */
+ toc_entry.data = &toc_entry_data;
+ toc_entry.data_len = sizeof(toc_entry_data);
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[LEADOUT].minute = toc_entry.data->addr.msf.minute;
+ cd->tracks[LEADOUT].second = toc_entry.data->addr.msf.second;
+ cd->tracks[LEADOUT].frame = toc_entry.data->addr.msf.frame;
+
+ cd->num_tracks = toc_header.ending_track;
+
+ return TRUE;
}
#elif defined HAVE_CDROM_BSD_DARWIN
gboolean cd_init(struct cd *cd,const gchar *device)
{
- struct ioc_toc_header toc_header;
- struct ioc_read_toc_entry toc_entry;
- guint i;
-
- cd->fd = open(device,O_RDONLY | O_NONBLOCK);
-
- if (cd->fd == -1) {
- return FALSE;
- }
-
- /* get the toc header information */
- if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- /* read each entry in the toc header */
- for (i = 1; i <= toc_header.ending_track; i++) {
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = i;
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[i].minute = toc_entry.data->addr[1];
- cd->tracks[i].second = toc_entry.data->addr[2];
- cd->tracks[i].frame = toc_entry.data->addr[3];
- cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
- }
-
- /* read the leadout */
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = 0xAA; /* leadout */
- toc_entry.data = &toc_entry_data;
- toc_entry.data_len = sizeof(toc_entry_data);
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[LEADOUT].minute = toc_entry.data->addr[1];
- cd->tracks[LEADOUT].second = toc_entry.data->addr[2];
- cd->tracks[LEADOUT].frame = toc_entry.data->addr[3];
-
- cd->num_tracks = toc_header.ending_track;
-
- return TRUE;
+ struct ioc_toc_header toc_header;
+ struct ioc_read_toc_entry toc_entry;
+ guint i;
+
+ cd->fd = open(device,O_RDONLY | O_NONBLOCK);
+
+ if (cd->fd == -1) {
+ return FALSE;
+ }
+
+ /* get the toc header information */
+ if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ /* read each entry in the toc header */
+ for (i = 1; i <= toc_header.ending_track; i++) {
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = i;
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[i].minute = toc_entry.data->addr[1];
+ cd->tracks[i].second = toc_entry.data->addr[2];
+ cd->tracks[i].frame = toc_entry.data->addr[3];
+ cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
+ }
+
+ /* read the leadout */
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = 0xAA; /* leadout */
+ toc_entry.data = &toc_entry_data;
+ toc_entry.data_len = sizeof(toc_entry_data);
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[LEADOUT].minute = toc_entry.data->addr[1];
+ cd->tracks[LEADOUT].second = toc_entry.data->addr[2];
+ cd->tracks[LEADOUT].frame = toc_entry.data->addr[3];
+
+ cd->num_tracks = toc_header.ending_track;
+
+ return TRUE;
}
#else /* free */
gboolean cd_init(struct cd *cd,const gchar *device)
{
- struct ioc_toc_header toc_header;
- struct ioc_read_toc_entry toc_entry;
- guint i;
-
- cd->fd = open(device,O_RDONLY | O_NONBLOCK);
-
- if (cd->fd == -1) {
- return FALSE;
- }
-
- /* get the toc header information */
- if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- /* read each entry in the toc header */
- for (i = 1; i <= toc_header.ending_track; i++) {
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = i;
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[i].minute = toc_entry.entry.addr.msf.minute;
- cd->tracks[i].second = toc_entry.entry.addr.msf.second;
- cd->tracks[i].frame = toc_entry.entry.addr.msf.frame;
- cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
- }
-
- /* read the leadout */
- toc_entry.address_format = CD_MSF_FORMAT;
- toc_entry.starting_track = 0xAA; /* leadout */
- toc_entry.data = &toc_entry_data;
- toc_entry.data_len = sizeof(toc_entry_data);
-
- if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[LEADOUT].minute = toc_entry.entry.addr.msf.minute;
- cd->tracks[LEADOUT].second = toc_entry.entry.addr.msf.second;
- cd->tracks[LEADOUT].frame = toc_entry.entry.addr.msf.frame;
-
- cd->num_tracks = toc_header.ending_track;
-
- return TRUE;
+ struct ioc_toc_header toc_header;
+ struct ioc_read_toc_entry toc_entry;
+ guint i;
+
+ cd->fd = open(device,O_RDONLY | O_NONBLOCK);
+
+ if (cd->fd == -1) {
+ return FALSE;
+ }
+
+ /* get the toc header information */
+ if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ /* read each entry in the toc header */
+ for (i = 1; i <= toc_header.ending_track; i++) {
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = i;
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[i].minute = toc_entry.entry.addr.msf.minute;
+ cd->tracks[i].second = toc_entry.entry.addr.msf.second;
+ cd->tracks[i].frame = toc_entry.entry.addr.msf.frame;
+ cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
+ }
+
+ /* read the leadout */
+ toc_entry.address_format = CD_MSF_FORMAT;
+ toc_entry.starting_track = 0xAA; /* leadout */
+ toc_entry.data = &toc_entry_data;
+ toc_entry.data_len = sizeof(toc_entry_data);
+
+ if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[LEADOUT].minute = toc_entry.entry.addr.msf.minute;
+ cd->tracks[LEADOUT].second = toc_entry.entry.addr.msf.second;
+ cd->tracks[LEADOUT].frame = toc_entry.entry.addr.msf.frame;
+
+ cd->num_tracks = toc_header.ending_track;
+
+ return TRUE;
}
#endif
gboolean cd_start(struct cd *cd,gint start_track,gint end_track)
{
- struct ioc_play_msf msf;
+ struct ioc_play_msf msf;
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- cd_fix_track_range(cd,&start_track,&end_track);
+ cd_fix_track_range(cd,&start_track,&end_track);
- msf.start_m = cd->tracks[start_track].minute;
- msf.start_s = cd->tracks[start_track].second;
- msf.start_f = cd->tracks[start_track].frame;
+ msf.start_m = cd->tracks[start_track].minute;
+ msf.start_s = cd->tracks[start_track].second;
+ msf.start_f = cd->tracks[start_track].frame;
- if (end_track == LEADOUT) {
- msf.end_m = cd->tracks[end_track].minute;
- msf.end_s = cd->tracks[end_track].second;
- msf.end_f = cd->tracks[end_track].frame;
- } else {
- msf.end_m = cd->tracks[end_track+1].minute;
- msf.end_s = cd->tracks[end_track+1].second;
- msf.end_f = cd->tracks[end_track+1].frame;
- }
+ if (end_track == LEADOUT) {
+ msf.end_m = cd->tracks[end_track].minute;
+ msf.end_s = cd->tracks[end_track].second;
+ msf.end_f = cd->tracks[end_track].frame;
+ } else {
+ msf.end_m = cd->tracks[end_track+1].minute;
+ msf.end_s = cd->tracks[end_track+1].second;
+ msf.end_f = cd->tracks[end_track+1].frame;
+ }
- if (ioctl(cd->fd,CDIOCPLAYMSF,&msf) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDIOCPLAYMSF,&msf) != 0) {
+ return FALSE;
+ }
}
gboolean cd_pause(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDIOCPAUSE,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDIOCPAUSE,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_resume(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDIOCRESUME,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDIOCRESUME,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_stop(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDIOCSTOP,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDIOCSTOP,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
/* -1 for error, 0 for not playing, 1 for playing */
CDStatus cd_status(struct cd *cd)
{
- struct ioc_read_subchannel sub_channel;
- struct cd_sub_channel_info sub_channel_info;
-
- if (cd->fd == -1) {
- return -1;
- }
-
- sub_channel.address_format = CD_MSF_FORMAT;
- sub_channel.data_format = CD_CURRENT_POSITION;
- sub_channel.track = 0;
- sub_channel.data = &sub_channel_info;
- sub_channel.data_len = sizeof(sub_channel_info);
-
- if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
- return FALSE;
- }
-
- switch (sub_channel.data->header.audio_status) {
- case CD_AS_PLAY_IN_PROGRESS:
- case CD_AS_PLAY_PAUSED:
- return CD_PLAYING;
- break;
- case CD_AS_PLAY_COMPLETED:
- return CD_COMPLETED;
- break;
- case CD_AS_AUDIO_INVALID:
- case CD_AS_PLAY_ERROR:
- default:
- return CD_ERROR;
- break;
-
- }
+ struct ioc_read_subchannel sub_channel;
+ struct cd_sub_channel_info sub_channel_info;
+
+ if (cd->fd == -1) {
+ return -1;
+ }
+
+ sub_channel.address_format = CD_MSF_FORMAT;
+ sub_channel.data_format = CD_CURRENT_POSITION;
+ sub_channel.track = 0;
+ sub_channel.data = &sub_channel_info;
+ sub_channel.data_len = sizeof(sub_channel_info);
+
+ if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
+ return FALSE;
+ }
+
+ switch (sub_channel.data->header.audio_status) {
+ case CD_AS_PLAY_IN_PROGRESS:
+ case CD_AS_PLAY_PAUSED:
+ return CD_PLAYING;
+ break;
+ case CD_AS_PLAY_COMPLETED:
+ return CD_COMPLETED;
+ break;
+ case CD_AS_AUDIO_INVALID:
+ case CD_AS_PLAY_ERROR:
+ default:
+ return CD_ERROR;
+ break;
+
+ }
}
gint cd_current_track(struct cd *cd)
{
- struct ioc_read_subchannel sub_channel;
- struct cd_sub_channel_info sub_channel_info;
+ struct ioc_read_subchannel sub_channel;
+ struct cd_sub_channel_info sub_channel_info;
- if (cd->fd == -1) {
- return -1;
- }
+ if (cd->fd == -1) {
+ return -1;
+ }
- sub_channel.address_format = CD_MSF_FORMAT;
- sub_channel.data_format = CD_TRACK_INFO;
- sub_channel.track = 0;
- sub_channel.data = &sub_channel_info;
- sub_channel.data_len = sizeof(sub_channel_info);
+ sub_channel.address_format = CD_MSF_FORMAT;
+ sub_channel.data_format = CD_TRACK_INFO;
+ sub_channel.track = 0;
+ sub_channel.data = &sub_channel_info;
+ sub_channel.data_len = sizeof(sub_channel_info);
- if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
- return -1;
- }
+ if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
+ return -1;
+ }
#ifdef __NetBSD__
- return sub_channel.data->what.track_info.track_number;
+ return sub_channel.data->what.track_info.track_number;
#else
- return sub_channel.data->track_number;
+ return sub_channel.data->track_number;
#endif
}
gboolean cd_close(struct cd *cd)
{
- if (cd->fd == -1) {
- return TRUE;
- }
+ if (cd->fd == -1) {
+ return TRUE;
+ }
- if (close(cd->fd) != 0) {
- return FALSE;
- }
+ if (close(cd->fd) != 0) {
+ return FALSE;
+ }
- cd->fd = -1;
+ cd->fd = -1;
- return TRUE;
+ return TRUE;
}
diff --git a/sys/cdrom/gstcdplayer_ioctl_irix.h b/sys/cdrom/gstcdplayer_ioctl_irix.h
index 2f6be35c..a6643bab 100644
--- a/sys/cdrom/gstcdplayer_ioctl_irix.h
+++ b/sys/cdrom/gstcdplayer_ioctl_irix.h
@@ -24,55 +24,55 @@
gboolean cd_init(struct cd *cd,const gchar *device)
{
- CDPLAYER *cdplayer;
- CDSTATUS status;
- CDTRACKINFO info;
- guint i;
+ CDPLAYER *cdplayer;
+ CDSTATUS status;
+ CDTRACKINFO info;
+ guint i;
- cdplayer = CDOpen(device,"r");
+ cdplayer = CDOpen(device,"r");
- if (cdplayer == NULL) {
- return FALSE;
- }
+ if (cdplayer == NULL) {
+ return FALSE;
+ }
- cd->fd = FD(cdplayer);
+ cd->fd = FD(cdplayer);
- if (CDgetstatus(cdplayer,&status) == 0) {
- CDclose(cdplayer);
- cd->fd = 0;
- return FALSE;
- }
+ if (CDgetstatus(cdplayer,&status) == 0) {
+ CDclose(cdplayer);
+ cd->fd = 0;
+ return FALSE;
+ }
- for (i = 1; i < status.last; i++) {
- if (CDgettrackinfo(cdplayer,i,&info) == 0) {
- CDclose(cdplayer);
- cd->fd = 0;
- return FALSE;
- }
+ for (i = 1; i < status.last; i++) {
+ if (CDgettrackinfo(cdplayer,i,&info) == 0) {
+ CDclose(cdplayer);
+ cd->fd = 0;
+ return FALSE;
+ }
- cd->tracks[i].minute = info.start_min;
- cd->tracks[i].second = info.start_sec;
- cd->tracks[i].frame = info.start_frame;
+ cd->tracks[i].minute = info.start_min;
+ cd->tracks[i].second = info.start_sec;
+ cd->tracks[i].frame = info.start_frame;
- }
+ }
- /* there is no leadout information */
-
+ /* there is no leadout information */
+
- cd->num_tracks = status.last;
+ cd->num_tracks = status.last;
- return TRUE;
+ return TRUE;
}
gboolean cd_start(struct cd *cd,gint start_track,gint end_track)
{
- if (cd->fd == 0) {
- return FALSE;
- }
+ if (cd->fd == 0) {
+ return FALSE;
+ }
- cd_fix_track_range(cd,&start_track,&end_track);
+ cd_fix_track_range(cd,&start_track,&end_track);
-
+
}
diff --git a/sys/cdrom/gstcdplayer_ioctl_solaris.h b/sys/cdrom/gstcdplayer_ioctl_solaris.h
index 868fb251..e0515e6d 100644
--- a/sys/cdrom/gstcdplayer_ioctl_solaris.h
+++ b/sys/cdrom/gstcdplayer_ioctl_solaris.h
@@ -19,186 +19,186 @@
gboolean cd_init(struct cd *cd,const gchar *device)
{
- struct cdrom_tochdr toc_header;
- struct cdrom_tocentry toc_entry;
- guint i;
-
- cd->fd = open(device,O_RDONLY | O_NONBLOCK);
-
- if (cd->fd == -1) {
- return FALSE;
- }
-
- /* get the toc header information */
- if (ioctl(cd->fd,CDROMREADTOCHDR,&toc_header) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- /* read each entry in the toc header */
- for (i = 1; i <= toc_header.cdth_trk1; i++) {
- toc_entry.cdte_format = CDROM_MSF;
- toc_entry.cdte_track = i;
-
- if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
-
- cd->tracks[i].minute = toc_entry.cdte_addr.msf.minute;
- cd->tracks[i].second = toc_entry.cdte_addr.msf.second;
- cd->tracks[i].frame = toc_entry.cdte_addr.msf.frame;
- cd->tracks[i].data_track = (toc_entry.cdte_ctrl == CDROM_DATA_TRACK);
- }
-
- /* read the leadout */
- toc_entry.cdte_track = CDROM_LEADOUT;
- toc_entry.cdte_format = CDROM_MSF;
- if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
- close(cd->fd);
- cd->fd = -1;
- return FALSE;
- }
- cd->tracks[LEADOUT].minute = toc_entry.cdte_addr.msf.minute;
- cd->tracks[LEADOUT].second = toc_entry.cdte_addr.msf.second;
- cd->tracks[LEADOUT].frame = toc_entry.cdte_addr.msf.frame;
-
- cd->num_tracks = toc_header.cdth_trk1;
-
- return TRUE;
+ struct cdrom_tochdr toc_header;
+ struct cdrom_tocentry toc_entry;
+ guint i;
+
+ cd->fd = open(device,O_RDONLY | O_NONBLOCK);
+
+ if (cd->fd == -1) {
+ return FALSE;
+ }
+
+ /* get the toc header information */
+ if (ioctl(cd->fd,CDROMREADTOCHDR,&toc_header) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ /* read each entry in the toc header */
+ for (i = 1; i <= toc_header.cdth_trk1; i++) {
+ toc_entry.cdte_format = CDROM_MSF;
+ toc_entry.cdte_track = i;
+
+ if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+
+ cd->tracks[i].minute = toc_entry.cdte_addr.msf.minute;
+ cd->tracks[i].second = toc_entry.cdte_addr.msf.second;
+ cd->tracks[i].frame = toc_entry.cdte_addr.msf.frame;
+ cd->tracks[i].data_track = (toc_entry.cdte_ctrl == CDROM_DATA_TRACK);
+ }
+
+ /* read the leadout */
+ toc_entry.cdte_track = CDROM_LEADOUT;
+ toc_entry.cdte_format = CDROM_MSF;
+ if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
+ close(cd->fd);
+ cd->fd = -1;
+ return FALSE;
+ }
+ cd->tracks[LEADOUT].minute = toc_entry.cdte_addr.msf.minute;
+ cd->tracks[LEADOUT].second = toc_entry.cdte_addr.msf.second;
+ cd->tracks[LEADOUT].frame = toc_entry.cdte_addr.msf.frame;
+
+ cd->num_tracks = toc_header.cdth_trk1;
+
+ return TRUE;
}
gboolean cd_start(struct cd *cd,gint start_track,gint end_track)
{
- struct cdrom_msf msf;
+ struct cdrom_msf msf;
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- cd_fix_track_range(cd,&start_track,&end_track);
+ cd_fix_track_range(cd,&start_track,&end_track);
- msf.cdmsf_min0 = cd->tracks[start_track].minute;
- msf.cdmsf_sec0 = cd->tracks[start_track].second;
- msf.cdmsf_frame0 = cd->tracks[start_track].frame;
+ msf.cdmsf_min0 = cd->tracks[start_track].minute;
+ msf.cdmsf_sec0 = cd->tracks[start_track].second;
+ msf.cdmsf_frame0 = cd->tracks[start_track].frame;
- if (end_track == LEADOUT) {
- msf.cdmsf_min1 = cd->tracks[end_track].minute;
- msf.cdmsf_sec1 = cd->tracks[end_track].second;
- msf.cdmsf_frame1 = cd->tracks[end_track].frame;
- } else {
- msf.cdmsf_min1 = cd->tracks[end_track+1].minute;
- msf.cdmsf_sec1 = cd->tracks[end_track+1].second;
- msf.cdmsf_frame1 = cd->tracks[end_track+1].frame;
- }
+ if (end_track == LEADOUT) {
+ msf.cdmsf_min1 = cd->tracks[end_track].minute;
+ msf.cdmsf_sec1 = cd->tracks[end_track].second;
+ msf.cdmsf_frame1 = cd->tracks[end_track].frame;
+ } else {
+ msf.cdmsf_min1 = cd->tracks[end_track+1].minute;
+ msf.cdmsf_sec1 = cd->tracks[end_track+1].second;
+ msf.cdmsf_frame1 = cd->tracks[end_track+1].frame;
+ }
- if (ioctl(cd->fd,CDROMPLAYMSF,&msf) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDROMPLAYMSF,&msf) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_pause(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDROMPAUSE,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDROMPAUSE,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_resume(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDROMRESUME,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDROMRESUME,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
gboolean cd_stop(struct cd *cd)
{
- if (cd->fd == -1) {
- return FALSE;
- }
+ if (cd->fd == -1) {
+ return FALSE;
+ }
- if (ioctl(cd->fd,CDROMSTOP,NULL) != 0) {
- return FALSE;
- }
+ if (ioctl(cd->fd,CDROMSTOP,NULL) != 0) {
+ return FALSE;
+ }
- return TRUE;
+ return TRUE;
}
/* -1 for error, 0 for not playing, 1 for playing */
CDStatus cd_status(struct cd *cd)
{
- struct cdrom_subchnl sub_channel;
-
- if (cd->fd == -1) {
- return -1;
- }
-
- sub_channel.cdsc_format = CDROM_MSF;
-
- if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
- return -1;
- }
-
- switch (sub_channel.cdsc_audiostatus) {
- case CDROM_AUDIO_COMPLETED:
- return CD_COMPLETED;
- break;
- case CDROM_AUDIO_PLAY:
- case CDROM_AUDIO_PAUSED:
- return CD_PLAYING;
- break;
- case CDROM_AUDIO_ERROR:
- default:
- return CD_ERROR;
- }
+ struct cdrom_subchnl sub_channel;
+
+ if (cd->fd == -1) {
+ return -1;
+ }
+
+ sub_channel.cdsc_format = CDROM_MSF;
+
+ if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
+ return -1;
+ }
+
+ switch (sub_channel.cdsc_audiostatus) {
+ case CDROM_AUDIO_COMPLETED:
+ return CD_COMPLETED;
+ break;
+ case CDROM_AUDIO_PLAY:
+ case CDROM_AUDIO_PAUSED:
+ return CD_PLAYING;
+ break;
+ case CDROM_AUDIO_ERROR:
+ default:
+ return CD_ERROR;
+ }
}
gint cd_current_track(struct cd *cd)
{
- struct cdrom_subchnl sub_channel;
+ struct cdrom_subchnl sub_channel;
- if (cd->fd == -1) {
- return -1;
- }
+ if (cd->fd == -1) {
+ return -1;
+ }
- sub_channel.cdsc_format = CDROM_MSF;
+ sub_channel.cdsc_format = CDROM_MSF;
- if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
- return -1;
- }
+ if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
+ return -1;
+ }
- return sub_channel.cdsc_trk;
+ return sub_channel.cdsc_trk;
}
gboolean cd_close(struct cd *cd)
{
- if (cd->fd == -1) {
- return TRUE;
- }
+ if (cd->fd == -1) {
+ return TRUE;
+ }
- if (close(cd->fd) != 0) {
- return FALSE;
- }
+ if (close(cd->fd) != 0) {
+ return FALSE;
+ }
- cd->fd = -1;
+ cd->fd = -1;
- return TRUE;
+ return TRUE;
}
diff --git a/sys/dxr3/dxr3audiosink.c b/sys/dxr3/dxr3audiosink.c
index 494aba26..671359ae 100644
--- a/sys/dxr3/dxr3audiosink.c
+++ b/sys/dxr3/dxr3audiosink.c
@@ -113,9 +113,9 @@ static gboolean dxr3audiosink_handle_event (GstPad * pad, GstEvent * event);
static void dxr3audiosink_chain_pcm (GstPad * pad, GstData * buf);
static void dxr3audiosink_chain_ac3 (GstPad * pad, GstData * buf);
-/* static void dxr3audiosink_wait (Dxr3AudioSink *sink, */
+/* static void dxr3audiosink_wait (Dxr3AudioSink *sink, */
/* GstClockTime time); */
-/* static int dxr3audiosink_mvcommand (Dxr3AudioSink *sink, */
+/* static int dxr3audiosink_mvcommand (Dxr3AudioSink *sink, */
/* int command); */
static GstStateChangeReturn dxr3audiosink_change_state (GstElement * element,
diff --git a/sys/dxr3/dxr3audiosink.h b/sys/dxr3/dxr3audiosink.h
index 787e20f7..458aa029 100644
--- a/sys/dxr3/dxr3audiosink.h
+++ b/sys/dxr3/dxr3audiosink.h
@@ -93,7 +93,7 @@ struct _Dxr3AudioSink {
ac3_padder *padder; /* AC3 to SPDIF padder object. */
- GstClock *clock; /* The clock for this element. */
+ GstClock *clock; /* The clock for this element. */
};
@@ -105,8 +105,8 @@ struct _Dxr3AudioSinkClass {
};
-extern GType dxr3audiosink_get_type (void);
-extern gboolean dxr3audiosink_factory_init (GstPlugin *plugin);
+extern GType dxr3audiosink_get_type (void);
+extern gboolean dxr3audiosink_factory_init (GstPlugin *plugin);
G_END_DECLS
diff --git a/sys/dxr3/dxr3spusink.c b/sys/dxr3/dxr3spusink.c
index 31c1d4cf..31c2534e 100644
--- a/sys/dxr3/dxr3spusink.c
+++ b/sys/dxr3/dxr3spusink.c
@@ -90,7 +90,7 @@ static void dxr3spusink_chain (GstPad * pad, GstData * _data);
static GstStateChangeReturn dxr3spusink_change_state (GstElement * element,
GstStateChange transition);
-/* static void dxr3spusink_wait (Dxr3SpuSink *sink, */
+/* static void dxr3spusink_wait (Dxr3SpuSink *sink, */
/* GstClockTime time); */
static void dxr3spusink_set_clut (Dxr3SpuSink * sink, const guint32 * clut);
diff --git a/sys/dxr3/dxr3spusink.h b/sys/dxr3/dxr3spusink.h
index e1563ab6..e68b1b2c 100644
--- a/sys/dxr3/dxr3spusink.h
+++ b/sys/dxr3/dxr3spusink.h
@@ -52,16 +52,16 @@ typedef enum {
struct _Dxr3SpuSink {
GstElement element;
- int card_number; /* The number of the card to open. */
+ int card_number; /* The number of the card to open. */
- gchar *spu_filename; /* File name for the spu device. */
- int spu_fd; /* File descriptor for the spu device. */
+ gchar *spu_filename; /* File name for the spu device. */
+ int spu_fd; /* File descriptor for the spu device. */
- gchar *control_filename; /* File name for the control device. */
- int control_fd; /* File descriptor for the control
+ gchar *control_filename; /* File name for the control device. */
+ int control_fd; /* File descriptor for the control
device. */
- GstClock *clock; /* The clock for this element. */
+ GstClock *clock; /* The clock for this element. */
};
@@ -79,8 +79,8 @@ struct _Dxr3SpuSinkClass {
};
-extern GType dxr3spusink_get_type (void);
-extern gboolean dxr3spusink_factory_init (GstPlugin *plugin);
+extern GType dxr3spusink_get_type (void);
+extern gboolean dxr3spusink_factory_init (GstPlugin *plugin);
G_END_DECLS
diff --git a/sys/dxr3/dxr3videosink.c b/sys/dxr3/dxr3videosink.c
index f100f5a1..a21d272b 100644
--- a/sys/dxr3/dxr3videosink.c
+++ b/sys/dxr3/dxr3videosink.c
@@ -120,7 +120,7 @@ static void dxr3videosink_chain (GstPad * pad, GstData * _data);
static GstStateChangeReturn dxr3videosink_change_state (GstElement * element,
GstStateChange transition);
-/* static void dxr3videosink_wait (Dxr3VideoSink *sink, */
+/* static void dxr3videosink_wait (Dxr3VideoSink *sink, */
/* GstClockTime time); */
static int dxr3videosink_mvcommand (Dxr3VideoSink * sink, int command);
diff --git a/sys/dxr3/dxr3videosink.h b/sys/dxr3/dxr3videosink.h
index 4af1de1b..e2daab1f 100644
--- a/sys/dxr3/dxr3videosink.h
+++ b/sys/dxr3/dxr3videosink.h
@@ -52,31 +52,31 @@ typedef enum {
struct _Dxr3VideoSink {
GstElement element;
- int card_number; /* The number of the card to open. */
+ int card_number; /* The number of the card to open. */
- gchar *video_filename; /* File name for the video device. */
- int video_fd; /* File descriptor for the video device. */
+ gchar *video_filename; /* File name for the video device. */
+ int video_fd; /* File descriptor for the video device. */
- gchar *control_filename; /* File name for the control device. */
- int control_fd; /* File descriptor for the control
+ gchar *control_filename; /* File name for the control device. */
+ int control_fd; /* File descriptor for the control
device. */
- GstClock *clock; /* The clock for this element. */
+ GstClock *clock; /* The clock for this element. */
- GstClockTime last_ts; /* Last timestamp received. */
+ GstClockTime last_ts; /* Last timestamp received. */
- GstBuffer *cur_buf; /* The buffer we are currently
+ GstBuffer *cur_buf; /* The buffer we are currently
building. */
- GstClockTime cur_ts; /* Timestamp associated to the
+ GstClockTime cur_ts; /* Timestamp associated to the
current buffer. */
- guchar scan_state; /* The current state of the MPEG start
+ guchar scan_state; /* The current state of the MPEG start
code scanner. */
- guint scan_pos; /* The current position of the MPEG
+ guint scan_pos; /* The current position of the MPEG
start code scanner (with respect to
the start of the current buffer. */
- guchar parse_state; /* The current state of the MPEG
+ guchar parse_state; /* The current state of the MPEG
sequence parser. */
};
@@ -89,8 +89,8 @@ struct _Dxr3VideoSinkClass {
};
-extern GType dxr3videosink_get_type (void);
-extern gboolean dxr3videosink_factory_init (GstPlugin *plugin);
+extern GType dxr3videosink_get_type (void);
+extern gboolean dxr3videosink_factory_init (GstPlugin *plugin);
G_END_DECLS
diff --git a/sys/qcam/dark.c b/sys/qcam/dark.c
index ac462b36..cdfa2ab8 100644
--- a/sys/qcam/dark.c
+++ b/sys/qcam/dark.c
@@ -25,17 +25,17 @@ OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
/* Fixdark
- Routine to repair dark current artifacts in qcam output.
- Basic idea: the Qcam CCD suffers from "dark current";
- that is, some of the CCD pixels will leak current under
- long exposures, even if they're in the dark, and this
- shows up as ugly speckling on images taken in low light.
+ Routine to repair dark current artifacts in qcam output.
+ Basic idea: the Qcam CCD suffers from "dark current";
+ that is, some of the CCD pixels will leak current under
+ long exposures, even if they're in the dark, and this
+ shows up as ugly speckling on images taken in low light.
- Fortunately, the leaky pixels are the same from shot to
- shot. So, we can figure out which pixels are leaky by
- taking some establishing shots in the dark, and try to
- fix those pixels on subsequent shots. The dark
- establishing shots need only be done once per camera.
+ Fortunately, the leaky pixels are the same from shot to
+ shot. So, we can figure out which pixels are leaky by
+ taking some establishing shots in the dark, and try to
+ fix those pixels on subsequent shots. The dark
+ establishing shots need only be done once per camera.
*/
#ifdef HAVE_CONFIG_H
@@ -77,7 +77,7 @@ read_darkmask()
}
if (fread(master_darkmask1, sizeof(unsigned char), MAX_WIDTH*MAX_HEIGHT, fp) !=
- MAX_WIDTH*MAX_HEIGHT) {
+ MAX_WIDTH*MAX_HEIGHT) {
#ifdef DEBUG
fprintf(stderr, "Error reading darkfile\n");
#endif
@@ -88,14 +88,14 @@ read_darkmask()
for (x = 0; x < MAX_WIDTH; x += 2) {
min_bright = master_darkmask1[y][x];
if (y < MAX_HEIGHT-1 && master_darkmask1[y+1][x] < min_bright)
- min_bright = master_darkmask1[y+1][x];
+ min_bright = master_darkmask1[y+1][x];
if (x < MAX_WIDTH-1 && master_darkmask1[y][x+1] < min_bright)
- min_bright = master_darkmask1[y][x+1];
+ min_bright = master_darkmask1[y][x+1];
if (y < MAX_HEIGHT-1 && x < MAX_WIDTH-1 && master_darkmask1[y+1][x+1] < min_bright)
- min_bright = master_darkmask1[y+1][x+1];
+ min_bright = master_darkmask1[y+1][x+1];
master_darkmask2[y/2][x/2] = min_bright;
- assert(y/2 < MAX_HEIGHT/2+1);
- assert(x/2 < MAX_WIDTH/2+1);
+ assert(y/2 < MAX_HEIGHT/2+1);
+ assert(x/2 < MAX_WIDTH/2+1);
}
}
@@ -103,14 +103,14 @@ read_darkmask()
for (x = 0; x < MAX_WIDTH/2; x += 2) {
min_bright = master_darkmask2[y][x];
if (y < MAX_HEIGHT/2-1 && master_darkmask2[y+1][x] < min_bright)
- min_bright = master_darkmask2[y+1][x];
+ min_bright = master_darkmask2[y+1][x];
if (x < MAX_WIDTH/2-1 && master_darkmask2[y][x+1] < min_bright)
- min_bright = master_darkmask2[y][x+1];
+ min_bright = master_darkmask2[y][x+1];
if (y < MAX_HEIGHT/2-1 && x < MAX_WIDTH-1 && master_darkmask2[y+1][x+1] < min_bright)
- min_bright = master_darkmask2[y+1][x+1];
+ min_bright = master_darkmask2[y+1][x+1];
master_darkmask4[y/2][x/2] = min_bright;
- assert(y/2 < MAX_HEIGHT/4+1);
- assert(x/2 < MAX_WIDTH/4+1);
+ assert(y/2 < MAX_HEIGHT/4+1);
+ assert(x/2 < MAX_WIDTH/4+1);
}
}
@@ -121,15 +121,15 @@ read_darkmask()
/* fixdark
- We first record a list of bad leaky pixels, by making a
- number of exposures in the dark. master_darkmask holds
- this information. It's a map of the CCD.
- master_darkmask[y][x] == val means that the pixel is
- unreliable for brightnesses of "val" and above.
+ We first record a list of bad leaky pixels, by making a
+ number of exposures in the dark. master_darkmask holds
+ this information. It's a map of the CCD.
+ master_darkmask[y][x] == val means that the pixel is
+ unreliable for brightnesses of "val" and above.
- We go over the image. If a pixel is bad, look at the
- adjacent four pixels, average the ones that have good
- values, and use that instead.
+ We go over the image. If a pixel is bad, look at the
+ adjacent four pixels, average the ones that have good
+ values, and use that instead.
*/
int
diff --git a/sys/qcam/gstqcamsrc.c b/sys/qcam/gstqcamsrc.c
index 901beca5..2bae6d85 100644
--- a/sys/qcam/gstqcamsrc.c
+++ b/sys/qcam/gstqcamsrc.c
@@ -40,19 +40,19 @@ GST_ELEMENT_DETAILS ("QCam Source",
"Read from a QuickCam device",
"Wim Taymans <wim.taymans@chello.be>");
-#define AE_NONE 3
-
-#define DEF_WIDTH 320
-#define DEF_HEIGHT 224
-#define DEF_BRIGHTNESS 226
-#define DEF_WHITEBAL 128
-#define DEF_CONTRAST 72
-#define DEF_TOP 1
-#define DEF_LEFT 14
-#define DEF_TRANSFER_SCALE 2
-#define DEF_DEPTH 6
-#define DEF_PORT 0x378
-#define DEF_AUTOEXP AE_NONE
+#define AE_NONE 3
+
+#define DEF_WIDTH 320
+#define DEF_HEIGHT 224
+#define DEF_BRIGHTNESS 226
+#define DEF_WHITEBAL 128
+#define DEF_CONTRAST 72
+#define DEF_TOP 1
+#define DEF_LEFT 14
+#define DEF_TRANSFER_SCALE 2
+#define DEF_DEPTH 6
+#define DEF_PORT 0x378
+#define DEF_AUTOEXP AE_NONE
static GstStaticPadTemplate gst_qcamsrc_src_factory =
GST_STATIC_PAD_TEMPLATE ("src",
diff --git a/sys/v4l2/gstv4l2colorbalance.h b/sys/v4l2/gstv4l2colorbalance.h
index 4003203b..b573cb2a 100644
--- a/sys/v4l2/gstv4l2colorbalance.h
+++ b/sys/v4l2/gstv4l2colorbalance.h
@@ -32,10 +32,10 @@ G_BEGIN_DECLS
(gst_v4l2_color_balance_channel_get_type ())
#define GST_V4L2_COLOR_BALANCE_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, \
- GstV4l2ColorBalanceChannel))
+ GstV4l2ColorBalanceChannel))
#define GST_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, \
- GstV4l2ColorBalanceChannelClass))
+ GstV4l2ColorBalanceChannelClass))
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL))
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
@@ -51,8 +51,8 @@ typedef struct _GstV4l2ColorBalanceChannelClass {
GstColorBalanceChannelClass parent;
} GstV4l2ColorBalanceChannelClass;
-GType gst_v4l2_color_balance_channel_get_type (void);
+GType gst_v4l2_color_balance_channel_get_type (void);
-void gst_v4l2_color_balance_interface_init (GstColorBalanceClass *klass);
+void gst_v4l2_color_balance_interface_init (GstColorBalanceClass *klass);
#endif /* __GST_V4L2_COLOR_BALANCE_H__ */
diff --git a/sys/v4l2/gstv4l2element.h b/sys/v4l2/gstv4l2element.h
index c9e5f347..62663a29 100644
--- a/sys/v4l2/gstv4l2element.h
+++ b/sys/v4l2/gstv4l2element.h
@@ -50,87 +50,87 @@
#ifdef GST_V4L2_MISSING_BUFDECL
struct v4l2_buffer
{
- __u32 index;
- enum v4l2_buf_type type;
- __u32 bytesused;
- __u32 flags;
- enum v4l2_field field;
- struct timeval timestamp;
- struct v4l2_timecode timecode;
- __u32 sequence;
-
- /* memory location */
- enum v4l2_memory memory;
- union {
- __u32 offset;
- unsigned long userptr;
- } m;
- __u32 length;
-
- __u32 reserved[2];
+ __u32 index;
+ enum v4l2_buf_type type;
+ __u32 bytesused;
+ __u32 flags;
+ enum v4l2_field field;
+ struct timeval timestamp;
+ struct v4l2_timecode timecode;
+ __u32 sequence;
+
+ /* memory location */
+ enum v4l2_memory memory;
+ union {
+ __u32 offset;
+ unsigned long userptr;
+ } m;
+ __u32 length;
+
+ __u32 reserved[2];
};
#endif /* GST_V4L2_MISSING_BUFDECL */
#define GST_TYPE_V4L2ELEMENT \
- (gst_v4l2element_get_type())
+ (gst_v4l2element_get_type())
#define GST_V4L2ELEMENT(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_V4L2ELEMENT, GstV4l2Element))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_V4L2ELEMENT, GstV4l2Element))
#define GST_V4L2ELEMENT_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
#define GST_IS_V4L2ELEMENT(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_V4L2ELEMENT))
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_V4L2ELEMENT))
#define GST_IS_V4L2ELEMENT_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_V4L2ELEMENT))
+ (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_V4L2ELEMENT))
#define GST_V4L2ELEMENT_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
-typedef struct _GstV4l2Element GstV4l2Element;
-typedef struct _GstV4l2ElementClass GstV4l2ElementClass;
-typedef struct _GstV4l2Xv GstV4l2Xv;
+typedef struct _GstV4l2Element GstV4l2Element;
+typedef struct _GstV4l2ElementClass GstV4l2ElementClass;
+typedef struct _GstV4l2Xv GstV4l2Xv;
struct _GstV4l2Element {
- GstElement element;
+ GstElement element;
- /* the video device */
- char *device;
+ /* the video device */
+ char *device;
- /* the video-device's file descriptor */
- gint video_fd;
+ /* the video-device's file descriptor */
+ gint video_fd;
- /* the video buffer (mmap()'ed) */
- guint8 **buffer;
+ /* the video buffer (mmap()'ed) */
+ guint8 **buffer;
- /* the video-device's capabilities */
- struct v4l2_capability vcap;
+ /* the video-device's capabilities */
+ struct v4l2_capability vcap;
- /* the toys available to us */
- GList *channels;
- GList *norms;
- GList *colors;
+ /* the toys available to us */
+ GList *channels;
+ GList *norms;
+ GList *colors;
- /* X-overlay */
- GstV4l2Xv *xv;
- XID xwindow_id;
+ /* X-overlay */
+ GstV4l2Xv *xv;
+ XID xwindow_id;
- /* properties */
- gchar *norm;
- gchar *channel;
- gulong frequency;
+ /* properties */
+ gchar *norm;
+ gchar *channel;
+ gulong frequency;
};
struct _GstV4l2ElementClass {
- GstElementClass parent_class;
+ GstElementClass parent_class;
- /* probed devices */
- GList *devices;
+ /* probed devices */
+ GList *devices;
- /* signals */
- void (*open) (GstElement *element,
- const gchar *device);
- void (*close) (GstElement *element,
- const gchar *device);
+ /* signals */
+ void (*open) (GstElement *element,
+ const gchar *device);
+ void (*close) (GstElement *element,
+ const gchar *device);
};
diff --git a/sys/v4l2/gstv4l2src.h b/sys/v4l2/gstv4l2src.h
index cbcfc6ec..c5aac389 100644
--- a/sys/v4l2/gstv4l2src.h
+++ b/sys/v4l2/gstv4l2src.h
@@ -28,78 +28,78 @@ GST_DEBUG_CATEGORY_EXTERN (v4l2src_debug);
#define GST_V4L2_MIN_BUFFERS 2
#define GST_TYPE_V4L2SRC \
- (gst_v4l2src_get_type())
+ (gst_v4l2src_get_type())
#define GST_V4L2SRC(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_V4L2SRC,GstV4l2Src))
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_V4L2SRC,GstV4l2Src))
#define GST_V4L2SRC_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_V4L2SRC,GstV4l2SrcClass))
+ (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_V4L2SRC,GstV4l2SrcClass))
#define GST_IS_V4L2SRC(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4L2SRC))
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4L2SRC))
#define GST_IS_V4L2SRC_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4L2SRC))
+ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4L2SRC))
-typedef struct _GstV4l2BufferPool GstV4l2BufferPool;
-typedef struct _GstV4l2Buffer GstV4l2Buffer;
-typedef struct _GstV4l2Src GstV4l2Src;
-typedef struct _GstV4l2SrcClass GstV4l2SrcClass;
+typedef struct _GstV4l2BufferPool GstV4l2BufferPool;
+typedef struct _GstV4l2Buffer GstV4l2Buffer;
+typedef struct _GstV4l2Src GstV4l2Src;
+typedef struct _GstV4l2SrcClass GstV4l2SrcClass;
/* global info */
struct _GstV4l2BufferPool {
- GstAtomicInt refcount; /* number of users: 1 for every buffer, 1 for element */
- gint video_fd;
- guint buffer_count;
- GstV4l2Buffer * buffers;
+ GstAtomicInt refcount; /* number of users: 1 for every buffer, 1 for element */
+ gint video_fd;
+ guint buffer_count;
+ GstV4l2Buffer * buffers;
};
struct _GstV4l2Buffer {
- struct v4l2_buffer buffer;
- guint8 * start;
- guint length;
- GstAtomicInt refcount; /* add 1 if in use by element, add 1 if in use by GstBuffer */
- GstV4l2BufferPool * pool;
+ struct v4l2_buffer buffer;
+ guint8 * start;
+ guint length;
+ GstAtomicInt refcount; /* add 1 if in use by element, add 1 if in use by GstBuffer */
+ GstV4l2BufferPool * pool;
};
struct _GstV4l2Src {
- GstV4l2Element v4l2element;
+ GstV4l2Element v4l2element;
- /* pads */
- GstPad *srcpad;
+ /* pads */
+ GstPad *srcpad;
- /* internal lists */
- GSList *formats; /* list of available capture formats */
+ /* internal lists */
+ GSList *formats; /* list of available capture formats */
- /* buffers */
- GstV4l2BufferPool *pool;
+ /* buffers */
+ GstV4l2BufferPool *pool;
- struct v4l2_requestbuffers breq;
- struct v4l2_format format;
+ struct v4l2_requestbuffers breq;
+ struct v4l2_format format;
- /* True if we want to stop */
- gboolean quit, is_capturing;
+ /* True if we want to stop */
+ gboolean quit, is_capturing;
- /* A/V sync... frame counter and internal cache */
- gulong handled;
- gint need_writes;
- GstBuffer *cached_buffer;
- gulong last_seq;
+ /* A/V sync... frame counter and internal cache */
+ gulong handled;
+ gint need_writes;
+ GstBuffer *cached_buffer;
+ gulong last_seq;
- /* clock */
- GstClock *clock;
-
- /* time to substract from clock time to get back to timestamp */
- GstClockTime substract_time;
+ /* clock */
+ GstClock *clock;
+
+ /* time to substract from clock time to get back to timestamp */
+ GstClockTime substract_time;
- /* how are we going to push buffers? */
- gboolean use_fixed_fps;
+ /* how are we going to push buffers? */
+ gboolean use_fixed_fps;
};
struct _GstV4l2SrcClass {
- GstV4l2ElementClass parent_class;
+ GstV4l2ElementClass parent_class;
- void (*frame_capture) (GObject *object);
- void (*frame_drop) (GObject *object);
- void (*frame_insert) (GObject *object);
- void (*frame_lost) (GObject *object,
+ void (*frame_capture) (GObject *object);
+ void (*frame_drop) (GObject *object);
+ void (*frame_insert) (GObject *object);
+ void (*frame_lost) (GObject *object,
gint num_lost);
};
diff --git a/sys/v4l2/gstv4l2tuner.h b/sys/v4l2/gstv4l2tuner.h
index a768ea2f..c51bf196 100644
--- a/sys/v4l2/gstv4l2tuner.h
+++ b/sys/v4l2/gstv4l2tuner.h
@@ -33,10 +33,10 @@ G_BEGIN_DECLS
(gst_v4l2_tuner_channel_get_type ())
#define GST_V4L2_TUNER_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_CHANNEL, \
- GstV4l2TunerChannel))
+ GstV4l2TunerChannel))
#define GST_V4L2_TUNER_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_CHANNEL, \
- GstV4l2TunerChannelClass))
+ GstV4l2TunerChannelClass))
#define GST_IS_V4L2_TUNER_CHANNEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_CHANNEL))
#define GST_IS_V4L2_TUNER_CHANNEL_CLASS(klass) \
@@ -58,10 +58,10 @@ typedef struct _GstV4l2TunerChannelClass {
(gst_v4l2_tuner_norm_get_type ())
#define GST_V4L2_TUNER_NORM(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_NORM, \
- GstV4l2TunerNorm))
+ GstV4l2TunerNorm))
#define GST_V4L2_TUNER_NORM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_NORM, \
- GstV4l2TunerNormClass))
+ GstV4l2TunerNormClass))
#define GST_IS_V4L2_TUNER_NORM(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_NORM))
#define GST_IS_V4L2_TUNER_NORM_CLASS(klass) \
@@ -77,9 +77,9 @@ typedef struct _GstV4l2TunerNormClass {
GstTunerNormClass parent;
} GstV4l2TunerNormClass;
-GType gst_v4l2_tuner_channel_get_type (void);
-GType gst_v4l2_tuner_norm_get_type (void);
+GType gst_v4l2_tuner_channel_get_type (void);
+GType gst_v4l2_tuner_norm_get_type (void);
-void gst_v4l2_tuner_interface_init (GstTunerClass *klass);
+void gst_v4l2_tuner_interface_init (GstTunerClass *klass);
#endif /* __GST_V4L2_TUNER_H__ */
diff --git a/sys/v4l2/gstv4l2xoverlay.h b/sys/v4l2/gstv4l2xoverlay.h
index c59c4536..a1bf5d7d 100644
--- a/sys/v4l2/gstv4l2xoverlay.h
+++ b/sys/v4l2/gstv4l2xoverlay.h
@@ -29,9 +29,9 @@
G_BEGIN_DECLS
-void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass);
+void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass);
-void gst_v4l2_xoverlay_open (GstV4l2Element *v4l2element);
-void gst_v4l2_xoverlay_close (GstV4l2Element *v4l2element);
+void gst_v4l2_xoverlay_open (GstV4l2Element *v4l2element);
+void gst_v4l2_xoverlay_close (GstV4l2Element *v4l2element);
#endif /* __GST_V4L2_X_OVERLAY_H__ */
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c
index fa9f3988..b4b16d97 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -37,9 +37,9 @@
#include "gstv4l2src.h"
#define DEBUG(format, args...) \
- GST_DEBUG_OBJECT (\
- GST_ELEMENT(v4l2element), \
- "V4L2: " format, ##args)
+ GST_DEBUG_OBJECT (\
+ GST_ELEMENT(v4l2element), \
+ "V4L2: " format, ##args)
/******************************************************
diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h
index 537ca72c..5325eadf 100644
--- a/sys/v4l2/v4l2_calls.h
+++ b/sys/v4l2/v4l2_calls.h
@@ -36,86 +36,86 @@
(element->vcap.capabilities & V4L2_CAP_VIDEO_OVERLAY)
/* checks whether the current v4lelement has already been open()'ed or not */
-#define GST_V4L2_CHECK_OPEN(element) \
- if (!GST_V4L2_IS_OPEN(element)) \
- { \
- GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
+#define GST_V4L2_CHECK_OPEN(element) \
+ if (!GST_V4L2_IS_OPEN(element)) \
+ { \
+ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is not open.")), (NULL)); \
- return FALSE; \
+ return FALSE; \
}
/* checks whether the current v4lelement is close()'ed or whether it is still open */
-#define GST_V4L2_CHECK_NOT_OPEN(element) \
- if (GST_V4L2_IS_OPEN(element)) \
- { \
- GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
+#define GST_V4L2_CHECK_NOT_OPEN(element) \
+ if (GST_V4L2_IS_OPEN(element)) \
+ { \
+ GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is open.")), (NULL)); \
- return FALSE; \
+ return FALSE; \
}
/* checks whether the current v4lelement does video overlay */
-#define GST_V4L2_CHECK_OVERLAY(element) \
- if (!GST_V4L2_IS_OVERLAY(element)) \
- { \
+#define GST_V4L2_CHECK_OVERLAY(element) \
+ if (!GST_V4L2_IS_OVERLAY(element)) \
+ { \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(NULL), ("Device cannot handle overlay")); \
- return FALSE; \
+ return FALSE; \
}
/* checks whether we're in capture mode or not */
-#define GST_V4L2_CHECK_ACTIVE(element) \
- if (!GST_V4L2_IS_ACTIVE(element)) \
- { \
+#define GST_V4L2_CHECK_ACTIVE(element) \
+ if (!GST_V4L2_IS_ACTIVE(element)) \
+ { \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
(NULL), ("Device is not in streaming mode")); \
- return FALSE; \
+ return FALSE; \
}
/* checks whether we're out of capture mode or not */
-#define GST_V4L2_CHECK_NOT_ACTIVE(element) \
- if (GST_V4L2_IS_ACTIVE(element)) \
- { \
+#define GST_V4L2_CHECK_NOT_ACTIVE(element) \
+ if (GST_V4L2_IS_ACTIVE(element)) \
+ { \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
(NULL), ("Device is in streaming mode")); \
- return FALSE; \
+ return FALSE; \
}
/* open/close the device */
-gboolean gst_v4l2_open (GstV4l2Element *v4l2element);
-gboolean gst_v4l2_close (GstV4l2Element *v4l2element);
+gboolean gst_v4l2_open (GstV4l2Element *v4l2element);
+gboolean gst_v4l2_close (GstV4l2Element *v4l2element);
/* norm/input/output */
-gboolean gst_v4l2_get_norm (GstV4l2Element *v4l2element,
- v4l2_std_id *norm);
-gboolean gst_v4l2_set_norm (GstV4l2Element *v4l2element,
- v4l2_std_id norm);
-gboolean gst_v4l2_get_input (GstV4l2Element *v4l2element,
- gint *input);
-gboolean gst_v4l2_set_input (GstV4l2Element *v4l2element,
- gint input);
-gboolean gst_v4l2_get_output (GstV4l2Element *v4l2element,
- gint *output);
-gboolean gst_v4l2_set_output (GstV4l2Element *v4l2element,
- gint output);
+gboolean gst_v4l2_get_norm (GstV4l2Element *v4l2element,
+ v4l2_std_id *norm);
+gboolean gst_v4l2_set_norm (GstV4l2Element *v4l2element,
+ v4l2_std_id norm);
+gboolean gst_v4l2_get_input (GstV4l2Element *v4l2element,
+ gint *input);
+gboolean gst_v4l2_set_input (GstV4l2Element *v4l2element,
+ gint input);
+gboolean gst_v4l2_get_output (GstV4l2Element *v4l2element,
+ gint *output);
+gboolean gst_v4l2_set_output (GstV4l2Element *v4l2element,
+ gint output);
/* frequency control */
-gboolean gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
- gint tunernum,
- gulong *frequency);
-gboolean gst_v4l2_set_frequency (GstV4l2Element *v4l2element,
- gint tunernum,
- gulong frequency);
-gboolean gst_v4l2_signal_strength (GstV4l2Element *v4l2element,
- gint tunernum,
- gulong *signal);
+gboolean gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
+ gint tunernum,
+ gulong *frequency);
+gboolean gst_v4l2_set_frequency (GstV4l2Element *v4l2element,
+ gint tunernum,
+ gulong frequency);
+gboolean gst_v4l2_signal_strength (GstV4l2Element *v4l2element,
+ gint tunernum,
+ gulong *signal);
/* attribute control */
-gboolean gst_v4l2_get_attribute (GstV4l2Element *v4l2element,
- int attribute,
- int *value);
-gboolean gst_v4l2_set_attribute (GstV4l2Element *v4l2element,
- int attribute,
- const int value);
+gboolean gst_v4l2_get_attribute (GstV4l2Element *v4l2element,
+ int attribute,
+ int *value);
+gboolean gst_v4l2_set_attribute (GstV4l2Element *v4l2element,
+ int attribute,
+ const int value);
#endif /* __V4L2_CALLS_H__ */
diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c
index 5e8d916f..69717330 100644
--- a/sys/v4l2/v4l2src_calls.c
+++ b/sys/v4l2/v4l2src_calls.c
@@ -40,9 +40,9 @@
#define GST_V4L2_SET_INACTIVE(element) (element)->buffer = NULL
#define DEBUG(format, args...) \
- GST_CAT_DEBUG_OBJECT (\
- v4l2src_debug, v4l2src, \
- "V4L2SRC: " format, ##args)
+ GST_CAT_DEBUG_OBJECT (\
+ v4l2src_debug, v4l2src, \
+ "V4L2SRC: " format, ##args)
/* On some systems MAP_FAILED seems to be missing */
#ifndef MAP_FAILED
diff --git a/sys/v4l2/v4l2src_calls.h b/sys/v4l2/v4l2src_calls.h
index dc5fca0c..d4f271b0 100644
--- a/sys/v4l2/v4l2src_calls.h
+++ b/sys/v4l2/v4l2src_calls.h
@@ -24,30 +24,30 @@
#include "v4l2_calls.h"
-gboolean gst_v4l2src_get_capture (GstV4l2Src *v4l2src);
-gboolean gst_v4l2src_set_capture (GstV4l2Src *v4l2src,
- struct v4l2_fmtdesc *fmt,
- gint width,
- gint height);
-gboolean gst_v4l2src_capture_init (GstV4l2Src *v4l2src);
-gboolean gst_v4l2src_capture_start (GstV4l2Src *v4l2src);
-gint gst_v4l2src_grab_frame (GstV4l2Src *v4l2src);
-guint8 * gst_v4l2src_get_buffer (GstV4l2Src *v4l2src,
- gint num);
-gboolean gst_v4l2src_queue_frame (GstV4l2Src *v4l2src,
- guint i);
-gboolean gst_v4l2src_capture_stop (GstV4l2Src *v4l2src);
-gboolean gst_v4l2src_capture_deinit (GstV4l2Src *v4l2src);
+gboolean gst_v4l2src_get_capture (GstV4l2Src *v4l2src);
+gboolean gst_v4l2src_set_capture (GstV4l2Src *v4l2src,
+ struct v4l2_fmtdesc *fmt,
+ gint width,
+ gint height);
+gboolean gst_v4l2src_capture_init (GstV4l2Src *v4l2src);
+gboolean gst_v4l2src_capture_start (GstV4l2Src *v4l2src);
+gint gst_v4l2src_grab_frame (GstV4l2Src *v4l2src);
+guint8 * gst_v4l2src_get_buffer (GstV4l2Src *v4l2src,
+ gint num);
+gboolean gst_v4l2src_queue_frame (GstV4l2Src *v4l2src,
+ guint i);
+gboolean gst_v4l2src_capture_stop (GstV4l2Src *v4l2src);
+gboolean gst_v4l2src_capture_deinit (GstV4l2Src *v4l2src);
-gboolean gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src);
-gboolean gst_v4l2src_clear_format_list (GstV4l2Src *v4l2src);
+gboolean gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src);
+gboolean gst_v4l2src_clear_format_list (GstV4l2Src *v4l2src);
/* hacky */
-gboolean gst_v4l2src_get_size_limits (GstV4l2Src *v4l2src,
- struct v4l2_fmtdesc *fmt,
- gint *min_w, gint *max_w,
- gint *min_h, gint *max_h);
+gboolean gst_v4l2src_get_size_limits (GstV4l2Src *v4l2src,
+ struct v4l2_fmtdesc *fmt,
+ gint *min_w, gint *max_w,
+ gint *min_h, gint *max_h);
-void gst_v4l2src_free_buffer (GstBuffer *buffer);
+void gst_v4l2src_free_buffer (GstBuffer *buffer);
#endif /* __V4L2SRC_CALLS_H__ */
diff --git a/sys/vcd/vcdsrc.h b/sys/vcd/vcdsrc.h
index 0c349846..21189641 100644
--- a/sys/vcd/vcdsrc.h
+++ b/sys/vcd/vcdsrc.h
@@ -41,9 +41,9 @@ G_BEGIN_DECLS
/* NOTE: per-element flags start with 16 for now */
typedef enum {
- VCDSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
+ VCDSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
- VCDSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
+ VCDSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
} GstVCDSrcFlags;
typedef struct _GstVCDSrc GstVCDSrc;
@@ -73,10 +73,10 @@ struct _GstVCDSrc {
gulong tempoffset;
gboolean discont, flush;
- gulong curoffset; /* current offset in file */
- gulong bytes_per_read; /* bytes per read */
+ gulong curoffset; /* current offset in file */
+ gulong bytes_per_read; /* bytes per read */
- gulong seq; /* buffer sequence number */
+ gulong seq; /* buffer sequence number */
int max_errors;
};