summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2004-03-15 16:32:54 +0000
committerJohan Dahlin <johan@gnome.org>2004-03-15 16:32:54 +0000
commit39fd8a2dbd436cbabe5e336d1145b62c2a885ed5 (patch)
tree61df7da4a9d2b8bdb853af50a27219a8921bf5e4 /sys
parent1633bd8693c54cbc5f6648703a7ecf01548ec55f (diff)
downloadgst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.tar.gz
gst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.tar.bz2
gst-plugins-bad-39fd8a2dbd436cbabe5e336d1145b62c2a885ed5.zip
*.h: Revert indenting
Original commit message from CVS: * *.h: Revert indenting
Diffstat (limited to 'sys')
-rw-r--r--sys/cdrom/gstcdplayer.h41
-rw-r--r--sys/cdrom/gstcdplayer_ioctl.h47
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_bsd.h556
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_irix.h91
-rw-r--r--sys/cdrom/gstcdplayer_ioctl_solaris.h289
-rw-r--r--sys/dxr3/ac3_padder.h47
-rw-r--r--sys/dxr3/dxr3audiosink.h66
-rw-r--r--sys/dxr3/dxr3spusink.h40
-rw-r--r--sys/dxr3/dxr3videosink.h38
-rw-r--r--sys/glsink/ARB_multitexture.h661
-rw-r--r--sys/glsink/EXT_paletted_texture.h221
-rw-r--r--sys/glsink/NV_register_combiners.h361
-rw-r--r--sys/glsink/gstglsink.h127
-rw-r--r--sys/qcam/gstqcamsrc.h48
-rw-r--r--sys/qcam/qcam-Linux.h2
-rw-r--r--sys/qcam/qcam-os.h2
-rw-r--r--sys/qcam/qcam.h117
-rw-r--r--sys/qcam/qcamip.h18
-rw-r--r--sys/v4l2/gstv4l2colorbalance.h12
-rw-r--r--sys/v4l2/gstv4l2element.h68
-rw-r--r--sys/v4l2/gstv4l2src.h97
-rw-r--r--sys/v4l2/gstv4l2tuner.h28
-rw-r--r--sys/v4l2/gstv4l2xoverlay.h13
-rw-r--r--sys/v4l2/v4l2_calls.h60
-rw-r--r--sys/v4l2/v4l2src_calls.h41
-rw-r--r--sys/vcd/vcdsrc.h74
26 files changed, 1405 insertions, 1760 deletions
diff --git a/sys/cdrom/gstcdplayer.h b/sys/cdrom/gstcdplayer.h
index 60d0b606..7c6c4bf9 100644
--- a/sys/cdrom/gstcdplayer.h
+++ b/sys/cdrom/gstcdplayer.h
@@ -35,31 +35,30 @@
typedef struct _CDPlayer CDPlayer;
typedef struct _CDPlayerClass CDPlayerClass;
-struct _CDPlayer
-{
- GstBin element;
+struct _CDPlayer {
+ GstBin element;
+
+ /* properties */
+ gchar *device;
+ gint num_tracks;
+ gint start_track;
+ gint end_track;
+ gint current_track;
+ guint32 cddb_discid;
- /* 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;
+struct _CDPlayerClass {
+ 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);
+GType cdplayer_get_type(void);
+
+#endif
-#endif
diff --git a/sys/cdrom/gstcdplayer_ioctl.h b/sys/cdrom/gstcdplayer_ioctl.h
index 5998276e..65bc2c66 100644
--- a/sys/cdrom/gstcdplayer_ioctl.h
+++ b/sys/cdrom/gstcdplayer_ioctl.h
@@ -28,40 +28,37 @@
#define CDPLAYER_MAX_TRACKS 128
-typedef enum
-{
- CD_PLAYING,
- CD_COMPLETED,
- CD_ERROR
+typedef enum {
+ CD_PLAYING,
+ CD_COMPLETED,
+ CD_ERROR
} CDStatus;
-struct cd_msf
-{
- guint8 minute;
- guint8 second;
- guint8 frame;
+struct cd_msf {
+ 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];
+struct cd {
+ gint fd;
+ gint num_tracks;
+ struct cd_msf tracks[CDPLAYER_MAX_TRACKS];
};
/* these are defined by the different cdrom type header files */
-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);
-guint32 cd_cddb_discid (struct cd *cd);
+guint32 cd_cddb_discid(struct cd *cd);
#endif
diff --git a/sys/cdrom/gstcdplayer_ioctl_bsd.h b/sys/cdrom/gstcdplayer_ioctl_bsd.h
index 34c2d9aa..f8a94cd7 100644
--- a/sys/cdrom/gstcdplayer_ioctl_bsd.h
+++ b/sys/cdrom/gstcdplayer_ioctl_bsd.h
@@ -17,337 +17,329 @@
* Boston, MA 02111-1307, USA.
*/
-#ifdef HAVE_CDROM_BSD_NETBSD /* net & open */
+#ifdef HAVE_CDROM_BSD_NETBSD /* net & open */
#ifndef CDIOREADTOCHDR
#define CDIOREADTOCHDR CDIOREADTOCHEADER
#endif
-gboolean
-cd_init (struct cd *cd, const gchar * device)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+gint cd_current_track(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_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;
- }
+ 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_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;
+ }
+
#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)
+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 fb18c489..2f6be35c 100644
--- a/sys/cdrom/gstcdplayer_ioctl_irix.h
+++ b/sys/cdrom/gstcdplayer_ioctl_irix.h
@@ -22,95 +22,88 @@
#define CDPLAYER(x) ((CDPlayer *)x)
#define FD(x) ((int)x)
-gboolean
-cd_init (struct cd *cd, const gchar * device)
+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)
+gboolean cd_start(struct cd *cd,gint start_track,gint end_track)
{
- if (cd->fd == 0) {
- return FALSE;
- }
-
- cd_fix_track_range (cd, &start_track, &end_track);
+ if (cd->fd == 0) {
+ return FALSE;
+ }
+ cd_fix_track_range(cd,&start_track,&end_track);
+
}
-gboolean
-cd_pause (struct cd * cd)
+gboolean cd_pause(struct cd *cd)
{
}
-gboolean
-cd_resume (struct cd *cd)
+gboolean cd_resume(struct cd *cd)
{
}
-gboolean
-cd_stop (struct cd *cd)
+gboolean cd_stop(struct cd *cd)
{
}
/* -1 for error, 0 for not playing, 1 for playing */
-CDStatus
-cd_status (struct cd *cd)
+CDStatus cd_status(struct cd *cd)
{
}
-gint
-cd_current_track (struct cd *cd)
+gint cd_current_track(struct cd *cd)
{
}
-gboolean
-cd_close (struct cd *cd)
+gboolean cd_close(struct cd *cd)
{
}
+
diff --git a/sys/cdrom/gstcdplayer_ioctl_solaris.h b/sys/cdrom/gstcdplayer_ioctl_solaris.h
index dd91e127..868fb251 100644
--- a/sys/cdrom/gstcdplayer_ioctl_solaris.h
+++ b/sys/cdrom/gstcdplayer_ioctl_solaris.h
@@ -17,195 +17,188 @@
* Boston, MA 02111-1307, USA.
*/
-gboolean
-cd_init (struct cd *cd, const gchar * device)
+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)
+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)
+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)
+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)
+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)
+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)
+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)
+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/ac3_padder.h b/sys/dxr3/ac3_padder.h
index f2ca2faa..c9a7447e 100644
--- a/sys/dxr3/ac3_padder.h
+++ b/sys/dxr3/ac3_padder.h
@@ -34,8 +34,7 @@
/* An IEC958 padded AC3 frame. */
-typedef struct
-{
+typedef struct {
/* IEC header. */
guchar header[AC3P_IEC_HEADER_SIZE];
@@ -48,9 +47,9 @@ typedef struct
guchar bsidmod;
guchar acmod;
/* End of AC3 header. */
-
- unsigned char data[AC3P_IEC_FRAME_SIZE - AC3P_IEC_HEADER_SIZE
- - AC3P_AC3_HEADER_SIZE];
+
+ unsigned char data[AC3P_IEC_FRAME_SIZE - AC3P_IEC_HEADER_SIZE
+ - AC3P_AC3_HEADER_SIZE];
} ac3p_iec958_burst_frame;
@@ -75,37 +74,39 @@ typedef struct
/* The internal state for the padder. */
-typedef struct
-{
- guint state; /* State of the reading automaton. */
+typedef struct {
+ guint state; /* State of the reading automaton. */
- guchar *in_ptr; /* Input pointer, marking the current
- postion in the input buffer. */
- guint remaining; /* The number of bytes remaining in the current
- reading buffer. */
+ guchar *in_ptr; /* Input pointer, marking the current
+ postion in the input buffer. */
+ guint remaining; /* The number of bytes remaining in the current
+ reading buffer. */
- guchar *out_ptr; /* Output pointer, marking the current
- position in the output frame. */
+ guchar *out_ptr; /* Output pointer, marking the current
+ position in the output frame. */
guint bytes_to_copy;
- /* Number of bytes that still must be copied
- to the output frame *during this reading
- stage*. */
+ /* Number of bytes that still must be copied
+ to the output frame *during this reading
+ stage*. */
guint ac3_frame_size;
- /* The size in bytes of the pure AC3 portion
- of the current frame. */
+ /* The size in bytes of the pure AC3 portion
+ of the current frame. */
ac3p_iec958_burst_frame frame;
- /* The current output frame. */
+ /* The current output frame. */
} ac3_padder;
-extern void ac3p_init (ac3_padder * padder);
+extern void
+ac3p_init(ac3_padder *padder);
-extern void ac3p_push_data (ac3_padder * padder, guchar * data, guint size);
+extern void
+ac3p_push_data(ac3_padder *padder, guchar *data, guint size);
-extern int ac3p_parse (ac3_padder * padder);
+extern int
+ac3p_parse(ac3_padder *padder);
/**
diff --git a/sys/dxr3/dxr3audiosink.h b/sys/dxr3/dxr3audiosink.h
index 07527d9f..28bb34ec 100644
--- a/sys/dxr3/dxr3audiosink.h
+++ b/sys/dxr3/dxr3audiosink.h
@@ -27,6 +27,8 @@
#include "ac3_padder.h"
G_BEGIN_DECLS
+
+
#define GST_TYPE_DXR3AUDIOSINK \
(dxr3audiosink_get_type())
#define DXR3AUDIOSINK(obj) \
@@ -37,77 +39,75 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DXR3AUDIOSINK))
#define GST_IS_DXR3AUDIOSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DXR3AUDIOSINK))
+
+
typedef struct _Dxr3AudioSink Dxr3AudioSink;
typedef struct _Dxr3AudioSinkClass Dxr3AudioSinkClass;
-typedef enum
-{
+typedef enum {
DXR3AUDIOSINK_OPEN = GST_ELEMENT_FLAG_LAST,
- DXR3AUDIOSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
+ DXR3AUDIOSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} Dxr3AudioSinkFlags;
/* PCM or AC3? */
-typedef enum
-{
- DXR3AUDIOSINK_MODE_NONE, /* No mode set. */
- DXR3AUDIOSINK_MODE_AC3, /* AC3 out. */
- DXR3AUDIOSINK_MODE_PCM, /* PCM out. */
+typedef enum {
+ DXR3AUDIOSINK_MODE_NONE, /* No mode set. */
+ DXR3AUDIOSINK_MODE_AC3, /* AC3 out. */
+ DXR3AUDIOSINK_MODE_PCM, /* PCM out. */
} Dxr3AudioSinkMode;
/* Information for a delayed SCR set operation. */
-typedef struct
-{
+typedef struct {
struct _Dxr3AudioSink *sink;
guint32 scr;
} Dxr3AudioSinkDelayedSCR;
-struct _Dxr3AudioSink
-{
+struct _Dxr3AudioSink {
GstElement element;
- GstPad *pcm_sinkpad; /* The AC3 audio sink pad. */
- GstPad *ac3_sinkpad; /* The PCM audio sink pad. */
+ GstPad *pcm_sinkpad; /* The AC3 audio sink pad. */
+ GstPad *ac3_sinkpad; /* The PCM audio sink pad. */
- int card_number; /* The number of the card to open. */
+ int card_number; /* The number of the card to open. */
- gchar *audio_filename; /* File name for the audio device. */
- int audio_fd; /* File descriptor for the audio device. */
+ gchar *audio_filename; /* File name for the audio device. */
+ int audio_fd; /* File descriptor for the audio device. */
- gchar *control_filename; /* File name for the control device. */
- int control_fd; /* File descriptor for the control
- device. */
+ gchar *control_filename; /* File name for the control device. */
+ int control_fd; /* File descriptor for the control
+ device. */
- guint64 scr; /* The current System Reference Clock value
- for the audio stream. */
+ guint64 scr; /* The current System Reference Clock value
+ for the audio stream. */
- gboolean digital_pcm; /* Should PCM use the digital or the
- analog output? */
+ gboolean digital_pcm; /* Should PCM use the digital or the
+ analog output? */
- Dxr3AudioSinkMode mode; /* The current sound output mode. */
+ Dxr3AudioSinkMode mode; /* The current sound output mode. */
- gint rate; /* The sampling rate for PCM sound. */
+ gint rate; /* The sampling rate for PCM sound. */
- ac3_padder *padder; /* AC3 to SPDIF padder object. */
+ ac3_padder *padder; /* AC3 to SPDIF padder object. */
- GstClock *clock; /* The clock for this element. */
+ GstClock *clock; /* The clock for this element. */
};
-struct _Dxr3AudioSinkClass
-{
+struct _Dxr3AudioSinkClass {
GstElementClass parent_class;
/* signals */
- void (*flushed) (Dxr3AudioSink * sink);
+ void (*flushed) (Dxr3AudioSink *sink);
};
-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
+
#endif /* __DXR3AUDIOINK_H__ */
diff --git a/sys/dxr3/dxr3spusink.h b/sys/dxr3/dxr3spusink.h
index 51bfa39e..e2551714 100644
--- a/sys/dxr3/dxr3spusink.h
+++ b/sys/dxr3/dxr3spusink.h
@@ -25,6 +25,8 @@
#include <gst/gst.h>
G_BEGIN_DECLS
+
+
#define GST_TYPE_DXR3SPUSINK \
(dxr3spusink_get_type())
#define DXR3SPUSINK(obj) \
@@ -35,49 +37,51 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DXR3SPUSINK))
#define GST_IS_DXR3SPUSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DXR3SPUSINK))
+
+
typedef struct _Dxr3SpuSink Dxr3SpuSink;
typedef struct _Dxr3SpuSinkClass Dxr3SpuSinkClass;
-typedef enum
-{
+typedef enum {
DXR3SPUSINK_OPEN = GST_ELEMENT_FLAG_LAST,
- DXR3SPUSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
+ DXR3SPUSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} Dxr3SpuSinkFlags;
-struct _Dxr3SpuSink
-{
+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
- device. */
+ device. */
GstClock *clock; /* The clock for this element. */
};
-struct _Dxr3SpuSinkClass
-{
+struct _Dxr3SpuSinkClass {
GstElementClass parent_class;
/* Signals */
- void (*set_clut) (Dxr3SpuSink * sink, const guint32 * clut);
- void (*highlight_on) (Dxr3SpuSink * sink, unsigned palette,
- unsigned sx, unsigned sy, unsigned ex, unsigned ey, unsigned pts);
- void (*highlight_off) (Dxr3SpuSink * sink);
- void (*flushed) (Dxr3SpuSink * sink);
+ void (*set_clut) (Dxr3SpuSink *sink, const guint32 *clut);
+ void (*highlight_on) (Dxr3SpuSink *sink, unsigned palette,
+ unsigned sx, unsigned sy,
+ unsigned ex, unsigned ey,
+ unsigned pts);
+ void (*highlight_off) (Dxr3SpuSink *sink);
+ void (*flushed) (Dxr3SpuSink *sink);
};
-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
+
#endif /* __DXR3SPUSINK_H__ */
diff --git a/sys/dxr3/dxr3videosink.h b/sys/dxr3/dxr3videosink.h
index 03aa8c36..b0e5cadf 100644
--- a/sys/dxr3/dxr3videosink.h
+++ b/sys/dxr3/dxr3videosink.h
@@ -25,6 +25,8 @@
#include <gst/gst.h>
G_BEGIN_DECLS
+
+
#define GST_TYPE_DXR3VIDEOSINK \
(dxr3videosink_get_type())
#define DXR3VIDEOSINK(obj) \
@@ -35,19 +37,19 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_DXR3VIDEOSINK))
#define GST_IS_DXR3VIDEOSINK_CLASS(obj) \
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_DXR3VIDEOSINK))
+
+
typedef struct _Dxr3VideoSink Dxr3VideoSink;
typedef struct _Dxr3VideoSinkClass Dxr3VideoSinkClass;
-typedef enum
-{
+typedef enum {
DXR3VIDEOSINK_OPEN = GST_ELEMENT_FLAG_LAST,
- DXR3VIDEOSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
+ DXR3VIDEOSINK_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
} Dxr3VideoSinkFlags;
-struct _Dxr3VideoSink
-{
+struct _Dxr3VideoSink {
GstElement element;
int card_number; /* The number of the card to open. */
@@ -56,40 +58,40 @@ struct _Dxr3VideoSink
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
- device. */
+ int control_fd; /* File descriptor for the control
+ device. */
GstClock *clock; /* The clock for this element. */
GstClockTime last_ts; /* Last timestamp received. */
GstBuffer *cur_buf; /* The buffer we are currently
- building. */
+ building. */
GstClockTime cur_ts; /* Timestamp associated to the
- current buffer. */
+ current buffer. */
guchar scan_state; /* The current state of the MPEG start
- code scanner. */
+ code scanner. */
guint scan_pos; /* The current position of the MPEG
- start code scanner (with respect to
- the start of the current buffer. */
+ start code scanner (with respect to
+ the start of the current buffer. */
guchar parse_state; /* The current state of the MPEG
- sequence parser. */
+ sequence parser. */
};
-struct _Dxr3VideoSinkClass
-{
+struct _Dxr3VideoSinkClass {
GstElementClass parent_class;
/* signals */
- void (*flushed) (Dxr3VideoSink * sink);
+ void (*flushed) (Dxr3VideoSink *sink);
};
-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
+
#endif /* __DXR3VIDEOSINK_H__ */
diff --git a/sys/glsink/ARB_multitexture.h b/sys/glsink/ARB_multitexture.h
index 6718e2fc..36dcf011 100644
--- a/sys/glsink/ARB_multitexture.h
+++ b/sys/glsink/ARB_multitexture.h
@@ -7,42 +7,42 @@
* *
* version 1.0ß *
* *
- *************************************************************/
-
+ *************************************************************/
+
#ifndef __ARB_MULTITEXTURE_H_
#define __ARB_MULTITEXTURE_H_
-
+
/*
* GLOBAL SWITCHES - enable/disable advanced features of this header
*
- */
-#define ARB_MULTITEXTURE_INITIALIZE 1 // enable generic init-routines
+ */
+#define ARB_MULTITEXTURE_INITIALIZE 1 // enable generic init-routines
#ifndef _WIN32
#define GL_GLEXT_PROTOTYPES 1
-#endif /* */
-
+#endif
+
#ifdef __cplusplus
-extern "C"
-{
-
-#endif /* */
-
+extern "C" {
+#endif
+
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
-#endif /* */
-
+#endif
+
#ifndef APIENTRY
#define APIENTRY
-#endif /* */
-
+#endif
+
+
// Header file version number, required by OpenGL ABI for Linux
//#define GL_GLEXT_VERSION 7
-
+
+
/*
* NEW TOKENS TO OPENGL 1.2.1
*
- */
+ */
#ifndef GL_ARB_multitexture
#define GL_TEXTURE0_ARB 0x84C0
#define GL_TEXTURE1_ARB 0x84C1
@@ -80,421 +80,232 @@ extern "C"
#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
#define GL_ARB_multitexture 1
-#endif /* */
-
+#endif
+
#ifndef _WIN32
#ifdef GL_GLEXT_PROTOTYPES
- extern void APIENTRY glActiveTextureARB (GLenum);
- extern void APIENTRY glClientActiveTextureARB (GLenum);
- extern void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
- extern void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
- extern void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
- extern void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
- extern void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
- extern void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
- extern void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
- extern void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
- extern void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
- extern void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
- extern void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
- extern void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
- extern void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
- extern void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
- extern void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
- extern void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
- extern void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble,
- GLdouble);
- extern void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
- extern void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat,
- GLfloat);
- extern void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
- extern void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
- extern void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
- extern void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort,
- GLshort);
- extern void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
- extern void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble,
- GLdouble, GLdouble);
- extern void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
- extern void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat,
- GLfloat, GLfloat);
- extern void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
- extern void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint,
- GLint);
- extern void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
- extern void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort,
- GLshort, GLshort);
- extern void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
-
-#endif // GL_GLEXT_PROTOTYPES
-#else // not _WIN32
- typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
- typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target,
- GLdouble s);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target,
- const GLdouble * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target,
- GLfloat s);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target,
- const GLfloat * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target,
- GLint s);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target,
- const GLint * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target,
- GLshort s);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target,
- const GLshort * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target,
- GLdouble s, GLdouble t);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target,
- const GLdouble * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target,
- GLfloat s, GLfloat t);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target,
- const GLfloat * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target,
- GLint s, GLint t);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target,
- const GLint * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target,
- GLshort s, GLshort t);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target,
- const GLshort * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target,
- GLdouble s, GLdouble t, GLdouble r);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target,
- const GLdouble * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target,
- GLfloat s, GLfloat t, GLfloat r);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target,
- const GLfloat * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target,
- GLint s, GLint t, GLint r);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target,
- const GLint * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target,
- GLshort s, GLshort t, GLshort r);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target,
- const GLshort * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target,
- GLdouble s, GLdouble t, GLdouble r, GLdouble q);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target,
- const GLdouble * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target,
- GLfloat s, GLfloat t, GLfloat r, GLfloat q);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target,
- const GLfloat * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target,
- GLint s, GLint t, GLint r, GLint q);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target,
- const GLint * v);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target,
- GLshort s, GLshort t, GLshort r, GLshort q);
- typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target,
- const GLshort * v);
-
-#endif // _WIN32
-
+extern void APIENTRY glActiveTextureARB (GLenum);
+extern void APIENTRY glClientActiveTextureARB (GLenum);
+extern void APIENTRY glMultiTexCoord1dARB (GLenum, GLdouble);
+extern void APIENTRY glMultiTexCoord1dvARB (GLenum, const GLdouble *);
+extern void APIENTRY glMultiTexCoord1fARB (GLenum, GLfloat);
+extern void APIENTRY glMultiTexCoord1fvARB (GLenum, const GLfloat *);
+extern void APIENTRY glMultiTexCoord1iARB (GLenum, GLint);
+extern void APIENTRY glMultiTexCoord1ivARB (GLenum, const GLint *);
+extern void APIENTRY glMultiTexCoord1sARB (GLenum, GLshort);
+extern void APIENTRY glMultiTexCoord1svARB (GLenum, const GLshort *);
+extern void APIENTRY glMultiTexCoord2dARB (GLenum, GLdouble, GLdouble);
+extern void APIENTRY glMultiTexCoord2dvARB (GLenum, const GLdouble *);
+extern void APIENTRY glMultiTexCoord2fARB (GLenum, GLfloat, GLfloat);
+extern void APIENTRY glMultiTexCoord2fvARB (GLenum, const GLfloat *);
+extern void APIENTRY glMultiTexCoord2iARB (GLenum, GLint, GLint);
+extern void APIENTRY glMultiTexCoord2ivARB (GLenum, const GLint *);
+extern void APIENTRY glMultiTexCoord2sARB (GLenum, GLshort, GLshort);
+extern void APIENTRY glMultiTexCoord2svARB (GLenum, const GLshort *);
+extern void APIENTRY glMultiTexCoord3dARB (GLenum, GLdouble, GLdouble, GLdouble);
+extern void APIENTRY glMultiTexCoord3dvARB (GLenum, const GLdouble *);
+extern void APIENTRY glMultiTexCoord3fARB (GLenum, GLfloat, GLfloat, GLfloat);
+extern void APIENTRY glMultiTexCoord3fvARB (GLenum, const GLfloat *);
+extern void APIENTRY glMultiTexCoord3iARB (GLenum, GLint, GLint, GLint);
+extern void APIENTRY glMultiTexCoord3ivARB (GLenum, const GLint *);
+extern void APIENTRY glMultiTexCoord3sARB (GLenum, GLshort, GLshort, GLshort);
+extern void APIENTRY glMultiTexCoord3svARB (GLenum, const GLshort *);
+extern void APIENTRY glMultiTexCoord4dARB (GLenum, GLdouble, GLdouble, GLdouble, GLdouble);
+extern void APIENTRY glMultiTexCoord4dvARB (GLenum, const GLdouble *);
+extern void APIENTRY glMultiTexCoord4fARB (GLenum, GLfloat, GLfloat, GLfloat, GLfloat);
+extern void APIENTRY glMultiTexCoord4fvARB (GLenum, const GLfloat *);
+extern void APIENTRY glMultiTexCoord4iARB (GLenum, GLint, GLint, GLint, GLint);
+extern void APIENTRY glMultiTexCoord4ivARB (GLenum, const GLint *);
+extern void APIENTRY glMultiTexCoord4sARB (GLenum, GLshort, GLshort, GLshort, GLshort);
+extern void APIENTRY glMultiTexCoord4svARB (GLenum, const GLshort *);
+#endif // GL_GLEXT_PROTOTYPES
+#else // not _WIN32
+typedef void (APIENTRY * PFNGLACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRY * PFNGLCLIENTACTIVETEXTUREARBPROC) (GLenum texture);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1DARBPROC) (GLenum target, GLdouble s);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1FARBPROC) (GLenum target, GLfloat s);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1IARBPROC) (GLenum target, GLint s);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1SARBPROC) (GLenum target, GLshort s);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD1SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2DARBPROC) (GLenum target, GLdouble s, GLdouble t);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2FARBPROC) (GLenum target, GLfloat s, GLfloat t);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2IARBPROC) (GLenum target, GLint s, GLint t);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2SARBPROC) (GLenum target, GLshort s, GLshort t);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD2SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3IARBPROC) (GLenum target, GLint s, GLint t, GLint r);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD3SVARBPROC) (GLenum target, const GLshort *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4DARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4DVARBPROC) (GLenum target, const GLdouble *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4FARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4FVARBPROC) (GLenum target, const GLfloat *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4IARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4IVARBPROC) (GLenum target, const GLint *v);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4SARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+typedef void (APIENTRY * PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLshort *v);
+#endif // _WIN32
+
#ifdef ARB_MULTITEXTURE_INITIALIZE
#include<string.h> // string manipulation for runtime-check
-
+
#ifdef _WIN32
- PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;
- PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB = NULL;
- PFNGLMULTITEXCOORD1DARBPROC glMultiTexCoord1dARB = NULL;
- PFNGLMULTITEXCOORD1DVARBPROC glMultiTexCoord1dvARB = NULL;
- PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1fARB = NULL;
- PFNGLMULTITEXCOORD1FVARBPROC glMultiTexCoord1fvARB = NULL;
- PFNGLMULTITEXCOORD1IARBPROC glMultiTexCoord1iARB = NULL;
- PFNGLMULTITEXCOORD1IVARBPROC glMultiTexCoord1ivARB = NULL;
- PFNGLMULTITEXCOORD1SARBPROC glMultiTexCoord1sARB = NULL;
- PFNGLMULTITEXCOORD1SVARBPROC glMultiTexCoord1svARB = NULL;
- PFNGLMULTITEXCOORD2DARBPROC glMultiTexCoord2dARB = NULL;
- PFNGLMULTITEXCOORD2DVARBPROC glMultiTexCoord2dvARB = NULL;
- PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL;
- PFNGLMULTITEXCOORD2FVARBPROC glMultiTexCoord2fvARB = NULL;
- PFNGLMULTITEXCOORD2IARBPROC glMultiTexCoord2iARB = NULL;
- PFNGLMULTITEXCOORD2IVARBPROC glMultiTexCoord2ivARB = NULL;
- PFNGLMULTITEXCOORD2SARBPROC glMultiTexCoord2sARB = NULL;
- PFNGLMULTITEXCOORD2SVARBPROC glMultiTexCoord2svARB = NULL;
- PFNGLMULTITEXCOORD3DARBPROC glMultiTexCoord3dARB = NULL;
- PFNGLMULTITEXCOORD3DVARBPROC glMultiTexCoord3dvARB = NULL;
- PFNGLMULTITEXCOORD3FARBPROC glMultiTexCoord3fARB = NULL;
- PFNGLMULTITEXCOORD3FVARBPROC glMultiTexCoord3fvARB = NULL;
- PFNGLMULTITEXCOORD3IARBPROC glMultiTexCoord3iARB = NULL;
- PFNGLMULTITEXCOORD3IVARBPROC glMultiTexCoord3ivARB = NULL;
- PFNGLMULTITEXCOORD3SARBPROC glMultiTexCoord3sARB = NULL;
- PFNGLMULTITEXCOORD3SVARBPROC glMultiTexCoord3svARB = NULL;
- PFNGLMULTITEXCOORD4DARBPROC glMultiTexCoord4dARB = NULL;
- PFNGLMULTITEXCOORD4DVARBPROC glMultiTexCoord4dvARB = NULL;
- PFNGLMULTITEXCOORD4FARBPROC glMultiTexCoord4fARB = NULL;
- PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fvARB = NULL;
- PFNGLMULTITEXCOORD4IARBPROC glMultiTexCoord4iARB = NULL;
- PFNGLMULTITEXCOORD4IVARBPROC glMultiTexCoord4ivARB = NULL;
- PFNGLMULTITEXCOORD4SARBPROC glMultiTexCoord4sARB = NULL;
- PFNGLMULTITEXCOORD4SVARBPROC glMultiTexCoord4svARB = NULL;
-
-#endif // _WIN32
- int CheckForARBMultitextureSupport (void)
- {
- const char search[] = "GL_ARB_multitexture";
- int i, pos = 0;
- int maxpos = strlen (search) - 1;
- char extensions[10000];
- printf ("Getting GLstring, context is %p\n", glXGetCurrentContext ());
- strcpy (extensions, (const char *) glGetString (GL_EXTENSIONS));
- printf ("Examinig GLstring\n");
- int len = strlen (extensions);
- for (i = 0; i < len; i++)
- {
- if ((i == 0) || ((i > 1) && extensions[i - 1] == ' ')) {
- pos = 0;
- while (extensions[i] != ' ')
- {
- if (extensions[i] == search[pos])
- pos++;
- if ((pos > maxpos) && extensions[i + 1] == ' ') {
-
- //if (debug)
- {
-
- //fprintf(stderr, search);
- //fprintf(stderr, " supported.\n");
- }
- return 1;
- }
- ++i;
- }
- }
- }
-
- //printf(search);
- //printf(" not supported.\n");
- return 0;
- }
- int GL_ARB_multitexture_Init (void)
- {
- if (!CheckForARBMultitextureSupport ())
- return 0;
-
+PFNGLACTIVETEXTUREARBPROC glActiveTextureARB = NULL;
+PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB = NULL;
+PFNGLMULTITEXCOORD1DARBPROC glMultiTexCoord1dARB = NULL;
+PFNGLMULTITEXCOORD1DVARBPROC glMultiTexCoord1dvARB = NULL;
+PFNGLMULTITEXCOORD1FARBPROC glMultiTexCoord1fARB = NULL;
+PFNGLMULTITEXCOORD1FVARBPROC glMultiTexCoord1fvARB = NULL;
+PFNGLMULTITEXCOORD1IARBPROC glMultiTexCoord1iARB = NULL;
+PFNGLMULTITEXCOORD1IVARBPROC glMultiTexCoord1ivARB = NULL;
+PFNGLMULTITEXCOORD1SARBPROC glMultiTexCoord1sARB = NULL;
+PFNGLMULTITEXCOORD1SVARBPROC glMultiTexCoord1svARB = NULL;
+PFNGLMULTITEXCOORD2DARBPROC glMultiTexCoord2dARB = NULL;
+PFNGLMULTITEXCOORD2DVARBPROC glMultiTexCoord2dvARB = NULL;
+PFNGLMULTITEXCOORD2FARBPROC glMultiTexCoord2fARB = NULL;
+PFNGLMULTITEXCOORD2FVARBPROC glMultiTexCoord2fvARB = NULL;
+PFNGLMULTITEXCOORD2IARBPROC glMultiTexCoord2iARB = NULL;
+PFNGLMULTITEXCOORD2IVARBPROC glMultiTexCoord2ivARB = NULL;
+PFNGLMULTITEXCOORD2SARBPROC glMultiTexCoord2sARB = NULL;
+PFNGLMULTITEXCOORD2SVARBPROC glMultiTexCoord2svARB = NULL;
+PFNGLMULTITEXCOORD3DARBPROC glMultiTexCoord3dARB = NULL;
+PFNGLMULTITEXCOORD3DVARBPROC glMultiTexCoord3dvARB = NULL;
+PFNGLMULTITEXCOORD3FARBPROC glMultiTexCoord3fARB = NULL;
+PFNGLMULTITEXCOORD3FVARBPROC glMultiTexCoord3fvARB = NULL;
+PFNGLMULTITEXCOORD3IARBPROC glMultiTexCoord3iARB = NULL;
+PFNGLMULTITEXCOORD3IVARBPROC glMultiTexCoord3ivARB = NULL;
+PFNGLMULTITEXCOORD3SARBPROC glMultiTexCoord3sARB = NULL;
+PFNGLMULTITEXCOORD3SVARBPROC glMultiTexCoord3svARB = NULL;
+PFNGLMULTITEXCOORD4DARBPROC glMultiTexCoord4dARB = NULL;
+PFNGLMULTITEXCOORD4DVARBPROC glMultiTexCoord4dvARB = NULL;
+PFNGLMULTITEXCOORD4FARBPROC glMultiTexCoord4fARB = NULL;
+PFNGLMULTITEXCOORD4FVARBPROC glMultiTexCoord4fvARB = NULL;
+PFNGLMULTITEXCOORD4IARBPROC glMultiTexCoord4iARB = NULL;
+PFNGLMULTITEXCOORD4IVARBPROC glMultiTexCoord4ivARB = NULL;
+PFNGLMULTITEXCOORD4SARBPROC glMultiTexCoord4sARB = NULL;
+PFNGLMULTITEXCOORD4SVARBPROC glMultiTexCoord4svARB = NULL;
+#endif // _WIN32
+
+int CheckForARBMultitextureSupport(void) {
+ const char search[]="GL_ARB_multitexture";
+ int i, pos=0;
+ int maxpos=strlen(search)-1;
+ char extensions[10000];
+ printf("Getting GLstring, context is %p\n", glXGetCurrentContext());
+ strcpy(extensions,(const char *)glGetString(GL_EXTENSIONS));
+ printf("Examinig GLstring\n");
+ int len=strlen(extensions);
+ for ( i=0; i<len; i++) {
+ if ((i==0) || ((i>1) && extensions[i-1]==' ')) {
+ pos=0;
+ while(extensions[i]!=' ') {
+ if (extensions[i]==search[pos]) pos++;
+ if ((pos>maxpos) && extensions[i+1]==' ') {
+ //if (debug)
+ {
+ //fprintf(stderr, search);
+ //fprintf(stderr, " supported.\n");
+ }
+ return 1;
+ }
+ ++i;
+ }
+ }
+ }
+ //printf(search);
+ //printf(" not supported.\n");
+ return 0;
+}
+
+int GL_ARB_multitexture_Init(void) {
+ if (!CheckForARBMultitextureSupport()) return 0;
#ifdef _WIN32
- glActiveTextureARB =
- (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress ("glActiveTextureARB");
- if (glActiveTextureARB == NULL) {
- fprintf (stderr, "glActiveTextureARB not found.\n");
- return 0;
- }
- glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC)
- wglGetProcAddress ("glClientActiveTextureARB");
- if (glClientActiveTextureARB == NULL) {
- fprintf (stderr, "glClientActiveTextureARB not found.\n");
- return 0;
- }
- glMultiTexCoord1dARB = (PFNGLMULTITEXCOORD1DARBPROC)
- wglGetProcAddress ("glMultiTexCoord1dARB");
- if (glMultiTexCoord1dARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1dARB not found.\n");
- return 0;
- }
- glMultiTexCoord1dvARB = (PFNGLMULTITEXCOORD1DVARBPROC)
- wglGetProcAddress ("glMultiTexCoord1dvARB");
- if (glMultiTexCoord1dvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1dAvRB not found.\n");
- return 0;
- }
- glMultiTexCoord1fARB = (PFNGLMULTITEXCOORD1FARBPROC)
- wglGetProcAddress ("glMultiTexCoord1fARB");
- if (glMultiTexCoord1fARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1fARB not found.\n");
- return 0;
- }
- glMultiTexCoord1fvARB = (PFNGLMULTITEXCOORD1FVARBPROC)
- wglGetProcAddress ("glMultiTexCoord1fvARB");
- if (glMultiTexCoord1fvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1fvARB not found.\n");
- return 0;
- }
- glMultiTexCoord1iARB = (PFNGLMULTITEXCOORD1IARBPROC)
- wglGetProcAddress ("glMultiTexCoord1iARB");
- if (glMultiTexCoord1iARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1iARB not found.\n");
- return 0;
- }
- glMultiTexCoord1ivARB = (PFNGLMULTITEXCOORD1IVARBPROC)
- wglGetProcAddress ("glMultiTexCoord1ivARB");
- if (glMultiTexCoord1ivARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1ivARB not found.\n");
- return 0;
- }
- glMultiTexCoord1sARB = (PFNGLMULTITEXCOORD1SARBPROC)
- wglGetProcAddress ("glMultiTexCoord1sARB");
- if (glMultiTexCoord1sARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1sARB not found.\n");
- return 0;
- }
- glMultiTexCoord1svARB = (PFNGLMULTITEXCOORD1SVARBPROC)
- wglGetProcAddress ("glMultiTexCoord1svARB");
- if (glMultiTexCoord1svARB == NULL) {
- fprintf (stderr, "glMultiTexCoord1svARB not found.\n");
- return 0;
- }
- glMultiTexCoord2dARB = (PFNGLMULTITEXCOORD2DARBPROC)
- wglGetProcAddress ("glMultiTexCoord2dARB");
- if (glMultiTexCoord2dARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2dARB not found.\n");
- return 0;
- }
- glMultiTexCoord2dvARB = (PFNGLMULTITEXCOORD2DVARBPROC)
- wglGetProcAddress ("glMultiTexCoord2dvARB");
- if (glMultiTexCoord2dvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2dAvRB not found.\n");
- return 0;
- }
- glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC)
- wglGetProcAddress ("glMultiTexCoord2fARB");
- if (glMultiTexCoord2fARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2fARB not found.\n");
- return 0;
- }
- glMultiTexCoord2fvARB = (PFNGLMULTITEXCOORD2FVARBPROC)
- wglGetProcAddress ("glMultiTexCoord2fvARB");
- if (glMultiTexCoord2fvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2fvARB not found.\n");
- return 0;
- }
- glMultiTexCoord2iARB = (PFNGLMULTITEXCOORD2IARBPROC)
- wglGetProcAddress ("glMultiTexCoord2iARB");
- if (glMultiTexCoord2iARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2iARB not found.\n");
- return 0;
- }
- glMultiTexCoord2ivARB = (PFNGLMULTITEXCOORD2IVARBPROC)
- wglGetProcAddress ("glMultiTexCoord2ivARB");
- if (glMultiTexCoord2ivARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2ivARB not found.\n");
- return 0;
- }
- glMultiTexCoord2sARB = (PFNGLMULTITEXCOORD2SARBPROC)
- wglGetProcAddress ("glMultiTexCoord2sARB");
- if (glMultiTexCoord2sARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2sARB not found.\n");
- return 0;
- }
- glMultiTexCoord2svARB = (PFNGLMULTITEXCOORD2SVARBPROC)
- wglGetProcAddress ("glMultiTexCoord2svARB");
- if (glMultiTexCoord2svARB == NULL) {
- fprintf (stderr, "glMultiTexCoord2svARB not found.\n");
- return 0;
- }
- glMultiTexCoord3dARB = (PFNGLMULTITEXCOORD3DARBPROC)
- wglGetProcAddress ("glMultiTexCoord3dARB");
- if (glMultiTexCoord3dARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3dARB not found.\n");
- return 0;
- }
- glMultiTexCoord3dvARB = (PFNGLMULTITEXCOORD3DVARBPROC)
- wglGetProcAddress ("glMultiTexCoord3dvARB");
- if (glMultiTexCoord3dvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3dAvRB not found.\n");
- return 0;
- }
- glMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC)
- wglGetProcAddress ("glMultiTexCoord3fARB");
- if (glMultiTexCoord3fARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3fARB not found.\n");
- return 0;
- }
- glMultiTexCoord3fvARB = (PFNGLMULTITEXCOORD3FVARBPROC)
- wglGetProcAddress ("glMultiTexCoord3fvARB");
- if (glMultiTexCoord3fvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3fvARB not found.\n");
- return 0;
- }
- glMultiTexCoord3iARB = (PFNGLMULTITEXCOORD3IARBPROC)
- wglGetProcAddress ("glMultiTexCoord3iARB");
- if (glMultiTexCoord3iARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3iARB not found.\n");
- return 0;
- }
- glMultiTexCoord3ivARB = (PFNGLMULTITEXCOORD3IVARBPROC)
- wglGetProcAddress ("glMultiTexCoord3ivARB");
- if (glMultiTexCoord3ivARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3ivARB not found.\n");
- return 0;
- }
- glMultiTexCoord3sARB = (PFNGLMULTITEXCOORD3SARBPROC)
- wglGetProcAddress ("glMultiTexCoord3sARB");
- if (glMultiTexCoord3sARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3sARB not found.\n");
- return 0;
- }
- glMultiTexCoord3svARB = (PFNGLMULTITEXCOORD3SVARBPROC)
- wglGetProcAddress ("glMultiTexCoord3svARB");
- if (glMultiTexCoord3svARB == NULL) {
- fprintf (stderr, "glMultiTexCoord3svARB not found.\n");
- return 0;
- }
- glMultiTexCoord4dARB = (PFNGLMULTITEXCOORD4DARBPROC)
- wglGetProcAddress ("glMultiTexCoord4dARB");
- if (glMultiTexCoord4dARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4dARB not found.\n");
- return 0;
- }
- glMultiTexCoord4dvARB = (PFNGLMULTITEXCOORD4DVARBPROC)
- wglGetProcAddress ("glMultiTexCoord4dvARB");
- if (glMultiTexCoord4dvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4dAvRB not found.\n");
- return 0;
- }
- glMultiTexCoord4fARB = (PFNGLMULTITEXCOORD4FARBPROC)
- wglGetProcAddress ("glMultiTexCoord4fARB");
- if (glMultiTexCoord4fARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4fARB not found.\n");
- return 0;
- }
- glMultiTexCoord4fvARB = (PFNGLMULTITEXCOORD4FVARBPROC)
- wglGetProcAddress ("glMultiTexCoord4fvARB");
- if (glMultiTexCoord4fvARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4fvARB not found.\n");
- return 0;
- }
- glMultiTexCoord4iARB = (PFNGLMULTITEXCOORD4IARBPROC)
- wglGetProcAddress ("glMultiTexCoord4iARB");
- if (glMultiTexCoord4iARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4iARB not found.\n");
- return 0;
- }
- glMultiTexCoord4ivARB = (PFNGLMULTITEXCOORD4IVARBPROC)
- wglGetProcAddress ("glMultiTexCoord4ivARB");
- if (glMultiTexCoord4ivARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4ivARB not found.\n");
- return 0;
- }
- glMultiTexCoord4sARB = (PFNGLMULTITEXCOORD4SARBPROC)
- wglGetProcAddress ("glMultiTexCoord4sARB");
- if (glMultiTexCoord4sARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4sARB not found.\n");
- return 0;
- }
- glMultiTexCoord4svARB = (PFNGLMULTITEXCOORD4SVARBPROC)
- wglGetProcAddress ("glMultiTexCoord4svARB");
- if (glMultiTexCoord4svARB == NULL) {
- fprintf (stderr, "glMultiTexCoord4svARB not found.\n");
- return 0;
- }
-
+ glActiveTextureARB = (PFNGLACTIVETEXTUREARBPROC) wglGetProcAddress("glActiveTextureARB");
+ if (glActiveTextureARB==NULL) {fprintf(stderr,"glActiveTextureARB not found.\n"); return 0; }
+ glClientActiveTextureARB = (PFNGLCLIENTACTIVETEXTUREARBPROC) wglGetProcAddress("glClientActiveTextureARB");
+ if (glClientActiveTextureARB==NULL) {fprintf(stderr,"glClientActiveTextureARB not found.\n"); return 0; }
+ glMultiTexCoord1dARB = (PFNGLMULTITEXCOORD1DARBPROC) wglGetProcAddress("glMultiTexCoord1dARB");
+ if (glMultiTexCoord1dARB==NULL) {fprintf(stderr,"glMultiTexCoord1dARB not found.\n"); return 0; }
+ glMultiTexCoord1dvARB = (PFNGLMULTITEXCOORD1DVARBPROC) wglGetProcAddress("glMultiTexCoord1dvARB");
+ if (glMultiTexCoord1dvARB==NULL) {fprintf(stderr,"glMultiTexCoord1dAvRB not found.\n"); return 0; }
+ glMultiTexCoord1fARB = (PFNGLMULTITEXCOORD1FARBPROC) wglGetProcAddress("glMultiTexCoord1fARB");
+ if (glMultiTexCoord1fARB==NULL) {fprintf(stderr,"glMultiTexCoord1fARB not found.\n"); return 0; }
+ glMultiTexCoord1fvARB = (PFNGLMULTITEXCOORD1FVARBPROC) wglGetProcAddress("glMultiTexCoord1fvARB");
+ if (glMultiTexCoord1fvARB==NULL) {fprintf(stderr,"glMultiTexCoord1fvARB not found.\n"); return 0; }
+ glMultiTexCoord1iARB = (PFNGLMULTITEXCOORD1IARBPROC) wglGetProcAddress("glMultiTexCoord1iARB");
+ if (glMultiTexCoord1iARB==NULL) {fprintf(stderr,"glMultiTexCoord1iARB not found.\n"); return 0; }
+ glMultiTexCoord1ivARB = (PFNGLMULTITEXCOORD1IVARBPROC) wglGetProcAddress("glMultiTexCoord1ivARB");
+ if (glMultiTexCoord1ivARB==NULL) {fprintf(stderr,"glMultiTexCoord1ivARB not found.\n"); return 0; }
+ glMultiTexCoord1sARB = (PFNGLMULTITEXCOORD1SARBPROC) wglGetProcAddress("glMultiTexCoord1sARB");
+ if (glMultiTexCoord1sARB==NULL) {fprintf(stderr,"glMultiTexCoord1sARB not found.\n"); return 0; }
+ glMultiTexCoord1svARB = (PFNGLMULTITEXCOORD1SVARBPROC) wglGetProcAddress("glMultiTexCoord1svARB");
+ if (glMultiTexCoord1svARB==NULL) {fprintf(stderr,"glMultiTexCoord1svARB not found.\n"); return 0; }
+ glMultiTexCoord2dARB = (PFNGLMULTITEXCOORD2DARBPROC) wglGetProcAddress("glMultiTexCoord2dARB");
+ if (glMultiTexCoord2dARB==NULL) {fprintf(stderr,"glMultiTexCoord2dARB not found.\n"); return 0; }
+ glMultiTexCoord2dvARB = (PFNGLMULTITEXCOORD2DVARBPROC) wglGetProcAddress("glMultiTexCoord2dvARB");
+ if (glMultiTexCoord2dvARB==NULL) {fprintf(stderr,"glMultiTexCoord2dAvRB not found.\n"); return 0; }
+ glMultiTexCoord2fARB = (PFNGLMULTITEXCOORD2FARBPROC) wglGetProcAddress("glMultiTexCoord2fARB");
+ if (glMultiTexCoord2fARB==NULL) {fprintf(stderr,"glMultiTexCoord2fARB not found.\n"); return 0; }
+ glMultiTexCoord2fvARB = (PFNGLMULTITEXCOORD2FVARBPROC) wglGetProcAddress("glMultiTexCoord2fvARB");
+ if (glMultiTexCoord2fvARB==NULL) {fprintf(stderr,"glMultiTexCoord2fvARB not found.\n"); return 0; }
+ glMultiTexCoord2iARB = (PFNGLMULTITEXCOORD2IARBPROC) wglGetProcAddress("glMultiTexCoord2iARB");
+ if (glMultiTexCoord2iARB==NULL) {fprintf(stderr,"glMultiTexCoord2iARB not found.\n"); return 0; }
+ glMultiTexCoord2ivARB = (PFNGLMULTITEXCOORD2IVARBPROC) wglGetProcAddress("glMultiTexCoord2ivARB");
+ if (glMultiTexCoord2ivARB==NULL) {fprintf(stderr,"glMultiTexCoord2ivARB not found.\n"); return 0; }
+ glMultiTexCoord2sARB = (PFNGLMULTITEXCOORD2SARBPROC) wglGetProcAddress("glMultiTexCoord2sARB");
+ if (glMultiTexCoord2sARB==NULL) {fprintf(stderr,"glMultiTexCoord2sARB not found.\n"); return 0; }
+ glMultiTexCoord2svARB = (PFNGLMULTITEXCOORD2SVARBPROC) wglGetProcAddress("glMultiTexCoord2svARB");
+ if (glMultiTexCoord2svARB==NULL) {fprintf(stderr,"glMultiTexCoord2svARB not found.\n"); return 0; }
+ glMultiTexCoord3dARB = (PFNGLMULTITEXCOORD3DARBPROC) wglGetProcAddress("glMultiTexCoord3dARB");
+ if (glMultiTexCoord3dARB==NULL) {fprintf(stderr,"glMultiTexCoord3dARB not found.\n"); return 0; }
+ glMultiTexCoord3dvARB = (PFNGLMULTITEXCOORD3DVARBPROC) wglGetProcAddress("glMultiTexCoord3dvARB");
+ if (glMultiTexCoord3dvARB==NULL) {fprintf(stderr,"glMultiTexCoord3dAvRB not found.\n"); return 0; }
+ glMultiTexCoord3fARB = (PFNGLMULTITEXCOORD3FARBPROC) wglGetProcAddress("glMultiTexCoord3fARB");
+ if (glMultiTexCoord3fARB==NULL) {fprintf(stderr,"glMultiTexCoord3fARB not found.\n"); return 0; }
+ glMultiTexCoord3fvARB = (PFNGLMULTITEXCOORD3FVARBPROC) wglGetProcAddress("glMultiTexCoord3fvARB");
+ if (glMultiTexCoord3fvARB==NULL) {fprintf(stderr,"glMultiTexCoord3fvARB not found.\n"); return 0; }
+ glMultiTexCoord3iARB = (PFNGLMULTITEXCOORD3IARBPROC) wglGetProcAddress("glMultiTexCoord3iARB");
+ if (glMultiTexCoord3iARB==NULL) {fprintf(stderr,"glMultiTexCoord3iARB not found.\n"); return 0; }
+ glMultiTexCoord3ivARB = (PFNGLMULTITEXCOORD3IVARBPROC) wglGetProcAddress("glMultiTexCoord3ivARB");
+ if (glMultiTexCoord3ivARB==NULL) {fprintf(stderr,"glMultiTexCoord3ivARB not found.\n"); return 0; }
+ glMultiTexCoord3sARB = (PFNGLMULTITEXCOORD3SARBPROC) wglGetProcAddress("glMultiTexCoord3sARB");
+ if (glMultiTexCoord3sARB==NULL) {fprintf(stderr,"glMultiTexCoord3sARB not found.\n"); return 0; }
+ glMultiTexCoord3svARB = (PFNGLMULTITEXCOORD3SVARBPROC) wglGetProcAddress("glMultiTexCoord3svARB");
+ if (glMultiTexCoord3svARB==NULL) {fprintf(stderr,"glMultiTexCoord3svARB not found.\n"); return 0; }
+ glMultiTexCoord4dARB = (PFNGLMULTITEXCOORD4DARBPROC) wglGetProcAddress("glMultiTexCoord4dARB");
+ if (glMultiTexCoord4dARB==NULL) {fprintf(stderr,"glMultiTexCoord4dARB not found.\n"); return 0; }
+ glMultiTexCoord4dvARB = (PFNGLMULTITEXCOORD4DVARBPROC) wglGetProcAddress("glMultiTexCoord4dvARB");
+ if (glMultiTexCoord4dvARB==NULL) {fprintf(stderr,"glMultiTexCoord4dAvRB not found.\n"); return 0; }
+ glMultiTexCoord4fARB = (PFNGLMULTITEXCOORD4FARBPROC) wglGetProcAddress("glMultiTexCoord4fARB");
+ if (glMultiTexCoord4fARB==NULL) {fprintf(stderr,"glMultiTexCoord4fARB not found.\n"); return 0; }
+ glMultiTexCoord4fvARB = (PFNGLMULTITEXCOORD4FVARBPROC) wglGetProcAddress("glMultiTexCoord4fvARB");
+ if (glMultiTexCoord4fvARB==NULL) {fprintf(stderr,"glMultiTexCoord4fvARB not found.\n"); return 0; }
+ glMultiTexCoord4iARB = (PFNGLMULTITEXCOORD4IARBPROC) wglGetProcAddress("glMultiTexCoord4iARB");
+ if (glMultiTexCoord4iARB==NULL) {fprintf(stderr,"glMultiTexCoord4iARB not found.\n"); return 0; }
+ glMultiTexCoord4ivARB = (PFNGLMULTITEXCOORD4IVARBPROC) wglGetProcAddress("glMultiTexCoord4ivARB");
+ if (glMultiTexCoord4ivARB==NULL) {fprintf(stderr,"glMultiTexCoord4ivARB not found.\n"); return 0; }
+ glMultiTexCoord4sARB = (PFNGLMULTITEXCOORD4SARBPROC) wglGetProcAddress("glMultiTexCoord4sARB");
+ if (glMultiTexCoord4sARB==NULL) {fprintf(stderr,"glMultiTexCoord4sARB not found.\n"); return 0; }
+ glMultiTexCoord4svARB = (PFNGLMULTITEXCOORD4SVARBPROC) wglGetProcAddress("glMultiTexCoord4svARB");
+ if (glMultiTexCoord4svARB==NULL) {fprintf(stderr,"glMultiTexCoord4svARB not found.\n"); return 0; }
#endif // _WIN32
- return 1;
- }
-
+ return 1;
+}
+
#endif // ARB_MULTITEXTURE_INITIALIZE
-
+
#ifdef __cplusplus
-}
-
+}
+#endif
-#endif /* */
-
#endif // not __ARB_MULTITEXTURE_H_
diff --git a/sys/glsink/EXT_paletted_texture.h b/sys/glsink/EXT_paletted_texture.h
index 7cc3e5d9..37e9a9bf 100644
--- a/sys/glsink/EXT_paletted_texture.h
+++ b/sys/glsink/EXT_paletted_texture.h
@@ -7,42 +7,42 @@
* *
* version 1.0ß *
* *
- *************************************************************/
-
+ *************************************************************/
+
#ifndef __EXT_paletted_texture_H_
#define __EXT_paletted_texture_H_
-
+
/*
* GLOBAL SWITCHES - enable/disable advanced features of this header
*
- */
-#define EXT_PALETTED_TEXTURE_INITIALIZE 1 // enable generic init-routines
+ */
+#define EXT_PALETTED_TEXTURE_INITIALIZE 1 // enable generic init-routines
#ifndef _WIN32
#define GL_GLEXT_PROTOTYPES 1
-#endif /* */
-
+#endif
+
#ifdef __cplusplus
-extern "C"
-{
-
-#endif /* */
-
+extern "C" {
+#endif
+
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
-#endif /* */
-
+#endif
+
#ifndef APIENTRY
#define APIENTRY
-#endif /* */
-
+#endif
+
+
// Header file version number, required by OpenGL ABI for Linux
//#define GL_GLEXT_VERSION 7
-
+
+
/*
* NEW TOKENS TO OPENGL 1.2.1
*
- */
+ */
#ifndef GL_EXT_paletted_texture
#define GL_COLOR_INDEX1_EXT 0x80E2
#define GL_COLOR_INDEX2_EXT 0x80E3
@@ -60,128 +60,83 @@ extern "C"
#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
#define GL_EXT_paletted_texture 1
-#endif /* */
-
+#endif
+
#ifndef _WIN32
#ifdef GL_GLEXT_PROTOTYPES
- extern void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum,
- const GLvoid *);
- extern void APIENTRY glColorSubTableEXT (GLenum, GLsizei, GLsizei, GLenum,
- GLenum, const GLvoid *);
- extern void APIENTRY glGetColorTableEXT (GLenum, GLenum, GLenum, GLvoid *);
- extern void APIENTRY glGetColorTableParameterivEXT (GLenum, GLenum,
- GLint *);
- extern void APIENTRY glGetColorTableParameterfvEXT (GLenum, GLenum,
- GLfloat *);
-
-#endif // GL_GLEXT_PROTOTYPES
-#else // _WIN32
- typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target,
- GLenum internalFormat, GLsizei width, GLenum format, GLenum type,
- const GLvoid * data);
- typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target,
- GLsizei start, GLsizei count, GLenum format, GLenum type,
- const GLvoid * data);
- typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC) (GLenum target,
- GLenum format, GLenum type, GLvoid * data);
- typedef void (APIENTRY *
- PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname,
- GLint * params);
- typedef void (APIENTRY *
- PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname,
- GLfloat * params);
-
-#endif // not _WIN32
-
+extern void APIENTRY glColorTableEXT (GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *);
+extern void APIENTRY glColorSubTableEXT(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *);
+extern void APIENTRY glGetColorTableEXT(GLenum, GLenum, GLenum, GLvoid *);
+extern void APIENTRY glGetColorTableParameterivEXT(GLenum, GLenum, GLint *);
+extern void APIENTRY glGetColorTableParameterfvEXT(GLenum, GLenum, GLfloat *);
+#endif // GL_GLEXT_PROTOTYPES
+#else // _WIN32
+typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC)(GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC)(GLenum target, GLenum format, GLenum type, GLvoid *data);
+typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)(GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)(GLenum target, GLenum pname, GLfloat *params);
+#endif // not _WIN32
+
#ifdef EXT_PALETTED_TEXTURE_INITIALIZE
-#include<string.h> // string manipulation for runtime-check
-
+#include<string.h> // string manipulation for runtime-check
+
#ifdef _WIN32
- PFNGLCOLORTABLEEXTPROC glColorTableEXT = NULL;
- PFNGLCOLORSUBTABLEEXTPROC glColorSubTableEXT = NULL;
- PFNGLGETCOLORTABLEEXTPROC glGetColorTableEXT = NULL;
- PFNGLGETCOLORTABLEPARAMETERIVEXTPROC glGetColorTableParameterivEXT = NULL;
- PFNGLGETCOLORTABLEPARAMETERFVEXTPROC glGetColorTableParameterfvEXT = NULL;
-
-#endif // _WIN32
- int CheckForEXTPalettedTextureSupport (void)
- {
- const char search[] = "GL_EXT_paletted_texture";
- int i, pos = 0;
- int maxpos = strlen (search) - 1;
- char extensions[10000];
- strcpy (extensions, (const char *) glGetString (GL_EXTENSIONS));
- int len = strlen (extensions);
- for (i = 0; i < len; i++)
- {
- if ((i == 0) || ((i > 1) && extensions[i - 1] == ' ')) {
- pos = 0;
- while (extensions[i] != ' ')
- {
- if (extensions[i] == search[pos])
- pos++;
- if ((pos > maxpos) && extensions[i + 1] == ' ') {
-
- //printf(search);
- //printf(" supported.\n");
- return 1;
- }
- i++;
- }
- }
- }
-
- //printf(search);
- //printf(" not supported.\n");
- return 0;
- }
- int GL_EXT_paletted_texture_Init (void)
- {
- if (!CheckForEXTPalettedTextureSupport ())
- return 0;
-
+PFNGLCOLORTABLEEXTPROC glColorTableEXT = NULL;
+PFNGLCOLORSUBTABLEEXTPROC glColorSubTableEXT = NULL;
+PFNGLGETCOLORTABLEEXTPROC glGetColorTableEXT = NULL;
+PFNGLGETCOLORTABLEPARAMETERIVEXTPROC glGetColorTableParameterivEXT = NULL;
+PFNGLGETCOLORTABLEPARAMETERFVEXTPROC glGetColorTableParameterfvEXT = NULL;
+#endif // _WIN32
+
+int CheckForEXTPalettedTextureSupport(void) {
+ const char search[]="GL_EXT_paletted_texture";
+ int i, pos=0;
+ int maxpos=strlen(search)-1;
+ char extensions[10000];
+ strcpy(extensions,(const char *)glGetString(GL_EXTENSIONS));
+ int len=strlen(extensions);
+ for (i=0; i<len; i++) {
+ if ((i==0) || ((i>1) && extensions[i-1]==' ')) {
+ pos=0;
+ while(extensions[i]!=' ') {
+ if (extensions[i]==search[pos]) pos++;
+ if ((pos>maxpos) && extensions[i+1]==' ') {
+ //printf(search);
+ //printf(" supported.\n");
+ return 1;
+ }
+ i++;
+ }
+ }
+ }
+ //printf(search);
+ //printf(" not supported.\n");
+ return 0;
+}
+
+int GL_EXT_paletted_texture_Init(void) {
+ if (!CheckForEXTPalettedTextureSupport()) return 0;
+
#ifdef _WIN32
- glColorTableEXT =
- (PFNGLCOLORTABLEEXTPROC) wglGetProcAddress ("glColorTableEXT");
- if (glColorTableEXT == NULL) {
- fprintf (stderr, "glColorTableEXT not found.\n");
- return 0;
- }
- glColorSubTableEXT =
- (PFNGLCOLORSUBTABLEEXTPROC) wglGetProcAddress ("glColorSubTableEXT");
- if (glColorSubTableEXT == NULL) {
- fprintf (stderr, "glColorSubTableEXT not found.\n");
- return 0;
- }
- glGetColorTableEXT =
- (PFNGLGETCOLORTABLEEXTPROC) wglGetProcAddress ("glGetColorTableEXT");
- if (glGetColorTableEXT == NULL) {
- fprintf (stderr, "glGetColorTableEXT not found.\n");
- return 0;
- }
- glGetColorTableParameterivEXT = (PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)
- wglGetProcAddress ("glGetColorTableParameterivEXT");
- if (glGetColorTableParameterivEXT == NULL) {
- fprintf (stderr, "glGetColorTableParameterivEXT not found.\n");
- return 0;
- }
- glGetColorTableParameterfvEXT = (PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)
- wglGetProcAddress ("glGetColorTableParameterfvEXT");
- if (glGetColorTableParameterfvEXT == NULL) {
- fprintf (stderr, "glGetColorTableParameterfvEXT not found.\n");
- return 0;
- }
-
+ glColorTableEXT = (PFNGLCOLORTABLEEXTPROC) wglGetProcAddress("glColorTableEXT");
+ if (glColorTableEXT==NULL) {fprintf(stderr,"glColorTableEXT not found.\n"); return 0;}
+ glColorSubTableEXT = (PFNGLCOLORSUBTABLEEXTPROC) wglGetProcAddress("glColorSubTableEXT");
+ if (glColorSubTableEXT==NULL) {fprintf(stderr,"glColorSubTableEXT not found.\n"); return 0;}
+ glGetColorTableEXT = (PFNGLGETCOLORTABLEEXTPROC) wglGetProcAddress("glGetColorTableEXT");
+ if (glGetColorTableEXT==NULL) {fprintf(stderr,"glGetColorTableEXT not found.\n"); return 0;}
+ glGetColorTableParameterivEXT = (PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) wglGetProcAddress("glGetColorTableParameterivEXT");
+ if (glGetColorTableParameterivEXT==NULL) {fprintf(stderr,"glGetColorTableParameterivEXT not found.\n"); return 0;}
+ glGetColorTableParameterfvEXT = (PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) wglGetProcAddress("glGetColorTableParameterfvEXT");
+ if (glGetColorTableParameterfvEXT==NULL) {fprintf(stderr,"glGetColorTableParameterfvEXT not found.\n"); return 0;}
#endif // _WIN32
- return 1;
- }
-
+ return 1;
+}
+
#endif // EXT_PALETTED_TEXTURE_INITIALIZE
-
+
#ifdef __cplusplus
-}
-
+}
+#endif
-#endif /* */
-
#endif // not __EXT_PALETTED_TEXTURE_H_
diff --git a/sys/glsink/NV_register_combiners.h b/sys/glsink/NV_register_combiners.h
index 83f33edc..52b74c39 100644
--- a/sys/glsink/NV_register_combiners.h
+++ b/sys/glsink/NV_register_combiners.h
@@ -7,42 +7,42 @@
* *
* version 2.0ß *
* *
- *************************************************************/
-
+ *************************************************************/
+
#ifndef __NV_register_combiners_H_
#define __NV_register_combiners_H_
-
+
/*
* GLOBAL SWITCHES - enable/disable advanced features of this header
*
- */
-#define NV_REGISTER_COMBINERS_INITIALIZE 1 // enable generic init-routines
+ */
+#define NV_REGISTER_COMBINERS_INITIALIZE 1 // enable generic init-routines
#ifndef _WIN32
#define GL_GLEXT_PROTOTYPES 1
-#endif /* */
-
+#endif
+
#ifdef __cplusplus
-extern "C"
-{
-
-#endif /* */
-
+extern "C" {
+#endif
+
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
-#endif /* */
-
+#endif
+
#ifndef APIENTRY
#define APIENTRY
-#endif /* */
-
+#endif
+
+
// Header file version number, required by OpenGL ABI for Linux
//#define GL_GLEXT_VERSION 7
-
+
+
/*
* NEW TOKENS TO OPENGL 1.2.1
*
- */
+ */
#ifndef GL_NV_register_combiners
#define GL_REGISTER_COMBINERS_NV 0x8522
#define GL_COMBINER0_NV 0x8550
@@ -96,228 +96,123 @@ extern "C"
#define GL_COLOR_SUM_CLAMP_NV 0x854F
#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
#define GL_NV_register_combiners 1
-#endif /* */
-
+#endif
+
#ifndef _WIN32
#ifdef GL_GLEXT_PROTOTYPES
- extern void APIENTRY glCombinerParameterfvNV (GLenum, const GLfloat *);
- extern void APIENTRY glCombinerParameterivNV (GLenum, const GLint *);
- extern void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
- extern void APIENTRY glCombinerParameteriNV (GLenum, GLint);
- extern void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum,
- GLenum, GLenum);
- extern void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum,
- GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
- extern void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum,
- GLenum);
- extern void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum,
- GLenum, GLenum, GLfloat *);
- extern void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum,
- GLenum, GLenum, GLint *);
- extern void APIENTRY glGetCombinerOutputParameterfvNV (GLenum, GLenum,
- GLenum, GLfloat *);
- extern void APIENTRY glGetCombinerOutputParameterivNV (GLenum, GLenum,
- GLenum, GLint *);
- extern void APIENTRY glGetFinalCombinerInputParameterfvNV (GLenum, GLenum,
- GLfloat *);
- extern void APIENTRY glGetFinalCombinerInputParameterivNV (GLenum, GLenum,
- GLint *);
-
-#endif // GL_GLEXT_PROTOTYPES
-#else // _WIN32
- typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname,
- const GLfloat * params);
- typedef void (APIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname,
- const GLint * params);
- typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname,
- GLfloat param);
- typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname,
- GLint param);
- typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage,
- GLenum portion, GLenum variable, GLenum input, GLenum mapping,
- GLenum componentUsage);
- typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage,
- GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput,
- GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct,
- GLboolean muxSum);
- typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable,
- GLenum input, GLenum mapping, GLenum componentUsage);
- typedef void (APIENTRY *
- PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion,
- GLenum variable, GLenum pname, GLfloat * params);
- typedef void (APIENTRY *
- PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion,
- GLenum variable, GLenum pname, GLint * params);
- typedef void (APIENTRY *
- PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion,
- GLenum pname, GLfloat * params);
- typedef void (APIENTRY *
- PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion,
- GLenum pname, GLint * params);
- typedef void (APIENTRY *
- PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable,
- GLenum pname, GLfloat * params);
- typedef void (APIENTRY *
- PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable,
- GLenum pname, GLint * params);
-
-#endif // not _WIN32
-
+extern void APIENTRY glCombinerParameterfvNV(GLenum, const GLfloat *);
+extern void APIENTRY glCombinerParameterivNV(GLenum, const GLint *);
+extern void APIENTRY glCombinerParameterfNV (GLenum, GLfloat);
+extern void APIENTRY glCombinerParameteriNV (GLenum, GLint);
+extern void APIENTRY glCombinerInputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum);
+extern void APIENTRY glCombinerOutputNV (GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean);
+extern void APIENTRY glFinalCombinerInputNV (GLenum, GLenum, GLenum, GLenum);
+extern void APIENTRY glGetCombinerInputParameterfvNV (GLenum, GLenum, GLenum, GLenum, GLfloat *);
+extern void APIENTRY glGetCombinerInputParameterivNV (GLenum, GLenum, GLenum, GLenum, GLint *);
+extern void APIENTRY glGetCombinerOutputParameterfvNV(GLenum, GLenum, GLenum, GLfloat *);
+extern void APIENTRY glGetCombinerOutputParameterivNV(GLenum, GLenum, GLenum, GLint *);
+extern void APIENTRY glGetFinalCombinerInputParameterfvNV(GLenum, GLenum, GLfloat *);
+extern void APIENTRY glGetFinalCombinerInputParameterivNV(GLenum, GLenum, GLint *);
+#endif // GL_GLEXT_PROTOTYPES
+#else // _WIN32
+typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRY * PFNGLCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
+typedef void (APIENTRY * PFNGLCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRY * PFNGLCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
+typedef void (APIENTRY * PFNGLCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRY * PFNGLCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
+typedef void (APIENTRY * PFNGLFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
+typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRY * PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
+typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC)(GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
+typedef void (APIENTRY * PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC)(GLenum stage, GLenum portion, GLenum pname, GLint *params);
+typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC)(GLenum variable, GLenum pname, GLfloat *params);
+typedef void (APIENTRY * PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC)(GLenum variable, GLenum pname, GLint *params);
+#endif // not _WIN32
+
#ifdef NV_REGISTER_COMBINERS_INITIALIZE
-#include<string.h> // string manipulation for runtime-check
-
+#include<string.h> // string manipulation for runtime-check
+
#ifdef _WIN32
- PFNGLCOMBINERPARAMETERFVNVPROC glCombinerParameterfvNV = NULL;
- PFNGLCOMBINERPARAMETERIVNVPROC glCombinerParameterivNV = NULL;
- PFNGLCOMBINERPARAMETERFNVPROC glCombinerParameterfNV = NULL;
- PFNGLCOMBINERPARAMETERINVPROC glCombinerParameteriNV = NULL;
- PFNGLCOMBINERINPUTNVPROC glCombinerInputNV = NULL;
- PFNGLCOMBINEROUTPUTNVPROC glCombinerOutputNV = NULL;
- PFNGLFINALCOMBINERINPUTNVPROC glFinalCombinerInputNV = NULL;
- PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC glGetCombinerInputParameterfvNV =
- NULL;
- PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC glGetCombinerInputParameterivNV =
- NULL;
- PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC glGetCombinerOutputParameterfvNV =
- NULL;
- PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC glGetCombinerOutputParameterivNV =
- NULL;
- PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC
- glGetFinalCombinerInputParameterfvNV = NULL;
- PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC
- glGetFinalCombinerInputParameterivNV = NULL;
-
-#endif // _WIN32
- int CheckForNVRegisterCombinersSupport (void)
- {
- const char search[] = "GL_NV_register_combiners";
- int i, pos = 0;
- int maxpos = strlen (search) - 1;
- char extensions[10000];
- strcpy (extensions, (const char *) glGetString (GL_EXTENSIONS));
- int len = strlen (extensions);
- for (i = 0; i < len; i++)
- {
- if ((i == 0) || ((i > 1) && extensions[i - 1] == ' ')) {
- pos = 0;
- while (extensions[i] != ' ')
- {
- if (extensions[i] == search[pos])
- pos++;
- if ((pos > maxpos) && extensions[i + 1] == ' ') {
-
- //printf(search);
- // printf(" supported.\n");
- return 1;
- }
- i++;
- }
- }
- }
-
- //printf(search);
- //printf(" not supported.\n");
- return 0;
- }
- int GL_NV_register_combiners_Init (void)
- {
- if (!CheckForNVRegisterCombinersSupport ())
- return 0;
-
+PFNGLCOMBINERPARAMETERFVNVPROC glCombinerParameterfvNV = NULL;
+PFNGLCOMBINERPARAMETERIVNVPROC glCombinerParameterivNV = NULL;
+PFNGLCOMBINERPARAMETERFNVPROC glCombinerParameterfNV = NULL;
+PFNGLCOMBINERPARAMETERINVPROC glCombinerParameteriNV = NULL;
+PFNGLCOMBINERINPUTNVPROC glCombinerInputNV = NULL;
+PFNGLCOMBINEROUTPUTNVPROC glCombinerOutputNV = NULL;
+PFNGLFINALCOMBINERINPUTNVPROC glFinalCombinerInputNV = NULL;
+PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC glGetCombinerInputParameterfvNV = NULL;
+PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC glGetCombinerInputParameterivNV = NULL;
+PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC glGetCombinerOutputParameterfvNV = NULL;
+PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC glGetCombinerOutputParameterivNV = NULL;
+PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC glGetFinalCombinerInputParameterfvNV = NULL;
+PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC glGetFinalCombinerInputParameterivNV = NULL;
+#endif // _WIN32
+
+int CheckForNVRegisterCombinersSupport(void) {
+ const char search[]="GL_NV_register_combiners";
+ int i, pos=0;
+ int maxpos=strlen(search)-1;
+ char extensions[10000];
+ strcpy(extensions,(const char *)glGetString(GL_EXTENSIONS));
+ int len=strlen(extensions);
+ for (i=0; i<len; i++) {
+ if ((i==0) || ((i>1) && extensions[i-1]==' ')) {
+ pos=0;
+ while(extensions[i]!=' ') {
+ if (extensions[i]==search[pos]) pos++;
+ if ((pos>maxpos) && extensions[i+1]==' ') {
+ //printf(search);
+ // printf(" supported.\n");
+ return 1;
+ }
+ i++;
+ }
+ }
+ }
+ //printf(search);
+ //printf(" not supported.\n");
+ return 0;
+}
+
+int GL_NV_register_combiners_Init(void) {
+ if (!CheckForNVRegisterCombinersSupport()) return 0;
+
#ifdef _WIN32
- glCombinerParameterfvNV = (PFNGLCOMBINERPARAMETERFVNVPROC)
- wglGetProcAddress ("glCombinerParameterfvNV");
- if (glCombinerParameterfvNV == NULL) {
- fprintf (stderr, "glCombinerParameterfvNV not found.\n");
- return 0;
- }
- glCombinerParameterivNV = (PFNGLCOMBINERPARAMETERIVNVPROC)
- wglGetProcAddress ("glCombinerParameterivNV");
- if (glCombinerParameterivNV == NULL) {
- fprintf (stderr, "glCombinerParameterivNV not found.\n");
- return 0;
- }
- glCombinerParameterfNV = (PFNGLCOMBINERPARAMETERFNVPROC)
- wglGetProcAddress ("glCombinerParameterfNV");
- if (glCombinerParameterfvNV == NULL) {
- fprintf (stderr, "glCombinerParameterfNV not found.\n");
- return 0;
- }
- glCombinerParameteriNV = (PFNGLCOMBINERPARAMETERINVPROC)
- wglGetProcAddress ("glCombinerParameteriNV");
- if (glCombinerParameterivNV == NULL) {
- fprintf (stderr, "glCombinerParameteriNV not found.\n");
- return 0;
- }
- glCombinerInputNV =
- (PFNGLCOMBINERINPUTNVPROC) wglGetProcAddress ("glCombinerInputNV");
- if (glCombinerInputNV == NULL) {
- fprintf (stderr, "glCombinerInputNV not found.\n");
- return 0;
- }
- glCombinerOutputNV =
- (PFNGLCOMBINEROUTPUTNVPROC) wglGetProcAddress ("glCombinerOutputNV");
- if (glCombinerOutputNV == NULL) {
- fprintf (stderr, "glCombinerOutputNV not found.\n");
- return 0;
- }
- glFinalCombinerInputNV = (PFNGLFINALCOMBINERINPUTNVPROC)
- wglGetProcAddress ("glFinalCombinerInputNV");
- if (glFinalCombinerInputNV == NULL) {
- fprintf (stderr, "glFinalCombinerInputNV not found.\n");
- return 0;
- }
- glGetCombinerInputParameterfvNV = (PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC)
- wglGetProcAddress ("glGetCombinerInputParameterfvNV");
- if (glGetCombinerInputParameterfvNV == NULL) {
- fprintf (stderr, "glGetCombinerInputParameterfvNV not found.\n");
- return 0;
- }
- glGetCombinerInputParameterivNV = (PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC)
- wglGetProcAddress ("glGetCombinerInputParameterivNV");
- if (glGetCombinerInputParameterivNV == NULL) {
- fprintf (stderr, "glGetCombinerInputParameterivNV not found.\n");
- return 0;
- }
- glGetCombinerOutputParameterfvNV =
- (PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC)
- wglGetProcAddress ("glGetCombinerOutputParameterfvNV");
- if (glGetCombinerOutputParameterfvNV == NULL) {
- fprintf (stderr, "glGetCombinerOutputParameterfvNV not found.\n");
- return 0;
- }
- glGetCombinerOutputParameterivNV =
- (PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC)
- wglGetProcAddress ("glGetCombinerOutputParameterivNV");
- if (glGetCombinerOutputParameterivNV == NULL) {
- fprintf (stderr, "glGetCombinerOutputParameterivNV not found.\n");
- return 0;
- }
- glGetFinalCombinerInputParameterfvNV =
- (PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC)
- wglGetProcAddress ("glGetFinalCombinerInputParameterfvNV");
- if (glGetFinalCombinerInputParameterfvNV == NULL) {
- fprintf (stderr, "glGetFinalCombinerInputParameterfvNV not found.\n");
- return 0;
- }
- glGetFinalCombinerInputParameterivNV =
- (PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC)
- wglGetProcAddress ("glGetFinalCombinerInputParameterivNV");
- if (glGetFinalCombinerInputParameterivNV == NULL) {
- fprintf (stderr, "glGetFinalCombinerInputParameterivNV not found.\n");
- return 0;
- }
-
+ glCombinerParameterfvNV=(PFNGLCOMBINERPARAMETERFVNVPROC) wglGetProcAddress("glCombinerParameterfvNV");
+ if (glCombinerParameterfvNV==NULL) {fprintf(stderr,"glCombinerParameterfvNV not found.\n"); return 0;}
+ glCombinerParameterivNV=(PFNGLCOMBINERPARAMETERIVNVPROC) wglGetProcAddress("glCombinerParameterivNV");
+ if (glCombinerParameterivNV==NULL) {fprintf(stderr,"glCombinerParameterivNV not found.\n"); return 0;}
+ glCombinerParameterfNV=(PFNGLCOMBINERPARAMETERFNVPROC) wglGetProcAddress("glCombinerParameterfNV");
+ if (glCombinerParameterfvNV==NULL) {fprintf(stderr,"glCombinerParameterfNV not found.\n"); return 0;}
+ glCombinerParameteriNV=(PFNGLCOMBINERPARAMETERINVPROC) wglGetProcAddress("glCombinerParameteriNV");
+ if (glCombinerParameterivNV==NULL) {fprintf(stderr,"glCombinerParameteriNV not found.\n"); return 0;}
+ glCombinerInputNV=(PFNGLCOMBINERINPUTNVPROC) wglGetProcAddress("glCombinerInputNV");
+ if (glCombinerInputNV==NULL) {fprintf(stderr,"glCombinerInputNV not found.\n"); return 0;}
+ glCombinerOutputNV=(PFNGLCOMBINEROUTPUTNVPROC) wglGetProcAddress("glCombinerOutputNV");
+ if (glCombinerOutputNV==NULL) {fprintf(stderr,"glCombinerOutputNV not found.\n"); return 0;}
+ glFinalCombinerInputNV=(PFNGLFINALCOMBINERINPUTNVPROC) wglGetProcAddress("glFinalCombinerInputNV");
+ if (glFinalCombinerInputNV==NULL) {fprintf(stderr,"glFinalCombinerInputNV not found.\n"); return 0;}
+ glGetCombinerInputParameterfvNV=(PFNGLGETCOMBINERINPUTPARAMETERFVNVPROC) wglGetProcAddress("glGetCombinerInputParameterfvNV");
+ if (glGetCombinerInputParameterfvNV==NULL) {fprintf(stderr,"glGetCombinerInputParameterfvNV not found.\n"); return 0;}
+ glGetCombinerInputParameterivNV=(PFNGLGETCOMBINERINPUTPARAMETERIVNVPROC) wglGetProcAddress("glGetCombinerInputParameterivNV");
+ if (glGetCombinerInputParameterivNV==NULL) {fprintf(stderr,"glGetCombinerInputParameterivNV not found.\n"); return 0;}
+ glGetCombinerOutputParameterfvNV=(PFNGLGETCOMBINEROUTPUTPARAMETERFVNVPROC) wglGetProcAddress("glGetCombinerOutputParameterfvNV");
+ if (glGetCombinerOutputParameterfvNV==NULL) {fprintf(stderr,"glGetCombinerOutputParameterfvNV not found.\n"); return 0;}
+ glGetCombinerOutputParameterivNV=(PFNGLGETCOMBINEROUTPUTPARAMETERIVNVPROC) wglGetProcAddress("glGetCombinerOutputParameterivNV");
+ if (glGetCombinerOutputParameterivNV==NULL) {fprintf(stderr,"glGetCombinerOutputParameterivNV not found.\n"); return 0;}
+ glGetFinalCombinerInputParameterfvNV=(PFNGLGETFINALCOMBINERINPUTPARAMETERFVNVPROC) wglGetProcAddress("glGetFinalCombinerInputParameterfvNV");
+ if (glGetFinalCombinerInputParameterfvNV==NULL) {fprintf(stderr,"glGetFinalCombinerInputParameterfvNV not found.\n"); return 0;}
+ glGetFinalCombinerInputParameterivNV=(PFNGLGETFINALCOMBINERINPUTPARAMETERIVNVPROC) wglGetProcAddress("glGetFinalCombinerInputParameterivNV");
+ if (glGetFinalCombinerInputParameterivNV==NULL) {fprintf(stderr,"glGetFinalCombinerInputParameterivNV not found.\n"); return 0;}
#endif // _WIN32
- return 1;
- }
-
+ return 1;
+}
+
#endif // NV_REGISTER_COMBINERS_INITIALIZE
-
+
#ifdef __cplusplus
-}
-
+}
+#endif
-#endif /* */
-
#endif // not __NV_REGISTER_COMBINERS_H_
diff --git a/sys/glsink/gstglsink.h b/sys/glsink/gstglsink.h
index 036ee78d..8a34df9a 100644
--- a/sys/glsink/gstglsink.h
+++ b/sys/glsink/gstglsink.h
@@ -25,81 +25,72 @@
#include <gst/gst.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define MAX_FLIP_BUFFERS 1
- typedef struct _GstImageInfo GstImageInfo;
- struct _GstImageInfo
- {
- gulong id;
- int demo;
- int dumpvideo;
- void (*free_info) (GstImageInfo * info);
- };
-
-
- typedef struct _GstImageData GstImageData;
- struct _GstImageData
- {
- gint size;
- gchar *data;
- };
-
- typedef struct _GstImageConnection GstImageConnection;
- struct _GstImageConnection
- {
- void (*open_conn) (GstImageConnection * conn, GstImageInfo * info);
- void (*close_conn) (GstImageConnection * conn, GstImageInfo * info);
- void (*free_conn) (GstImageConnection * conn);
- };
-
- typedef GstCaps *(*GstImagePluginGetCapsFunc) (GstImageInfo * info);
- typedef GstImageConnection *(*GstImagePluginSetCapsFunc) (GstImageInfo * info,
- GstCaps * caps);
- typedef GstImageData *(*GstImagePluginGetImageFunc) (GstImageInfo * info,
- GstImageConnection * conn);
- typedef void (*GstImagePluginPutImageFunc) (GstImageInfo * info,
- GstImageData * image);
- typedef void (*GstImagePluginFreeImageFunc) (GstImageData * image);
-
- typedef struct _GstImagePlugin GstImagePlugin;
- struct _GstImagePlugin
- {
- GstImagePluginGetCapsFunc get_caps;
- GstImagePluginSetCapsFunc set_caps;
- GstImagePluginGetImageFunc get_image;
- GstImagePluginPutImageFunc put_image;
- GstImagePluginFreeImageFunc free_image;
- };
-
- typedef struct _GstGLImageInfo GstGLImageInfo;
+typedef struct _GstImageInfo GstImageInfo;
+struct _GstImageInfo {
+ gulong id;
+ int demo;
+ int dumpvideo;
+ void (*free_info) (GstImageInfo *info);
+};
+
+
+typedef struct _GstImageData GstImageData;
+struct _GstImageData {
+ gint size;
+ gchar *data;
+};
+
+typedef struct _GstImageConnection GstImageConnection;
+struct _GstImageConnection {
+ void (*open_conn) (GstImageConnection *conn, GstImageInfo *info);
+ void (*close_conn) (GstImageConnection *conn, GstImageInfo *info);
+ void (*free_conn) (GstImageConnection *conn);
+};
+
+typedef GstCaps * (*GstImagePluginGetCapsFunc) (GstImageInfo *info);
+typedef GstImageConnection * (*GstImagePluginSetCapsFunc) (GstImageInfo *info, GstCaps *caps);
+typedef GstImageData* (*GstImagePluginGetImageFunc) (GstImageInfo *info, GstImageConnection *conn);
+typedef void (*GstImagePluginPutImageFunc) (GstImageInfo *info, GstImageData *image);
+typedef void (*GstImagePluginFreeImageFunc) (GstImageData *image);
+
+typedef struct _GstImagePlugin GstImagePlugin;
+struct _GstImagePlugin {
+ GstImagePluginGetCapsFunc get_caps;
+ GstImagePluginSetCapsFunc set_caps;
+ GstImagePluginGetImageFunc get_image;
+ GstImagePluginPutImageFunc put_image;
+ GstImagePluginFreeImageFunc free_image;
+};
+
+typedef struct _GstGLImageInfo GstGLImageInfo;
/* stuff about our window grouped together */
- struct _GstGLImageInfo
- {
- GstImageInfo info;
- Display *dpy;
- int screen;
- Window win;
- GLXContext ctx;
- XSetWindowAttributes attr;
- Bool fs;
- //XF86VidModeModeInfo deskMode;
- int x, y;
- unsigned int width, height;
- unsigned int depth;
- /* window specific from here */
- GstElement *sink;
- gulong handler_id;
- float rotX, rotY, zoom, zoomdir;
- };
+struct _GstGLImageInfo {
+ GstImageInfo info;
+ Display *dpy;
+ int screen;
+ Window win;
+ GLXContext ctx;
+ XSetWindowAttributes attr;
+ Bool fs;
+ //XF86VidModeModeInfo deskMode;
+ int x, y;
+ unsigned int width, height;
+ unsigned int depth;
+ /* window specific from here */
+ GstElement *sink;
+ gulong handler_id;
+ float rotX,rotY,zoom, zoomdir;
+};
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_VIDEOSINK_H__ */
+#endif /* __GST_VIDEOSINK_H__ */
diff --git a/sys/qcam/gstqcamsrc.h b/sys/qcam/gstqcamsrc.h
index c6e763d4..0bd201c8 100644
--- a/sys/qcam/gstqcamsrc.h
+++ b/sys/qcam/gstqcamsrc.h
@@ -25,9 +25,8 @@
#include <gst/gst.h>
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
/** QuickCam include files */
#include "qcam.h"
@@ -45,38 +44,35 @@ extern "C"
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QCAMSRC))
/* NOTE: per-element flags start with 16 for now */
- typedef enum
- {
- GST_QCAMSRC_OPEN = GST_ELEMENT_FLAG_LAST,
+typedef enum {
+ GST_QCAMSRC_OPEN = GST_ELEMENT_FLAG_LAST,
- GST_QCAMSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
- } GstQCamSrcFlags;
+ GST_QCAMSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
+} GstQCamSrcFlags;
- typedef struct _GstQCamSrc GstQCamSrc;
- typedef struct _GstQCamSrcClass GstQCamSrcClass;
+typedef struct _GstQCamSrc GstQCamSrc;
+typedef struct _GstQCamSrcClass GstQCamSrcClass;
- struct _GstQCamSrc
- {
- GstElement element;
+struct _GstQCamSrc {
+ GstElement element;
- /* pads */
- GstPad *srcpad;
+ /* pads */
+ GstPad *srcpad;
- struct qcam *qcam;
- gboolean autoexposure;
- gint port;
- };
+ struct qcam *qcam;
+ gboolean autoexposure;
+ gint port;
+};
- struct _GstQCamSrcClass
- {
- GstElementClass parent_class;
- };
+struct _GstQCamSrcClass {
+ GstElementClass parent_class;
+};
- GType gst_qcamsrc_get_type (void);
+GType gst_qcamsrc_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __GST_QCAMSRC_H__ */
+#endif /* __GST_QCAMSRC_H__ */
diff --git a/sys/qcam/qcam-Linux.h b/sys/qcam/qcam-Linux.h
index 06c1cb20..46dcbe51 100644
--- a/sys/qcam/qcam-Linux.h
+++ b/sys/qcam/qcam-Linux.h
@@ -28,3 +28,5 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
+
+
diff --git a/sys/qcam/qcam-os.h b/sys/qcam/qcam-os.h
index 06c1cb20..46dcbe51 100644
--- a/sys/qcam/qcam-os.h
+++ b/sys/qcam/qcam-os.h
@@ -28,3 +28,5 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
******************************************************************/
+
+
diff --git a/sys/qcam/qcam.h b/sys/qcam/qcam.h
index 4697befd..35b2dc26 100644
--- a/sys/qcam/qcam.h
+++ b/sys/qcam/qcam.h
@@ -54,8 +54,7 @@ OTHER DEALINGS IN THE SOFTWARE.
#define MAX_HEIGHT 243
#define MAX_WIDTH 336
-struct qcam
-{
+struct qcam {
int width, height;
int bpp;
int mode;
@@ -64,72 +63,72 @@ struct qcam
int port_mode;
int transfer_scale;
int top, left;
- int fd; /* lock file descriptor
- * It was, unfortunately, necessary to add this member to the
- * struct qcam to conveniently implement POSIX fcntl-style locking.
- * We need a seperate lock file for each struct qcam, for instance,
- * if the same process (using qcam-lib) is accessing multiple
- * QuickCams on (of course) multiple ports.
- * - Dave Plonka (plonka@carroll1.cc.edu)
- */
+ int fd; /* lock file descriptor
+ * It was, unfortunately, necessary to add this member to the
+ * struct qcam to conveniently implement POSIX fcntl-style locking.
+ * We need a seperate lock file for each struct qcam, for instance,
+ * if the same process (using qcam-lib) is accessing multiple
+ * QuickCams on (of course) multiple ports.
+ * - Dave Plonka (plonka@carroll1.cc.edu)
+ */
};
typedef unsigned char scanbuf;
/* General QuickCam handling routines */
-int qc_getbrightness (const struct qcam *q);
-int qc_setbrightness (struct qcam *q, int val);
-int qc_getcontrast (const struct qcam *q);
-int qc_setcontrast (struct qcam *q, int val);
-int qc_getwhitebal (const struct qcam *q);
-int qc_setwhitebal (struct qcam *q, int val);
-void qc_getresolution (const struct qcam *q, int *x, int *y);
-int qc_setresolution (struct qcam *q, int x, int y);
-int qc_getbitdepth (const struct qcam *q);
-int qc_setbitdepth (struct qcam *q, int val);
-int qc_getheight (const struct qcam *q);
-int qc_setheight (struct qcam *q, int y);
-int qc_getwidth (const struct qcam *q);
-int qc_setwidth (struct qcam *q, int x);
-int qc_gettop (const struct qcam *q);
-int qc_settop (struct qcam *q, int val);
-int qc_getleft (const struct qcam *q);
-int qc_setleft (struct qcam *q, int val);
-int qc_gettransfer_scale (const struct qcam *q);
-int qc_settransfer_scale (struct qcam *q, int val);
-int qc_calibrate (struct qcam *q);
-int qc_forceunidir (struct qcam *q);
-void qc_dump (const struct qcam *q, char *file);
-
-struct qcam *qc_init (void);
-int qc_initfile (struct qcam *q, char *fname);
-int qc_open (struct qcam *q);
-int qc_close (struct qcam *q);
-int qc_detect (const struct qcam *q);
-void qc_reset (struct qcam *q);
-void qc_set (struct qcam *q);
-scanbuf *qc_scan (const struct qcam *q);
-scanbuf *qc_convertscan (struct qcam *q, scanbuf * scan);
-void qc_writepgm (const struct qcam *q, FILE * f, scanbuf * scan);
-void qc_wait (int val);
+int qc_getbrightness(const struct qcam *q);
+int qc_setbrightness(struct qcam *q, int val);
+int qc_getcontrast(const struct qcam *q);
+int qc_setcontrast(struct qcam *q, int val);
+int qc_getwhitebal(const struct qcam *q);
+int qc_setwhitebal(struct qcam *q, int val);
+void qc_getresolution(const struct qcam *q, int *x, int *y);
+int qc_setresolution(struct qcam *q, int x, int y);
+int qc_getbitdepth(const struct qcam *q);
+int qc_setbitdepth(struct qcam *q, int val);
+int qc_getheight(const struct qcam *q);
+int qc_setheight(struct qcam *q, int y);
+int qc_getwidth(const struct qcam *q);
+int qc_setwidth(struct qcam *q, int x);
+int qc_gettop(const struct qcam *q);
+int qc_settop(struct qcam *q, int val);
+int qc_getleft(const struct qcam *q);
+int qc_setleft(struct qcam *q, int val);
+int qc_gettransfer_scale(const struct qcam *q);
+int qc_settransfer_scale(struct qcam *q, int val);
+int qc_calibrate(struct qcam *q);
+int qc_forceunidir(struct qcam *q);
+void qc_dump(const struct qcam *q, char *file);
+
+struct qcam *qc_init(void);
+int qc_initfile(struct qcam *q, char *fname);
+int qc_open(struct qcam *q);
+int qc_close(struct qcam *q);
+int qc_detect(const struct qcam *q);
+void qc_reset(struct qcam *q);
+void qc_set(struct qcam *q);
+scanbuf *qc_scan(const struct qcam *q);
+scanbuf *qc_convertscan(struct qcam *q, scanbuf *scan);
+void qc_writepgm(const struct qcam *q, FILE *f, scanbuf *scan);
+void qc_wait(int val);
/* OS/hardware specific routines */
-int read_lpstatus (const struct qcam *q);
-int read_lpcontrol (const struct qcam *q);
-int read_lpdata (const struct qcam *q);
-void write_lpdata (const struct qcam *q, int d);
-void write_lpcontrol (const struct qcam *q, int d);
-int enable_ports (const struct qcam *q);
-int disable_ports (const struct qcam *q);
-int qc_unlock (struct qcam *q);
-int qc_lock (struct qcam *q);
-void qc_wait (int val);
-int qc_probe (struct qcam *q);
+int read_lpstatus(const struct qcam *q);
+int read_lpcontrol(const struct qcam *q);
+int read_lpdata(const struct qcam *q);
+void write_lpdata(const struct qcam *q, int d);
+void write_lpcontrol(const struct qcam *q, int d);
+int enable_ports(const struct qcam *q);
+int disable_ports(const struct qcam *q);
+int qc_unlock(struct qcam *q);
+int qc_lock(struct qcam *q);
+void qc_wait(int val);
+int qc_probe(struct qcam *q);
/* Image processing routines */
-int fixdark (const struct qcam *q, scanbuf * scan);
-int qc_edge_detect (const struct qcam *q, scanbuf * scan, int tolerance);
+int fixdark(const struct qcam *q, scanbuf *scan);
+int qc_edge_detect(const struct qcam *q, scanbuf *scan, int tolerance);
-#endif /*! _QCAM_H */
+#endif /*! _QCAM_H*/
diff --git a/sys/qcam/qcamip.h b/sys/qcam/qcamip.h
index e3bc5c2e..3bab6faf 100644
--- a/sys/qcam/qcamip.h
+++ b/sys/qcam/qcamip.h
@@ -55,13 +55,13 @@ SOFTWARE.
/* Prototypes for image processing routines */
-int qcip_autoexposure (struct qcam *q, scanbuf * scan);
-int qcip_set_luminance_target (struct qcam *q, int val);
-int qcip_set_luminance_tolerance (struct qcam *q, int val);
-int qcip_set_luminance_std_target (struct qcam *q, int val);
-int qcip_set_luminance_std_tolerance (struct qcam *q, int val);
-int qcip_set_autoexposure_mode (int val);
-void qcip_histogram (struct qcam *q, scanbuf * scan, int *histogram);
-void qcip_display_histogram (struct qcam *q, scanbuf * scan);
+int qcip_autoexposure(struct qcam *q, scanbuf *scan);
+int qcip_set_luminance_target(struct qcam *q, int val);
+int qcip_set_luminance_tolerance(struct qcam *q, int val);
+int qcip_set_luminance_std_target(struct qcam *q, int val);
+int qcip_set_luminance_std_tolerance(struct qcam *q, int val);
+int qcip_set_autoexposure_mode(int val);
+void qcip_histogram(struct qcam *q, scanbuf *scan, int *histogram);
+void qcip_display_histogram(struct qcam *q, scanbuf *scan);
-#endif /*! _QCAMIP_H */
+#endif /*! _QCAMIP_H*/
diff --git a/sys/v4l2/gstv4l2colorbalance.h b/sys/v4l2/gstv4l2colorbalance.h
index f0de44ce..4003203b 100644
--- a/sys/v4l2/gstv4l2colorbalance.h
+++ b/sys/v4l2/gstv4l2colorbalance.h
@@ -27,6 +27,7 @@
#include "v4l2_calls.h"
G_BEGIN_DECLS
+
#define GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL \
(gst_v4l2_color_balance_channel_get_type ())
#define GST_V4L2_COLOR_BALANCE_CHANNEL(obj) \
@@ -39,20 +40,19 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL))
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL))
- typedef struct _GstV4l2ColorBalanceChannel
-{
+
+typedef struct _GstV4l2ColorBalanceChannel {
GstColorBalanceChannel parent;
guint32 index;
} GstV4l2ColorBalanceChannel;
-typedef struct _GstV4l2ColorBalanceChannelClass
-{
+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 7dcd6846..e46b2440 100644
--- a/sys/v4l2/gstv4l2element.h
+++ b/sys/v4l2/gstv4l2element.h
@@ -55,53 +55,53 @@
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
-typedef struct _GstV4l2Element GstV4l2Element;
-typedef struct _GstV4l2ElementClass GstV4l2ElementClass;
+typedef struct _GstV4l2Element GstV4l2Element;
+typedef struct _GstV4l2ElementClass GstV4l2ElementClass;
-struct _GstV4l2Element
-{
- GstElement element;
+struct _GstV4l2Element {
+ 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 */
- GstXWindowListener *overlay;
- XID xwindow_id;
+ /* X-overlay */
+ GstXWindowListener *overlay;
+ XID xwindow_id;
- /* properties */
- gchar *norm;
- gchar *channel;
- gulong frequency;
+ /* properties */
+ gchar *norm;
+ gchar *channel;
+ gulong frequency;
- /* caching values */
- gchar *display;
+ /* caching values */
+ gchar *display;
};
-struct _GstV4l2ElementClass
-{
- GstElementClass parent_class;
+struct _GstV4l2ElementClass {
+ 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 d68f9cf8..ca528d1e 100644
--- a/sys/v4l2/gstv4l2src.h
+++ b/sys/v4l2/gstv4l2src.h
@@ -38,75 +38,72 @@ GST_DEBUG_CATEGORY_EXTERN (v4l2src_debug);
#define GST_IS_V4L2SRC_CLASS(obj) \
(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;
+struct _GstV4l2BufferPool {
+ 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 _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 _GstV4l2Src
-{
- GstV4l2Element v4l2element;
+struct _GstV4l2Src {
+ 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;
+ /* True if we want to stop */
+ gboolean quit;
- /* 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;
+ /* clock */
+ GstClock *clock;
+
+ /* time to substract from clock time to get back to timestamp */
+ GstClockTime substract_time;
- /* 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;
+struct _GstV4l2SrcClass {
+ GstV4l2ElementClass parent_class;
- void (*frame_capture) (GObject * object);
- void (*frame_drop) (GObject * object);
- void (*frame_insert) (GObject * object);
- void (*frame_lost) (GObject * object, gint num_lost);
+ void (*frame_capture) (GObject *object);
+ void (*frame_drop) (GObject *object);
+ void (*frame_insert) (GObject *object);
+ void (*frame_lost) (GObject *object,
+ gint num_lost);
};
-GType gst_v4l2src_get_type (void);
+GType gst_v4l2src_get_type(void);
#endif /* __GST_V4L2SRC_H__ */
diff --git a/sys/v4l2/gstv4l2tuner.h b/sys/v4l2/gstv4l2tuner.h
index 729fe221..a768ea2f 100644
--- a/sys/v4l2/gstv4l2tuner.h
+++ b/sys/v4l2/gstv4l2tuner.h
@@ -28,6 +28,7 @@
#include "gstv4l2element.h"
G_BEGIN_DECLS
+
#define GST_TYPE_V4L2_TUNER_CHANNEL \
(gst_v4l2_tuner_channel_get_type ())
#define GST_V4L2_TUNER_CHANNEL(obj) \
@@ -40,17 +41,16 @@ G_BEGIN_DECLS
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_CHANNEL))
#define GST_IS_V4L2_TUNER_CHANNEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_TUNER_CHANNEL))
- typedef struct _GstV4l2TunerChannel
-{
+
+typedef struct _GstV4l2TunerChannel {
GstTunerChannel parent;
- guint32 index;
- guint32 tuner;
- guint32 audio;
+ guint32 index;
+ guint32 tuner;
+ guint32 audio;
} GstV4l2TunerChannel;
-typedef struct _GstV4l2TunerChannelClass
-{
+typedef struct _GstV4l2TunerChannelClass {
GstTunerChannelClass parent;
} GstV4l2TunerChannelClass;
@@ -67,21 +67,19 @@ typedef struct _GstV4l2TunerChannelClass
#define GST_IS_V4L2_TUNER_NORM_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_V4L2_TUNER_NORM))
-typedef struct _GstV4l2TunerNorm
-{
+typedef struct _GstV4l2TunerNorm {
GstTunerNorm parent;
- v4l2_std_id index;
+ v4l2_std_id index;
} GstV4l2TunerNorm;
-typedef struct _GstV4l2TunerNormClass
-{
+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 d5cb7796..cfcdfd35 100644
--- a/sys/v4l2/gstv4l2xoverlay.h
+++ b/sys/v4l2/gstv4l2xoverlay.h
@@ -27,13 +27,16 @@
#include "gstv4l2element.h"
-G_BEGIN_DECLS void gst_v4l2_xoverlay_interface_init (GstXOverlayClass * klass);
+G_BEGIN_DECLS
-GstXWindowListener *gst_v4l2_xoverlay_new (GstV4l2Element * v4l2element);
-void gst_v4l2_xoverlay_free (GstV4l2Element * v4l2element);
+void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass);
+
+GstXWindowListener *
+ gst_v4l2_xoverlay_new (GstV4l2Element *v4l2element);
+void gst_v4l2_xoverlay_free (GstV4l2Element *v4l2element);
/* signal handlers */
-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.h b/sys/v4l2/v4l2_calls.h
index 488e7bca..428c57aa 100644
--- a/sys/v4l2/v4l2_calls.h
+++ b/sys/v4l2/v4l2_calls.h
@@ -82,36 +82,50 @@
/* 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);
/* overlay */
-gboolean gst_v4l2_set_display (GstV4l2Element * v4l2element);
-gboolean gst_v4l2_set_window (GstElement * element,
- gint x, gint y, gint w, gint h, struct v4l2_clip *clips, gint num_clips);
-gboolean gst_v4l2_enable_overlay (GstV4l2Element * v4l2element,
- gboolean enable);
+gboolean gst_v4l2_set_display (GstV4l2Element *v4l2element);
+gboolean gst_v4l2_set_window (GstElement *element,
+ gint x, gint y,
+ gint w, gint h,
+ struct v4l2_clip *clips,
+ gint num_clips);
+gboolean gst_v4l2_enable_overlay (GstV4l2Element *v4l2element,
+ gboolean enable);
#endif /* __V4L2_CALLS_H__ */
diff --git a/sys/v4l2/v4l2src_calls.h b/sys/v4l2/v4l2src_calls.h
index 043dddf0..dc5fca0c 100644
--- a/sys/v4l2/v4l2src_calls.h
+++ b/sys/v4l2/v4l2src_calls.h
@@ -24,25 +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_fill_format_list (GstV4l2Src * v4l2src);
-gboolean gst_v4l2src_clear_format_list (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);
/* 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);
-
-void gst_v4l2src_free_buffer (GstBuffer * buffer);
+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);
+
#endif /* __V4L2SRC_CALLS_H__ */
diff --git a/sys/vcd/vcdsrc.h b/sys/vcd/vcdsrc.h
index 5026cd78..ab2c74da 100644
--- a/sys/vcd/vcdsrc.h
+++ b/sys/vcd/vcdsrc.h
@@ -28,9 +28,8 @@
#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
+extern "C" {
+#endif /* __cplusplus */
#define VCD_BYTES_PER_SECTOR 2352
@@ -47,54 +46,51 @@ extern "C"
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_VCDSRC))
/* NOTE: per-element flags start with 16 for now */
- typedef enum
- {
- VCDSRC_OPEN = GST_ELEMENT_FLAG_LAST,
+typedef enum {
+ VCDSRC_OPEN = GST_ELEMENT_FLAG_LAST,
- VCDSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST + 2,
- } VCDSrcFlags;
+ VCDSRC_FLAG_LAST = GST_ELEMENT_FLAG_LAST+2,
+} VCDSrcFlags;
- typedef struct _VCDSrc VCDSrc;
- typedef struct _VCDSrcClass VCDSrcClass;
+typedef struct _VCDSrc VCDSrc;
+typedef struct _VCDSrcClass VCDSrcClass;
- struct _VCDSrc
- {
- GstElement element;
- /* pads */
- GstPad *srcpad;
+struct _VCDSrc {
+ GstElement element;
+ /* pads */
+ GstPad *srcpad;
- /* device */
- gchar *device;
- /* track number */
- gint track;
- /* fd */
- gint fd;
+ /* device */
+ gchar *device;
+ /* track number */
+ gint track;
+ /* fd */
+ gint fd;
- struct cdrom_tochdr tochdr;
- gint numtracks;
- struct cdrom_tocentry *tracks;
+ struct cdrom_tochdr tochdr;
+ gint numtracks;
+ struct cdrom_tocentry *tracks;
- /* current time offset */
- gulong trackoffset;
- gulong frameoffset;
+ /* current time offset */
+ gulong trackoffset;
+ gulong frameoffset;
- 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 */
- int max_errors;
- };
+ gulong seq; /* buffer sequence number */
+ int max_errors;
+};
- struct _VCDSrcClass
- {
- GstElementClass parent_class;
- };
+struct _VCDSrcClass {
+ GstElementClass parent_class;
+};
- GType vcdsrc_get_type (void);
+GType vcdsrc_get_type(void);
#ifdef __cplusplus
}
-#endif /* __cplusplus */
+#endif /* __cplusplus */
-#endif /* __VCDSRC_H__ */
+#endif /* __VCDSRC_H__ */