mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
expand tabs
Original commit message from CVS: expand tabs
This commit is contained in:
parent
04ad447fcf
commit
bdb814f6ef
81 changed files with 2288 additions and 2203 deletions
83
ChangeLog
83
ChangeLog
|
@ -1,3 +1,86 @@
|
||||||
|
2005-12-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
|
* docs/plugins/gst-plugins-bad-plugins-undocumented.txt:
|
||||||
|
* ext/audiofile/gstafparse.h:
|
||||||
|
* ext/audiofile/gstafsink.c: (gst_afsink_chain):
|
||||||
|
* ext/audiofile/gstafsink.h:
|
||||||
|
* ext/audiofile/gstafsrc.c: (gst_afsrc_close_file):
|
||||||
|
* ext/audiofile/gstafsrc.h:
|
||||||
|
* ext/cdaudio/gstcdaudio.c:
|
||||||
|
* ext/divx/gstdivxenc.c:
|
||||||
|
* ext/dts/gstdtsdec.h:
|
||||||
|
* ext/faac/gstfaac.h:
|
||||||
|
* ext/ivorbis/vorbisenc.h:
|
||||||
|
* ext/ivorbis/vorbisfile.c:
|
||||||
|
* ext/musepack/gstmusepackdec.h:
|
||||||
|
* ext/nas/nassink.c:
|
||||||
|
* ext/snapshot/gstsnapshot.c:
|
||||||
|
* ext/sndfile/gstsf.h:
|
||||||
|
* ext/tarkin/gsttarkindec.h:
|
||||||
|
* ext/tarkin/gsttarkinenc.h:
|
||||||
|
* ext/xine/gstxine.h:
|
||||||
|
* ext/xine/xinecaps.c:
|
||||||
|
* ext/xvid/gstxvid.h:
|
||||||
|
* gst-libs/gst/play/play.h:
|
||||||
|
* gst/apetag/apedemux.h:
|
||||||
|
* gst/cdxaparse/gstcdxaparse.h:
|
||||||
|
* gst/cdxaparse/gstcdxastrip.h:
|
||||||
|
* gst/colorspace/yuv2rgb.c:
|
||||||
|
* gst/colorspace/yuv2rgb.h:
|
||||||
|
* gst/equalizer/gstiirequalizer.c:
|
||||||
|
* gst/festival/gstfestival.h:
|
||||||
|
* gst/games/gstpuzzle.c:
|
||||||
|
* gst/games/gstvideoimage.c:
|
||||||
|
* gst/games/gstvideoimage.h:
|
||||||
|
* gst/modplug/gstmodplug.h:
|
||||||
|
* gst/modplug/libmodplug/it_defs.h:
|
||||||
|
* gst/modplug/libmodplug/modplug.h:
|
||||||
|
* gst/modplug/libmodplug/sndfile.h:
|
||||||
|
* gst/modplug/libmodplug/stdafx.h:
|
||||||
|
* gst/mpeg1sys/buffer.c:
|
||||||
|
* gst/mpeg1sys/gstmpeg1systemencode.h:
|
||||||
|
* gst/mpeg1sys/main.h:
|
||||||
|
* gst/mpeg1sys/systems.c:
|
||||||
|
* gst/mpeg1videoparse/gstmp1videoparse.h:
|
||||||
|
* gst/mpeg2sub/gstmpeg2subt.h:
|
||||||
|
* gst/mpegaudioparse/gstmpegaudioparse.c: (gst_mp3parse_chain):
|
||||||
|
* gst/mpegaudioparse/gstmpegaudioparse.h:
|
||||||
|
* gst/multifilesink/gstmultifilesink.h:
|
||||||
|
* gst/overlay/gstoverlay.h:
|
||||||
|
* gst/qtdemux/qtdemux.c:
|
||||||
|
* gst/qtdemux/qtdemux.h:
|
||||||
|
* gst/rtjpeg/RTjpeg.c: (RTjpeg_dctY), (RTjpeg_idct):
|
||||||
|
* gst/rtjpeg/RTjpeg.h:
|
||||||
|
* gst/tta/crc32.h:
|
||||||
|
* gst/tta/filters.h:
|
||||||
|
* gst/tta/ttadec.h:
|
||||||
|
* gst/videodrop/gstvideodrop.h:
|
||||||
|
* sys/cdrom/gstcdplayer.h:
|
||||||
|
* sys/cdrom/gstcdplayer_ioctl.c:
|
||||||
|
* sys/cdrom/gstcdplayer_ioctl.h:
|
||||||
|
* sys/cdrom/gstcdplayer_ioctl_bsd.h:
|
||||||
|
* sys/cdrom/gstcdplayer_ioctl_irix.h:
|
||||||
|
* sys/cdrom/gstcdplayer_ioctl_solaris.h:
|
||||||
|
* sys/dxr3/dxr3audiosink.c:
|
||||||
|
* sys/dxr3/dxr3audiosink.h:
|
||||||
|
* sys/dxr3/dxr3spusink.c:
|
||||||
|
* sys/dxr3/dxr3spusink.h:
|
||||||
|
* sys/dxr3/dxr3videosink.c:
|
||||||
|
* sys/dxr3/dxr3videosink.h:
|
||||||
|
* sys/qcam/dark.c:
|
||||||
|
* sys/qcam/gstqcamsrc.c:
|
||||||
|
* sys/v4l2/gstv4l2colorbalance.h:
|
||||||
|
* sys/v4l2/gstv4l2element.h:
|
||||||
|
* sys/v4l2/gstv4l2src.h:
|
||||||
|
* sys/v4l2/gstv4l2tuner.h:
|
||||||
|
* sys/v4l2/gstv4l2xoverlay.h:
|
||||||
|
* sys/v4l2/v4l2_calls.c:
|
||||||
|
* sys/v4l2/v4l2_calls.h:
|
||||||
|
* sys/v4l2/v4l2src_calls.c:
|
||||||
|
* sys/v4l2/v4l2src_calls.h:
|
||||||
|
* sys/vcd/vcdsrc.h:
|
||||||
|
expand tabs
|
||||||
|
|
||||||
=== release 0.10.0 ===
|
=== release 0.10.0 ===
|
||||||
|
|
||||||
2005-12-05 <thomas (at) apestaart (dot) org>
|
2005-12-05 <thomas (at) apestaart (dot) org>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
50% symbol docs coverage.
|
75% symbol docs coverage.
|
||||||
1 symbols documented.
|
3 symbols documented.
|
||||||
|
0 symbols incomplete.
|
||||||
1 not documented.
|
1 not documented.
|
||||||
|
|
||||||
|
|
||||||
GstDfbVideoSink
|
GstDfbVideoSink
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/bytestream/bytestream.h>
|
#include <gst/bytestream/bytestream.h>
|
||||||
#include <audiofile.h> /* what else are we to do */
|
#include <audiofile.h> /* what else are we to do */
|
||||||
#include <af_vfs.h>
|
#include <af_vfs.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ typedef struct _GstAFParseClass GstAFParseClass;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_AFPARSE_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
GST_AFPARSE_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
||||||
|
|
||||||
GST_AFPARSE_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
GST_AFPARSE_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
||||||
} GstAFParseFlags;
|
} GstAFParseFlags;
|
||||||
|
|
||||||
struct _GstAFParse {
|
struct _GstAFParse {
|
||||||
|
@ -71,9 +71,9 @@ struct _GstAFParse {
|
||||||
int width;
|
int width;
|
||||||
unsigned int rate;
|
unsigned int rate;
|
||||||
gboolean is_signed;
|
gboolean is_signed;
|
||||||
int type; /* type of output, compare to audiofile.h
|
int type; /* type of output, compare to audiofile.h
|
||||||
* RAW, AIFF, AIFFC, NEXTSND, WAVE
|
* RAW, AIFF, AIFFC, NEXTSND, WAVE
|
||||||
*/
|
*/
|
||||||
/* blocking */
|
/* blocking */
|
||||||
gulong curoffset;
|
gulong curoffset;
|
||||||
gulong bytes_per_read;
|
gulong bytes_per_read;
|
||||||
|
@ -82,7 +82,7 @@ struct _GstAFParse {
|
||||||
gulong seq;
|
gulong seq;
|
||||||
gint64 timestamp;
|
gint64 timestamp;
|
||||||
/* FIXME : endianness is a little cryptic at this point */
|
/* FIXME : endianness is a little cryptic at this point */
|
||||||
int endianness_data; /* 4321 or 1234 */
|
int endianness_data; /* 4321 or 1234 */
|
||||||
int endianness_wanted; /* same thing, but what the output format wants */
|
int endianness_wanted; /* same thing, but what the output format wants */
|
||||||
int endianness_output; /* what the output endianness will be */
|
int endianness_output; /* what the output endianness will be */
|
||||||
};
|
};
|
||||||
|
@ -94,7 +94,7 @@ struct _GstAFParseClass {
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
};
|
};
|
||||||
|
|
||||||
gboolean gst_afparse_plugin_init (GstPlugin *plugin);
|
gboolean gst_afparse_plugin_init (GstPlugin *plugin);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,7 +399,7 @@ gst_afsink_chain (GstPad * pad, GstData * _data)
|
||||||
if (bytes_written < GST_BUFFER_SIZE (buf))
|
if (bytes_written < GST_BUFFER_SIZE (buf))
|
||||||
{
|
{
|
||||||
printf ("afsink : Warning : %d bytes should be written, only %d bytes written\n",
|
printf ("afsink : Warning : %d bytes should be written, only %d bytes written\n",
|
||||||
GST_BUFFER_SIZE (buf), bytes_written);
|
GST_BUFFER_SIZE (buf), bytes_written);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <audiofile.h> /* what else are we to do */
|
#include <audiofile.h> /* what else are we to do */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -54,7 +54,7 @@ typedef struct _GstAFSinkClass GstAFSinkClass;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_AFSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
GST_AFSINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
||||||
|
|
||||||
GST_AFSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
GST_AFSINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
||||||
} GstAFSinkFlags;
|
} GstAFSinkFlags;
|
||||||
|
|
||||||
struct _GstAFSink {
|
struct _GstAFSink {
|
||||||
|
@ -71,11 +71,11 @@ struct _GstAFSink {
|
||||||
int width;
|
int width;
|
||||||
unsigned int rate;
|
unsigned int rate;
|
||||||
gboolean is_signed;
|
gboolean is_signed;
|
||||||
int type; /* type of output, compare to audiofile.h
|
int type; /* type of output, compare to audiofile.h
|
||||||
* RAW, AIFF, AIFFC, NEXTSND, WAVE
|
* RAW, AIFF, AIFFC, NEXTSND, WAVE
|
||||||
*/
|
*/
|
||||||
/* FIXME : endianness is a little cryptic at this point */
|
/* FIXME : endianness is a little cryptic at this point */
|
||||||
int endianness_data; /* 4321 or 1234 */
|
int endianness_data; /* 4321 or 1234 */
|
||||||
int endianness_wanted; /* same thing, but what the output format wants */
|
int endianness_wanted; /* same thing, but what the output format wants */
|
||||||
int endianness_output; /* what the output endianness will be */
|
int endianness_output; /* what the output endianness will be */
|
||||||
};
|
};
|
||||||
|
@ -87,8 +87,8 @@ struct _GstAFSinkClass {
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_afsink_get_type (void);
|
GType gst_afsink_get_type (void);
|
||||||
gboolean gst_afsink_plugin_init (GstPlugin *plugin);
|
gboolean gst_afsink_plugin_init (GstPlugin *plugin);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -364,7 +364,7 @@ gst_afsrc_close_file (GstAFSrc * src)
|
||||||
/* g_print ("DEBUG: closing srcfile...\n"); */
|
/* g_print ("DEBUG: closing srcfile...\n"); */
|
||||||
g_return_if_fail (GST_OBJECT_FLAG_IS_SET (src, GST_AFSRC_OPEN));
|
g_return_if_fail (GST_OBJECT_FLAG_IS_SET (src, GST_AFSRC_OPEN));
|
||||||
/* g_print ("DEBUG: past flag test\n"); */
|
/* g_print ("DEBUG: past flag test\n"); */
|
||||||
/* if (fclose (src->file) != 0) */
|
/* if (fclose (src->file) != 0) */
|
||||||
if (afCloseFile (src->file) != 0) {
|
if (afCloseFile (src->file) != 0) {
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, CLOSE,
|
GST_ELEMENT_ERROR (src, RESOURCE, CLOSE,
|
||||||
(_("Error closing file \"%s\"."), src->filename), GST_ERROR_SYSTEM);
|
(_("Error closing file \"%s\"."), src->filename), GST_ERROR_SYSTEM);
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <audiofile.h> /* what else are we to do */
|
#include <audiofile.h> /* what else are we to do */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -54,7 +54,7 @@ typedef struct _GstAFSrcClass GstAFSrcClass;
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_AFSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
GST_AFSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
||||||
|
|
||||||
GST_AFSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
GST_AFSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
||||||
} GstAFSrcFlags;
|
} GstAFSrcFlags;
|
||||||
|
|
||||||
struct _GstAFSrc {
|
struct _GstAFSrc {
|
||||||
|
@ -71,9 +71,9 @@ struct _GstAFSrc {
|
||||||
int width;
|
int width;
|
||||||
unsigned int rate;
|
unsigned int rate;
|
||||||
gboolean is_signed;
|
gboolean is_signed;
|
||||||
int type; /* type of output, compare to audiofile.h
|
int type; /* type of output, compare to audiofile.h
|
||||||
* RAW, AIFF, AIFFC, NEXTSND, WAVE
|
* RAW, AIFF, AIFFC, NEXTSND, WAVE
|
||||||
*/
|
*/
|
||||||
/* blocking */
|
/* blocking */
|
||||||
gulong curoffset;
|
gulong curoffset;
|
||||||
gulong bytes_per_read;
|
gulong bytes_per_read;
|
||||||
|
@ -81,7 +81,7 @@ struct _GstAFSrc {
|
||||||
gulong seq;
|
gulong seq;
|
||||||
guint64 framestamp;
|
guint64 framestamp;
|
||||||
/* FIXME : endianness is a little cryptic at this point */
|
/* FIXME : endianness is a little cryptic at this point */
|
||||||
int endianness_data; /* 4321 or 1234 */
|
int endianness_data; /* 4321 or 1234 */
|
||||||
int endianness_wanted; /* same thing, but what the output format wants */
|
int endianness_wanted; /* same thing, but what the output format wants */
|
||||||
int endianness_output; /* what the output endianness will be */
|
int endianness_output; /* what the output endianness will be */
|
||||||
};
|
};
|
||||||
|
@ -93,7 +93,7 @@ struct _GstAFSrcClass {
|
||||||
void (*handoff) (GstElement *element,GstPad *pad);
|
void (*handoff) (GstElement *element,GstPad *pad);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_afsrc_get_type (void);
|
GType gst_afsrc_get_type (void);
|
||||||
gboolean gst_afsrc_plugin_init (GstPlugin *plugin);
|
gboolean gst_afsrc_plugin_init (GstPlugin *plugin);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,11 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#define GST_TYPE_CDAUDIO (gst_cdaudio_get_type())
|
#define GST_TYPE_CDAUDIO (gst_cdaudio_get_type())
|
||||||
#define GST_CDAUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDAUDIO,GstCDAudio))
|
#define GST_CDAUDIO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDAUDIO,GstCDAudio))
|
||||||
#define GST_CDAUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDAUDIO,GstCDAudioClass))
|
#define GST_CDAUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDAUDIO,GstCDAudioClass))
|
||||||
#define GST_IS_CDAUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDAUDIO))
|
#define GST_IS_CDAUDIO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDAUDIO))
|
||||||
#define GST_IS_CDAUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDAUDIO))
|
#define GST_IS_CDAUDIO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDAUDIO))
|
||||||
|
|
||||||
typedef struct _GstCDAudio GstCDAudio;
|
typedef struct _GstCDAudio GstCDAudio;
|
||||||
typedef struct _GstCDAudioClass GstCDAudioClass;
|
typedef struct _GstCDAudioClass GstCDAudioClass;
|
||||||
|
|
|
@ -366,14 +366,14 @@ gst_divxenc_chain (GstPad * pad, GstData * _data)
|
||||||
case GST_MAKE_FOURCC ('R', 'G', 'B', ' '):
|
case GST_MAKE_FOURCC ('R', 'G', 'B', ' '):
|
||||||
gst_caps_get_int (caps, "depth", &d);
|
gst_caps_get_int (caps, "depth", &d);
|
||||||
switch (d) {
|
switch (d) {
|
||||||
case 24:
|
case 24:
|
||||||
divx_cs = 0;
|
divx_cs = 0;
|
||||||
bitcnt = 24;
|
bitcnt = 24;
|
||||||
break;
|
break;
|
||||||
case 32:
|
case 32:
|
||||||
divx_cs = 0;
|
divx_cs = 0;
|
||||||
bitcnt = 32;
|
bitcnt = 32;
|
||||||
break;
|
break;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static GstPadLinkReturn
|
static GstPadLinkReturn
|
||||||
|
|
|
@ -41,31 +41,31 @@ typedef struct _GstDtsDec GstDtsDec;
|
||||||
typedef struct _GstDtsDecClass GstDtsDecClass;
|
typedef struct _GstDtsDecClass GstDtsDecClass;
|
||||||
|
|
||||||
struct _GstDtsDec {
|
struct _GstDtsDec {
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *sinkpad,
|
GstPad *sinkpad,
|
||||||
*srcpad;
|
*srcpad;
|
||||||
|
|
||||||
/* stream properties */
|
/* stream properties */
|
||||||
gint bit_rate;
|
gint bit_rate;
|
||||||
gint sample_rate;
|
gint sample_rate;
|
||||||
gint stream_channels;
|
gint stream_channels;
|
||||||
gint request_channels;
|
gint request_channels;
|
||||||
gint using_channels;
|
gint using_channels;
|
||||||
|
|
||||||
/* decoding properties */
|
/* decoding properties */
|
||||||
sample_t level;
|
sample_t level;
|
||||||
sample_t bias;
|
sample_t bias;
|
||||||
gboolean dynamic_range_compression;
|
gboolean dynamic_range_compression;
|
||||||
sample_t *samples;
|
sample_t *samples;
|
||||||
dts_state_t *state;
|
dts_state_t *state;
|
||||||
|
|
||||||
/* Data left over from the previous buffer */
|
/* Data left over from the previous buffer */
|
||||||
GstBuffer *cache;
|
GstBuffer *cache;
|
||||||
|
|
||||||
/* keep track of time */
|
/* keep track of time */
|
||||||
GstClockTime current_ts;
|
GstClockTime current_ts;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstDtsDecClass {
|
struct _GstDtsDecClass {
|
||||||
|
|
|
@ -52,9 +52,9 @@ typedef struct _GstFaac {
|
||||||
shortctl,
|
shortctl,
|
||||||
outputformat;
|
outputformat;
|
||||||
gboolean tns,
|
gboolean tns,
|
||||||
midside;
|
midside;
|
||||||
gulong bytes,
|
gulong bytes,
|
||||||
samples;
|
samples;
|
||||||
|
|
||||||
/* FAAC object */
|
/* FAAC object */
|
||||||
faacEncHandle handle;
|
faacEncHandle handle;
|
||||||
|
|
|
@ -45,18 +45,18 @@ typedef struct _VorbisEnc VorbisEnc;
|
||||||
typedef struct _VorbisEncClass VorbisEncClass;
|
typedef struct _VorbisEncClass VorbisEncClass;
|
||||||
|
|
||||||
struct _VorbisEnc {
|
struct _VorbisEnc {
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *sinkpad,
|
GstPad *sinkpad,
|
||||||
*srcpad;
|
*srcpad;
|
||||||
|
|
||||||
ogg_stream_state os; /* take physical pages, weld into a logical
|
ogg_stream_state os; /* take physical pages, weld into a logical
|
||||||
stream of packets */
|
stream of packets */
|
||||||
ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
|
ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */
|
||||||
ogg_packet op; /* one raw packet of data for decode */
|
ogg_packet op; /* one raw packet of data for decode */
|
||||||
|
|
||||||
vorbis_info vi; /* struct that stores all the static vorbis bitstream
|
vorbis_info vi; /* struct that stores all the static vorbis bitstream
|
||||||
settings */
|
settings */
|
||||||
vorbis_comment vc; /* struct that stores all the user comments */
|
vorbis_comment vc; /* struct that stores all the user comments */
|
||||||
|
|
||||||
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
|
vorbis_dsp_state vd; /* central working state for the packet->PCM decoder */
|
||||||
|
@ -69,20 +69,20 @@ struct _VorbisEnc {
|
||||||
gint min_bitrate;
|
gint min_bitrate;
|
||||||
gint max_bitrate;
|
gint max_bitrate;
|
||||||
gfloat quality;
|
gfloat quality;
|
||||||
gboolean quality_set;
|
gboolean quality_set;
|
||||||
gint serial;
|
gint serial;
|
||||||
|
|
||||||
gint channels;
|
gint channels;
|
||||||
gint frequency;
|
gint frequency;
|
||||||
|
|
||||||
guint64 samples_in;
|
guint64 samples_in;
|
||||||
guint64 bytes_out;
|
guint64 bytes_out;
|
||||||
|
|
||||||
GstCaps *metadata;
|
GstCaps *metadata;
|
||||||
|
|
||||||
gboolean setup;
|
gboolean setup;
|
||||||
gboolean flush_header;
|
gboolean flush_header;
|
||||||
gchar *last_message;
|
gchar *last_message;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _VorbisEncClass {
|
struct _VorbisEncClass {
|
||||||
|
|
|
@ -31,15 +31,15 @@
|
||||||
GST_DEBUG_CATEGORY_STATIC (ivorbisfile_debug);
|
GST_DEBUG_CATEGORY_STATIC (ivorbisfile_debug);
|
||||||
#define GST_CAT_DEFAULT ivorbisfile_debug
|
#define GST_CAT_DEFAULT ivorbisfile_debug
|
||||||
|
|
||||||
#define GST_TYPE_IVORBISFILE \
|
#define GST_TYPE_IVORBISFILE \
|
||||||
(ivorbisfile_get_type())
|
(ivorbisfile_get_type())
|
||||||
#define GST_IVORBISFILE(obj) \
|
#define GST_IVORBISFILE(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IVORBISFILE,Ivorbisfile))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_IVORBISFILE,Ivorbisfile))
|
||||||
#define GST_IVORBISFILE_CLASS(klass) \
|
#define GST_IVORBISFILE_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IVORBISFILE,IvorbisfileClass))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_IVORBISFILE,IvorbisfileClass))
|
||||||
#define GST_IS_IVORBISFILE(obj) \
|
#define GST_IS_IVORBISFILE(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IVORBISFILE))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_IVORBISFILE))
|
||||||
#define GST_IS_IVORBISFILE_CLASS(obj) \
|
#define GST_IS_IVORBISFILE_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IVORBISFILE))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_IVORBISFILE))
|
||||||
|
|
||||||
typedef struct _Ivorbisfile Ivorbisfile;
|
typedef struct _Ivorbisfile Ivorbisfile;
|
||||||
|
|
|
@ -71,8 +71,8 @@ typedef struct _GstMusepackDecClass {
|
||||||
GType gst_musepackdec_get_type (void);
|
GType gst_musepackdec_get_type (void);
|
||||||
|
|
||||||
extern gboolean gst_musepackdec_src_convert (GstPad * pad,
|
extern gboolean gst_musepackdec_src_convert (GstPad * pad,
|
||||||
GstFormat src_format,
|
GstFormat src_format,
|
||||||
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
gint64 src_value, GstFormat * dest_format, gint64 * dest_value);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
#include <audio/soundlib.h>
|
#include <audio/soundlib.h>
|
||||||
#include "nassink.h"
|
#include "nassink.h"
|
||||||
|
|
||||||
#define NAS_SOUND_PORT_DURATION (2)
|
#define NAS_SOUND_PORT_DURATION (2)
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY (NAS);
|
GST_DEBUG_CATEGORY (NAS);
|
||||||
/* Signals and args */
|
/* Signals and args */
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
#include "gstsnapshot.h"
|
#include "gstsnapshot.h"
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
|
||||||
#define MAX_HEIGHT 2048
|
#define MAX_HEIGHT 2048
|
||||||
|
|
||||||
/* elementfactory information */
|
/* elementfactory information */
|
||||||
static GstElementDetails snapshot_details = {
|
static GstElementDetails snapshot_details = {
|
||||||
|
|
|
@ -66,8 +66,8 @@ typedef struct _GstSF GstSF;
|
||||||
typedef struct _GstSFClass GstSFClass;
|
typedef struct _GstSFClass GstSFClass;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_SF_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
GST_SF_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
||||||
GST_SF_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
GST_SF_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
||||||
} GstSFlags;
|
} GstSFlags;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -106,9 +106,9 @@ struct _GstSFClass {
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_sf_get_type (void);
|
GType gst_sf_get_type (void);
|
||||||
GType gst_sfsrc_get_type (void);
|
GType gst_sfsrc_get_type (void);
|
||||||
GType gst_sfsink_get_type (void);
|
GType gst_sfsink_get_type (void);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -49,18 +49,18 @@ struct _TarkinDec {
|
||||||
|
|
||||||
GstPad *sinkpad,*srcpad;
|
GstPad *sinkpad,*srcpad;
|
||||||
|
|
||||||
ogg_sync_state oy;
|
ogg_sync_state oy;
|
||||||
ogg_stream_state os;
|
ogg_stream_state os;
|
||||||
ogg_page og;
|
ogg_page og;
|
||||||
ogg_packet op;
|
ogg_packet op;
|
||||||
|
|
||||||
TarkinStream *tarkin_stream;
|
TarkinStream *tarkin_stream;
|
||||||
TarkinComment tc;
|
TarkinComment tc;
|
||||||
TarkinInfo ti;
|
TarkinInfo ti;
|
||||||
TarkinVideoLayerDesc layer[1];
|
TarkinVideoLayerDesc layer[1];
|
||||||
|
|
||||||
gint frame_num;
|
gint frame_num;
|
||||||
gint nheader;
|
gint nheader;
|
||||||
|
|
||||||
gboolean eos;
|
gboolean eos;
|
||||||
gint bitrate;
|
gint bitrate;
|
||||||
|
|
|
@ -49,17 +49,17 @@ struct _TarkinEnc {
|
||||||
|
|
||||||
GstPad *sinkpad,*srcpad;
|
GstPad *sinkpad,*srcpad;
|
||||||
|
|
||||||
ogg_stream_state os; /* take physical pages, weld into a logical
|
ogg_stream_state os; /* take physical pages, weld into a logical
|
||||||
stream of packets */
|
stream of packets */
|
||||||
ogg_page og; /* one Ogg bitstream page. Tarkin packets are inside */
|
ogg_page og; /* one Ogg bitstream page. Tarkin packets are inside */
|
||||||
ogg_packet op[3]; /* one raw packet of data for decode */
|
ogg_packet op[3]; /* one raw packet of data for decode */
|
||||||
|
|
||||||
TarkinStream *tarkin_stream;
|
TarkinStream *tarkin_stream;
|
||||||
TarkinComment tc;
|
TarkinComment tc;
|
||||||
TarkinInfo ti;
|
TarkinInfo ti;
|
||||||
TarkinVideoLayerDesc layer[1];
|
TarkinVideoLayerDesc layer[1];
|
||||||
|
|
||||||
gint frame_num;
|
gint frame_num;
|
||||||
|
|
||||||
gboolean eos;
|
gboolean eos;
|
||||||
gint bitrate;
|
gint bitrate;
|
||||||
|
|
|
@ -44,40 +44,40 @@ typedef struct _GstXineClass GstXineClass;
|
||||||
|
|
||||||
struct _GstXine
|
struct _GstXine
|
||||||
{
|
{
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
xine_stream_t * stream;
|
xine_stream_t * stream;
|
||||||
xine_ao_driver_t * audio_driver;
|
xine_ao_driver_t * audio_driver;
|
||||||
xine_vo_driver_t * video_driver;
|
xine_vo_driver_t * video_driver;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstXineClass
|
struct _GstXineClass
|
||||||
{
|
{
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
xine_t * xine;
|
xine_t * xine;
|
||||||
|
|
||||||
xine_ao_driver_t * (* create_audio_driver) (GstXine * xine);
|
xine_ao_driver_t * (* create_audio_driver) (GstXine * xine);
|
||||||
xine_vo_driver_t * (* create_video_driver) (GstXine * xine);
|
xine_vo_driver_t * (* create_video_driver) (GstXine * xine);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_xine_get_type (void);
|
GType gst_xine_get_type (void);
|
||||||
|
|
||||||
xine_stream_t * gst_xine_get_stream (GstXine *xine);
|
xine_stream_t * gst_xine_get_stream (GstXine *xine);
|
||||||
void gst_xine_free_stream (GstXine *xine);
|
void gst_xine_free_stream (GstXine *xine);
|
||||||
|
|
||||||
void gst_buffer_to_xine_buffer (buf_element_t *element, GstBuffer *buffer);
|
void gst_buffer_to_xine_buffer (buf_element_t *element, GstBuffer *buffer);
|
||||||
|
|
||||||
/* conversion functions from xinecaps.c */
|
/* conversion functions from xinecaps.c */
|
||||||
|
|
||||||
const gchar * gst_xine_get_caps_for_format (guint32 format);
|
const gchar * gst_xine_get_caps_for_format (guint32 format);
|
||||||
guint32 gst_xine_get_format_for_caps (const GstCaps *caps);
|
guint32 gst_xine_get_format_for_caps (const GstCaps *caps);
|
||||||
|
|
||||||
/* init functions for the plugins */
|
/* init functions for the plugins */
|
||||||
|
|
||||||
gboolean gst_xine_audio_sink_init_plugin (GstPlugin *plugin);
|
gboolean gst_xine_audio_sink_init_plugin (GstPlugin *plugin);
|
||||||
gboolean gst_xine_audio_dec_init_plugin (GstPlugin *plugin);
|
gboolean gst_xine_audio_dec_init_plugin (GstPlugin *plugin);
|
||||||
gboolean gst_xine_input_init_plugin (GstPlugin *plugin);
|
gboolean gst_xine_input_init_plugin (GstPlugin *plugin);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -29,56 +29,56 @@ typedef struct
|
||||||
static GstXineCapsMap _gst_xine_caps_map[] = {
|
static GstXineCapsMap _gst_xine_caps_map[] = {
|
||||||
{BUF_AUDIO_QDESIGN2, "audio/x-qdm2"},
|
{BUF_AUDIO_QDESIGN2, "audio/x-qdm2"},
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
#define BUF_AUDIO_A52 0x03000000
|
#define BUF_AUDIO_A52 0x03000000
|
||||||
#define BUF_AUDIO_MPEG 0x03010000
|
#define BUF_AUDIO_MPEG 0x03010000
|
||||||
#define BUF_AUDIO_LPCM_BE 0x03020000
|
#define BUF_AUDIO_LPCM_BE 0x03020000
|
||||||
#define BUF_AUDIO_LPCM_LE 0x03030000
|
#define BUF_AUDIO_LPCM_LE 0x03030000
|
||||||
#define BUF_AUDIO_WMAV1 0x03040000
|
#define BUF_AUDIO_WMAV1 0x03040000
|
||||||
#define BUF_AUDIO_DTS 0x03050000
|
#define BUF_AUDIO_DTS 0x03050000
|
||||||
#define BUF_AUDIO_MSADPCM 0x03060000
|
#define BUF_AUDIO_MSADPCM 0x03060000
|
||||||
#define BUF_AUDIO_MSIMAADPCM 0x03070000
|
#define BUF_AUDIO_MSIMAADPCM 0x03070000
|
||||||
#define BUF_AUDIO_MSGSM 0x03080000
|
#define BUF_AUDIO_MSGSM 0x03080000
|
||||||
#define BUF_AUDIO_VORBIS 0x03090000
|
#define BUF_AUDIO_VORBIS 0x03090000
|
||||||
#define BUF_AUDIO_IMC 0x030a0000
|
#define BUF_AUDIO_IMC 0x030a0000
|
||||||
#define BUF_AUDIO_LH 0x030b0000
|
#define BUF_AUDIO_LH 0x030b0000
|
||||||
#define BUF_AUDIO_VOXWARE 0x030c0000
|
#define BUF_AUDIO_VOXWARE 0x030c0000
|
||||||
#define BUF_AUDIO_ACELPNET 0x030d0000
|
#define BUF_AUDIO_ACELPNET 0x030d0000
|
||||||
#define BUF_AUDIO_AAC 0x030e0000
|
#define BUF_AUDIO_AAC 0x030e0000
|
||||||
#define BUF_AUDIO_DNET 0x030f0000
|
#define BUF_AUDIO_DNET 0x030f0000
|
||||||
#define BUF_AUDIO_VIVOG723 0x03100000
|
#define BUF_AUDIO_VIVOG723 0x03100000
|
||||||
#define BUF_AUDIO_DK3ADPCM 0x03110000
|
#define BUF_AUDIO_DK3ADPCM 0x03110000
|
||||||
#define BUF_AUDIO_DK4ADPCM 0x03120000
|
#define BUF_AUDIO_DK4ADPCM 0x03120000
|
||||||
#define BUF_AUDIO_ROQ 0x03130000
|
#define BUF_AUDIO_ROQ 0x03130000
|
||||||
#define BUF_AUDIO_QTIMAADPCM 0x03140000
|
#define BUF_AUDIO_QTIMAADPCM 0x03140000
|
||||||
#define BUF_AUDIO_MAC3 0x03150000
|
#define BUF_AUDIO_MAC3 0x03150000
|
||||||
#define BUF_AUDIO_MAC6 0x03160000
|
#define BUF_AUDIO_MAC6 0x03160000
|
||||||
#define BUF_AUDIO_QDESIGN1 0x03170000
|
#define BUF_AUDIO_QDESIGN1 0x03170000
|
||||||
#define BUF_AUDIO_QDESIGN2 0x03180000
|
#define BUF_AUDIO_QDESIGN2 0x03180000
|
||||||
#define BUF_AUDIO_QCLP 0x03190000
|
#define BUF_AUDIO_QCLP 0x03190000
|
||||||
#define BUF_AUDIO_SMJPEG_IMA 0x031A0000
|
#define BUF_AUDIO_SMJPEG_IMA 0x031A0000
|
||||||
#define BUF_AUDIO_VQA_IMA 0x031B0000
|
#define BUF_AUDIO_VQA_IMA 0x031B0000
|
||||||
#define BUF_AUDIO_MULAW 0x031C0000
|
#define BUF_AUDIO_MULAW 0x031C0000
|
||||||
#define BUF_AUDIO_ALAW 0x031D0000
|
#define BUF_AUDIO_ALAW 0x031D0000
|
||||||
#define BUF_AUDIO_GSM610 0x031E0000
|
#define BUF_AUDIO_GSM610 0x031E0000
|
||||||
#define BUF_AUDIO_EA_ADPCM 0x031F0000
|
#define BUF_AUDIO_EA_ADPCM 0x031F0000
|
||||||
#define BUF_AUDIO_WMAV2 0x03200000
|
#define BUF_AUDIO_WMAV2 0x03200000
|
||||||
#define BUF_AUDIO_COOK 0x03210000
|
#define BUF_AUDIO_COOK 0x03210000
|
||||||
#define BUF_AUDIO_ATRK 0x03220000
|
#define BUF_AUDIO_ATRK 0x03220000
|
||||||
#define BUF_AUDIO_14_4 0x03230000
|
#define BUF_AUDIO_14_4 0x03230000
|
||||||
#define BUF_AUDIO_28_8 0x03240000
|
#define BUF_AUDIO_28_8 0x03240000
|
||||||
#define BUF_AUDIO_SIPRO 0x03250000
|
#define BUF_AUDIO_SIPRO 0x03250000
|
||||||
#define BUF_AUDIO_WMAV3 0x03260000
|
#define BUF_AUDIO_WMAV3 0x03260000
|
||||||
#define BUF_AUDIO_INTERPLAY 0x03270000
|
#define BUF_AUDIO_INTERPLAY 0x03270000
|
||||||
#define BUF_AUDIO_XA_ADPCM 0x03280000
|
#define BUF_AUDIO_XA_ADPCM 0x03280000
|
||||||
#define BUF_AUDIO_WESTWOOD 0x03290000
|
#define BUF_AUDIO_WESTWOOD 0x03290000
|
||||||
#define BUF_AUDIO_DIALOGIC_IMA 0x032A0000
|
#define BUF_AUDIO_DIALOGIC_IMA 0x032A0000
|
||||||
#define BUF_AUDIO_NSF 0x032B0000
|
#define BUF_AUDIO_NSF 0x032B0000
|
||||||
#define BUF_AUDIO_FLAC 0x032C0000
|
#define BUF_AUDIO_FLAC 0x032C0000
|
||||||
#define BUF_AUDIO_DV 0x032D0000
|
#define BUF_AUDIO_DV 0x032D0000
|
||||||
#define BUF_AUDIO_WMAV 0x032E0000
|
#define BUF_AUDIO_WMAV 0x032E0000
|
||||||
#define BUF_AUDIO_SPEEX 0x032F0000
|
#define BUF_AUDIO_SPEEX 0x032F0000
|
||||||
#define BUF_AUDIO_RAWPCM 0x03300000
|
#define BUF_AUDIO_RAWPCM 0x03300000
|
||||||
#define BUF_AUDIO_4X_ADPCM 0x03310000
|
#define BUF_AUDIO_4X_ADPCM 0x03310000
|
||||||
*/
|
*/
|
||||||
{0, NULL}
|
{0, NULL}
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,11 +42,11 @@ G_BEGIN_DECLS
|
||||||
"green_mask = (int) " G_STRINGIFY (g_mask) ", " \
|
"green_mask = (int) " G_STRINGIFY (g_mask) ", " \
|
||||||
"blue_mask = (int) " G_STRINGIFY (b_mask)
|
"blue_mask = (int) " G_STRINGIFY (b_mask)
|
||||||
|
|
||||||
extern gchar * gst_xvid_error (int errorcode);
|
extern gchar * gst_xvid_error (int errorcode);
|
||||||
extern gboolean gst_xvid_init (void);
|
extern gboolean gst_xvid_init (void);
|
||||||
|
|
||||||
extern gint gst_xvid_structure_to_csp (GstStructure *structure,
|
extern gint gst_xvid_structure_to_csp (GstStructure *structure,
|
||||||
gint w, gint *stride, gint *bpp);
|
gint w, gint *stride, gint *bpp);
|
||||||
extern GstCaps *gst_xvid_csp_to_caps (gint csp, gint w, gint h, gdouble fps);
|
extern GstCaps *gst_xvid_csp_to_caps (gint csp, gint w, gint h, gdouble fps);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -28,7 +28,7 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
/* GError stuff */
|
/* GError stuff */
|
||||||
|
|
||||||
#define GST_PLAY_ERROR gst_play_error_quark ()
|
#define GST_PLAY_ERROR gst_play_error_quark ()
|
||||||
/* GObject stuff */
|
/* GObject stuff */
|
||||||
|
|
||||||
#define GST_TYPE_PLAY (gst_play_get_type())
|
#define GST_TYPE_PLAY (gst_play_get_type())
|
||||||
|
|
|
@ -57,7 +57,7 @@ typedef struct _GstApeDemuxClass {
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
} GstApeDemuxClass;
|
} GstApeDemuxClass;
|
||||||
|
|
||||||
GType gst_ape_demux_get_type (void);
|
GType gst_ape_demux_get_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ struct _GstCDXAParseClass {
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_cdxaparse_get_type (void);
|
GType gst_cdxaparse_get_type (void);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,9 @@ G_BEGIN_DECLS
|
||||||
#define GST_IS_CDXASTRIP_CLASS(obj) \
|
#define GST_IS_CDXASTRIP_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDXASTRIP))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDXASTRIP))
|
||||||
|
|
||||||
#define GST_CDXA_SECTOR_SIZE 2352
|
#define GST_CDXA_SECTOR_SIZE 2352
|
||||||
#define GST_CDXA_DATA_SIZE 2324
|
#define GST_CDXA_DATA_SIZE 2324
|
||||||
#define GST_CDXA_HEADER_SIZE 24
|
#define GST_CDXA_HEADER_SIZE 24
|
||||||
|
|
||||||
typedef struct _GstCDXAStrip GstCDXAStrip;
|
typedef struct _GstCDXAStrip GstCDXAStrip;
|
||||||
typedef struct _GstCDXAStripClass GstCDXAStripClass;
|
typedef struct _GstCDXAStripClass GstCDXAStripClass;
|
||||||
|
@ -54,13 +54,13 @@ struct _GstCDXAStripClass {
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_cdxastrip_get_type (void);
|
GType gst_cdxastrip_get_type (void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Also useful for CDXAparse.
|
* Also useful for CDXAparse.
|
||||||
*/
|
*/
|
||||||
GstBuffer * gst_cdxastrip_strip (GstBuffer * buf);
|
GstBuffer * gst_cdxastrip_strip (GstBuffer * buf);
|
||||||
gint gst_cdxastrip_sync (GstBuffer * buf);
|
gint gst_cdxastrip_sync (GstBuffer * buf);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,9 @@ G_BEGIN_DECLS
|
||||||
#define GST_IS_CDXASTRIP_CLASS(obj) \
|
#define GST_IS_CDXASTRIP_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDXASTRIP))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDXASTRIP))
|
||||||
|
|
||||||
#define GST_CDXA_SECTOR_SIZE 2352
|
#define GST_CDXA_SECTOR_SIZE 2352
|
||||||
#define GST_CDXA_DATA_SIZE 2324
|
#define GST_CDXA_DATA_SIZE 2324
|
||||||
#define GST_CDXA_HEADER_SIZE 24
|
#define GST_CDXA_HEADER_SIZE 24
|
||||||
|
|
||||||
typedef struct _GstCDXAStrip GstCDXAStrip;
|
typedef struct _GstCDXAStrip GstCDXAStrip;
|
||||||
typedef struct _GstCDXAStripClass GstCDXAStripClass;
|
typedef struct _GstCDXAStripClass GstCDXAStripClass;
|
||||||
|
@ -54,13 +54,13 @@ struct _GstCDXAStripClass {
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
};
|
};
|
||||||
|
|
||||||
GType gst_cdxastrip_get_type (void);
|
GType gst_cdxastrip_get_type (void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Also useful for CDXAparse.
|
* Also useful for CDXAparse.
|
||||||
*/
|
*/
|
||||||
GstBuffer * gst_cdxastrip_strip (GstBuffer * buf);
|
GstBuffer * gst_cdxastrip_strip (GstBuffer * buf);
|
||||||
gint gst_cdxastrip_sync (GstBuffer * buf);
|
gint gst_cdxastrip_sync (GstBuffer * buf);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -46,17 +46,17 @@ static int U_b_tab[256];
|
||||||
|
|
||||||
#define GAMMA_CORRECTION(x) ((int)(pow((x) / 255.0, 1.0 / gammaCorrect) * 255.0))
|
#define GAMMA_CORRECTION(x) ((int)(pow((x) / 255.0, 1.0 / gammaCorrect) * 255.0))
|
||||||
#define CHROMA_CORRECTION256(x) ((x) >= 128 \
|
#define CHROMA_CORRECTION256(x) ((x) >= 128 \
|
||||||
? 128 + Min(127, (int)(((x) - 128.0) * chromaCorrect)) \
|
? 128 + Min(127, (int)(((x) - 128.0) * chromaCorrect)) \
|
||||||
: 128 - Min(128, (int)((128.0 - (x)) * chromaCorrect)))
|
: 128 - Min(128, (int)((128.0 - (x)) * chromaCorrect)))
|
||||||
#define CHROMA_CORRECTION128(x) ((x) >= 0 \
|
#define CHROMA_CORRECTION128(x) ((x) >= 0 \
|
||||||
? Min(127, (int)(((x) * chromaCorrect))) \
|
? Min(127, (int)(((x) * chromaCorrect))) \
|
||||||
: Max(-128, (int)(((x) * chromaCorrect))))
|
: Max(-128, (int)(((x) * chromaCorrect))))
|
||||||
#define CHROMA_CORRECTION256D(x) ((x) >= 128 \
|
#define CHROMA_CORRECTION256D(x) ((x) >= 128 \
|
||||||
? 128.0 + Min(127.0, (((x) - 128.0) * chromaCorrect)) \
|
? 128.0 + Min(127.0, (((x) - 128.0) * chromaCorrect)) \
|
||||||
: 128.0 - Min(128.0, (((128.0 - (x)) * chromaCorrect))))
|
: 128.0 - Min(128.0, (((128.0 - (x)) * chromaCorrect))))
|
||||||
#define CHROMA_CORRECTION128D(x) ((x) >= 0 \
|
#define CHROMA_CORRECTION128D(x) ((x) >= 0 \
|
||||||
? Min(127.0, ((x) * chromaCorrect)) \
|
? Min(127.0, ((x) * chromaCorrect)) \
|
||||||
: Max(-128.0, ((x) * chromaCorrect)))
|
: Max(-128.0, ((x) * chromaCorrect)))
|
||||||
|
|
||||||
|
|
||||||
void gst_colorspace_I420_to_rgb16 (GstColorspace * space, unsigned char *src,
|
void gst_colorspace_I420_to_rgb16 (GstColorspace * space, unsigned char *src,
|
||||||
|
@ -345,14 +345,14 @@ free_bits_at_bottom (a)
|
||||||
*
|
*
|
||||||
* InitColor16Dither --
|
* InitColor16Dither --
|
||||||
*
|
*
|
||||||
* To get rid of the multiply and other conversions in color
|
* To get rid of the multiply and other conversions in color
|
||||||
* dither, we use a lookup table.
|
* dither, we use a lookup table.
|
||||||
*
|
*
|
||||||
* Results:
|
* Results:
|
||||||
* None.
|
* None.
|
||||||
*
|
*
|
||||||
* Side effects:
|
* Side effects:
|
||||||
* The lookup tables are initialized.
|
* The lookup tables are initialized.
|
||||||
*
|
*
|
||||||
*--------------------------------------------------------------
|
*--------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -85,10 +85,10 @@ GstColorspaceYUVTables * gst_colorspace_init_yuv(long depth,
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
GstColorspaceConverter* gst_colorspace_yuv2rgb_get_converter (const GstCaps *from, const GstCaps *to);
|
GstColorspaceConverter* gst_colorspace_yuv2rgb_get_converter (const GstCaps *from, const GstCaps *to);
|
||||||
#define gst_colorspace_convert(converter, src, dest) \
|
#define gst_colorspace_convert(converter, src, dest) \
|
||||||
(converter)->convert((converter), (src), (dest))
|
(converter)->convert((converter), (src), (dest))
|
||||||
void gst_colorspace_converter_destroy (GstColorspaceConverter *space);
|
void gst_colorspace_converter_destroy (GstColorspaceConverter *space);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
|
@ -340,57 +340,57 @@ gst_iir_equalizer_get_property (GObject * object, guint prop_id,
|
||||||
|
|
||||||
/* start of code that is type specific */
|
/* start of code that is type specific */
|
||||||
|
|
||||||
#define CREATE_OPTIMIZED_FUNCTIONS(TYPE,BIG_TYPE,MIN_VAL,MAX_VAL) \
|
#define CREATE_OPTIMIZED_FUNCTIONS(TYPE,BIG_TYPE,MIN_VAL,MAX_VAL) \
|
||||||
typedef struct { \
|
typedef struct { \
|
||||||
TYPE x1, x2; /* history of input values for a filter */ \
|
TYPE x1, x2; /* history of input values for a filter */ \
|
||||||
TYPE y1, y2; /* history of output values for a filter */ \
|
TYPE y1, y2; /* history of output values for a filter */ \
|
||||||
} SecondOrderHistory ## TYPE; \
|
} SecondOrderHistory ## TYPE; \
|
||||||
\
|
\
|
||||||
static inline TYPE \
|
static inline TYPE \
|
||||||
one_step_ ## TYPE (SecondOrderFilter *filter, \
|
one_step_ ## TYPE (SecondOrderFilter *filter, \
|
||||||
SecondOrderHistory ## TYPE *history, TYPE input) \
|
SecondOrderHistory ## TYPE *history, TYPE input) \
|
||||||
{ \
|
{ \
|
||||||
/* calculate output */ \
|
/* calculate output */ \
|
||||||
TYPE output = filter->alpha * (input - history->x2) + \
|
TYPE output = filter->alpha * (input - history->x2) + \
|
||||||
filter->gamma * history->y1 - filter->beta * history->y2; \
|
filter->gamma * history->y1 - filter->beta * history->y2; \
|
||||||
/* update history */ \
|
/* update history */ \
|
||||||
history->y2 = history->y1; \
|
history->y2 = history->y1; \
|
||||||
history->y1 = output; \
|
history->y1 = output; \
|
||||||
history->x2 = history->x1; \
|
history->x2 = history->x1; \
|
||||||
history->x1 = input; \
|
history->x1 = input; \
|
||||||
\
|
\
|
||||||
return output; \
|
return output; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static const guint \
|
static const guint \
|
||||||
history_size_ ## TYPE = sizeof (SecondOrderHistory ## TYPE); \
|
history_size_ ## TYPE = sizeof (SecondOrderHistory ## TYPE); \
|
||||||
\
|
\
|
||||||
static void \
|
static void \
|
||||||
gst_iir_equ_process_ ## TYPE (GstIirEqualizer *equ, guint8 *data, \
|
gst_iir_equ_process_ ## TYPE (GstIirEqualizer *equ, guint8 *data, \
|
||||||
guint size, guint channels) \
|
guint size, guint channels) \
|
||||||
{ \
|
{ \
|
||||||
guint frames = size / channels / sizeof (TYPE); \
|
guint frames = size / channels / sizeof (TYPE); \
|
||||||
guint i, c, f; \
|
guint i, c, f; \
|
||||||
BIG_TYPE cur; \
|
BIG_TYPE cur; \
|
||||||
TYPE val; \
|
TYPE val; \
|
||||||
\
|
\
|
||||||
for (i = 0; i < frames; i++) { \
|
for (i = 0; i < frames; i++) { \
|
||||||
for (c = 0; c < channels; c++) { \
|
for (c = 0; c < channels; c++) { \
|
||||||
SecondOrderHistory ## TYPE *history = equ->history; \
|
SecondOrderHistory ## TYPE *history = equ->history; \
|
||||||
val = *((TYPE *) data); \
|
val = *((TYPE *) data); \
|
||||||
cur = 0; \
|
cur = 0; \
|
||||||
for (f = 0; f < equ->freq_count; f++) { \
|
for (f = 0; f < equ->freq_count; f++) { \
|
||||||
SecondOrderFilter *filter = &equ->filter[f]; \
|
SecondOrderFilter *filter = &equ->filter[f]; \
|
||||||
\
|
\
|
||||||
cur += one_step_ ## TYPE (filter, history, val); \
|
cur += one_step_ ## TYPE (filter, history, val); \
|
||||||
history++; \
|
history++; \
|
||||||
} \
|
} \
|
||||||
cur += val * 0.25; \
|
cur += val * 0.25; \
|
||||||
cur = CLAMP (cur, MIN_VAL, MAX_VAL); \
|
cur = CLAMP (cur, MIN_VAL, MAX_VAL); \
|
||||||
*((TYPE *) data) = (TYPE) cur; \
|
*((TYPE *) data) = (TYPE) cur; \
|
||||||
data += sizeof (TYPE); \
|
data += sizeof (TYPE); \
|
||||||
} \
|
} \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
CREATE_OPTIMIZED_FUNCTIONS (gint16, gint, -32768, 32767);
|
CREATE_OPTIMIZED_FUNCTIONS (gint16, gint, -32768, 32767);
|
||||||
|
|
|
@ -94,9 +94,9 @@ typedef struct FT_Info
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FESTIVAL))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FESTIVAL))
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GST_FESTIVAL_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
GST_FESTIVAL_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
||||||
|
|
||||||
GST_FESTIVAL_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
GST_FESTIVAL_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
||||||
} GstFestivalFlags;
|
} GstFestivalFlags;
|
||||||
|
|
||||||
typedef struct _GstFestival GstFestival;
|
typedef struct _GstFestival GstFestival;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* GStreamer
|
/* GStreamer
|
||||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
* <2003> David Schleef <ds@schleef.org>
|
* <2003> David Schleef <ds@schleef.org>
|
||||||
* <2004> Benjamin Otte <otte@gnome.org>
|
* <2004> Benjamin Otte <otte@gnome.org>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* GStreamer
|
/* GStreamer
|
||||||
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
* Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
|
||||||
* <2004> Benjamin Otte <otte@gnome.org>
|
* <2004> Benjamin Otte <otte@gnome.org>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* GStreamer
|
/* GStreamer
|
||||||
* Copyright (C) <2003> David A. Schleef <ds@schleef.org>
|
* Copyright (C) <2003> David A. Schleef <ds@schleef.org>
|
||||||
* <2004> Benjamin Otte <otte@gnome.org
|
* <2004> Benjamin Otte <otte@gnome.org
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Library General Public
|
* modify it under the terms of the GNU Library General Public
|
||||||
|
@ -31,8 +31,8 @@ typedef struct _GstVideoImage GstVideoImage;
|
||||||
typedef struct _GstVideoFormat GstVideoFormat;
|
typedef struct _GstVideoFormat GstVideoFormat;
|
||||||
|
|
||||||
struct _GstVideoColor {
|
struct _GstVideoColor {
|
||||||
int Y, U, V;
|
int Y, U, V;
|
||||||
int R, G, B;
|
int R, G, B;
|
||||||
};
|
};
|
||||||
extern const GstVideoColor GST_VIDEO_COLOR_WHITE;
|
extern const GstVideoColor GST_VIDEO_COLOR_WHITE;
|
||||||
extern const GstVideoColor GST_VIDEO_COLOR_YELLOW;
|
extern const GstVideoColor GST_VIDEO_COLOR_YELLOW;
|
||||||
|
@ -50,64 +50,64 @@ extern const GstVideoColor GST_VIDEO_COLOR_DARK_GREY;
|
||||||
|
|
||||||
struct _GstVideoImage
|
struct _GstVideoImage
|
||||||
{
|
{
|
||||||
guint8 * dest; /* pointer to first byte of video data */
|
guint8 * dest; /* pointer to first byte of video data */
|
||||||
guint8 * yp, *up, *vp; /* pointers to first byte of each component
|
guint8 * yp, *up, *vp; /* pointers to first byte of each component
|
||||||
* for both packed/planar YUV and RGB */
|
* for both packed/planar YUV and RGB */
|
||||||
guint8 * endptr; /* pointer to byte beyond last video data */
|
guint8 * endptr; /* pointer to byte beyond last video data */
|
||||||
guint ystride;
|
guint ystride;
|
||||||
guint ustride;
|
guint ustride;
|
||||||
guint vstride;
|
guint vstride;
|
||||||
guint width;
|
guint width;
|
||||||
guint height;
|
guint height;
|
||||||
const GstVideoFormat * format;
|
const GstVideoFormat * format;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstVideoFormat
|
struct _GstVideoFormat
|
||||||
{
|
{
|
||||||
char * fourcc;
|
char * fourcc;
|
||||||
char * name;
|
char * name;
|
||||||
int bitspp;
|
int bitspp;
|
||||||
void (* paint_setup) (GstVideoImage * p, char *dest);
|
void (* paint_setup) (GstVideoImage * p, char *dest);
|
||||||
void (* paint_hline) (GstVideoImage * p, int x, int y, int w, const GstVideoColor *c);
|
void (* paint_hline) (GstVideoImage * p, int x, int y, int w, const GstVideoColor *c);
|
||||||
void (* copy_hline) (GstVideoImage * dest, int destx, int desty,
|
void (* copy_hline) (GstVideoImage * dest, int destx, int desty,
|
||||||
GstVideoImage * src, int srcx, int srcy, int w);
|
GstVideoImage * src, int srcx, int srcy, int w);
|
||||||
int ext_caps;
|
int ext_caps;
|
||||||
int depth;
|
int depth;
|
||||||
guint red_mask;
|
guint red_mask;
|
||||||
guint green_mask;
|
guint green_mask;
|
||||||
guint blue_mask;
|
guint blue_mask;
|
||||||
};
|
};
|
||||||
|
|
||||||
const GstVideoFormat * gst_video_format_find_by_fourcc (int find_fourcc);
|
const GstVideoFormat * gst_video_format_find_by_fourcc (int find_fourcc);
|
||||||
const GstVideoFormat * gst_video_format_find_by_name (const char *name);
|
const GstVideoFormat * gst_video_format_find_by_name (const char *name);
|
||||||
const GstVideoFormat * gst_video_format_find_by_structure (const GstStructure *structure);
|
const GstVideoFormat * gst_video_format_find_by_structure (const GstStructure *structure);
|
||||||
GstStructure * gst_video_format_get_structure (const GstVideoFormat *format);
|
GstStructure * gst_video_format_get_structure (const GstVideoFormat *format);
|
||||||
guint gst_video_format_get_size (const GstVideoFormat *format,
|
guint gst_video_format_get_size (const GstVideoFormat *format,
|
||||||
guint w, guint h);
|
guint w, guint h);
|
||||||
|
|
||||||
extern const GstVideoFormat gst_video_format_list[];
|
extern const GstVideoFormat gst_video_format_list[];
|
||||||
extern const guint gst_video_format_count;
|
extern const guint gst_video_format_count;
|
||||||
|
|
||||||
void gst_video_image_setup (GstVideoImage *image,
|
void gst_video_image_setup (GstVideoImage *image,
|
||||||
const GstVideoFormat *format,
|
const GstVideoFormat *format,
|
||||||
guint8 *data, guint w, guint h);
|
guint8 *data, guint w, guint h);
|
||||||
|
|
||||||
/* drawing operations */
|
/* drawing operations */
|
||||||
void gst_video_image_draw_hline (GstVideoImage *image,
|
void gst_video_image_draw_hline (GstVideoImage *image,
|
||||||
gint x, gint y, gint w,
|
gint x, gint y, gint w,
|
||||||
const GstVideoColor *c);
|
const GstVideoColor *c);
|
||||||
void gst_video_image_draw_rectangle (GstVideoImage *image,
|
void gst_video_image_draw_rectangle (GstVideoImage *image,
|
||||||
gint x, gint y, gint w, gint h,
|
gint x, gint y, gint w, gint h,
|
||||||
const GstVideoColor *c, gboolean filled);
|
const GstVideoColor *c, gboolean filled);
|
||||||
void gst_video_image_copy_hline (GstVideoImage *dest,
|
void gst_video_image_copy_hline (GstVideoImage *dest,
|
||||||
gint xdest, gint ydest,
|
gint xdest, gint ydest,
|
||||||
GstVideoImage *src,
|
GstVideoImage *src,
|
||||||
gint xsrc, gint ysrc, gint w);
|
gint xsrc, gint ysrc, gint w);
|
||||||
void gst_video_image_copy_area (GstVideoImage *dest,
|
void gst_video_image_copy_area (GstVideoImage *dest,
|
||||||
gint xdest, gint ydest,
|
gint xdest, gint ydest,
|
||||||
GstVideoImage *src,
|
GstVideoImage *src,
|
||||||
gint xsrc, gint ysrc,
|
gint xsrc, gint ysrc,
|
||||||
gint w, gint h);
|
gint w, gint h);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ extern "C" {
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/bytestream/bytestream.h>
|
#include <gst/bytestream/bytestream.h>
|
||||||
|
|
||||||
#define GST_TYPE_MODPLUG \
|
#define GST_TYPE_MODPLUG \
|
||||||
(gst_modplug_get_type())
|
(gst_modplug_get_type())
|
||||||
|
|
||||||
|
|
|
@ -5,125 +5,125 @@
|
||||||
|
|
||||||
typedef struct tagITFILEHEADER
|
typedef struct tagITFILEHEADER
|
||||||
{
|
{
|
||||||
DWORD id; /* 0x4D504D49 */
|
DWORD id; /* 0x4D504D49 */
|
||||||
CHAR songname[26];
|
CHAR songname[26];
|
||||||
WORD reserved1; /* 0x1004 */
|
WORD reserved1; /* 0x1004 */
|
||||||
WORD ordnum;
|
WORD ordnum;
|
||||||
WORD insnum;
|
WORD insnum;
|
||||||
WORD smpnum;
|
WORD smpnum;
|
||||||
WORD patnum;
|
WORD patnum;
|
||||||
WORD cwtv;
|
WORD cwtv;
|
||||||
WORD cmwt;
|
WORD cmwt;
|
||||||
WORD flags;
|
WORD flags;
|
||||||
WORD special;
|
WORD special;
|
||||||
BYTE globalvol;
|
BYTE globalvol;
|
||||||
BYTE mv;
|
BYTE mv;
|
||||||
BYTE speed;
|
BYTE speed;
|
||||||
BYTE tempo;
|
BYTE tempo;
|
||||||
BYTE sep;
|
BYTE sep;
|
||||||
BYTE zero;
|
BYTE zero;
|
||||||
WORD msglength;
|
WORD msglength;
|
||||||
DWORD msgoffset;
|
DWORD msgoffset;
|
||||||
DWORD reserved2;
|
DWORD reserved2;
|
||||||
BYTE chnpan[64];
|
BYTE chnpan[64];
|
||||||
BYTE chnvol[64];
|
BYTE chnvol[64];
|
||||||
} ITFILEHEADER;
|
} ITFILEHEADER;
|
||||||
|
|
||||||
|
|
||||||
typedef struct tagITENVELOPE
|
typedef struct tagITENVELOPE
|
||||||
{
|
{
|
||||||
BYTE flags;
|
BYTE flags;
|
||||||
BYTE num;
|
BYTE num;
|
||||||
BYTE lpb;
|
BYTE lpb;
|
||||||
BYTE lpe;
|
BYTE lpe;
|
||||||
BYTE slb;
|
BYTE slb;
|
||||||
BYTE sle;
|
BYTE sle;
|
||||||
BYTE data[25*3];
|
BYTE data[25*3];
|
||||||
BYTE reserved;
|
BYTE reserved;
|
||||||
} ITENVELOPE;
|
} ITENVELOPE;
|
||||||
|
|
||||||
/* Old Impulse Instrument Format (cmwt < 0x200) */
|
/* Old Impulse Instrument Format (cmwt < 0x200) */
|
||||||
typedef struct tagITOLDINSTRUMENT
|
typedef struct tagITOLDINSTRUMENT
|
||||||
{
|
{
|
||||||
DWORD id; /* IMPI = 0x49504D49 */
|
DWORD id; /* IMPI = 0x49504D49 */
|
||||||
CHAR filename[12]; /* DOS file name */
|
CHAR filename[12]; /* DOS file name */
|
||||||
BYTE zero;
|
BYTE zero;
|
||||||
BYTE flags;
|
BYTE flags;
|
||||||
BYTE vls;
|
BYTE vls;
|
||||||
BYTE vle;
|
BYTE vle;
|
||||||
BYTE sls;
|
BYTE sls;
|
||||||
BYTE sle;
|
BYTE sle;
|
||||||
WORD reserved1;
|
WORD reserved1;
|
||||||
WORD fadeout;
|
WORD fadeout;
|
||||||
BYTE nna;
|
BYTE nna;
|
||||||
BYTE dnc;
|
BYTE dnc;
|
||||||
WORD trkvers;
|
WORD trkvers;
|
||||||
BYTE nos;
|
BYTE nos;
|
||||||
BYTE reserved2;
|
BYTE reserved2;
|
||||||
CHAR name[26];
|
CHAR name[26];
|
||||||
WORD reserved3[3];
|
WORD reserved3[3];
|
||||||
BYTE keyboard[240];
|
BYTE keyboard[240];
|
||||||
BYTE volenv[200];
|
BYTE volenv[200];
|
||||||
BYTE nodes[50];
|
BYTE nodes[50];
|
||||||
} ITOLDINSTRUMENT;
|
} ITOLDINSTRUMENT;
|
||||||
|
|
||||||
|
|
||||||
/* Impulse Instrument Format */
|
/* Impulse Instrument Format */
|
||||||
typedef struct tagITINSTRUMENT
|
typedef struct tagITINSTRUMENT
|
||||||
{
|
{
|
||||||
DWORD id;
|
DWORD id;
|
||||||
CHAR filename[12];
|
CHAR filename[12];
|
||||||
BYTE zero;
|
BYTE zero;
|
||||||
BYTE nna;
|
BYTE nna;
|
||||||
BYTE dct;
|
BYTE dct;
|
||||||
BYTE dca;
|
BYTE dca;
|
||||||
WORD fadeout;
|
WORD fadeout;
|
||||||
signed char pps;
|
signed char pps;
|
||||||
BYTE ppc;
|
BYTE ppc;
|
||||||
BYTE gbv;
|
BYTE gbv;
|
||||||
BYTE dfp;
|
BYTE dfp;
|
||||||
BYTE rv;
|
BYTE rv;
|
||||||
BYTE rp;
|
BYTE rp;
|
||||||
WORD trkvers;
|
WORD trkvers;
|
||||||
BYTE nos;
|
BYTE nos;
|
||||||
BYTE reserved1;
|
BYTE reserved1;
|
||||||
CHAR name[26];
|
CHAR name[26];
|
||||||
BYTE ifc;
|
BYTE ifc;
|
||||||
BYTE ifr;
|
BYTE ifr;
|
||||||
BYTE mch;
|
BYTE mch;
|
||||||
BYTE mpr;
|
BYTE mpr;
|
||||||
WORD mbank;
|
WORD mbank;
|
||||||
BYTE keyboard[240];
|
BYTE keyboard[240];
|
||||||
ITENVELOPE volenv;
|
ITENVELOPE volenv;
|
||||||
ITENVELOPE panenv;
|
ITENVELOPE panenv;
|
||||||
ITENVELOPE pitchenv;
|
ITENVELOPE pitchenv;
|
||||||
BYTE dummy[4]; /* was 7, but IT v2.17 saves 554 bytes */
|
BYTE dummy[4]; /* was 7, but IT v2.17 saves 554 bytes */
|
||||||
} ITINSTRUMENT;
|
} ITINSTRUMENT;
|
||||||
|
|
||||||
|
|
||||||
/* IT Sample Format */
|
/* IT Sample Format */
|
||||||
typedef struct ITSAMPLESTRUCT
|
typedef struct ITSAMPLESTRUCT
|
||||||
{
|
{
|
||||||
DWORD id; /* 0x53504D49 */
|
DWORD id; /* 0x53504D49 */
|
||||||
CHAR filename[12];
|
CHAR filename[12];
|
||||||
BYTE zero;
|
BYTE zero;
|
||||||
BYTE gvl;
|
BYTE gvl;
|
||||||
BYTE flags;
|
BYTE flags;
|
||||||
BYTE vol;
|
BYTE vol;
|
||||||
CHAR name[26];
|
CHAR name[26];
|
||||||
BYTE cvt;
|
BYTE cvt;
|
||||||
BYTE dfp;
|
BYTE dfp;
|
||||||
DWORD length;
|
DWORD length;
|
||||||
DWORD loopbegin;
|
DWORD loopbegin;
|
||||||
DWORD loopend;
|
DWORD loopend;
|
||||||
DWORD C5Speed;
|
DWORD C5Speed;
|
||||||
DWORD susloopbegin;
|
DWORD susloopbegin;
|
||||||
DWORD susloopend;
|
DWORD susloopend;
|
||||||
DWORD samplepointer;
|
DWORD samplepointer;
|
||||||
BYTE vis;
|
BYTE vis;
|
||||||
BYTE vid;
|
BYTE vid;
|
||||||
BYTE vir;
|
BYTE vir;
|
||||||
BYTE vit;
|
BYTE vit;
|
||||||
} ITSAMPLESTRUCT;
|
} ITSAMPLESTRUCT;
|
||||||
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
|
@ -43,40 +43,40 @@ void ModPlug_Seek(ModPlugFile* file, int millisecond);
|
||||||
|
|
||||||
enum _ModPlug_Flags
|
enum _ModPlug_Flags
|
||||||
{
|
{
|
||||||
MODPLUG_ENABLE_OVERSAMPLING = 1 << 0, /* Enable oversampling (*highly* recommended) */
|
MODPLUG_ENABLE_OVERSAMPLING = 1 << 0, /* Enable oversampling (*highly* recommended) */
|
||||||
MODPLUG_ENABLE_NOISE_REDUCTION = 1 << 1, /* Enable noise reduction */
|
MODPLUG_ENABLE_NOISE_REDUCTION = 1 << 1, /* Enable noise reduction */
|
||||||
MODPLUG_ENABLE_REVERB = 1 << 2, /* Enable reverb */
|
MODPLUG_ENABLE_REVERB = 1 << 2, /* Enable reverb */
|
||||||
MODPLUG_ENABLE_MEGABASS = 1 << 3, /* Enable megabass */
|
MODPLUG_ENABLE_MEGABASS = 1 << 3, /* Enable megabass */
|
||||||
MODPLUG_ENABLE_SURROUND = 1 << 4 /* Enable surround sound. */
|
MODPLUG_ENABLE_SURROUND = 1 << 4 /* Enable surround sound. */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum _ModPlug_ResamplingMode
|
enum _ModPlug_ResamplingMode
|
||||||
{
|
{
|
||||||
MODPLUG_RESAMPLE_NEAREST = 0, /* No interpolation (very fast, extremely bad sound quality) */
|
MODPLUG_RESAMPLE_NEAREST = 0, /* No interpolation (very fast, extremely bad sound quality) */
|
||||||
MODPLUG_RESAMPLE_LINEAR = 1, /* Linear interpolation (fast, good quality) */
|
MODPLUG_RESAMPLE_LINEAR = 1, /* Linear interpolation (fast, good quality) */
|
||||||
MODPLUG_RESAMPLE_SPLINE = 2, /* Cubic spline interpolation (high quality) */
|
MODPLUG_RESAMPLE_SPLINE = 2, /* Cubic spline interpolation (high quality) */
|
||||||
MODPLUG_RESAMPLE_FIR = 3 /* 8-tap fir filter (extremely high quality) */
|
MODPLUG_RESAMPLE_FIR = 3 /* 8-tap fir filter (extremely high quality) */
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _ModPlug_Settings
|
typedef struct _ModPlug_Settings
|
||||||
{
|
{
|
||||||
int mFlags; /* One or more of the MODPLUG_ENABLE_* flags above, bitwise-OR'ed */
|
int mFlags; /* One or more of the MODPLUG_ENABLE_* flags above, bitwise-OR'ed */
|
||||||
|
|
||||||
/* Note that ModPlug always decodes sound at 44100kHz, 32 bit, stereo and then
|
/* Note that ModPlug always decodes sound at 44100kHz, 32 bit, stereo and then
|
||||||
* down-mixes to the settings you choose. */
|
* down-mixes to the settings you choose. */
|
||||||
int mChannels; /* Number of channels - 1 for mono or 2 for stereo */
|
int mChannels; /* Number of channels - 1 for mono or 2 for stereo */
|
||||||
int mBits; /* Bits per sample - 8, 16, or 32 */
|
int mBits; /* Bits per sample - 8, 16, or 32 */
|
||||||
int mFrequency; /* Sampling rate - 11025, 22050, or 44100 */
|
int mFrequency; /* Sampling rate - 11025, 22050, or 44100 */
|
||||||
int mResamplingMode; /* One of MODPLUG_RESAMPLE_*, above */
|
int mResamplingMode; /* One of MODPLUG_RESAMPLE_*, above */
|
||||||
|
|
||||||
int mReverbDepth; /* Reverb level 0(quiet)-100(loud) */
|
int mReverbDepth; /* Reverb level 0(quiet)-100(loud) */
|
||||||
int mReverbDelay; /* Reverb delay in ms, usually 40-200ms */
|
int mReverbDelay; /* Reverb delay in ms, usually 40-200ms */
|
||||||
int mBassAmount; /* XBass level 0(quiet)-100(loud) */
|
int mBassAmount; /* XBass level 0(quiet)-100(loud) */
|
||||||
int mBassRange; /* XBass cutoff in Hz 10-100 */
|
int mBassRange; /* XBass cutoff in Hz 10-100 */
|
||||||
int mSurroundDepth; /* Surround level 0(quiet)-100(heavy) */
|
int mSurroundDepth; /* Surround level 0(quiet)-100(heavy) */
|
||||||
int mSurroundDelay; /* Surround delay in ms, usually 5-40ms */
|
int mSurroundDelay; /* Surround delay in ms, usually 5-40ms */
|
||||||
int mLoopCount; /* Number of times to loop. Zero prevents looping.
|
int mLoopCount; /* Number of times to loop. Zero prevents looping.
|
||||||
-1 loops forever. */
|
-1 loops forever. */
|
||||||
} ModPlug_Settings;
|
} ModPlug_Settings;
|
||||||
|
|
||||||
/* Get and set the mod decoder settings. All options, except for channels, bits-per-sample,
|
/* Get and set the mod decoder settings. All options, except for channels, bits-per-sample,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -79,15 +79,15 @@ inline void ProcessPlugins(int n) {}
|
||||||
|
|
||||||
#define GlobalFreePtr(p) free((void *)(p))
|
#define GlobalFreePtr(p) free((void *)(p))
|
||||||
|
|
||||||
#define strnicmp(a,b,c) strncasecmp(a,b,c)
|
#define strnicmp(a,b,c) strncasecmp(a,b,c)
|
||||||
#define wsprintf sprintf
|
#define wsprintf sprintf
|
||||||
|
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
#define FALSE false
|
#define FALSE false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
#define TRUE true
|
#define TRUE true
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* MSC_VER */
|
#endif /* MSC_VER */
|
||||||
|
|
|
@ -71,8 +71,8 @@ static double picture_rates[16] = {
|
||||||
|
|
||||||
/* defined but not used
|
/* defined but not used
|
||||||
static double ratio [16] = { 0., 1., 0.6735, 0.7031, 0.7615, 0.8055,
|
static double ratio [16] = { 0., 1., 0.6735, 0.7031, 0.7615, 0.8055,
|
||||||
0.8437, 0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575,
|
0.8437, 0.8935, 0.9157, 0.9815, 1.0255, 1.0695, 1.0950, 1.1575,
|
||||||
1.2015, 0.};
|
1.2015, 0.};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GST_DISABLE_GST_DEBUG
|
#ifndef GST_DISABLE_GST_DEBUG
|
||||||
|
|
|
@ -87,7 +87,7 @@ struct _GstMPEG1SystemEncode {
|
||||||
GList *mta;
|
GList *mta;
|
||||||
|
|
||||||
/* stream input pads */
|
/* stream input pads */
|
||||||
GstPad *private_1_pad[8]; /* up to 8 ac3 audio tracks <grumble> */
|
GstPad *private_1_pad[8]; /* up to 8 ac3 audio tracks <grumble> */
|
||||||
GstPad *private_2_pad;
|
GstPad *private_2_pad;
|
||||||
GstPad *video_pad[16];
|
GstPad *video_pad[16];
|
||||||
GstPad *audio_pad[32];
|
GstPad *audio_pad[32];
|
||||||
|
|
|
@ -1,37 +1,37 @@
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* Generating a MPEG/SYSTEMS *
|
* Generating a MPEG/SYSTEMS *
|
||||||
* MULTIPLEXED VIDEO/AUDIO STREAM *
|
* MULTIPLEXED VIDEO/AUDIO STREAM *
|
||||||
* from two MPEG source streams *
|
* from two MPEG source streams *
|
||||||
* Christoph Moar *
|
* Christoph Moar *
|
||||||
* SIEMENS CORPORATE RESEARCH AND DEVELOPMENT ST SN 11 / T SN 6 *
|
* SIEMENS CORPORATE RESEARCH AND DEVELOPMENT ST SN 11 / T SN 6 *
|
||||||
* (C) 1994 1995 *
|
* (C) 1994 1995 *
|
||||||
**************************************************************************
|
**************************************************************************
|
||||||
* Restrictions apply. Will not support the whole MPEG/SYSTEM Standard. *
|
* Restrictions apply. Will not support the whole MPEG/SYSTEM Standard. *
|
||||||
* Basically, will generate Constrained System Parameter Files. *
|
* Basically, will generate Constrained System Parameter Files. *
|
||||||
* Mixes only one audio and/or one video stream. Might be expanded. *
|
* Mixes only one audio and/or one video stream. Might be expanded. *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* mplex - MPEG/SYSTEMS multiplexer *
|
* mplex - MPEG/SYSTEMS multiplexer *
|
||||||
* Copyright (C) 1994 1995 Christoph Moar *
|
* Copyright (C) 1994 1995 Christoph Moar *
|
||||||
* Siemens ZFE ST SN 11 / T SN 6 *
|
* Siemens ZFE ST SN 11 / T SN 6 *
|
||||||
* *
|
* *
|
||||||
* moar@informatik.tu-muenchen.de *
|
* moar@informatik.tu-muenchen.de *
|
||||||
* (Christoph Moar) *
|
* (Christoph Moar) *
|
||||||
* *
|
* *
|
||||||
* This program is free software; you can redistribute it and/or modify *
|
* This program is free software; you can redistribute it and/or modify *
|
||||||
* it under the terms of the GNU General Public License as published by *
|
* it under the terms of the GNU General Public License as published by *
|
||||||
* the Free Software Foundation; either version 2 of the License, or *
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
* (at your option) any later version. *
|
* (at your option) any later version. *
|
||||||
* *
|
* *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, *
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
* GNU General Public License for more details. *
|
* GNU General Public License for more details. *
|
||||||
* *
|
* *
|
||||||
* You should have received a copy of the GNU General Public License *
|
* You should have received a copy of the GNU General Public License *
|
||||||
* along with this program; if not, write to the Free Software *
|
* along with this program; if not, write to the Free Software *
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,83 +40,83 @@
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#define PACK_START 0x000001ba
|
#define PACK_START 0x000001ba
|
||||||
#define SYS_HEADER_START 0x000001bb
|
#define SYS_HEADER_START 0x000001bb
|
||||||
#define ISO11172_END 0x000001b9
|
#define ISO11172_END 0x000001b9
|
||||||
#define PACKET_START 0x000001
|
#define PACKET_START 0x000001
|
||||||
|
|
||||||
#define CLOCKS 90000.0 /* System Clock Hertz */
|
#define CLOCKS 90000.0 /* System Clock Hertz */
|
||||||
|
|
||||||
#define AFTER_PACKET_LENGTH 15 /* No of non-data-bytes */
|
#define AFTER_PACKET_LENGTH 15 /* No of non-data-bytes */
|
||||||
/* following the packet */
|
/* following the packet */
|
||||||
/* length field */
|
/* length field */
|
||||||
#define LAST_SCR_BYTE_IN_PACK 9 /* No of bytes in pack */
|
#define LAST_SCR_BYTE_IN_PACK 9 /* No of bytes in pack */
|
||||||
/* preceding, and */
|
/* preceding, and */
|
||||||
/* including, the SCR */
|
/* including, the SCR */
|
||||||
|
|
||||||
/* The following values for sys_header_length & size are only valid for */
|
/* The following values for sys_header_length & size are only valid for */
|
||||||
/* System streams consisting of two basic streams. When wrapping around */
|
/* System streams consisting of two basic streams. When wrapping around */
|
||||||
/* the system layer on a single video or a single audio stream, those */
|
/* the system layer on a single video or a single audio stream, those */
|
||||||
/* values get decreased by 3. */
|
/* values get decreased by 3. */
|
||||||
|
|
||||||
#define SYS_HEADER_LENGTH 12 /* length of Sys Header */
|
#define SYS_HEADER_LENGTH 12 /* length of Sys Header */
|
||||||
/* after start code and */
|
/* after start code and */
|
||||||
/* length field */
|
/* length field */
|
||||||
|
|
||||||
#define SYS_HEADER_SIZE 18 /* incl. start code and */
|
#define SYS_HEADER_SIZE 18 /* incl. start code and */
|
||||||
/* length field */
|
/* length field */
|
||||||
#define PACK_HEADER_SIZE 12
|
#define PACK_HEADER_SIZE 12
|
||||||
|
|
||||||
#define PACKET_HEADER_SIZE 6
|
#define PACKET_HEADER_SIZE 6
|
||||||
|
|
||||||
#define MAX_SECTOR_SIZE 0x20000 /* Max Sektor Groesse */
|
#define MAX_SECTOR_SIZE 0x20000 /* Max Sektor Groesse */
|
||||||
|
|
||||||
#define STREAMS_VIDEO 1
|
#define STREAMS_VIDEO 1
|
||||||
#define STREAMS_AUDIO 2
|
#define STREAMS_AUDIO 2
|
||||||
#define STREAMS_BOTH 3
|
#define STREAMS_BOTH 3
|
||||||
|
|
||||||
#define AUDIO_STREAMS 0xb8 /* Marker Audio Streams */
|
#define AUDIO_STREAMS 0xb8 /* Marker Audio Streams */
|
||||||
#define VIDEO_STREAMS 0xb9 /* Marker Video Streams */
|
#define VIDEO_STREAMS 0xb9 /* Marker Video Streams */
|
||||||
#define AUDIO_STR_0 0xc0 /* Marker Audio Stream0 */
|
#define AUDIO_STR_0 0xc0 /* Marker Audio Stream0 */
|
||||||
#define VIDEO_STR_0 0xe0 /* Marker Video Stream0 */
|
#define VIDEO_STR_0 0xe0 /* Marker Video Stream0 */
|
||||||
#define PADDING_STR 0xbe /* Marker Padding Stream*/
|
#define PADDING_STR 0xbe /* Marker Padding Stream*/
|
||||||
|
|
||||||
#define ZERO_STUFFING_BYTE 0
|
#define ZERO_STUFFING_BYTE 0
|
||||||
#define STUFFING_BYTE 0xff
|
#define STUFFING_BYTE 0xff
|
||||||
#define RESERVED_BYTE 0xff
|
#define RESERVED_BYTE 0xff
|
||||||
#define TIMESTAMPS_NO 0 /* Flag NO timestamps */
|
#define TIMESTAMPS_NO 0 /* Flag NO timestamps */
|
||||||
#define TIMESTAMPS_PTS 1 /* Flag PTS timestamp */
|
#define TIMESTAMPS_PTS 1 /* Flag PTS timestamp */
|
||||||
#define TIMESTAMPS_PTS_DTS 2 /* Flag BOTH timestamps */
|
#define TIMESTAMPS_PTS_DTS 2 /* Flag BOTH timestamps */
|
||||||
|
|
||||||
#define MARKER_SCR 2 /* Marker SCR */
|
#define MARKER_SCR 2 /* Marker SCR */
|
||||||
#define MARKER_JUST_PTS 2 /* Marker only PTS */
|
#define MARKER_JUST_PTS 2 /* Marker only PTS */
|
||||||
#define MARKER_PTS 3 /* Marker PTS */
|
#define MARKER_PTS 3 /* Marker PTS */
|
||||||
#define MARKER_DTS 1 /* Marker DTS */
|
#define MARKER_DTS 1 /* Marker DTS */
|
||||||
#define MARKER_NO_TIMESTAMPS 0x0f /* Marker NO timestamps */
|
#define MARKER_NO_TIMESTAMPS 0x0f /* Marker NO timestamps */
|
||||||
|
|
||||||
#define STATUS_AUDIO_END 0 /* Statusmessage A end */
|
#define STATUS_AUDIO_END 0 /* Statusmessage A end */
|
||||||
#define STATUS_VIDEO_END 1 /* Statusmessage V end */
|
#define STATUS_VIDEO_END 1 /* Statusmessage V end */
|
||||||
#define STATUS_AUDIO_TIME_OUT 2 /* Statusmessage A out */
|
#define STATUS_AUDIO_TIME_OUT 2 /* Statusmessage A out */
|
||||||
#define STATUS_VIDEO_TIME_OUT 3 /* Statusmessage V out */
|
#define STATUS_VIDEO_TIME_OUT 3 /* Statusmessage V out */
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Typ- und Strukturdefinitionen
|
Typ- und Strukturdefinitionen
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
typedef struct sector_struc /* A sector, can contain pack, sys header */
|
typedef struct sector_struc /* A sector, can contain pack, sys header */
|
||||||
/* and packet. */
|
/* and packet. */
|
||||||
{ unsigned char buf [MAX_SECTOR_SIZE] ;
|
{ unsigned char buf [MAX_SECTOR_SIZE] ;
|
||||||
unsigned int length_of_sector ;
|
unsigned int length_of_sector ;
|
||||||
unsigned int length_of_packet_data ;
|
unsigned int length_of_packet_data ;
|
||||||
guint64 TS ;
|
guint64 TS ;
|
||||||
} Sector_struc;
|
} Sector_struc;
|
||||||
|
|
||||||
typedef struct pack_struc /* Pack Info */
|
typedef struct pack_struc /* Pack Info */
|
||||||
{ unsigned char buf [PACK_HEADER_SIZE];
|
{ unsigned char buf [PACK_HEADER_SIZE];
|
||||||
guint64 SCR;
|
guint64 SCR;
|
||||||
} Pack_struc;
|
} Pack_struc;
|
||||||
|
|
||||||
typedef struct sys_header_struc /* System Header Info */
|
typedef struct sys_header_struc /* System Header Info */
|
||||||
{ unsigned char buf [SYS_HEADER_SIZE];
|
{ unsigned char buf [SYS_HEADER_SIZE];
|
||||||
} Sys_header_struc;
|
} Sys_header_struc;
|
||||||
|
|
||||||
|
@ -126,15 +126,15 @@ typedef struct sys_header_struc /* System Header Info */
|
||||||
|
|
||||||
/* systems.c */
|
/* systems.c */
|
||||||
void create_sector (Sector_struc *sector, Pack_struc *pack, Sys_header_struc *sys_header,
|
void create_sector (Sector_struc *sector, Pack_struc *pack, Sys_header_struc *sys_header,
|
||||||
unsigned int packet_size, unsigned char *inputbuffer, unsigned char type, unsigned char buffer_scale,
|
unsigned int packet_size, unsigned char *inputbuffer, unsigned char type, unsigned char buffer_scale,
|
||||||
unsigned int buffer_size, unsigned char buffers, guint64 PTS, guint64 DTS,
|
unsigned int buffer_size, unsigned char buffers, guint64 PTS, guint64 DTS,
|
||||||
unsigned char timestamps, unsigned int which_streams);
|
unsigned char timestamps, unsigned int which_streams);
|
||||||
|
|
||||||
void create_pack (Pack_struc *pack, guint64 SCR, unsigned int mux_rate);
|
void create_pack (Pack_struc *pack, guint64 SCR, unsigned int mux_rate);
|
||||||
|
|
||||||
void create_sys_header (Sys_header_struc *sys_header, unsigned int rate_bound, unsigned char audio_bound,
|
void create_sys_header (Sys_header_struc *sys_header, unsigned int rate_bound, unsigned char audio_bound,
|
||||||
unsigned char fixed, unsigned char CSPS, unsigned char audio_lock, unsigned char video_lock,
|
unsigned char fixed, unsigned char CSPS, unsigned char audio_lock, unsigned char video_lock,
|
||||||
unsigned char video_bound, unsigned char stream1, unsigned char buffer1_scale, unsigned int buffer1_size,
|
unsigned char video_bound, unsigned char stream1, unsigned char buffer1_scale, unsigned int buffer1_size,
|
||||||
unsigned char stream2, unsigned char buffer2_scale, unsigned int buffer2_size, unsigned int which_streams);
|
unsigned char stream2, unsigned char buffer2_scale, unsigned int buffer2_size, unsigned int which_streams);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -29,10 +29,10 @@ buffer_timecode (timecode, marker, buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
creates a complete sector.
|
creates a complete sector.
|
||||||
Also copies Pack and Sys_Header informations into the
|
Also copies Pack and Sys_Header informations into the
|
||||||
sector buffer, then reads a packet full of data from
|
sector buffer, then reads a packet full of data from
|
||||||
the input stream into the sector buffer.
|
the input stream into the sector buffer.
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,8 +170,8 @@ create_sector (sector, pack, sys_header,
|
||||||
|
|
||||||
/* zero byte stuffing in the last Packet of a stream */
|
/* zero byte stuffing in the last Packet of a stream */
|
||||||
/* we don't need this any more, since we shortenend the packet */
|
/* we don't need this any more, since we shortenend the packet */
|
||||||
/* for (j=tmp; j<i; j++) */
|
/* for (j=tmp; j<i; j++) */
|
||||||
/* *(index++)=(unsigned char) ZERO_STUFFING_BYTE; */
|
/* *(index++)=(unsigned char) ZERO_STUFFING_BYTE; */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,9 +184,9 @@ create_sector (sector, pack, sys_header,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
writes specifical pack header information into a buffer
|
writes specifical pack header information into a buffer
|
||||||
later this will be copied from the sector routine into
|
later this will be copied from the sector routine into
|
||||||
the sector buffer
|
the sector buffer
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -214,9 +214,9 @@ create_pack (pack, SCR, mux_rate)
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
writes specifical system header information into a buffer
|
writes specifical system header information into a buffer
|
||||||
later this will be copied from the sector routine into
|
later this will be copied from the sector routine into
|
||||||
the sector buffer
|
the sector buffer
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -49,7 +49,7 @@ struct _Mp1VideoParse {
|
||||||
|
|
||||||
GstPad *sinkpad,*srcpad;
|
GstPad *sinkpad,*srcpad;
|
||||||
|
|
||||||
GstBuffer *partialbuf; /* previous buffer (if carryover) */
|
GstBuffer *partialbuf; /* previous buffer (if carryover) */
|
||||||
gulong next_buffer_offset;
|
gulong next_buffer_offset;
|
||||||
gboolean need_resync;
|
gboolean need_resync;
|
||||||
gboolean in_flush;
|
gboolean in_flush;
|
||||||
|
|
|
@ -57,8 +57,8 @@ struct _GstMpeg2Subt {
|
||||||
|
|
||||||
GstPad *videopad,*subtitlepad,*srcpad;
|
GstPad *videopad,*subtitlepad,*srcpad;
|
||||||
|
|
||||||
GstBuffer *partialbuf; /* Collect together subtitle buffers until we have a full control sequence */
|
GstBuffer *partialbuf; /* Collect together subtitle buffers until we have a full control sequence */
|
||||||
GstBuffer *hold_frame; /* Hold back one frame of video */
|
GstBuffer *hold_frame; /* Hold back one frame of video */
|
||||||
GstBuffer *still_frame;
|
GstBuffer *still_frame;
|
||||||
|
|
||||||
guint16 packet_size;
|
guint16 packet_size;
|
||||||
|
|
|
@ -180,12 +180,12 @@ mp3_type_frame_length_from_header (guint32 header, guint * put_layer,
|
||||||
* (0.024%) per try. This makes the function for calculating false positives
|
* (0.024%) per try. This makes the function for calculating false positives
|
||||||
* 1 - (1 - ((63 / 2 ^18) ^ GST_MP3_TYPEFIND_MIN_HEADERS)) ^ buffersize)
|
* 1 - (1 - ((63 / 2 ^18) ^ GST_MP3_TYPEFIND_MIN_HEADERS)) ^ buffersize)
|
||||||
* This has the following probabilities of false positives:
|
* This has the following probabilities of false positives:
|
||||||
* bufsize MIN_HEADERS
|
* bufsize MIN_HEADERS
|
||||||
* (bytes) 1 2 3 4
|
* (bytes) 1 2 3 4
|
||||||
* 4096 62.6% 0.02% 0% 0%
|
* 4096 62.6% 0.02% 0% 0%
|
||||||
* 16384 98% 0.09% 0% 0%
|
* 16384 98% 0.09% 0% 0%
|
||||||
* 1 MiB 100% 5.88% 0% 0%
|
* 1 MiB 100% 5.88% 0% 0%
|
||||||
* 1 GiB 100% 100% 1.44% 0%
|
* 1 GiB 100% 100% 1.44% 0%
|
||||||
* 1 TiB 100% 100% 100% 0.35%
|
* 1 TiB 100% 100% 100% 0.35%
|
||||||
* This means that the current choice (3 headers by most of the time 4096 byte
|
* This means that the current choice (3 headers by most of the time 4096 byte
|
||||||
* buffers is pretty safe for now.
|
* buffers is pretty safe for now.
|
||||||
|
@ -361,8 +361,8 @@ gst_mp3parse_chain (GstPad * pad, GstBuffer * buf)
|
||||||
|
|
||||||
/* mask the bits which are allowed to differ between frames */
|
/* mask the bits which are allowed to differ between frames */
|
||||||
#define HDRMASK ~((0xF << 12) /* bitrate */ | \
|
#define HDRMASK ~((0xF << 12) /* bitrate */ | \
|
||||||
(0x1 << 9) /* padding */ | \
|
(0x1 << 9) /* padding */ | \
|
||||||
(0x3 << 4)) /*mode extension */
|
(0x3 << 4)) /*mode extension */
|
||||||
|
|
||||||
if ((header2 & HDRMASK) != (header & HDRMASK)) { /* require 2 matching headers in a row */
|
if ((header2 & HDRMASK) != (header & HDRMASK)) { /* require 2 matching headers in a row */
|
||||||
GST_DEBUG
|
GST_DEBUG
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct _GstMPEGAudioParse {
|
||||||
|
|
||||||
GstPad *sinkpad,*srcpad;
|
GstPad *sinkpad,*srcpad;
|
||||||
|
|
||||||
GstBuffer *partialbuf; /* previous buffer (if carryover) */
|
GstBuffer *partialbuf; /* previous buffer (if carryover) */
|
||||||
guint skip; /* number of frames to skip */
|
guint skip; /* number of frames to skip */
|
||||||
guint bit_rate;
|
guint bit_rate;
|
||||||
gint channels, rate, layer;
|
gint channels, rate, layer;
|
||||||
|
|
|
@ -47,7 +47,7 @@ typedef enum {
|
||||||
GST_MULTIFILESINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
GST_MULTIFILESINK_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
||||||
GST_MULTIFILESINK_NEWFILE = (GST_ELEMENT_FLAG_LAST << 1),
|
GST_MULTIFILESINK_NEWFILE = (GST_ELEMENT_FLAG_LAST << 1),
|
||||||
|
|
||||||
GST_MULTIFILESINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 4)
|
GST_MULTIFILESINK_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 4)
|
||||||
} GstMultiFileSinkFlags;
|
} GstMultiFileSinkFlags;
|
||||||
|
|
||||||
struct _GstMultiFileSink {
|
struct _GstMultiFileSink {
|
||||||
|
|
|
@ -38,26 +38,26 @@ typedef struct _GstOverlay GstOverlay;
|
||||||
typedef struct _GstOverlayClass GstOverlayClass;
|
typedef struct _GstOverlayClass GstOverlayClass;
|
||||||
|
|
||||||
struct _GstOverlay {
|
struct _GstOverlay {
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
GstPad *sinkpad1;
|
GstPad *sinkpad1;
|
||||||
GstPad *sinkpad2;
|
GstPad *sinkpad2;
|
||||||
GstPad *sinkpad3;
|
GstPad *sinkpad3;
|
||||||
|
|
||||||
gint format;
|
gint format;
|
||||||
gint width;
|
gint width;
|
||||||
gint height;
|
gint height;
|
||||||
|
|
||||||
gint duration;
|
gint duration;
|
||||||
gint position;
|
gint position;
|
||||||
|
|
||||||
gint type;
|
gint type;
|
||||||
gint fps;
|
gint fps;
|
||||||
gint border;
|
gint border;
|
||||||
gint depth;
|
gint depth;
|
||||||
|
|
||||||
gdouble framerate;
|
gdouble framerate;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstOverlayClass {
|
struct _GstOverlayClass {
|
||||||
|
|
|
@ -33,13 +33,13 @@ GST_DEBUG_CATEGORY_EXTERN (qtdemux_debug);
|
||||||
/* temporary hack */
|
/* temporary hack */
|
||||||
#define gst_util_dump_mem(a,b) /* */
|
#define gst_util_dump_mem(a,b) /* */
|
||||||
|
|
||||||
#define QTDEMUX_GUINT32_GET(a) (GST_READ_UINT32_BE(a))
|
#define QTDEMUX_GUINT32_GET(a) (GST_READ_UINT32_BE(a))
|
||||||
#define QTDEMUX_GUINT24_GET(a) (GST_READ_UINT32_BE(a) >> 8)
|
#define QTDEMUX_GUINT24_GET(a) (GST_READ_UINT32_BE(a) >> 8)
|
||||||
#define QTDEMUX_GUINT16_GET(a) (GST_READ_UINT16_BE(a))
|
#define QTDEMUX_GUINT16_GET(a) (GST_READ_UINT16_BE(a))
|
||||||
#define QTDEMUX_GUINT8_GET(a) (*(guint8 *)(a))
|
#define QTDEMUX_GUINT8_GET(a) (*(guint8 *)(a))
|
||||||
#define QTDEMUX_FP32_GET(a) ((GST_READ_UINT32_BE(a))/65536.0)
|
#define QTDEMUX_FP32_GET(a) ((GST_READ_UINT32_BE(a))/65536.0)
|
||||||
#define QTDEMUX_FP16_GET(a) ((GST_READ_UINT16_BE(a))/256.0)
|
#define QTDEMUX_FP16_GET(a) ((GST_READ_UINT16_BE(a))/256.0)
|
||||||
#define QTDEMUX_FOURCC_GET(a) (GST_READ_UINT32_LE(a))
|
#define QTDEMUX_FOURCC_GET(a) (GST_READ_UINT32_LE(a))
|
||||||
|
|
||||||
#define QTDEMUX_GUINT64_GET(a) ((((guint64)QTDEMUX_GUINT32_GET(a))<<32)|QTDEMUX_GUINT32_GET(((void *)a)+4))
|
#define QTDEMUX_GUINT64_GET(a) ((((guint64)QTDEMUX_GUINT32_GET(a))<<32)|QTDEMUX_GUINT32_GET(((void *)a)+4))
|
||||||
|
|
||||||
|
@ -781,76 +781,76 @@ gst_qtdemux_add_stream (GstQTDemux * qtdemux,
|
||||||
|
|
||||||
#define QT_CONTAINER 1
|
#define QT_CONTAINER 1
|
||||||
|
|
||||||
#define FOURCC_moov GST_MAKE_FOURCC('m','o','o','v')
|
#define FOURCC_moov GST_MAKE_FOURCC('m','o','o','v')
|
||||||
#define FOURCC_mvhd GST_MAKE_FOURCC('m','v','h','d')
|
#define FOURCC_mvhd GST_MAKE_FOURCC('m','v','h','d')
|
||||||
#define FOURCC_clip GST_MAKE_FOURCC('c','l','i','p')
|
#define FOURCC_clip GST_MAKE_FOURCC('c','l','i','p')
|
||||||
#define FOURCC_trak GST_MAKE_FOURCC('t','r','a','k')
|
#define FOURCC_trak GST_MAKE_FOURCC('t','r','a','k')
|
||||||
#define FOURCC_udta GST_MAKE_FOURCC('u','d','t','a')
|
#define FOURCC_udta GST_MAKE_FOURCC('u','d','t','a')
|
||||||
#define FOURCC_ctab GST_MAKE_FOURCC('c','t','a','b')
|
#define FOURCC_ctab GST_MAKE_FOURCC('c','t','a','b')
|
||||||
#define FOURCC_tkhd GST_MAKE_FOURCC('t','k','h','d')
|
#define FOURCC_tkhd GST_MAKE_FOURCC('t','k','h','d')
|
||||||
#define FOURCC_crgn GST_MAKE_FOURCC('c','r','g','n')
|
#define FOURCC_crgn GST_MAKE_FOURCC('c','r','g','n')
|
||||||
#define FOURCC_matt GST_MAKE_FOURCC('m','a','t','t')
|
#define FOURCC_matt GST_MAKE_FOURCC('m','a','t','t')
|
||||||
#define FOURCC_kmat GST_MAKE_FOURCC('k','m','a','t')
|
#define FOURCC_kmat GST_MAKE_FOURCC('k','m','a','t')
|
||||||
#define FOURCC_edts GST_MAKE_FOURCC('e','d','t','s')
|
#define FOURCC_edts GST_MAKE_FOURCC('e','d','t','s')
|
||||||
#define FOURCC_elst GST_MAKE_FOURCC('e','l','s','t')
|
#define FOURCC_elst GST_MAKE_FOURCC('e','l','s','t')
|
||||||
#define FOURCC_load GST_MAKE_FOURCC('l','o','a','d')
|
#define FOURCC_load GST_MAKE_FOURCC('l','o','a','d')
|
||||||
#define FOURCC_tref GST_MAKE_FOURCC('t','r','e','f')
|
#define FOURCC_tref GST_MAKE_FOURCC('t','r','e','f')
|
||||||
#define FOURCC_imap GST_MAKE_FOURCC('i','m','a','p')
|
#define FOURCC_imap GST_MAKE_FOURCC('i','m','a','p')
|
||||||
#define FOURCC___in GST_MAKE_FOURCC(' ',' ','i','n')
|
#define FOURCC___in GST_MAKE_FOURCC(' ',' ','i','n')
|
||||||
#define FOURCC___ty GST_MAKE_FOURCC(' ',' ','t','y')
|
#define FOURCC___ty GST_MAKE_FOURCC(' ',' ','t','y')
|
||||||
#define FOURCC_mdia GST_MAKE_FOURCC('m','d','i','a')
|
#define FOURCC_mdia GST_MAKE_FOURCC('m','d','i','a')
|
||||||
#define FOURCC_mdhd GST_MAKE_FOURCC('m','d','h','d')
|
#define FOURCC_mdhd GST_MAKE_FOURCC('m','d','h','d')
|
||||||
#define FOURCC_hdlr GST_MAKE_FOURCC('h','d','l','r')
|
#define FOURCC_hdlr GST_MAKE_FOURCC('h','d','l','r')
|
||||||
#define FOURCC_minf GST_MAKE_FOURCC('m','i','n','f')
|
#define FOURCC_minf GST_MAKE_FOURCC('m','i','n','f')
|
||||||
#define FOURCC_vmhd GST_MAKE_FOURCC('v','m','h','d')
|
#define FOURCC_vmhd GST_MAKE_FOURCC('v','m','h','d')
|
||||||
#define FOURCC_smhd GST_MAKE_FOURCC('s','m','h','d')
|
#define FOURCC_smhd GST_MAKE_FOURCC('s','m','h','d')
|
||||||
#define FOURCC_gmhd GST_MAKE_FOURCC('g','m','h','d')
|
#define FOURCC_gmhd GST_MAKE_FOURCC('g','m','h','d')
|
||||||
#define FOURCC_gmin GST_MAKE_FOURCC('g','m','i','n')
|
#define FOURCC_gmin GST_MAKE_FOURCC('g','m','i','n')
|
||||||
#define FOURCC_dinf GST_MAKE_FOURCC('d','i','n','f')
|
#define FOURCC_dinf GST_MAKE_FOURCC('d','i','n','f')
|
||||||
#define FOURCC_dref GST_MAKE_FOURCC('d','r','e','f')
|
#define FOURCC_dref GST_MAKE_FOURCC('d','r','e','f')
|
||||||
#define FOURCC_stbl GST_MAKE_FOURCC('s','t','b','l')
|
#define FOURCC_stbl GST_MAKE_FOURCC('s','t','b','l')
|
||||||
#define FOURCC_stsd GST_MAKE_FOURCC('s','t','s','d')
|
#define FOURCC_stsd GST_MAKE_FOURCC('s','t','s','d')
|
||||||
#define FOURCC_stts GST_MAKE_FOURCC('s','t','t','s')
|
#define FOURCC_stts GST_MAKE_FOURCC('s','t','t','s')
|
||||||
#define FOURCC_stss GST_MAKE_FOURCC('s','t','s','s')
|
#define FOURCC_stss GST_MAKE_FOURCC('s','t','s','s')
|
||||||
#define FOURCC_stsc GST_MAKE_FOURCC('s','t','s','c')
|
#define FOURCC_stsc GST_MAKE_FOURCC('s','t','s','c')
|
||||||
#define FOURCC_stsz GST_MAKE_FOURCC('s','t','s','z')
|
#define FOURCC_stsz GST_MAKE_FOURCC('s','t','s','z')
|
||||||
#define FOURCC_stco GST_MAKE_FOURCC('s','t','c','o')
|
#define FOURCC_stco GST_MAKE_FOURCC('s','t','c','o')
|
||||||
#define FOURCC_vide GST_MAKE_FOURCC('v','i','d','e')
|
#define FOURCC_vide GST_MAKE_FOURCC('v','i','d','e')
|
||||||
#define FOURCC_soun GST_MAKE_FOURCC('s','o','u','n')
|
#define FOURCC_soun GST_MAKE_FOURCC('s','o','u','n')
|
||||||
#define FOURCC_co64 GST_MAKE_FOURCC('c','o','6','4')
|
#define FOURCC_co64 GST_MAKE_FOURCC('c','o','6','4')
|
||||||
#define FOURCC_cmov GST_MAKE_FOURCC('c','m','o','v')
|
#define FOURCC_cmov GST_MAKE_FOURCC('c','m','o','v')
|
||||||
#define FOURCC_dcom GST_MAKE_FOURCC('d','c','o','m')
|
#define FOURCC_dcom GST_MAKE_FOURCC('d','c','o','m')
|
||||||
#define FOURCC_cmvd GST_MAKE_FOURCC('c','m','v','d')
|
#define FOURCC_cmvd GST_MAKE_FOURCC('c','m','v','d')
|
||||||
#define FOURCC_hint GST_MAKE_FOURCC('h','i','n','t')
|
#define FOURCC_hint GST_MAKE_FOURCC('h','i','n','t')
|
||||||
#define FOURCC_mp4a GST_MAKE_FOURCC('m','p','4','a')
|
#define FOURCC_mp4a GST_MAKE_FOURCC('m','p','4','a')
|
||||||
#define FOURCC_mp4v GST_MAKE_FOURCC('m','p','4','v')
|
#define FOURCC_mp4v GST_MAKE_FOURCC('m','p','4','v')
|
||||||
#define FOURCC_wave GST_MAKE_FOURCC('w','a','v','e')
|
#define FOURCC_wave GST_MAKE_FOURCC('w','a','v','e')
|
||||||
#define FOURCC_appl GST_MAKE_FOURCC('a','p','p','l')
|
#define FOURCC_appl GST_MAKE_FOURCC('a','p','p','l')
|
||||||
#define FOURCC_esds GST_MAKE_FOURCC('e','s','d','s')
|
#define FOURCC_esds GST_MAKE_FOURCC('e','s','d','s')
|
||||||
#define FOURCC_hnti GST_MAKE_FOURCC('h','n','t','i')
|
#define FOURCC_hnti GST_MAKE_FOURCC('h','n','t','i')
|
||||||
#define FOURCC_rtp_ GST_MAKE_FOURCC('r','t','p',' ')
|
#define FOURCC_rtp_ GST_MAKE_FOURCC('r','t','p',' ')
|
||||||
#define FOURCC_sdp_ GST_MAKE_FOURCC('s','d','p',' ')
|
#define FOURCC_sdp_ GST_MAKE_FOURCC('s','d','p',' ')
|
||||||
#define FOURCC_meta GST_MAKE_FOURCC('m','e','t','a')
|
#define FOURCC_meta GST_MAKE_FOURCC('m','e','t','a')
|
||||||
#define FOURCC_ilst GST_MAKE_FOURCC('i','l','s','t')
|
#define FOURCC_ilst GST_MAKE_FOURCC('i','l','s','t')
|
||||||
#define FOURCC__nam GST_MAKE_FOURCC(0xa9,'n','a','m')
|
#define FOURCC__nam GST_MAKE_FOURCC(0xa9,'n','a','m')
|
||||||
#define FOURCC__ART GST_MAKE_FOURCC(0xa9,'A','R','T')
|
#define FOURCC__ART GST_MAKE_FOURCC(0xa9,'A','R','T')
|
||||||
#define FOURCC__wrt GST_MAKE_FOURCC(0xa9,'w','r','t')
|
#define FOURCC__wrt GST_MAKE_FOURCC(0xa9,'w','r','t')
|
||||||
#define FOURCC__grp GST_MAKE_FOURCC(0xa9,'g','r','p')
|
#define FOURCC__grp GST_MAKE_FOURCC(0xa9,'g','r','p')
|
||||||
#define FOURCC__alb GST_MAKE_FOURCC(0xa9,'a','l','b')
|
#define FOURCC__alb GST_MAKE_FOURCC(0xa9,'a','l','b')
|
||||||
#define FOURCC_gnre GST_MAKE_FOURCC('g','n','r','e')
|
#define FOURCC_gnre GST_MAKE_FOURCC('g','n','r','e')
|
||||||
#define FOURCC_disc GST_MAKE_FOURCC('d','i','s','c')
|
#define FOURCC_disc GST_MAKE_FOURCC('d','i','s','c')
|
||||||
#define FOURCC_trkn GST_MAKE_FOURCC('t','r','k','n')
|
#define FOURCC_trkn GST_MAKE_FOURCC('t','r','k','n')
|
||||||
#define FOURCC_cpil GST_MAKE_FOURCC('c','p','i','l')
|
#define FOURCC_cpil GST_MAKE_FOURCC('c','p','i','l')
|
||||||
#define FOURCC_tmpo GST_MAKE_FOURCC('t','m','p','o')
|
#define FOURCC_tmpo GST_MAKE_FOURCC('t','m','p','o')
|
||||||
#define FOURCC__too GST_MAKE_FOURCC(0xa9,'t','o','o')
|
#define FOURCC__too GST_MAKE_FOURCC(0xa9,'t','o','o')
|
||||||
#define FOURCC_____ GST_MAKE_FOURCC('-','-','-','-')
|
#define FOURCC_____ GST_MAKE_FOURCC('-','-','-','-')
|
||||||
#define FOURCC_free GST_MAKE_FOURCC('f','r','e','e')
|
#define FOURCC_free GST_MAKE_FOURCC('f','r','e','e')
|
||||||
#define FOURCC_data GST_MAKE_FOURCC('d','a','t','a')
|
#define FOURCC_data GST_MAKE_FOURCC('d','a','t','a')
|
||||||
#define FOURCC_SVQ3 GST_MAKE_FOURCC('S','V','Q','3')
|
#define FOURCC_SVQ3 GST_MAKE_FOURCC('S','V','Q','3')
|
||||||
#define FOURCC_rmra GST_MAKE_FOURCC('r','m','r','a')
|
#define FOURCC_rmra GST_MAKE_FOURCC('r','m','r','a')
|
||||||
#define FOURCC_rmda GST_MAKE_FOURCC('r','m','d','a')
|
#define FOURCC_rmda GST_MAKE_FOURCC('r','m','d','a')
|
||||||
#define FOURCC_rdrf GST_MAKE_FOURCC('r','d','r','f')
|
#define FOURCC_rdrf GST_MAKE_FOURCC('r','d','r','f')
|
||||||
#define FOURCC__gen GST_MAKE_FOURCC(0xa9, 'g', 'e', 'n')
|
#define FOURCC__gen GST_MAKE_FOURCC(0xa9, 'g', 'e', 'n')
|
||||||
|
|
||||||
static void qtdemux_dump_mvhd (GstQTDemux * qtdemux, void *buffer, int depth);
|
static void qtdemux_dump_mvhd (GstQTDemux * qtdemux, void *buffer, int depth);
|
||||||
static void qtdemux_dump_tkhd (GstQTDemux * qtdemux, void *buffer, int depth);
|
static void qtdemux_dump_tkhd (GstQTDemux * qtdemux, void *buffer, int depth);
|
||||||
|
|
|
@ -39,7 +39,7 @@ extern "C" {
|
||||||
#define GST_IS_QTDEMUX_CLASS(obj) \
|
#define GST_IS_QTDEMUX_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QTDEMUX))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_QTDEMUX))
|
||||||
|
|
||||||
#define GST_QTDEMUX_MAX_STREAMS 8
|
#define GST_QTDEMUX_MAX_STREAMS 8
|
||||||
|
|
||||||
typedef struct _GstQTDemux GstQTDemux;
|
typedef struct _GstQTDemux GstQTDemux;
|
||||||
typedef struct _GstQTDemuxClass GstQTDemuxClass;
|
typedef struct _GstQTDemuxClass GstQTDemuxClass;
|
||||||
|
|
|
@ -648,7 +648,7 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
|
||||||
movq_r2r (mm3, mm4); /* write result 4 */
|
movq_r2r (mm3, mm4); /* write result 4 */
|
||||||
|
|
||||||
/************************************************************************************************
|
/************************************************************************************************
|
||||||
End of Transpose
|
End of Transpose
|
||||||
************************************************************************************************/
|
************************************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
@ -743,8 +743,8 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
|
||||||
movq_r2m (mm0, *(dataptr + 14)); /*save y7 */
|
movq_r2m (mm0, *(dataptr + 14)); /*save y7 */
|
||||||
|
|
||||||
/************************************************
|
/************************************************
|
||||||
* End of 1st 4 rows
|
* End of 1st 4 rows
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
movq_m2r (*(dataptr + 3), mm1); /* load x1: stage 1 */
|
movq_m2r (*(dataptr + 3), mm1); /* load x1: stage 1 */
|
||||||
movq_r2r (mm7, mm0); /* copy x0 */
|
movq_r2r (mm7, mm0); /* copy x0 */
|
||||||
|
@ -864,7 +864,7 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
|
||||||
psubw_r2r (mm2, mm0); /* y7 */
|
psubw_r2r (mm2, mm0); /* y7 */
|
||||||
|
|
||||||
/************************************************************************************************
|
/************************************************************************************************
|
||||||
Start of Transpose
|
Start of Transpose
|
||||||
************************************************************************************************/
|
************************************************************************************************/
|
||||||
|
|
||||||
movq_m2r (*(dataptr + 13), mm6); /* m23:m22|m21:m20 - third line (line 6)and copy into m2 */
|
movq_m2r (*(dataptr + 13), mm6); /* m23:m22|m21:m20 - third line (line 6)and copy into m2 */
|
||||||
|
@ -999,7 +999,7 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
|
||||||
movq_r2r (mm3, mm4); /* write result 4 */
|
movq_r2r (mm3, mm4); /* write result 4 */
|
||||||
|
|
||||||
/************************************************************************************************
|
/************************************************************************************************
|
||||||
End of Transpose 2
|
End of Transpose 2
|
||||||
************************************************************************************************/
|
************************************************************************************************/
|
||||||
|
|
||||||
paddw_m2r (*(dataptr + 8), mm3); /* tmp03=x3+x4: stage 1 */
|
paddw_m2r (*(dataptr + 8), mm3); /* tmp03=x3+x4: stage 1 */
|
||||||
|
@ -1092,8 +1092,8 @@ RTjpeg_dctY (__u8 * idata, __s16 * odata, int rskip)
|
||||||
movq_r2m (mm0, *(dataptr + 14)); /*save y7 */
|
movq_r2m (mm0, *(dataptr + 14)); /*save y7 */
|
||||||
|
|
||||||
/************************************************
|
/************************************************
|
||||||
* End of 1st 4 rows
|
* End of 1st 4 rows
|
||||||
************************************************/
|
************************************************/
|
||||||
|
|
||||||
movq_m2r (*(dataptr + 3), mm1); /* load x1 : stage 1 */
|
movq_m2r (*(dataptr + 3), mm1); /* load x1 : stage 1 */
|
||||||
movq_r2r (mm7, mm0); /* copy x0 */
|
movq_r2r (mm7, mm0); /* copy x0 */
|
||||||
|
@ -1585,8 +1585,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
|
|
||||||
/*ok */
|
/*ok */
|
||||||
|
|
||||||
/* mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] */
|
/* mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] */
|
||||||
/* mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] */
|
/* mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] */
|
||||||
|
|
||||||
|
|
||||||
movq_r2r (mm0, mm2);
|
movq_r2r (mm0, mm2);
|
||||||
|
@ -1718,8 +1718,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
movq_r2r (mm5, mm1);
|
movq_r2r (mm5, mm1);
|
||||||
|
|
||||||
punpckldq_r2r (mm2, mm3); /* wsptr[0,z12],[1,z12],[2,z12],[3,z12] */
|
punpckldq_r2r (mm2, mm3); /* wsptr[0,z12],[1,z12],[2,z12],[3,z12] */
|
||||||
/* tmp7 = z11 + z13; : phase 5 */
|
/* tmp7 = z11 + z13; : phase 5 */
|
||||||
/* tmp8 = z11 - z13; : phase 5 */
|
/* tmp8 = z11 - z13; : phase 5 */
|
||||||
psubw_r2r (mm4, mm1); /* tmp8 */
|
psubw_r2r (mm4, mm1); /* tmp8 */
|
||||||
|
|
||||||
paddw_r2r (mm4, mm5); /* tmp7 */
|
paddw_r2r (mm4, mm5); /* tmp7 */
|
||||||
|
@ -1730,7 +1730,7 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
|
|
||||||
pmulhw_m2r (fix_141, mm1); /* tmp21 */
|
pmulhw_m2r (fix_141, mm1); /* tmp21 */
|
||||||
/* tmp20 = MULTIPLY(z12, (FIX_1_082392200- FIX_1_847759065)) 2*(c2-c6) */
|
/* tmp20 = MULTIPLY(z12, (FIX_1_082392200- FIX_1_847759065)) 2*(c2-c6) */
|
||||||
/* + MULTIPLY(z10, - FIX_1_847759065); : 2*c2 */
|
/* + MULTIPLY(z10, - FIX_1_847759065); : 2*c2 */
|
||||||
psllw_i2r (2, mm3);
|
psllw_i2r (2, mm3);
|
||||||
movq_r2r (mm0, mm7);
|
movq_r2r (mm0, mm7);
|
||||||
|
|
||||||
|
@ -1740,8 +1740,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
movq_m2r (*(wsptr), mm2); /* tmp0,final1 */
|
movq_m2r (*(wsptr), mm2); /* tmp0,final1 */
|
||||||
|
|
||||||
pmulhw_m2r (fix_108n184, mm6);
|
pmulhw_m2r (fix_108n184, mm6);
|
||||||
/* tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) : -2*(c2+c6) */
|
/* tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) : -2*(c2+c6) */
|
||||||
/* + MULTIPLY(z12, FIX_1_847759065); 2*c2 */
|
/* + MULTIPLY(z12, FIX_1_847759065); 2*c2 */
|
||||||
movq_r2r (mm2, mm4); /* final1 */
|
movq_r2r (mm2, mm4); /* final1 */
|
||||||
|
|
||||||
pmulhw_m2r (fix_184n261, mm0);
|
pmulhw_m2r (fix_184n261, mm0);
|
||||||
|
@ -1750,7 +1750,7 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
pmulhw_m2r (fix_184, mm3);
|
pmulhw_m2r (fix_184, mm3);
|
||||||
psubw_r2r (mm5, mm4); /* tmp0-tmp7,final1 */
|
psubw_r2r (mm5, mm4); /* tmp0-tmp7,final1 */
|
||||||
|
|
||||||
/* tmp6 = tmp22 - tmp7; phase 2 */
|
/* tmp6 = tmp22 - tmp7; phase 2 */
|
||||||
psraw_i2r (3, mm2); /* outptr[0,0],[1,0],[2,0],[3,0],final1 */
|
psraw_i2r (3, mm2); /* outptr[0,0],[1,0],[2,0],[3,0],final1 */
|
||||||
|
|
||||||
paddw_r2r (mm6, mm7); /* tmp20 */
|
paddw_r2r (mm6, mm7); /* tmp20 */
|
||||||
|
@ -1772,15 +1772,15 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
|
|
||||||
|
|
||||||
/* outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) */
|
/* outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; */
|
/* & RANGE_MASK]; */
|
||||||
/* outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) */
|
/* outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; final1 */
|
/* & RANGE_MASK]; final1 */
|
||||||
|
|
||||||
|
|
||||||
/* outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) */
|
/* outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; */
|
/* & RANGE_MASK]; */
|
||||||
/* outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) */
|
/* outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; final2 */
|
/* & RANGE_MASK]; final2 */
|
||||||
psubw_r2r (mm3, mm6); /* tmp1-tmp6,final2 */
|
psubw_r2r (mm3, mm6); /* tmp1-tmp6,final2 */
|
||||||
psraw_i2r (3, mm0); /* outptr[0,1],[1,1],[2,1],[3,1] */
|
psraw_i2r (3, mm0); /* outptr[0,1],[1,1],[2,1],[3,1] */
|
||||||
|
|
||||||
|
@ -1792,9 +1792,9 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
packuswb_r2r (mm6, mm2); /* out[0,0],[1,0],[2,0],[3,0],[0,6],[1,6],[2,6],[3,6] */
|
packuswb_r2r (mm6, mm2); /* out[0,0],[1,0],[2,0],[3,0],[0,6],[1,6],[2,6],[3,6] */
|
||||||
|
|
||||||
/* outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) */
|
/* outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; */
|
/* & RANGE_MASK]; */
|
||||||
/* outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) */
|
/* outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; final3 */
|
/* & RANGE_MASK]; final3 */
|
||||||
paddw_r2r (mm1, mm7); /* tmp4 */
|
paddw_r2r (mm1, mm7); /* tmp4 */
|
||||||
movq_r2r (mm5, mm3);
|
movq_r2r (mm5, mm3);
|
||||||
|
|
||||||
|
@ -1809,9 +1809,9 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
|
|
||||||
|
|
||||||
/* outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) */
|
/* outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; */
|
/* & RANGE_MASK]; */
|
||||||
/* outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) */
|
/* outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; final4 */
|
/* & RANGE_MASK]; final4 */
|
||||||
movq_r2r (mm4, mm6);
|
movq_r2r (mm4, mm6);
|
||||||
paddw_r2r (mm7, mm4); /* tmp3+tmp4 */
|
paddw_r2r (mm7, mm4); /* tmp3+tmp4 */
|
||||||
|
|
||||||
|
@ -1946,8 +1946,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
|
|
||||||
/*OK */
|
/*OK */
|
||||||
|
|
||||||
/* mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] */
|
/* mm0 = ;wsptr[0,tmp10],[1,tmp10],[0,tmp13],[1,tmp13] */
|
||||||
/* mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] */
|
/* mm1 = ;wsptr[0,tmp11],[1,tmp11],[0,tmp14],[1,tmp14] */
|
||||||
|
|
||||||
movq_r2r (mm0, mm2);
|
movq_r2r (mm0, mm2);
|
||||||
punpckhdq_r2r (mm4, mm6); /* wsptr[0,tmp14],[1,tmp14],[2,tmp14],[3,tmp14] */
|
punpckhdq_r2r (mm4, mm6); /* wsptr[0,tmp14],[1,tmp14],[2,tmp14],[3,tmp14] */
|
||||||
|
@ -2079,8 +2079,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
movq_r2r (mm5, mm1);
|
movq_r2r (mm5, mm1);
|
||||||
|
|
||||||
punpckldq_r2r (mm2, mm3); /* wsptr[0,z12],[1,z12],[2,z12],[3,z12] */
|
punpckldq_r2r (mm2, mm3); /* wsptr[0,z12],[1,z12],[2,z12],[3,z12] */
|
||||||
/* tmp7 = z11 + z13; : phase 5 */
|
/* tmp7 = z11 + z13; : phase 5 */
|
||||||
/* tmp8 = z11 - z13; : phase 5 */
|
/* tmp8 = z11 - z13; : phase 5 */
|
||||||
psubw_r2r (mm4, mm1); /* tmp8 */
|
psubw_r2r (mm4, mm1); /* tmp8 */
|
||||||
|
|
||||||
paddw_r2r (mm4, mm5); /* tmp7 */
|
paddw_r2r (mm4, mm5); /* tmp7 */
|
||||||
|
@ -2091,7 +2091,7 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
|
|
||||||
pmulhw_m2r (fix_141, mm1); /* tmp21 */
|
pmulhw_m2r (fix_141, mm1); /* tmp21 */
|
||||||
/* tmp20 = MULTIPLY(z12, (FIX_1_082392200- FIX_1_847759065)) : 2*(c2-c6) */
|
/* tmp20 = MULTIPLY(z12, (FIX_1_082392200- FIX_1_847759065)) : 2*(c2-c6) */
|
||||||
/* + MULTIPLY(z10, - FIX_1_847759065); : 2*c2 */
|
/* + MULTIPLY(z10, - FIX_1_847759065); : 2*c2 */
|
||||||
psllw_i2r (2, mm3);
|
psllw_i2r (2, mm3);
|
||||||
movq_r2r (mm0, mm7);
|
movq_r2r (mm0, mm7);
|
||||||
|
|
||||||
|
@ -2101,8 +2101,8 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
movq_m2r (*(wsptr), mm2); /* tmp0,final1 */
|
movq_m2r (*(wsptr), mm2); /* tmp0,final1 */
|
||||||
|
|
||||||
pmulhw_m2r (fix_108n184, mm6);
|
pmulhw_m2r (fix_108n184, mm6);
|
||||||
/* tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) : -2*(c2+c6) */
|
/* tmp22 = MULTIPLY(z10,(FIX_1_847759065 - FIX_2_613125930)) : -2*(c2+c6) */
|
||||||
/* + MULTIPLY(z12, FIX_1_847759065); : 2*c2 */
|
/* + MULTIPLY(z12, FIX_1_847759065); : 2*c2 */
|
||||||
movq_r2r (mm2, mm4); /* final1 */
|
movq_r2r (mm2, mm4); /* final1 */
|
||||||
|
|
||||||
pmulhw_m2r (fix_184n261, mm0);
|
pmulhw_m2r (fix_184n261, mm0);
|
||||||
|
@ -2111,7 +2111,7 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
pmulhw_m2r (fix_184, mm3);
|
pmulhw_m2r (fix_184, mm3);
|
||||||
psubw_r2r (mm5, mm4); /* tmp0-tmp7,final1 */
|
psubw_r2r (mm5, mm4); /* tmp0-tmp7,final1 */
|
||||||
|
|
||||||
/* tmp6 = tmp22 - tmp7; phase 2 */
|
/* tmp6 = tmp22 - tmp7; phase 2 */
|
||||||
psraw_i2r (3, mm2); /* outptr[0,0],[1,0],[2,0],[3,0],final1 */
|
psraw_i2r (3, mm2); /* outptr[0,0],[1,0],[2,0],[3,0],final1 */
|
||||||
|
|
||||||
paddw_r2r (mm6, mm7); /* tmp20 */
|
paddw_r2r (mm6, mm7); /* tmp20 */
|
||||||
|
@ -2132,15 +2132,15 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
/* Final output stage: scale down by a factor of 8 and range-limit */
|
/* Final output stage: scale down by a factor of 8 and range-limit */
|
||||||
|
|
||||||
/* outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) */
|
/* outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; */
|
/* & RANGE_MASK]; */
|
||||||
/* outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) */
|
/* outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; final1 */
|
/* & RANGE_MASK]; final1 */
|
||||||
|
|
||||||
|
|
||||||
/* outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) */
|
/* outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; */
|
/* & RANGE_MASK]; */
|
||||||
/* outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) */
|
/* outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; final2 */
|
/* & RANGE_MASK]; final2 */
|
||||||
psubw_r2r (mm3, mm6); /* tmp1-tmp6,final2 */
|
psubw_r2r (mm3, mm6); /* tmp1-tmp6,final2 */
|
||||||
psraw_i2r (3, mm0); /* outptr[0,1],[1,1],[2,1],[3,1] */
|
psraw_i2r (3, mm0); /* outptr[0,1],[1,1],[2,1],[3,1] */
|
||||||
|
|
||||||
|
@ -2152,9 +2152,9 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
packuswb_r2r (mm6, mm2); /* out[0,0],[1,0],[2,0],[3,0],[0,6],[1,6],[2,6],[3,6] */
|
packuswb_r2r (mm6, mm2); /* out[0,0],[1,0],[2,0],[3,0],[0,6],[1,6],[2,6],[3,6] */
|
||||||
|
|
||||||
/* outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) */
|
/* outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; */
|
/* & RANGE_MASK]; */
|
||||||
/* outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) */
|
/* outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; final3 */
|
/* & RANGE_MASK]; final3 */
|
||||||
paddw_r2r (mm1, mm7); /* tmp4 */
|
paddw_r2r (mm1, mm7); /* tmp4 */
|
||||||
movq_r2r (mm5, mm3);
|
movq_r2r (mm5, mm3);
|
||||||
|
|
||||||
|
@ -2169,9 +2169,9 @@ RTjpeg_idct (__u8 * odata, __s16 * data, int rskip)
|
||||||
|
|
||||||
|
|
||||||
/* outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) */
|
/* outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; */
|
/* & RANGE_MASK]; */
|
||||||
/* outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) */
|
/* outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) */
|
||||||
/* & RANGE_MASK]; final4 */
|
/* & RANGE_MASK]; final4 */
|
||||||
movq_r2r (mm4, mm6);
|
movq_r2r (mm4, mm6);
|
||||||
paddw_r2r (mm7, mm4); /* tmp3+tmp4 */
|
paddw_r2r (mm7, mm4); /* tmp3+tmp4 */
|
||||||
|
|
||||||
|
|
|
@ -49,4 +49,4 @@ extern void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb);
|
||||||
extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb);
|
extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb);
|
||||||
extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb);
|
extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb);
|
||||||
extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb);
|
extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb);
|
||||||
|
|
||||||
|
|
142
gst/tta/crc32.h
142
gst/tta/crc32.h
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* crc32.h
|
* crc32.h
|
||||||
*
|
*
|
||||||
* Description: CRC32 functions
|
* Description: CRC32 functions
|
||||||
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
|
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
|
||||||
* Pavel Zhilin <pzh@iszf.irk.ru>
|
* Pavel Zhilin <pzh@iszf.irk.ru>
|
||||||
*
|
*
|
||||||
|
@ -32,83 +32,83 @@
|
||||||
#define CRC32_H
|
#define CRC32_H
|
||||||
|
|
||||||
static const unsigned long crc32_table[256] = {
|
static const unsigned long crc32_table[256] = {
|
||||||
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
|
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
|
||||||
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
|
0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
|
||||||
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
|
0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
|
||||||
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
|
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
|
||||||
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
|
0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
|
||||||
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
|
0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
|
||||||
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
|
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
|
||||||
0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
|
0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
|
||||||
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
|
0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
|
||||||
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
|
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
|
||||||
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
|
0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
|
||||||
0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
|
0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
|
||||||
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
|
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
|
||||||
0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
|
0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
|
||||||
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
|
0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
|
||||||
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
|
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
|
||||||
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
|
0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
|
||||||
0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
|
0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
|
||||||
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
|
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
|
||||||
0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
|
0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
|
||||||
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
|
0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
|
||||||
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
|
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
|
||||||
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
|
0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
|
||||||
0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
|
0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
|
||||||
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
|
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
|
||||||
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
|
0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
|
||||||
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
|
0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
|
||||||
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
|
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
|
||||||
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
|
0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
|
||||||
0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
||||||
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
|
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
|
||||||
0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
|
0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
|
||||||
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
|
0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
|
||||||
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
|
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
|
||||||
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
|
0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
|
||||||
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
|
0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
|
||||||
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
|
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
|
||||||
0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
|
0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
|
||||||
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
|
0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
|
||||||
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
|
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
|
||||||
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
|
0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
|
||||||
0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
|
0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
|
||||||
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
|
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
|
||||||
0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
|
0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
|
||||||
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
|
0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
|
||||||
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
|
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
|
||||||
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
|
0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
|
||||||
0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
|
0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
|
||||||
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
|
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
|
||||||
0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
|
0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
|
||||||
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
|
0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
|
||||||
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
|
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
|
||||||
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
|
0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
|
||||||
0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
|
0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
|
||||||
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
|
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
|
||||||
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
|
0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
|
||||||
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
|
0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
|
||||||
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
|
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
|
||||||
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
|
0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
|
||||||
0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
||||||
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
|
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
|
||||||
0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
|
0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
|
||||||
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
|
0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
|
||||||
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
|
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
|
||||||
};
|
};
|
||||||
|
|
||||||
#define UPDATE_CRC32(x, crc) crc = \
|
#define UPDATE_CRC32(x, crc) crc = \
|
||||||
(((crc>>8) & 0x00FFFFFF) ^ crc32_table[(crc^x) & 0xFF])
|
(((crc>>8) & 0x00FFFFFF) ^ crc32_table[(crc^x) & 0xFF])
|
||||||
|
|
||||||
static unsigned long
|
static unsigned long
|
||||||
crc32 (unsigned char *buffer, unsigned long len) {
|
crc32 (unsigned char *buffer, unsigned long len) {
|
||||||
unsigned long i;
|
unsigned long i;
|
||||||
unsigned long crc = 0xFFFFFFFF;
|
unsigned long crc = 0xFFFFFFFF;
|
||||||
|
|
||||||
for (i = 0; i < len; i++) UPDATE_CRC32(buffer[i], crc);
|
for (i = 0; i < len; i++) UPDATE_CRC32(buffer[i], crc);
|
||||||
|
|
||||||
return (crc ^ 0xFFFFFFFF);
|
return (crc ^ 0xFFFFFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CRC32_H */
|
#endif /* CRC32_H */
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* filters.h
|
* filters.h
|
||||||
*
|
*
|
||||||
* Description: TTAv1 filter functions
|
* Description: TTAv1 filter functions
|
||||||
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
|
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
|
||||||
* Pavel Zhilin <pzh@iszf.irk.ru>
|
* Pavel Zhilin <pzh@iszf.irk.ru>
|
||||||
*
|
*
|
||||||
|
@ -36,75 +36,75 @@ static long flt_set[3] = {10, 9, 10};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
memshl (register long *pA, register long *pB) {
|
memshl (register long *pA, register long *pB) {
|
||||||
*pA++ = *pB++;
|
*pA++ = *pB++;
|
||||||
*pA++ = *pB++;
|
*pA++ = *pB++;
|
||||||
*pA++ = *pB++;
|
*pA++ = *pB++;
|
||||||
*pA++ = *pB++;
|
*pA++ = *pB++;
|
||||||
*pA++ = *pB++;
|
*pA++ = *pB++;
|
||||||
*pA++ = *pB++;
|
*pA++ = *pB++;
|
||||||
*pA++ = *pB++;
|
*pA++ = *pB++;
|
||||||
*pA = *pB;
|
*pA = *pB;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hybrid_filter (fltst *fs, long *in) {
|
hybrid_filter (fltst *fs, long *in) {
|
||||||
register long *pA = fs->dl;
|
register long *pA = fs->dl;
|
||||||
register long *pB = fs->qm;
|
register long *pB = fs->qm;
|
||||||
register long *pM = fs->dx;
|
register long *pM = fs->dx;
|
||||||
register long sum = fs->round;
|
register long sum = fs->round;
|
||||||
|
|
||||||
if (!fs->error) {
|
if (!fs->error) {
|
||||||
sum += *pA++ * *pB, pB++;
|
sum += *pA++ * *pB, pB++;
|
||||||
sum += *pA++ * *pB, pB++;
|
sum += *pA++ * *pB, pB++;
|
||||||
sum += *pA++ * *pB, pB++;
|
sum += *pA++ * *pB, pB++;
|
||||||
sum += *pA++ * *pB, pB++;
|
sum += *pA++ * *pB, pB++;
|
||||||
sum += *pA++ * *pB, pB++;
|
sum += *pA++ * *pB, pB++;
|
||||||
sum += *pA++ * *pB, pB++;
|
sum += *pA++ * *pB, pB++;
|
||||||
sum += *pA++ * *pB, pB++;
|
sum += *pA++ * *pB, pB++;
|
||||||
sum += *pA++ * *pB, pB++; pM += 8;
|
sum += *pA++ * *pB, pB++; pM += 8;
|
||||||
} else if (fs->error < 0) {
|
} else if (fs->error < 0) {
|
||||||
sum += *pA++ * (*pB -= *pM++), pB++;
|
sum += *pA++ * (*pB -= *pM++), pB++;
|
||||||
sum += *pA++ * (*pB -= *pM++), pB++;
|
sum += *pA++ * (*pB -= *pM++), pB++;
|
||||||
sum += *pA++ * (*pB -= *pM++), pB++;
|
sum += *pA++ * (*pB -= *pM++), pB++;
|
||||||
sum += *pA++ * (*pB -= *pM++), pB++;
|
sum += *pA++ * (*pB -= *pM++), pB++;
|
||||||
sum += *pA++ * (*pB -= *pM++), pB++;
|
sum += *pA++ * (*pB -= *pM++), pB++;
|
||||||
sum += *pA++ * (*pB -= *pM++), pB++;
|
sum += *pA++ * (*pB -= *pM++), pB++;
|
||||||
sum += *pA++ * (*pB -= *pM++), pB++;
|
sum += *pA++ * (*pB -= *pM++), pB++;
|
||||||
sum += *pA++ * (*pB -= *pM++), pB++;
|
sum += *pA++ * (*pB -= *pM++), pB++;
|
||||||
} else {
|
} else {
|
||||||
sum += *pA++ * (*pB += *pM++), pB++;
|
sum += *pA++ * (*pB += *pM++), pB++;
|
||||||
sum += *pA++ * (*pB += *pM++), pB++;
|
sum += *pA++ * (*pB += *pM++), pB++;
|
||||||
sum += *pA++ * (*pB += *pM++), pB++;
|
sum += *pA++ * (*pB += *pM++), pB++;
|
||||||
sum += *pA++ * (*pB += *pM++), pB++;
|
sum += *pA++ * (*pB += *pM++), pB++;
|
||||||
sum += *pA++ * (*pB += *pM++), pB++;
|
sum += *pA++ * (*pB += *pM++), pB++;
|
||||||
sum += *pA++ * (*pB += *pM++), pB++;
|
sum += *pA++ * (*pB += *pM++), pB++;
|
||||||
sum += *pA++ * (*pB += *pM++), pB++;
|
sum += *pA++ * (*pB += *pM++), pB++;
|
||||||
sum += *pA++ * (*pB += *pM++), pB++;
|
sum += *pA++ * (*pB += *pM++), pB++;
|
||||||
}
|
}
|
||||||
|
|
||||||
*(pM-0) = ((*(pA-1) >> 30) | 1) << 2;
|
*(pM-0) = ((*(pA-1) >> 30) | 1) << 2;
|
||||||
*(pM-1) = ((*(pA-2) >> 30) | 1) << 1;
|
*(pM-1) = ((*(pA-2) >> 30) | 1) << 1;
|
||||||
*(pM-2) = ((*(pA-3) >> 30) | 1) << 1;
|
*(pM-2) = ((*(pA-3) >> 30) | 1) << 1;
|
||||||
*(pM-3) = ((*(pA-4) >> 30) | 1);
|
*(pM-3) = ((*(pA-4) >> 30) | 1);
|
||||||
|
|
||||||
fs->error = *in;
|
fs->error = *in;
|
||||||
*in += (sum >> fs->shift);
|
*in += (sum >> fs->shift);
|
||||||
*pA = *in;
|
*pA = *in;
|
||||||
|
|
||||||
*(pA-1) = *(pA-0) - *(pA-1);
|
*(pA-1) = *(pA-0) - *(pA-1);
|
||||||
*(pA-2) = *(pA-1) - *(pA-2);
|
*(pA-2) = *(pA-1) - *(pA-2);
|
||||||
*(pA-3) = *(pA-2) - *(pA-3);
|
*(pA-3) = *(pA-2) - *(pA-3);
|
||||||
|
|
||||||
memshl (fs->dl, fs->dl + 1);
|
memshl (fs->dl, fs->dl + 1);
|
||||||
memshl (fs->dx, fs->dx + 1);
|
memshl (fs->dx, fs->dx + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
filter_init (fltst *fs, long shift) {
|
filter_init (fltst *fs, long shift) {
|
||||||
memset (fs, 0, sizeof(fltst));
|
memset (fs, 0, sizeof(fltst));
|
||||||
fs->shift = shift;
|
fs->shift = shift;
|
||||||
fs->round = 1 << (shift - 1);
|
fs->round = 1 << (shift - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* FILTERS_H */
|
#endif /* FILTERS_H */
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* ttadec.h
|
* ttadec.h
|
||||||
*
|
*
|
||||||
* Description: TTAv1 decoder definitions and prototypes
|
* Description: TTAv1 decoder definitions and prototypes
|
||||||
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
|
* Developed by: Alexander Djourik <sasha@iszf.irk.ru>
|
||||||
* Pavel Zhilin <pzh@iszf.irk.ru>
|
* Pavel Zhilin <pzh@iszf.irk.ru>
|
||||||
*
|
*
|
||||||
|
@ -35,21 +35,21 @@
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
#define __ATTRIBUTE_PACKED__
|
#define __ATTRIBUTE_PACKED__
|
||||||
#else
|
#else
|
||||||
#define __ATTRIBUTE_PACKED__ __attribute__((packed))
|
#define __ATTRIBUTE_PACKED__ __attribute__((packed))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TTA1_SIGN 0x31415454
|
#define TTA1_SIGN 0x31415454
|
||||||
#define FRAME_TIME 1.04489795918367346939
|
#define FRAME_TIME 1.04489795918367346939
|
||||||
#define MAX_ORDER 8
|
#define MAX_ORDER 8
|
||||||
|
|
||||||
#ifndef WAVE_FORMAT_PCM
|
#ifndef WAVE_FORMAT_PCM
|
||||||
#define WAVE_FORMAT_PCM 1
|
#define WAVE_FORMAT_PCM 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
typedef unsigned __int64 uint64;
|
typedef unsigned __int64 uint64;
|
||||||
#else
|
#else
|
||||||
typedef unsigned long long uint64;
|
typedef unsigned long long uint64;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,23 +87,23 @@ static const unsigned long *shift_16 = bit_shift + 4;
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
|
|
||||||
#ifdef _BIG_ENDIAN
|
#ifdef _BIG_ENDIAN
|
||||||
#define ENDSWAP_INT16(x) (((((x)>>8)&0xFF)|(((x)&0xFF)<<8)))
|
#define ENDSWAP_INT16(x) (((((x)>>8)&0xFF)|(((x)&0xFF)<<8)))
|
||||||
#define ENDSWAP_INT32(x) (((((x)>>24)&0xFF)|(((x)>>8)&0xFF00)|(((x)&0xFF00)<<8)|(((x)&0xFF)<<24)))
|
#define ENDSWAP_INT32(x) (((((x)>>24)&0xFF)|(((x)>>8)&0xFF00)|(((x)&0xFF00)<<8)|(((x)&0xFF)<<24)))
|
||||||
#define WRITE_BUFFER(x, bsize, out) { \
|
#define WRITE_BUFFER(x, bsize, out) { \
|
||||||
if (bsize > 2) *out++ = (byte)(*x >> 16); \
|
if (bsize > 2) *out++ = (byte)(*x >> 16); \
|
||||||
if (bsize > 1) *out++ = (byte)(*x >> 8); \
|
if (bsize > 1) *out++ = (byte)(*x >> 8); \
|
||||||
*out++ = (byte) *x; }
|
*out++ = (byte) *x; }
|
||||||
#else
|
#else
|
||||||
#define ENDSWAP_INT16(x) (x)
|
#define ENDSWAP_INT16(x) (x)
|
||||||
#define ENDSWAP_INT32(x) (x)
|
#define ENDSWAP_INT32(x) (x)
|
||||||
#define WRITE_BUFFER(x, bsize, out) { \
|
#define WRITE_BUFFER(x, bsize, out) { \
|
||||||
*out++ = (byte) *x; \
|
*out++ = (byte) *x; \
|
||||||
if (bsize > 1) *out++ = (byte)(*x >> 8); \
|
if (bsize > 1) *out++ = (byte)(*x >> 8); \
|
||||||
if (bsize > 2) *out++ = (byte)(*x >> 16); }
|
if (bsize > 2) *out++ = (byte)(*x >> 16); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PREDICTOR1(x, k) ((long)((((uint64)x << k) - x) >> k))
|
#define PREDICTOR1(x, k) ((long)((((uint64)x << k) - x) >> k))
|
||||||
#define DEC(x) (((x)&1)?(++(x)>>1):(-(x)>>1))
|
#define DEC(x) (((x)&1)?(++(x)>>1):(-(x)>>1))
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* This doesn't compile on non-gcc compilers */
|
/* This doesn't compile on non-gcc compilers */
|
||||||
|
@ -119,26 +119,26 @@ typedef struct {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned long k0;
|
unsigned long k0;
|
||||||
unsigned long k1;
|
unsigned long k1;
|
||||||
unsigned long sum0;
|
unsigned long sum0;
|
||||||
unsigned long sum1;
|
unsigned long sum1;
|
||||||
} adapt;
|
} adapt;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
long shift;
|
long shift;
|
||||||
long round;
|
long round;
|
||||||
long error;
|
long error;
|
||||||
long mutex;
|
long mutex;
|
||||||
long qm[MAX_ORDER+1];
|
long qm[MAX_ORDER+1];
|
||||||
long dx[MAX_ORDER+1];
|
long dx[MAX_ORDER+1];
|
||||||
long dl[MAX_ORDER+1];
|
long dl[MAX_ORDER+1];
|
||||||
} fltst;
|
} fltst;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
fltst fst;
|
fltst fst;
|
||||||
adapt rice;
|
adapt rice;
|
||||||
long last;
|
long last;
|
||||||
} decoder;
|
} decoder;
|
||||||
|
|
||||||
#endif /* TTADEC_H_ */
|
#endif /* TTADEC_H_ */
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct _GstVideodrop {
|
||||||
/* video state */
|
/* video state */
|
||||||
gboolean inited;
|
gboolean inited;
|
||||||
gfloat from_fps,
|
gfloat from_fps,
|
||||||
to_fps;
|
to_fps;
|
||||||
gfloat speed;
|
gfloat speed;
|
||||||
guint64 pass, total, time_adjust;
|
guint64 pass, total, time_adjust;
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,40 +25,40 @@
|
||||||
|
|
||||||
#include "gstcdplayer_ioctl.h"
|
#include "gstcdplayer_ioctl.h"
|
||||||
|
|
||||||
#define GST_TYPE_CDPLAYER (cdplayer_get_type())
|
#define GST_TYPE_CDPLAYER (cdplayer_get_type())
|
||||||
#define CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDPLAYER,CDPlayer))
|
#define CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_CDPLAYER,CDPlayer))
|
||||||
#define CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDPLAYER,CDPlayerClass))
|
#define CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_CDPLAYER,CDPlayerClass))
|
||||||
#define GST_IS_CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDPLAYER))
|
#define GST_IS_CDPLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_CDPLAYER))
|
||||||
#define GST_IS_CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDPLAYER))
|
#define GST_IS_CDPLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_CDPLAYER))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _CDPlayer CDPlayer;
|
typedef struct _CDPlayer CDPlayer;
|
||||||
typedef struct _CDPlayerClass CDPlayerClass;
|
typedef struct _CDPlayerClass CDPlayerClass;
|
||||||
|
|
||||||
struct _CDPlayer {
|
struct _CDPlayer {
|
||||||
GstBin element;
|
GstBin element;
|
||||||
|
|
||||||
/* properties */
|
/* properties */
|
||||||
gchar *device;
|
gchar *device;
|
||||||
gint num_tracks;
|
gint num_tracks;
|
||||||
gint start_track;
|
gint start_track;
|
||||||
gint end_track;
|
gint end_track;
|
||||||
gint current_track;
|
gint current_track;
|
||||||
guint32 cddb_discid;
|
guint32 cddb_discid;
|
||||||
|
|
||||||
/* private */
|
/* private */
|
||||||
struct cd cd;
|
struct cd cd;
|
||||||
gboolean paused;
|
gboolean paused;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _CDPlayerClass {
|
struct _CDPlayerClass {
|
||||||
GstBinClass parent_class;
|
GstBinClass parent_class;
|
||||||
|
|
||||||
/* signal callbacks */
|
/* signal callbacks */
|
||||||
void (*track_change) (GstElement *element,guint track);
|
void (*track_change) (GstElement *element,guint track);
|
||||||
};
|
};
|
||||||
|
|
||||||
GType cdplayer_get_type(void);
|
GType cdplayer_get_type(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -51,14 +51,14 @@ irix cdaudio works quite a bit differently than ioctl(), so its not ready
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* these headers define low level functions:
|
/* these headers define low level functions:
|
||||||
gboolean cd_init(struct cd *cd,const gchar *device);
|
gboolean cd_init(struct cd *cd,const gchar *device);
|
||||||
gboolean cd_start(struct cd *cd,gint start_track,gint end_track);
|
gboolean cd_start(struct cd *cd,gint start_track,gint 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);
|
||||||
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);
|
||||||
*/
|
*/
|
||||||
#if defined(HAVE_CDROM_SOLARIS)
|
#if defined(HAVE_CDROM_SOLARIS)
|
||||||
#include "gstcdplayer_ioctl_solaris.h"
|
#include "gstcdplayer_ioctl_solaris.h"
|
||||||
|
|
|
@ -29,23 +29,23 @@
|
||||||
#define CDPLAYER_MAX_TRACKS 128
|
#define CDPLAYER_MAX_TRACKS 128
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
CD_PLAYING,
|
CD_PLAYING,
|
||||||
CD_COMPLETED,
|
CD_COMPLETED,
|
||||||
CD_ERROR
|
CD_ERROR
|
||||||
} CDStatus;
|
} CDStatus;
|
||||||
|
|
||||||
struct cd_msf {
|
struct cd_msf {
|
||||||
guint8 minute;
|
guint8 minute;
|
||||||
guint8 second;
|
guint8 second;
|
||||||
guint8 frame;
|
guint8 frame;
|
||||||
|
|
||||||
gboolean data_track;
|
gboolean data_track;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cd {
|
struct cd {
|
||||||
gint fd;
|
gint fd;
|
||||||
gint num_tracks;
|
gint num_tracks;
|
||||||
struct cd_msf tracks[CDPLAYER_MAX_TRACKS];
|
struct cd_msf tracks[CDPLAYER_MAX_TRACKS];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,323 +23,323 @@
|
||||||
#endif
|
#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_toc_header toc_header;
|
||||||
struct ioc_read_toc_entry toc_entry;
|
struct ioc_read_toc_entry toc_entry;
|
||||||
struct cd_toc_entry toc_entry_data;
|
struct cd_toc_entry toc_entry_data;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
cd->fd = open(device,O_RDONLY | O_NONBLOCK);
|
cd->fd = open(device,O_RDONLY | O_NONBLOCK);
|
||||||
|
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the toc header information */
|
/* get the toc header information */
|
||||||
if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read each entry in the toc header */
|
/* read each entry in the toc header */
|
||||||
for (i = 1; i <= toc_header.ending_track; i++) {
|
for (i = 1; i <= toc_header.ending_track; i++) {
|
||||||
toc_entry.address_format = CD_MSF_FORMAT;
|
toc_entry.address_format = CD_MSF_FORMAT;
|
||||||
toc_entry.starting_track = i;
|
toc_entry.starting_track = i;
|
||||||
toc_entry.data = &toc_entry_data;
|
toc_entry.data = &toc_entry_data;
|
||||||
toc_entry.data_len = sizeof(toc_entry_data);
|
toc_entry.data_len = sizeof(toc_entry_data);
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->tracks[i].minute = toc_entry.data->addr.msf.minute;
|
cd->tracks[i].minute = toc_entry.data->addr.msf.minute;
|
||||||
cd->tracks[i].second = toc_entry.data->addr.msf.second;
|
cd->tracks[i].second = toc_entry.data->addr.msf.second;
|
||||||
cd->tracks[i].frame = toc_entry.data->addr.msf.frame;
|
cd->tracks[i].frame = toc_entry.data->addr.msf.frame;
|
||||||
cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
|
cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the leadout */
|
/* read the leadout */
|
||||||
toc_entry.address_format = CD_MSF_FORMAT;
|
toc_entry.address_format = CD_MSF_FORMAT;
|
||||||
toc_entry.starting_track = 0xAA; /* leadout */
|
toc_entry.starting_track = 0xAA; /* leadout */
|
||||||
toc_entry.data = &toc_entry_data;
|
toc_entry.data = &toc_entry_data;
|
||||||
toc_entry.data_len = sizeof(toc_entry_data);
|
toc_entry.data_len = sizeof(toc_entry_data);
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->tracks[LEADOUT].minute = toc_entry.data->addr.msf.minute;
|
cd->tracks[LEADOUT].minute = toc_entry.data->addr.msf.minute;
|
||||||
cd->tracks[LEADOUT].second = toc_entry.data->addr.msf.second;
|
cd->tracks[LEADOUT].second = toc_entry.data->addr.msf.second;
|
||||||
cd->tracks[LEADOUT].frame = toc_entry.data->addr.msf.frame;
|
cd->tracks[LEADOUT].frame = toc_entry.data->addr.msf.frame;
|
||||||
|
|
||||||
cd->num_tracks = toc_header.ending_track;
|
cd->num_tracks = toc_header.ending_track;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#elif defined HAVE_CDROM_BSD_DARWIN
|
#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_toc_header toc_header;
|
||||||
struct ioc_read_toc_entry toc_entry;
|
struct ioc_read_toc_entry toc_entry;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
cd->fd = open(device,O_RDONLY | O_NONBLOCK);
|
cd->fd = open(device,O_RDONLY | O_NONBLOCK);
|
||||||
|
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the toc header information */
|
/* get the toc header information */
|
||||||
if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read each entry in the toc header */
|
/* read each entry in the toc header */
|
||||||
for (i = 1; i <= toc_header.ending_track; i++) {
|
for (i = 1; i <= toc_header.ending_track; i++) {
|
||||||
toc_entry.address_format = CD_MSF_FORMAT;
|
toc_entry.address_format = CD_MSF_FORMAT;
|
||||||
toc_entry.starting_track = i;
|
toc_entry.starting_track = i;
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->tracks[i].minute = toc_entry.data->addr[1];
|
cd->tracks[i].minute = toc_entry.data->addr[1];
|
||||||
cd->tracks[i].second = toc_entry.data->addr[2];
|
cd->tracks[i].second = toc_entry.data->addr[2];
|
||||||
cd->tracks[i].frame = toc_entry.data->addr[3];
|
cd->tracks[i].frame = toc_entry.data->addr[3];
|
||||||
cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
|
cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the leadout */
|
/* read the leadout */
|
||||||
toc_entry.address_format = CD_MSF_FORMAT;
|
toc_entry.address_format = CD_MSF_FORMAT;
|
||||||
toc_entry.starting_track = 0xAA; /* leadout */
|
toc_entry.starting_track = 0xAA; /* leadout */
|
||||||
toc_entry.data = &toc_entry_data;
|
toc_entry.data = &toc_entry_data;
|
||||||
toc_entry.data_len = sizeof(toc_entry_data);
|
toc_entry.data_len = sizeof(toc_entry_data);
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->tracks[LEADOUT].minute = toc_entry.data->addr[1];
|
cd->tracks[LEADOUT].minute = toc_entry.data->addr[1];
|
||||||
cd->tracks[LEADOUT].second = toc_entry.data->addr[2];
|
cd->tracks[LEADOUT].second = toc_entry.data->addr[2];
|
||||||
cd->tracks[LEADOUT].frame = toc_entry.data->addr[3];
|
cd->tracks[LEADOUT].frame = toc_entry.data->addr[3];
|
||||||
|
|
||||||
cd->num_tracks = toc_header.ending_track;
|
cd->num_tracks = toc_header.ending_track;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#else /* free */
|
#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_toc_header toc_header;
|
||||||
struct ioc_read_toc_entry toc_entry;
|
struct ioc_read_toc_entry toc_entry;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
cd->fd = open(device,O_RDONLY | O_NONBLOCK);
|
cd->fd = open(device,O_RDONLY | O_NONBLOCK);
|
||||||
|
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the toc header information */
|
/* get the toc header information */
|
||||||
if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCHDR,&toc_header) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read each entry in the toc header */
|
/* read each entry in the toc header */
|
||||||
for (i = 1; i <= toc_header.ending_track; i++) {
|
for (i = 1; i <= toc_header.ending_track; i++) {
|
||||||
toc_entry.address_format = CD_MSF_FORMAT;
|
toc_entry.address_format = CD_MSF_FORMAT;
|
||||||
toc_entry.starting_track = i;
|
toc_entry.starting_track = i;
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->tracks[i].minute = toc_entry.entry.addr.msf.minute;
|
cd->tracks[i].minute = toc_entry.entry.addr.msf.minute;
|
||||||
cd->tracks[i].second = toc_entry.entry.addr.msf.second;
|
cd->tracks[i].second = toc_entry.entry.addr.msf.second;
|
||||||
cd->tracks[i].frame = toc_entry.entry.addr.msf.frame;
|
cd->tracks[i].frame = toc_entry.entry.addr.msf.frame;
|
||||||
cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
|
cd->tracks[i].data_track = (toc_entry.data->control & 4) == 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the leadout */
|
/* read the leadout */
|
||||||
toc_entry.address_format = CD_MSF_FORMAT;
|
toc_entry.address_format = CD_MSF_FORMAT;
|
||||||
toc_entry.starting_track = 0xAA; /* leadout */
|
toc_entry.starting_track = 0xAA; /* leadout */
|
||||||
toc_entry.data = &toc_entry_data;
|
toc_entry.data = &toc_entry_data;
|
||||||
toc_entry.data_len = sizeof(toc_entry_data);
|
toc_entry.data_len = sizeof(toc_entry_data);
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
if (ioctl(cd->fd,CDIOREADTOCENTRYS,&toc_entry) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->tracks[LEADOUT].minute = toc_entry.entry.addr.msf.minute;
|
cd->tracks[LEADOUT].minute = toc_entry.entry.addr.msf.minute;
|
||||||
cd->tracks[LEADOUT].second = toc_entry.entry.addr.msf.second;
|
cd->tracks[LEADOUT].second = toc_entry.entry.addr.msf.second;
|
||||||
cd->tracks[LEADOUT].frame = toc_entry.entry.addr.msf.frame;
|
cd->tracks[LEADOUT].frame = toc_entry.entry.addr.msf.frame;
|
||||||
|
|
||||||
cd->num_tracks = toc_header.ending_track;
|
cd->num_tracks = toc_header.ending_track;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#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) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
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_m = cd->tracks[start_track].minute;
|
||||||
msf.start_s = cd->tracks[start_track].second;
|
msf.start_s = cd->tracks[start_track].second;
|
||||||
msf.start_f = cd->tracks[start_track].frame;
|
msf.start_f = cd->tracks[start_track].frame;
|
||||||
|
|
||||||
if (end_track == LEADOUT) {
|
if (end_track == LEADOUT) {
|
||||||
msf.end_m = cd->tracks[end_track].minute;
|
msf.end_m = cd->tracks[end_track].minute;
|
||||||
msf.end_s = cd->tracks[end_track].second;
|
msf.end_s = cd->tracks[end_track].second;
|
||||||
msf.end_f = cd->tracks[end_track].frame;
|
msf.end_f = cd->tracks[end_track].frame;
|
||||||
} else {
|
} else {
|
||||||
msf.end_m = cd->tracks[end_track+1].minute;
|
msf.end_m = cd->tracks[end_track+1].minute;
|
||||||
msf.end_s = cd->tracks[end_track+1].second;
|
msf.end_s = cd->tracks[end_track+1].second;
|
||||||
msf.end_f = cd->tracks[end_track+1].frame;
|
msf.end_f = cd->tracks[end_track+1].frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOCPLAYMSF,&msf) != 0) {
|
if (ioctl(cd->fd,CDIOCPLAYMSF,&msf) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean cd_pause(struct cd *cd)
|
gboolean cd_pause(struct cd *cd)
|
||||||
{
|
{
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOCPAUSE,NULL) != 0) {
|
if (ioctl(cd->fd,CDIOCPAUSE,NULL) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean cd_resume(struct cd *cd)
|
gboolean cd_resume(struct cd *cd)
|
||||||
{
|
{
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOCRESUME,NULL) != 0) {
|
if (ioctl(cd->fd,CDIOCRESUME,NULL) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean cd_stop(struct cd *cd)
|
gboolean cd_stop(struct cd *cd)
|
||||||
{
|
{
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOCSTOP,NULL) != 0) {
|
if (ioctl(cd->fd,CDIOCSTOP,NULL) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -1 for error, 0 for not playing, 1 for playing */
|
/* -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 ioc_read_subchannel sub_channel;
|
||||||
struct cd_sub_channel_info sub_channel_info;
|
struct cd_sub_channel_info sub_channel_info;
|
||||||
|
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_channel.address_format = CD_MSF_FORMAT;
|
sub_channel.address_format = CD_MSF_FORMAT;
|
||||||
sub_channel.data_format = CD_CURRENT_POSITION;
|
sub_channel.data_format = CD_CURRENT_POSITION;
|
||||||
sub_channel.track = 0;
|
sub_channel.track = 0;
|
||||||
sub_channel.data = &sub_channel_info;
|
sub_channel.data = &sub_channel_info;
|
||||||
sub_channel.data_len = sizeof(sub_channel_info);
|
sub_channel.data_len = sizeof(sub_channel_info);
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
|
if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (sub_channel.data->header.audio_status) {
|
switch (sub_channel.data->header.audio_status) {
|
||||||
case CD_AS_PLAY_IN_PROGRESS:
|
case CD_AS_PLAY_IN_PROGRESS:
|
||||||
case CD_AS_PLAY_PAUSED:
|
case CD_AS_PLAY_PAUSED:
|
||||||
return CD_PLAYING;
|
return CD_PLAYING;
|
||||||
break;
|
break;
|
||||||
case CD_AS_PLAY_COMPLETED:
|
case CD_AS_PLAY_COMPLETED:
|
||||||
return CD_COMPLETED;
|
return CD_COMPLETED;
|
||||||
break;
|
break;
|
||||||
case CD_AS_AUDIO_INVALID:
|
case CD_AS_AUDIO_INVALID:
|
||||||
case CD_AS_PLAY_ERROR:
|
case CD_AS_PLAY_ERROR:
|
||||||
default:
|
default:
|
||||||
return CD_ERROR;
|
return CD_ERROR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gint cd_current_track(struct cd *cd)
|
gint cd_current_track(struct cd *cd)
|
||||||
{
|
{
|
||||||
struct ioc_read_subchannel sub_channel;
|
struct ioc_read_subchannel sub_channel;
|
||||||
struct cd_sub_channel_info sub_channel_info;
|
struct cd_sub_channel_info sub_channel_info;
|
||||||
|
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_channel.address_format = CD_MSF_FORMAT;
|
sub_channel.address_format = CD_MSF_FORMAT;
|
||||||
sub_channel.data_format = CD_TRACK_INFO;
|
sub_channel.data_format = CD_TRACK_INFO;
|
||||||
sub_channel.track = 0;
|
sub_channel.track = 0;
|
||||||
sub_channel.data = &sub_channel_info;
|
sub_channel.data = &sub_channel_info;
|
||||||
sub_channel.data_len = sizeof(sub_channel_info);
|
sub_channel.data_len = sizeof(sub_channel_info);
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
|
if (ioctl(cd->fd,CDIOCREADSUBCHANNEL,&sub_channel) != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
return sub_channel.data->what.track_info.track_number;
|
return sub_channel.data->what.track_info.track_number;
|
||||||
#else
|
#else
|
||||||
return sub_channel.data->track_number;
|
return sub_channel.data->track_number;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean cd_close(struct cd *cd)
|
gboolean cd_close(struct cd *cd)
|
||||||
{
|
{
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (close(cd->fd) != 0) {
|
if (close(cd->fd) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,55 +24,55 @@
|
||||||
|
|
||||||
gboolean cd_init(struct cd *cd,const gchar *device)
|
gboolean cd_init(struct cd *cd,const gchar *device)
|
||||||
{
|
{
|
||||||
CDPLAYER *cdplayer;
|
CDPLAYER *cdplayer;
|
||||||
CDSTATUS status;
|
CDSTATUS status;
|
||||||
CDTRACKINFO info;
|
CDTRACKINFO info;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
cdplayer = CDOpen(device,"r");
|
cdplayer = CDOpen(device,"r");
|
||||||
|
|
||||||
if (cdplayer == NULL) {
|
if (cdplayer == NULL) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->fd = FD(cdplayer);
|
cd->fd = FD(cdplayer);
|
||||||
|
|
||||||
if (CDgetstatus(cdplayer,&status) == 0) {
|
if (CDgetstatus(cdplayer,&status) == 0) {
|
||||||
CDclose(cdplayer);
|
CDclose(cdplayer);
|
||||||
cd->fd = 0;
|
cd->fd = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < status.last; i++) {
|
for (i = 1; i < status.last; i++) {
|
||||||
if (CDgettrackinfo(cdplayer,i,&info) == 0) {
|
if (CDgettrackinfo(cdplayer,i,&info) == 0) {
|
||||||
CDclose(cdplayer);
|
CDclose(cdplayer);
|
||||||
cd->fd = 0;
|
cd->fd = 0;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->tracks[i].minute = info.start_min;
|
cd->tracks[i].minute = info.start_min;
|
||||||
cd->tracks[i].second = info.start_sec;
|
cd->tracks[i].second = info.start_sec;
|
||||||
cd->tracks[i].frame = info.start_frame;
|
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) {
|
if (cd->fd == 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_fix_track_range(cd,&start_track,&end_track);
|
cd_fix_track_range(cd,&start_track,&end_track);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,186 +19,186 @@
|
||||||
|
|
||||||
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_tochdr toc_header;
|
||||||
struct cdrom_tocentry toc_entry;
|
struct cdrom_tocentry toc_entry;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
cd->fd = open(device,O_RDONLY | O_NONBLOCK);
|
cd->fd = open(device,O_RDONLY | O_NONBLOCK);
|
||||||
|
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get the toc header information */
|
/* get the toc header information */
|
||||||
if (ioctl(cd->fd,CDROMREADTOCHDR,&toc_header) != 0) {
|
if (ioctl(cd->fd,CDROMREADTOCHDR,&toc_header) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read each entry in the toc header */
|
/* read each entry in the toc header */
|
||||||
for (i = 1; i <= toc_header.cdth_trk1; i++) {
|
for (i = 1; i <= toc_header.cdth_trk1; i++) {
|
||||||
toc_entry.cdte_format = CDROM_MSF;
|
toc_entry.cdte_format = CDROM_MSF;
|
||||||
toc_entry.cdte_track = i;
|
toc_entry.cdte_track = i;
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
|
if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->tracks[i].minute = toc_entry.cdte_addr.msf.minute;
|
cd->tracks[i].minute = toc_entry.cdte_addr.msf.minute;
|
||||||
cd->tracks[i].second = toc_entry.cdte_addr.msf.second;
|
cd->tracks[i].second = toc_entry.cdte_addr.msf.second;
|
||||||
cd->tracks[i].frame = toc_entry.cdte_addr.msf.frame;
|
cd->tracks[i].frame = toc_entry.cdte_addr.msf.frame;
|
||||||
cd->tracks[i].data_track = (toc_entry.cdte_ctrl == CDROM_DATA_TRACK);
|
cd->tracks[i].data_track = (toc_entry.cdte_ctrl == CDROM_DATA_TRACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read the leadout */
|
/* read the leadout */
|
||||||
toc_entry.cdte_track = CDROM_LEADOUT;
|
toc_entry.cdte_track = CDROM_LEADOUT;
|
||||||
toc_entry.cdte_format = CDROM_MSF;
|
toc_entry.cdte_format = CDROM_MSF;
|
||||||
if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
|
if (ioctl(cd->fd,CDROMREADTOCENTRY,&toc_entry) != 0) {
|
||||||
close(cd->fd);
|
close(cd->fd);
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
cd->tracks[LEADOUT].minute = toc_entry.cdte_addr.msf.minute;
|
cd->tracks[LEADOUT].minute = toc_entry.cdte_addr.msf.minute;
|
||||||
cd->tracks[LEADOUT].second = toc_entry.cdte_addr.msf.second;
|
cd->tracks[LEADOUT].second = toc_entry.cdte_addr.msf.second;
|
||||||
cd->tracks[LEADOUT].frame = toc_entry.cdte_addr.msf.frame;
|
cd->tracks[LEADOUT].frame = toc_entry.cdte_addr.msf.frame;
|
||||||
|
|
||||||
cd->num_tracks = toc_header.cdth_trk1;
|
cd->num_tracks = toc_header.cdth_trk1;
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
struct cdrom_msf msf;
|
struct cdrom_msf msf;
|
||||||
|
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
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_min0 = cd->tracks[start_track].minute;
|
||||||
msf.cdmsf_sec0 = cd->tracks[start_track].second;
|
msf.cdmsf_sec0 = cd->tracks[start_track].second;
|
||||||
msf.cdmsf_frame0 = cd->tracks[start_track].frame;
|
msf.cdmsf_frame0 = cd->tracks[start_track].frame;
|
||||||
|
|
||||||
if (end_track == LEADOUT) {
|
if (end_track == LEADOUT) {
|
||||||
msf.cdmsf_min1 = cd->tracks[end_track].minute;
|
msf.cdmsf_min1 = cd->tracks[end_track].minute;
|
||||||
msf.cdmsf_sec1 = cd->tracks[end_track].second;
|
msf.cdmsf_sec1 = cd->tracks[end_track].second;
|
||||||
msf.cdmsf_frame1 = cd->tracks[end_track].frame;
|
msf.cdmsf_frame1 = cd->tracks[end_track].frame;
|
||||||
} else {
|
} else {
|
||||||
msf.cdmsf_min1 = cd->tracks[end_track+1].minute;
|
msf.cdmsf_min1 = cd->tracks[end_track+1].minute;
|
||||||
msf.cdmsf_sec1 = cd->tracks[end_track+1].second;
|
msf.cdmsf_sec1 = cd->tracks[end_track+1].second;
|
||||||
msf.cdmsf_frame1 = cd->tracks[end_track+1].frame;
|
msf.cdmsf_frame1 = cd->tracks[end_track+1].frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDROMPLAYMSF,&msf) != 0) {
|
if (ioctl(cd->fd,CDROMPLAYMSF,&msf) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean cd_pause(struct cd *cd)
|
gboolean cd_pause(struct cd *cd)
|
||||||
{
|
{
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDROMPAUSE,NULL) != 0) {
|
if (ioctl(cd->fd,CDROMPAUSE,NULL) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean cd_resume(struct cd *cd)
|
gboolean cd_resume(struct cd *cd)
|
||||||
{
|
{
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDROMRESUME,NULL) != 0) {
|
if (ioctl(cd->fd,CDROMRESUME,NULL) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean cd_stop(struct cd *cd)
|
gboolean cd_stop(struct cd *cd)
|
||||||
{
|
{
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDROMSTOP,NULL) != 0) {
|
if (ioctl(cd->fd,CDROMSTOP,NULL) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -1 for error, 0 for not playing, 1 for playing */
|
/* -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;
|
struct cdrom_subchnl sub_channel;
|
||||||
|
|
||||||
if (cd->fd == -1) {
|
if (cd->fd == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_channel.cdsc_format = CDROM_MSF;
|
sub_channel.cdsc_format = CDROM_MSF;
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
|
if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (sub_channel.cdsc_audiostatus) {
|
switch (sub_channel.cdsc_audiostatus) {
|
||||||
case CDROM_AUDIO_COMPLETED:
|
case CDROM_AUDIO_COMPLETED:
|
||||||
return CD_COMPLETED;
|
return CD_COMPLETED;
|
||||||
break;
|
break;
|
||||||
case CDROM_AUDIO_PLAY:
|
case CDROM_AUDIO_PLAY:
|
||||||
case CDROM_AUDIO_PAUSED:
|
case CDROM_AUDIO_PAUSED:
|
||||||
return CD_PLAYING;
|
return CD_PLAYING;
|
||||||
break;
|
break;
|
||||||
case CDROM_AUDIO_ERROR:
|
case CDROM_AUDIO_ERROR:
|
||||||
default:
|
default:
|
||||||
return CD_ERROR;
|
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) {
|
if (cd->fd == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub_channel.cdsc_format = CDROM_MSF;
|
sub_channel.cdsc_format = CDROM_MSF;
|
||||||
|
|
||||||
if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
|
if (ioctl(cd->fd,CDROMSUBCHNL,&sub_channel) != 0) {
|
||||||
return -1;
|
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) {
|
if (cd->fd == -1) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (close(cd->fd) != 0) {
|
if (close(cd->fd) != 0) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
cd->fd = -1;
|
cd->fd = -1;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,9 +113,9 @@ static gboolean dxr3audiosink_handle_event (GstPad * pad, GstEvent * event);
|
||||||
static void dxr3audiosink_chain_pcm (GstPad * pad, GstData * buf);
|
static void dxr3audiosink_chain_pcm (GstPad * pad, GstData * buf);
|
||||||
static void dxr3audiosink_chain_ac3 (GstPad * pad, GstData * buf);
|
static void dxr3audiosink_chain_ac3 (GstPad * pad, GstData * buf);
|
||||||
|
|
||||||
/* static void dxr3audiosink_wait (Dxr3AudioSink *sink, */
|
/* static void dxr3audiosink_wait (Dxr3AudioSink *sink, */
|
||||||
/* GstClockTime time); */
|
/* GstClockTime time); */
|
||||||
/* static int dxr3audiosink_mvcommand (Dxr3AudioSink *sink, */
|
/* static int dxr3audiosink_mvcommand (Dxr3AudioSink *sink, */
|
||||||
/* int command); */
|
/* int command); */
|
||||||
|
|
||||||
static GstStateChangeReturn dxr3audiosink_change_state (GstElement * element,
|
static GstStateChangeReturn dxr3audiosink_change_state (GstElement * element,
|
||||||
|
|
|
@ -93,7 +93,7 @@ struct _Dxr3AudioSink {
|
||||||
|
|
||||||
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. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,8 +105,8 @@ struct _Dxr3AudioSinkClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern GType dxr3audiosink_get_type (void);
|
extern GType dxr3audiosink_get_type (void);
|
||||||
extern gboolean dxr3audiosink_factory_init (GstPlugin *plugin);
|
extern gboolean dxr3audiosink_factory_init (GstPlugin *plugin);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ static void dxr3spusink_chain (GstPad * pad, GstData * _data);
|
||||||
static GstStateChangeReturn dxr3spusink_change_state (GstElement * element,
|
static GstStateChangeReturn dxr3spusink_change_state (GstElement * element,
|
||||||
GstStateChange transition);
|
GstStateChange transition);
|
||||||
|
|
||||||
/* static void dxr3spusink_wait (Dxr3SpuSink *sink, */
|
/* static void dxr3spusink_wait (Dxr3SpuSink *sink, */
|
||||||
/* GstClockTime time); */
|
/* GstClockTime time); */
|
||||||
|
|
||||||
static void dxr3spusink_set_clut (Dxr3SpuSink * sink, const guint32 * clut);
|
static void dxr3spusink_set_clut (Dxr3SpuSink * sink, const guint32 * clut);
|
||||||
|
|
|
@ -52,16 +52,16 @@ typedef enum {
|
||||||
struct _Dxr3SpuSink {
|
struct _Dxr3SpuSink {
|
||||||
GstElement element;
|
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. */
|
gchar *spu_filename; /* File name for the spu device. */
|
||||||
int spu_fd; /* File descriptor for the spu device. */
|
int spu_fd; /* File descriptor for the spu device. */
|
||||||
|
|
||||||
gchar *control_filename; /* File name for the control device. */
|
gchar *control_filename; /* File name for the control device. */
|
||||||
int control_fd; /* File descriptor for the control
|
int control_fd; /* File descriptor for the control
|
||||||
device. */
|
device. */
|
||||||
|
|
||||||
GstClock *clock; /* The clock for this element. */
|
GstClock *clock; /* The clock for this element. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -79,8 +79,8 @@ struct _Dxr3SpuSinkClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern GType dxr3spusink_get_type (void);
|
extern GType dxr3spusink_get_type (void);
|
||||||
extern gboolean dxr3spusink_factory_init (GstPlugin *plugin);
|
extern gboolean dxr3spusink_factory_init (GstPlugin *plugin);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ static void dxr3videosink_chain (GstPad * pad, GstData * _data);
|
||||||
static GstStateChangeReturn dxr3videosink_change_state (GstElement * element,
|
static GstStateChangeReturn dxr3videosink_change_state (GstElement * element,
|
||||||
GstStateChange transition);
|
GstStateChange transition);
|
||||||
|
|
||||||
/* static void dxr3videosink_wait (Dxr3VideoSink *sink, */
|
/* static void dxr3videosink_wait (Dxr3VideoSink *sink, */
|
||||||
/* GstClockTime time); */
|
/* GstClockTime time); */
|
||||||
static int dxr3videosink_mvcommand (Dxr3VideoSink * sink, int command);
|
static int dxr3videosink_mvcommand (Dxr3VideoSink * sink, int command);
|
||||||
|
|
||||||
|
|
|
@ -52,31 +52,31 @@ typedef enum {
|
||||||
struct _Dxr3VideoSink {
|
struct _Dxr3VideoSink {
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
int card_number; /* The number of the card to open. */
|
int card_number; /* The number of the card to open. */
|
||||||
|
|
||||||
gchar *video_filename; /* File name for the video device. */
|
gchar *video_filename; /* File name for the video device. */
|
||||||
int video_fd; /* File descriptor for the video device. */
|
int video_fd; /* File descriptor for the video device. */
|
||||||
|
|
||||||
gchar *control_filename; /* File name for the control device. */
|
gchar *control_filename; /* File name for the control device. */
|
||||||
int control_fd; /* File descriptor for the control
|
int control_fd; /* File descriptor for the control
|
||||||
device. */
|
device. */
|
||||||
|
|
||||||
GstClock *clock; /* The clock for this element. */
|
GstClock *clock; /* The clock for this element. */
|
||||||
|
|
||||||
GstClockTime last_ts; /* Last timestamp received. */
|
GstClockTime last_ts; /* Last timestamp received. */
|
||||||
|
|
||||||
GstBuffer *cur_buf; /* The buffer we are currently
|
GstBuffer *cur_buf; /* The buffer we are currently
|
||||||
building. */
|
building. */
|
||||||
GstClockTime cur_ts; /* Timestamp associated to the
|
GstClockTime cur_ts; /* Timestamp associated to the
|
||||||
current buffer. */
|
current buffer. */
|
||||||
|
|
||||||
guchar scan_state; /* The current state of the MPEG start
|
guchar scan_state; /* The current state of the MPEG start
|
||||||
code scanner. */
|
code scanner. */
|
||||||
guint scan_pos; /* The current position of the MPEG
|
guint scan_pos; /* The current position of the MPEG
|
||||||
start code scanner (with respect to
|
start code scanner (with respect to
|
||||||
the start of the current buffer. */
|
the start of the current buffer. */
|
||||||
|
|
||||||
guchar parse_state; /* The current state of the MPEG
|
guchar parse_state; /* The current state of the MPEG
|
||||||
sequence parser. */
|
sequence parser. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -89,8 +89,8 @@ struct _Dxr3VideoSinkClass {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern GType dxr3videosink_get_type (void);
|
extern GType dxr3videosink_get_type (void);
|
||||||
extern gboolean dxr3videosink_factory_init (GstPlugin *plugin);
|
extern gboolean dxr3videosink_factory_init (GstPlugin *plugin);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -25,17 +25,17 @@ OTHER DEALINGS IN THE SOFTWARE.
|
||||||
******************************************************************/
|
******************************************************************/
|
||||||
|
|
||||||
/* Fixdark
|
/* Fixdark
|
||||||
Routine to repair dark current artifacts in qcam output.
|
Routine to repair dark current artifacts in qcam output.
|
||||||
Basic idea: the Qcam CCD suffers from "dark current";
|
Basic idea: the Qcam CCD suffers from "dark current";
|
||||||
that is, some of the CCD pixels will leak current under
|
that is, some of the CCD pixels will leak current under
|
||||||
long exposures, even if they're in the dark, and this
|
long exposures, even if they're in the dark, and this
|
||||||
shows up as ugly speckling on images taken in low light.
|
shows up as ugly speckling on images taken in low light.
|
||||||
|
|
||||||
Fortunately, the leaky pixels are the same from shot to
|
Fortunately, the leaky pixels are the same from shot to
|
||||||
shot. So, we can figure out which pixels are leaky by
|
shot. So, we can figure out which pixels are leaky by
|
||||||
taking some establishing shots in the dark, and try to
|
taking some establishing shots in the dark, and try to
|
||||||
fix those pixels on subsequent shots. The dark
|
fix those pixels on subsequent shots. The dark
|
||||||
establishing shots need only be done once per camera.
|
establishing shots need only be done once per camera.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -77,7 +77,7 @@ read_darkmask()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fread(master_darkmask1, sizeof(unsigned char), MAX_WIDTH*MAX_HEIGHT, fp) !=
|
if (fread(master_darkmask1, sizeof(unsigned char), MAX_WIDTH*MAX_HEIGHT, fp) !=
|
||||||
MAX_WIDTH*MAX_HEIGHT) {
|
MAX_WIDTH*MAX_HEIGHT) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stderr, "Error reading darkfile\n");
|
fprintf(stderr, "Error reading darkfile\n");
|
||||||
#endif
|
#endif
|
||||||
|
@ -88,14 +88,14 @@ read_darkmask()
|
||||||
for (x = 0; x < MAX_WIDTH; x += 2) {
|
for (x = 0; x < MAX_WIDTH; x += 2) {
|
||||||
min_bright = master_darkmask1[y][x];
|
min_bright = master_darkmask1[y][x];
|
||||||
if (y < MAX_HEIGHT-1 && master_darkmask1[y+1][x] < min_bright)
|
if (y < MAX_HEIGHT-1 && master_darkmask1[y+1][x] < min_bright)
|
||||||
min_bright = master_darkmask1[y+1][x];
|
min_bright = master_darkmask1[y+1][x];
|
||||||
if (x < MAX_WIDTH-1 && master_darkmask1[y][x+1] < min_bright)
|
if (x < MAX_WIDTH-1 && master_darkmask1[y][x+1] < min_bright)
|
||||||
min_bright = master_darkmask1[y][x+1];
|
min_bright = master_darkmask1[y][x+1];
|
||||||
if (y < MAX_HEIGHT-1 && x < MAX_WIDTH-1 && master_darkmask1[y+1][x+1] < min_bright)
|
if (y < MAX_HEIGHT-1 && x < MAX_WIDTH-1 && master_darkmask1[y+1][x+1] < min_bright)
|
||||||
min_bright = master_darkmask1[y+1][x+1];
|
min_bright = master_darkmask1[y+1][x+1];
|
||||||
master_darkmask2[y/2][x/2] = min_bright;
|
master_darkmask2[y/2][x/2] = min_bright;
|
||||||
assert(y/2 < MAX_HEIGHT/2+1);
|
assert(y/2 < MAX_HEIGHT/2+1);
|
||||||
assert(x/2 < MAX_WIDTH/2+1);
|
assert(x/2 < MAX_WIDTH/2+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,14 +103,14 @@ read_darkmask()
|
||||||
for (x = 0; x < MAX_WIDTH/2; x += 2) {
|
for (x = 0; x < MAX_WIDTH/2; x += 2) {
|
||||||
min_bright = master_darkmask2[y][x];
|
min_bright = master_darkmask2[y][x];
|
||||||
if (y < MAX_HEIGHT/2-1 && master_darkmask2[y+1][x] < min_bright)
|
if (y < MAX_HEIGHT/2-1 && master_darkmask2[y+1][x] < min_bright)
|
||||||
min_bright = master_darkmask2[y+1][x];
|
min_bright = master_darkmask2[y+1][x];
|
||||||
if (x < MAX_WIDTH/2-1 && master_darkmask2[y][x+1] < min_bright)
|
if (x < MAX_WIDTH/2-1 && master_darkmask2[y][x+1] < min_bright)
|
||||||
min_bright = master_darkmask2[y][x+1];
|
min_bright = master_darkmask2[y][x+1];
|
||||||
if (y < MAX_HEIGHT/2-1 && x < MAX_WIDTH-1 && master_darkmask2[y+1][x+1] < min_bright)
|
if (y < MAX_HEIGHT/2-1 && x < MAX_WIDTH-1 && master_darkmask2[y+1][x+1] < min_bright)
|
||||||
min_bright = master_darkmask2[y+1][x+1];
|
min_bright = master_darkmask2[y+1][x+1];
|
||||||
master_darkmask4[y/2][x/2] = min_bright;
|
master_darkmask4[y/2][x/2] = min_bright;
|
||||||
assert(y/2 < MAX_HEIGHT/4+1);
|
assert(y/2 < MAX_HEIGHT/4+1);
|
||||||
assert(x/2 < MAX_WIDTH/4+1);
|
assert(x/2 < MAX_WIDTH/4+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,15 +121,15 @@ read_darkmask()
|
||||||
|
|
||||||
|
|
||||||
/* fixdark
|
/* fixdark
|
||||||
We first record a list of bad leaky pixels, by making a
|
We first record a list of bad leaky pixels, by making a
|
||||||
number of exposures in the dark. master_darkmask holds
|
number of exposures in the dark. master_darkmask holds
|
||||||
this information. It's a map of the CCD.
|
this information. It's a map of the CCD.
|
||||||
master_darkmask[y][x] == val means that the pixel is
|
master_darkmask[y][x] == val means that the pixel is
|
||||||
unreliable for brightnesses of "val" and above.
|
unreliable for brightnesses of "val" and above.
|
||||||
|
|
||||||
We go over the image. If a pixel is bad, look at the
|
We go over the image. If a pixel is bad, look at the
|
||||||
adjacent four pixels, average the ones that have good
|
adjacent four pixels, average the ones that have good
|
||||||
values, and use that instead.
|
values, and use that instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
|
@ -40,19 +40,19 @@ GST_ELEMENT_DETAILS ("QCam Source",
|
||||||
"Read from a QuickCam device",
|
"Read from a QuickCam device",
|
||||||
"Wim Taymans <wim.taymans@chello.be>");
|
"Wim Taymans <wim.taymans@chello.be>");
|
||||||
|
|
||||||
#define AE_NONE 3
|
#define AE_NONE 3
|
||||||
|
|
||||||
#define DEF_WIDTH 320
|
#define DEF_WIDTH 320
|
||||||
#define DEF_HEIGHT 224
|
#define DEF_HEIGHT 224
|
||||||
#define DEF_BRIGHTNESS 226
|
#define DEF_BRIGHTNESS 226
|
||||||
#define DEF_WHITEBAL 128
|
#define DEF_WHITEBAL 128
|
||||||
#define DEF_CONTRAST 72
|
#define DEF_CONTRAST 72
|
||||||
#define DEF_TOP 1
|
#define DEF_TOP 1
|
||||||
#define DEF_LEFT 14
|
#define DEF_LEFT 14
|
||||||
#define DEF_TRANSFER_SCALE 2
|
#define DEF_TRANSFER_SCALE 2
|
||||||
#define DEF_DEPTH 6
|
#define DEF_DEPTH 6
|
||||||
#define DEF_PORT 0x378
|
#define DEF_PORT 0x378
|
||||||
#define DEF_AUTOEXP AE_NONE
|
#define DEF_AUTOEXP AE_NONE
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_qcamsrc_src_factory =
|
static GstStaticPadTemplate gst_qcamsrc_src_factory =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
|
|
|
@ -32,10 +32,10 @@ G_BEGIN_DECLS
|
||||||
(gst_v4l2_color_balance_channel_get_type ())
|
(gst_v4l2_color_balance_channel_get_type ())
|
||||||
#define GST_V4L2_COLOR_BALANCE_CHANNEL(obj) \
|
#define GST_V4L2_COLOR_BALANCE_CHANNEL(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, \
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, \
|
||||||
GstV4l2ColorBalanceChannel))
|
GstV4l2ColorBalanceChannel))
|
||||||
#define GST_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
|
#define GST_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, \
|
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL, \
|
||||||
GstV4l2ColorBalanceChannelClass))
|
GstV4l2ColorBalanceChannelClass))
|
||||||
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL(obj) \
|
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_COLOR_BALANCE_CHANNEL))
|
||||||
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
|
#define GST_IS_V4L2_COLOR_BALANCE_CHANNEL_CLASS(klass) \
|
||||||
|
@ -51,8 +51,8 @@ typedef struct _GstV4l2ColorBalanceChannelClass {
|
||||||
GstColorBalanceChannelClass parent;
|
GstColorBalanceChannelClass parent;
|
||||||
} GstV4l2ColorBalanceChannelClass;
|
} 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__ */
|
#endif /* __GST_V4L2_COLOR_BALANCE_H__ */
|
||||||
|
|
|
@ -50,87 +50,87 @@
|
||||||
#ifdef GST_V4L2_MISSING_BUFDECL
|
#ifdef GST_V4L2_MISSING_BUFDECL
|
||||||
struct v4l2_buffer
|
struct v4l2_buffer
|
||||||
{
|
{
|
||||||
__u32 index;
|
__u32 index;
|
||||||
enum v4l2_buf_type type;
|
enum v4l2_buf_type type;
|
||||||
__u32 bytesused;
|
__u32 bytesused;
|
||||||
__u32 flags;
|
__u32 flags;
|
||||||
enum v4l2_field field;
|
enum v4l2_field field;
|
||||||
struct timeval timestamp;
|
struct timeval timestamp;
|
||||||
struct v4l2_timecode timecode;
|
struct v4l2_timecode timecode;
|
||||||
__u32 sequence;
|
__u32 sequence;
|
||||||
|
|
||||||
/* memory location */
|
/* memory location */
|
||||||
enum v4l2_memory memory;
|
enum v4l2_memory memory;
|
||||||
union {
|
union {
|
||||||
__u32 offset;
|
__u32 offset;
|
||||||
unsigned long userptr;
|
unsigned long userptr;
|
||||||
} m;
|
} m;
|
||||||
__u32 length;
|
__u32 length;
|
||||||
|
|
||||||
__u32 reserved[2];
|
__u32 reserved[2];
|
||||||
};
|
};
|
||||||
#endif /* GST_V4L2_MISSING_BUFDECL */
|
#endif /* GST_V4L2_MISSING_BUFDECL */
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_V4L2ELEMENT \
|
#define GST_TYPE_V4L2ELEMENT \
|
||||||
(gst_v4l2element_get_type())
|
(gst_v4l2element_get_type())
|
||||||
#define GST_V4L2ELEMENT(obj) \
|
#define GST_V4L2ELEMENT(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_V4L2ELEMENT, GstV4l2Element))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_V4L2ELEMENT, GstV4l2Element))
|
||||||
#define GST_V4L2ELEMENT_CLASS(klass) \
|
#define GST_V4L2ELEMENT_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
|
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
|
||||||
#define GST_IS_V4L2ELEMENT(obj) \
|
#define GST_IS_V4L2ELEMENT(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_V4L2ELEMENT))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_V4L2ELEMENT))
|
||||||
#define GST_IS_V4L2ELEMENT_CLASS(obj) \
|
#define GST_IS_V4L2ELEMENT_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_V4L2ELEMENT))
|
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_V4L2ELEMENT))
|
||||||
#define GST_V4L2ELEMENT_GET_CLASS(obj) \
|
#define GST_V4L2ELEMENT_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_V4L2ELEMENT, GstV4l2ElementClass))
|
||||||
|
|
||||||
|
|
||||||
typedef struct _GstV4l2Element GstV4l2Element;
|
typedef struct _GstV4l2Element GstV4l2Element;
|
||||||
typedef struct _GstV4l2ElementClass GstV4l2ElementClass;
|
typedef struct _GstV4l2ElementClass GstV4l2ElementClass;
|
||||||
typedef struct _GstV4l2Xv GstV4l2Xv;
|
typedef struct _GstV4l2Xv GstV4l2Xv;
|
||||||
|
|
||||||
struct _GstV4l2Element {
|
struct _GstV4l2Element {
|
||||||
GstElement element;
|
GstElement element;
|
||||||
|
|
||||||
/* the video device */
|
/* the video device */
|
||||||
char *device;
|
char *device;
|
||||||
|
|
||||||
/* the video-device's file descriptor */
|
/* the video-device's file descriptor */
|
||||||
gint video_fd;
|
gint video_fd;
|
||||||
|
|
||||||
/* the video buffer (mmap()'ed) */
|
/* the video buffer (mmap()'ed) */
|
||||||
guint8 **buffer;
|
guint8 **buffer;
|
||||||
|
|
||||||
/* the video-device's capabilities */
|
/* the video-device's capabilities */
|
||||||
struct v4l2_capability vcap;
|
struct v4l2_capability vcap;
|
||||||
|
|
||||||
/* the toys available to us */
|
/* the toys available to us */
|
||||||
GList *channels;
|
GList *channels;
|
||||||
GList *norms;
|
GList *norms;
|
||||||
GList *colors;
|
GList *colors;
|
||||||
|
|
||||||
/* X-overlay */
|
/* X-overlay */
|
||||||
GstV4l2Xv *xv;
|
GstV4l2Xv *xv;
|
||||||
XID xwindow_id;
|
XID xwindow_id;
|
||||||
|
|
||||||
/* properties */
|
/* properties */
|
||||||
gchar *norm;
|
gchar *norm;
|
||||||
gchar *channel;
|
gchar *channel;
|
||||||
gulong frequency;
|
gulong frequency;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstV4l2ElementClass {
|
struct _GstV4l2ElementClass {
|
||||||
GstElementClass parent_class;
|
GstElementClass parent_class;
|
||||||
|
|
||||||
/* probed devices */
|
/* probed devices */
|
||||||
GList *devices;
|
GList *devices;
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
void (*open) (GstElement *element,
|
void (*open) (GstElement *element,
|
||||||
const gchar *device);
|
const gchar *device);
|
||||||
void (*close) (GstElement *element,
|
void (*close) (GstElement *element,
|
||||||
const gchar *device);
|
const gchar *device);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,78 +28,78 @@ GST_DEBUG_CATEGORY_EXTERN (v4l2src_debug);
|
||||||
#define GST_V4L2_MIN_BUFFERS 2
|
#define GST_V4L2_MIN_BUFFERS 2
|
||||||
|
|
||||||
#define GST_TYPE_V4L2SRC \
|
#define GST_TYPE_V4L2SRC \
|
||||||
(gst_v4l2src_get_type())
|
(gst_v4l2src_get_type())
|
||||||
#define GST_V4L2SRC(obj) \
|
#define GST_V4L2SRC(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_V4L2SRC,GstV4l2Src))
|
(G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_V4L2SRC,GstV4l2Src))
|
||||||
#define GST_V4L2SRC_CLASS(klass) \
|
#define GST_V4L2SRC_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_V4L2SRC,GstV4l2SrcClass))
|
(G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_V4L2SRC,GstV4l2SrcClass))
|
||||||
#define GST_IS_V4L2SRC(obj) \
|
#define GST_IS_V4L2SRC(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4L2SRC))
|
(G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_V4L2SRC))
|
||||||
#define GST_IS_V4L2SRC_CLASS(obj) \
|
#define GST_IS_V4L2SRC_CLASS(obj) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4L2SRC))
|
(G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_V4L2SRC))
|
||||||
|
|
||||||
typedef struct _GstV4l2BufferPool GstV4l2BufferPool;
|
typedef struct _GstV4l2BufferPool GstV4l2BufferPool;
|
||||||
typedef struct _GstV4l2Buffer GstV4l2Buffer;
|
typedef struct _GstV4l2Buffer GstV4l2Buffer;
|
||||||
typedef struct _GstV4l2Src GstV4l2Src;
|
typedef struct _GstV4l2Src GstV4l2Src;
|
||||||
typedef struct _GstV4l2SrcClass GstV4l2SrcClass;
|
typedef struct _GstV4l2SrcClass GstV4l2SrcClass;
|
||||||
|
|
||||||
/* global info */
|
/* global info */
|
||||||
struct _GstV4l2BufferPool {
|
struct _GstV4l2BufferPool {
|
||||||
GstAtomicInt refcount; /* number of users: 1 for every buffer, 1 for element */
|
GstAtomicInt refcount; /* number of users: 1 for every buffer, 1 for element */
|
||||||
gint video_fd;
|
gint video_fd;
|
||||||
guint buffer_count;
|
guint buffer_count;
|
||||||
GstV4l2Buffer * buffers;
|
GstV4l2Buffer * buffers;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstV4l2Buffer {
|
struct _GstV4l2Buffer {
|
||||||
struct v4l2_buffer buffer;
|
struct v4l2_buffer buffer;
|
||||||
guint8 * start;
|
guint8 * start;
|
||||||
guint length;
|
guint length;
|
||||||
GstAtomicInt refcount; /* add 1 if in use by element, add 1 if in use by GstBuffer */
|
GstAtomicInt refcount; /* add 1 if in use by element, add 1 if in use by GstBuffer */
|
||||||
GstV4l2BufferPool * pool;
|
GstV4l2BufferPool * pool;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstV4l2Src {
|
struct _GstV4l2Src {
|
||||||
GstV4l2Element v4l2element;
|
GstV4l2Element v4l2element;
|
||||||
|
|
||||||
/* pads */
|
/* pads */
|
||||||
GstPad *srcpad;
|
GstPad *srcpad;
|
||||||
|
|
||||||
/* internal lists */
|
/* internal lists */
|
||||||
GSList *formats; /* list of available capture formats */
|
GSList *formats; /* list of available capture formats */
|
||||||
|
|
||||||
/* buffers */
|
/* buffers */
|
||||||
GstV4l2BufferPool *pool;
|
GstV4l2BufferPool *pool;
|
||||||
|
|
||||||
struct v4l2_requestbuffers breq;
|
struct v4l2_requestbuffers breq;
|
||||||
struct v4l2_format format;
|
struct v4l2_format format;
|
||||||
|
|
||||||
/* True if we want to stop */
|
/* True if we want to stop */
|
||||||
gboolean quit, is_capturing;
|
gboolean quit, is_capturing;
|
||||||
|
|
||||||
/* A/V sync... frame counter and internal cache */
|
/* A/V sync... frame counter and internal cache */
|
||||||
gulong handled;
|
gulong handled;
|
||||||
gint need_writes;
|
gint need_writes;
|
||||||
GstBuffer *cached_buffer;
|
GstBuffer *cached_buffer;
|
||||||
gulong last_seq;
|
gulong last_seq;
|
||||||
|
|
||||||
/* clock */
|
/* clock */
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
|
|
||||||
/* time to substract from clock time to get back to timestamp */
|
/* time to substract from clock time to get back to timestamp */
|
||||||
GstClockTime substract_time;
|
GstClockTime substract_time;
|
||||||
|
|
||||||
/* how are we going to push buffers? */
|
/* how are we going to push buffers? */
|
||||||
gboolean use_fixed_fps;
|
gboolean use_fixed_fps;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstV4l2SrcClass {
|
struct _GstV4l2SrcClass {
|
||||||
GstV4l2ElementClass parent_class;
|
GstV4l2ElementClass parent_class;
|
||||||
|
|
||||||
void (*frame_capture) (GObject *object);
|
void (*frame_capture) (GObject *object);
|
||||||
void (*frame_drop) (GObject *object);
|
void (*frame_drop) (GObject *object);
|
||||||
void (*frame_insert) (GObject *object);
|
void (*frame_insert) (GObject *object);
|
||||||
void (*frame_lost) (GObject *object,
|
void (*frame_lost) (GObject *object,
|
||||||
gint num_lost);
|
gint num_lost);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,10 +33,10 @@ G_BEGIN_DECLS
|
||||||
(gst_v4l2_tuner_channel_get_type ())
|
(gst_v4l2_tuner_channel_get_type ())
|
||||||
#define GST_V4L2_TUNER_CHANNEL(obj) \
|
#define GST_V4L2_TUNER_CHANNEL(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_CHANNEL, \
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_CHANNEL, \
|
||||||
GstV4l2TunerChannel))
|
GstV4l2TunerChannel))
|
||||||
#define GST_V4L2_TUNER_CHANNEL_CLASS(klass) \
|
#define GST_V4L2_TUNER_CHANNEL_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_CHANNEL, \
|
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_CHANNEL, \
|
||||||
GstV4l2TunerChannelClass))
|
GstV4l2TunerChannelClass))
|
||||||
#define GST_IS_V4L2_TUNER_CHANNEL(obj) \
|
#define GST_IS_V4L2_TUNER_CHANNEL(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_CHANNEL))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_CHANNEL))
|
||||||
#define GST_IS_V4L2_TUNER_CHANNEL_CLASS(klass) \
|
#define GST_IS_V4L2_TUNER_CHANNEL_CLASS(klass) \
|
||||||
|
@ -58,10 +58,10 @@ typedef struct _GstV4l2TunerChannelClass {
|
||||||
(gst_v4l2_tuner_norm_get_type ())
|
(gst_v4l2_tuner_norm_get_type ())
|
||||||
#define GST_V4L2_TUNER_NORM(obj) \
|
#define GST_V4L2_TUNER_NORM(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_NORM, \
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_V4L2_TUNER_NORM, \
|
||||||
GstV4l2TunerNorm))
|
GstV4l2TunerNorm))
|
||||||
#define GST_V4L2_TUNER_NORM_CLASS(klass) \
|
#define GST_V4L2_TUNER_NORM_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_NORM, \
|
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_V4L2_TUNER_NORM, \
|
||||||
GstV4l2TunerNormClass))
|
GstV4l2TunerNormClass))
|
||||||
#define GST_IS_V4L2_TUNER_NORM(obj) \
|
#define GST_IS_V4L2_TUNER_NORM(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_NORM))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_V4L2_TUNER_NORM))
|
||||||
#define GST_IS_V4L2_TUNER_NORM_CLASS(klass) \
|
#define GST_IS_V4L2_TUNER_NORM_CLASS(klass) \
|
||||||
|
@ -77,9 +77,9 @@ typedef struct _GstV4l2TunerNormClass {
|
||||||
GstTunerNormClass parent;
|
GstTunerNormClass parent;
|
||||||
} GstV4l2TunerNormClass;
|
} GstV4l2TunerNormClass;
|
||||||
|
|
||||||
GType gst_v4l2_tuner_channel_get_type (void);
|
GType gst_v4l2_tuner_channel_get_type (void);
|
||||||
GType gst_v4l2_tuner_norm_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__ */
|
#endif /* __GST_V4L2_TUNER_H__ */
|
||||||
|
|
|
@ -29,9 +29,9 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass);
|
void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass);
|
||||||
|
|
||||||
void gst_v4l2_xoverlay_open (GstV4l2Element *v4l2element);
|
void gst_v4l2_xoverlay_open (GstV4l2Element *v4l2element);
|
||||||
void gst_v4l2_xoverlay_close (GstV4l2Element *v4l2element);
|
void gst_v4l2_xoverlay_close (GstV4l2Element *v4l2element);
|
||||||
|
|
||||||
#endif /* __GST_V4L2_X_OVERLAY_H__ */
|
#endif /* __GST_V4L2_X_OVERLAY_H__ */
|
||||||
|
|
|
@ -37,9 +37,9 @@
|
||||||
#include "gstv4l2src.h"
|
#include "gstv4l2src.h"
|
||||||
|
|
||||||
#define DEBUG(format, args...) \
|
#define DEBUG(format, args...) \
|
||||||
GST_DEBUG_OBJECT (\
|
GST_DEBUG_OBJECT (\
|
||||||
GST_ELEMENT(v4l2element), \
|
GST_ELEMENT(v4l2element), \
|
||||||
"V4L2: " format, ##args)
|
"V4L2: " format, ##args)
|
||||||
|
|
||||||
|
|
||||||
/******************************************************
|
/******************************************************
|
||||||
|
|
|
@ -36,86 +36,86 @@
|
||||||
(element->vcap.capabilities & V4L2_CAP_VIDEO_OVERLAY)
|
(element->vcap.capabilities & V4L2_CAP_VIDEO_OVERLAY)
|
||||||
|
|
||||||
/* checks whether the current v4lelement has already been open()'ed or not */
|
/* checks whether the current v4lelement has already been open()'ed or not */
|
||||||
#define GST_V4L2_CHECK_OPEN(element) \
|
#define GST_V4L2_CHECK_OPEN(element) \
|
||||||
if (!GST_V4L2_IS_OPEN(element)) \
|
if (!GST_V4L2_IS_OPEN(element)) \
|
||||||
{ \
|
{ \
|
||||||
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
|
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
|
||||||
(_("Device is not open.")), (NULL)); \
|
(_("Device is not open.")), (NULL)); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checks whether the current v4lelement is close()'ed or whether it is still open */
|
/* checks whether the current v4lelement is close()'ed or whether it is still open */
|
||||||
#define GST_V4L2_CHECK_NOT_OPEN(element) \
|
#define GST_V4L2_CHECK_NOT_OPEN(element) \
|
||||||
if (GST_V4L2_IS_OPEN(element)) \
|
if (GST_V4L2_IS_OPEN(element)) \
|
||||||
{ \
|
{ \
|
||||||
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
|
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
|
||||||
(_("Device is open.")), (NULL)); \
|
(_("Device is open.")), (NULL)); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checks whether the current v4lelement does video overlay */
|
/* checks whether the current v4lelement does video overlay */
|
||||||
#define GST_V4L2_CHECK_OVERLAY(element) \
|
#define GST_V4L2_CHECK_OVERLAY(element) \
|
||||||
if (!GST_V4L2_IS_OVERLAY(element)) \
|
if (!GST_V4L2_IS_OVERLAY(element)) \
|
||||||
{ \
|
{ \
|
||||||
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
|
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
|
||||||
(NULL), ("Device cannot handle overlay")); \
|
(NULL), ("Device cannot handle overlay")); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checks whether we're in capture mode or not */
|
/* checks whether we're in capture mode or not */
|
||||||
#define GST_V4L2_CHECK_ACTIVE(element) \
|
#define GST_V4L2_CHECK_ACTIVE(element) \
|
||||||
if (!GST_V4L2_IS_ACTIVE(element)) \
|
if (!GST_V4L2_IS_ACTIVE(element)) \
|
||||||
{ \
|
{ \
|
||||||
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
|
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
|
||||||
(NULL), ("Device is not in streaming mode")); \
|
(NULL), ("Device is not in streaming mode")); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
/* checks whether we're out of capture mode or not */
|
/* checks whether we're out of capture mode or not */
|
||||||
#define GST_V4L2_CHECK_NOT_ACTIVE(element) \
|
#define GST_V4L2_CHECK_NOT_ACTIVE(element) \
|
||||||
if (GST_V4L2_IS_ACTIVE(element)) \
|
if (GST_V4L2_IS_ACTIVE(element)) \
|
||||||
{ \
|
{ \
|
||||||
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
|
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
|
||||||
(NULL), ("Device is in streaming mode")); \
|
(NULL), ("Device is in streaming mode")); \
|
||||||
return FALSE; \
|
return FALSE; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* open/close the device */
|
/* open/close the device */
|
||||||
gboolean gst_v4l2_open (GstV4l2Element *v4l2element);
|
gboolean gst_v4l2_open (GstV4l2Element *v4l2element);
|
||||||
gboolean gst_v4l2_close (GstV4l2Element *v4l2element);
|
gboolean gst_v4l2_close (GstV4l2Element *v4l2element);
|
||||||
|
|
||||||
/* norm/input/output */
|
/* norm/input/output */
|
||||||
gboolean gst_v4l2_get_norm (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_get_norm (GstV4l2Element *v4l2element,
|
||||||
v4l2_std_id *norm);
|
v4l2_std_id *norm);
|
||||||
gboolean gst_v4l2_set_norm (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_set_norm (GstV4l2Element *v4l2element,
|
||||||
v4l2_std_id norm);
|
v4l2_std_id norm);
|
||||||
gboolean gst_v4l2_get_input (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_get_input (GstV4l2Element *v4l2element,
|
||||||
gint *input);
|
gint *input);
|
||||||
gboolean gst_v4l2_set_input (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_set_input (GstV4l2Element *v4l2element,
|
||||||
gint input);
|
gint input);
|
||||||
gboolean gst_v4l2_get_output (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_get_output (GstV4l2Element *v4l2element,
|
||||||
gint *output);
|
gint *output);
|
||||||
gboolean gst_v4l2_set_output (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_set_output (GstV4l2Element *v4l2element,
|
||||||
gint output);
|
gint output);
|
||||||
|
|
||||||
/* frequency control */
|
/* frequency control */
|
||||||
gboolean gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
|
||||||
gint tunernum,
|
gint tunernum,
|
||||||
gulong *frequency);
|
gulong *frequency);
|
||||||
gboolean gst_v4l2_set_frequency (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_set_frequency (GstV4l2Element *v4l2element,
|
||||||
gint tunernum,
|
gint tunernum,
|
||||||
gulong frequency);
|
gulong frequency);
|
||||||
gboolean gst_v4l2_signal_strength (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_signal_strength (GstV4l2Element *v4l2element,
|
||||||
gint tunernum,
|
gint tunernum,
|
||||||
gulong *signal);
|
gulong *signal);
|
||||||
|
|
||||||
/* attribute control */
|
/* attribute control */
|
||||||
gboolean gst_v4l2_get_attribute (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_get_attribute (GstV4l2Element *v4l2element,
|
||||||
int attribute,
|
int attribute,
|
||||||
int *value);
|
int *value);
|
||||||
gboolean gst_v4l2_set_attribute (GstV4l2Element *v4l2element,
|
gboolean gst_v4l2_set_attribute (GstV4l2Element *v4l2element,
|
||||||
int attribute,
|
int attribute,
|
||||||
const int value);
|
const int value);
|
||||||
|
|
||||||
#endif /* __V4L2_CALLS_H__ */
|
#endif /* __V4L2_CALLS_H__ */
|
||||||
|
|
|
@ -40,9 +40,9 @@
|
||||||
#define GST_V4L2_SET_INACTIVE(element) (element)->buffer = NULL
|
#define GST_V4L2_SET_INACTIVE(element) (element)->buffer = NULL
|
||||||
|
|
||||||
#define DEBUG(format, args...) \
|
#define DEBUG(format, args...) \
|
||||||
GST_CAT_DEBUG_OBJECT (\
|
GST_CAT_DEBUG_OBJECT (\
|
||||||
v4l2src_debug, v4l2src, \
|
v4l2src_debug, v4l2src, \
|
||||||
"V4L2SRC: " format, ##args)
|
"V4L2SRC: " format, ##args)
|
||||||
|
|
||||||
/* On some systems MAP_FAILED seems to be missing */
|
/* On some systems MAP_FAILED seems to be missing */
|
||||||
#ifndef MAP_FAILED
|
#ifndef MAP_FAILED
|
||||||
|
|
|
@ -24,30 +24,30 @@
|
||||||
#include "v4l2_calls.h"
|
#include "v4l2_calls.h"
|
||||||
|
|
||||||
|
|
||||||
gboolean gst_v4l2src_get_capture (GstV4l2Src *v4l2src);
|
gboolean gst_v4l2src_get_capture (GstV4l2Src *v4l2src);
|
||||||
gboolean gst_v4l2src_set_capture (GstV4l2Src *v4l2src,
|
gboolean gst_v4l2src_set_capture (GstV4l2Src *v4l2src,
|
||||||
struct v4l2_fmtdesc *fmt,
|
struct v4l2_fmtdesc *fmt,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
gboolean gst_v4l2src_capture_init (GstV4l2Src *v4l2src);
|
gboolean gst_v4l2src_capture_init (GstV4l2Src *v4l2src);
|
||||||
gboolean gst_v4l2src_capture_start (GstV4l2Src *v4l2src);
|
gboolean gst_v4l2src_capture_start (GstV4l2Src *v4l2src);
|
||||||
gint gst_v4l2src_grab_frame (GstV4l2Src *v4l2src);
|
gint gst_v4l2src_grab_frame (GstV4l2Src *v4l2src);
|
||||||
guint8 * gst_v4l2src_get_buffer (GstV4l2Src *v4l2src,
|
guint8 * gst_v4l2src_get_buffer (GstV4l2Src *v4l2src,
|
||||||
gint num);
|
gint num);
|
||||||
gboolean gst_v4l2src_queue_frame (GstV4l2Src *v4l2src,
|
gboolean gst_v4l2src_queue_frame (GstV4l2Src *v4l2src,
|
||||||
guint i);
|
guint i);
|
||||||
gboolean gst_v4l2src_capture_stop (GstV4l2Src *v4l2src);
|
gboolean gst_v4l2src_capture_stop (GstV4l2Src *v4l2src);
|
||||||
gboolean gst_v4l2src_capture_deinit (GstV4l2Src *v4l2src);
|
gboolean gst_v4l2src_capture_deinit (GstV4l2Src *v4l2src);
|
||||||
|
|
||||||
gboolean gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src);
|
gboolean gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src);
|
||||||
gboolean gst_v4l2src_clear_format_list (GstV4l2Src *v4l2src);
|
gboolean gst_v4l2src_clear_format_list (GstV4l2Src *v4l2src);
|
||||||
|
|
||||||
/* hacky */
|
/* hacky */
|
||||||
gboolean gst_v4l2src_get_size_limits (GstV4l2Src *v4l2src,
|
gboolean gst_v4l2src_get_size_limits (GstV4l2Src *v4l2src,
|
||||||
struct v4l2_fmtdesc *fmt,
|
struct v4l2_fmtdesc *fmt,
|
||||||
gint *min_w, gint *max_w,
|
gint *min_w, gint *max_w,
|
||||||
gint *min_h, gint *max_h);
|
gint *min_h, gint *max_h);
|
||||||
|
|
||||||
void gst_v4l2src_free_buffer (GstBuffer *buffer);
|
void gst_v4l2src_free_buffer (GstBuffer *buffer);
|
||||||
|
|
||||||
#endif /* __V4L2SRC_CALLS_H__ */
|
#endif /* __V4L2SRC_CALLS_H__ */
|
||||||
|
|
|
@ -41,9 +41,9 @@ G_BEGIN_DECLS
|
||||||
|
|
||||||
/* NOTE: per-element flags start with 16 for now */
|
/* NOTE: per-element flags start with 16 for now */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
VCDSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
VCDSRC_OPEN = (GST_ELEMENT_FLAG_LAST << 0),
|
||||||
|
|
||||||
VCDSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
VCDSRC_FLAG_LAST = (GST_ELEMENT_FLAG_LAST << 2),
|
||||||
} GstVCDSrcFlags;
|
} GstVCDSrcFlags;
|
||||||
|
|
||||||
typedef struct _GstVCDSrc GstVCDSrc;
|
typedef struct _GstVCDSrc GstVCDSrc;
|
||||||
|
@ -73,10 +73,10 @@ struct _GstVCDSrc {
|
||||||
gulong tempoffset;
|
gulong tempoffset;
|
||||||
gboolean discont, flush;
|
gboolean discont, flush;
|
||||||
|
|
||||||
gulong curoffset; /* current offset in file */
|
gulong curoffset; /* current offset in file */
|
||||||
gulong bytes_per_read; /* bytes per read */
|
gulong bytes_per_read; /* bytes per read */
|
||||||
|
|
||||||
gulong seq; /* buffer sequence number */
|
gulong seq; /* buffer sequence number */
|
||||||
int max_errors;
|
int max_errors;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue