diff options
author | Charles Schmidt <cbschmid@users.sourceforge.net> | 2002-07-28 22:45:45 +0000 |
---|---|---|
committer | Charles Schmidt <cbschmid@users.sourceforge.net> | 2002-07-28 22:45:45 +0000 |
commit | 0327f33923e0861e59dbaba696f86d87149eb885 (patch) | |
tree | 62c25141c8d0e8543dd5f00626f9e95deb48d898 /sys/cdrom/gstcdplayer_ioctl_irix.h | |
parent | 186ba5c337e42e8c87f1851615e1d0dd7c717904 (diff) | |
download | gst-plugins-bad-0327f33923e0861e59dbaba696f86d87149eb885.tar.gz gst-plugins-bad-0327f33923e0861e59dbaba696f86d87149eb885.tar.bz2 gst-plugins-bad-0327f33923e0861e59dbaba696f86d87149eb885.zip |
Added *BSD (and Darwin) ioctl cdaudio playing. Couple bugfixes. 'end-track','current-track' and 'cddb-discid' propert...
Original commit message from CVS:
Added *BSD (and Darwin) ioctl cdaudio playing. Couple bugfixes. 'end-track','current-track' and 'cddb-discid' properties and 'track-change' signal for the element.
Diffstat (limited to 'sys/cdrom/gstcdplayer_ioctl_irix.h')
-rw-r--r-- | sys/cdrom/gstcdplayer_ioctl_irix.h | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/sys/cdrom/gstcdplayer_ioctl_irix.h b/sys/cdrom/gstcdplayer_ioctl_irix.h new file mode 100644 index 00000000..2f6be35c --- /dev/null +++ b/sys/cdrom/gstcdplayer_ioctl_irix.h @@ -0,0 +1,109 @@ +/* gstcdplay + * Copyright (c) 2002 Charles Schmidt <cbschmid@uiuc.edu> + + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* THIS DOES NOT WORK YET */ + +#define CDPLAYER(x) ((CDPlayer *)x) +#define FD(x) ((int)x) + +gboolean cd_init(struct cd *cd,const gchar *device) +{ + CDPLAYER *cdplayer; + CDSTATUS status; + CDTRACKINFO info; + guint i; + + cdplayer = CDOpen(device,"r"); + + if (cdplayer == NULL) { + return FALSE; + } + + cd->fd = FD(cdplayer); + + 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; + } + + 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 */ + + + cd->num_tracks = status.last; + + return TRUE; +} + +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); + + + +} + +gboolean cd_pause(struct cd *cd) +{ + +} + +gboolean cd_resume(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) +{ + +} + +gint cd_current_track(struct cd *cd) +{ + +} + +gboolean cd_close(struct cd *cd) +{ + +} + |