Unified getbits handling. I currently have an inline integer implementation.

Original commit message from CVS:
Unified getbits handling. I currently have an inline integer implementation.
This commit is contained in:
Wim Taymans 2000-04-16 18:47:45 +00:00
parent 3fbaa5c582
commit a3443b51d5
5 changed files with 106 additions and 46 deletions

View file

@ -301,6 +301,7 @@ gst/xml/Makefile
libs/Makefile libs/Makefile
libs/riff/Makefile libs/riff/Makefile
libs/colorspace/Makefile libs/colorspace/Makefile
libs/getbits/Makefile
plugins/Makefile plugins/Makefile
plugins/au/Makefile plugins/au/Makefile
plugins/wav/Makefile plugins/wav/Makefile

View file

@ -359,6 +359,64 @@ GstBuffer *buffer
<RETURNS>void </RETURNS> <RETURNS>void </RETURNS>
GstBuffer *buffer,GstMeta *meta GstBuffer *buffer,GstMeta *meta
</FUNCTION> </FUNCTION>
<TYPEDEF>
<NAME>GstClockTime</NAME>
typedef guint64 GstClockTime;
</TYPEDEF>
<TYPEDEF>
<NAME>GstClockTimeDiff</NAME>
typedef gint64 GstClockTimeDiff;
</TYPEDEF>
<MACRO>
<NAME>GST_CLOCK_DIFF</NAME>
#define GST_CLOCK_DIFF(s, e) (GstClockTimeDiff)((s)-(e))
</MACRO>
<STRUCT>
<NAME>GstClock</NAME>
</STRUCT>
<STRUCT>
<NAME>GstClock</NAME>
struct GstClock {
gchar *name;
GstClockTime start_time;
GstClockTime current_time;
GstClockTimeDiff adjust;
gboolean locking;
GList *sinkobjects;
GMutex *sinkmutex;
GMutex *lock;
};
</STRUCT>
<FUNCTION>
<NAME>gst_clock_new</NAME>
<RETURNS>GstClock *</RETURNS>
gchar *name
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_get_system</NAME>
<RETURNS>GstClock *</RETURNS>
void
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_register</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstObject *obj
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_set</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstClockTime time
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_reset</NAME>
<RETURNS>void </RETURNS>
GstClock *clock
</FUNCTION>
<FUNCTION>
<NAME>gst_clock_wait</NAME>
<RETURNS>void </RETURNS>
GstClock *clock, GstClockTime time, GstObject *obj
</FUNCTION>
<MACRO> <MACRO>
<NAME>GST_TYPE_CONNECTION</NAME> <NAME>GST_TYPE_CONNECTION</NAME>
#define GST_TYPE_CONNECTION \ #define GST_TYPE_CONNECTION \
@ -1876,8 +1934,11 @@ struct GstAudioSink {
GstPad *sinkpad; GstPad *sinkpad;
GstClockTime clocktime;
GstClock *clock;
/* soundcard state */ /* soundcard state */
int fd; int fd;
int caps; /* the capabilities */
gint format; gint format;
gint channels; gint channels;
gint frequency; gint frequency;
@ -2630,7 +2691,7 @@ struct MetaVideoRaw {
/* formatting information */ /* formatting information */
gint format; gint format;
GdkVisual *visual; GdkVisual *visual;
// dimensions of the video buffer // dimensions of the video buffer
gint width; gint width;
gint height; gint height;

View file

@ -167,13 +167,6 @@
@Returns: @Returns:
<!-- ##### FUNCTION gst_object_get_type ##### -->
<para>
</para>
@Returns:
<!-- ##### MACRO GST_SINESRC ##### --> <!-- ##### MACRO GST_SINESRC ##### -->
<para> <para>
@ -181,19 +174,19 @@
@obj: @obj:
<!-- ##### SECTION ./tmpl/plugin.sgml:Long_Description ##### --> <!-- ##### FUNCTION gst_object_get_type ##### -->
<para>
</para>
<!-- ##### FUNCTION gst_audiosrc_get_type ##### -->
<para> <para>
</para> </para>
@Returns: @Returns:
<!-- ##### SECTION ./tmpl/plugin.sgml:Long_Description ##### -->
<para>
</para>
<!-- ##### MACRO GST_QUEUE_CLASS ##### --> <!-- ##### MACRO GST_QUEUE_CLASS ##### -->
<para> <para>
@ -201,6 +194,13 @@
@klass: @klass:
<!-- ##### FUNCTION gst_audiosrc_get_type ##### -->
<para>
</para>
@Returns:
<!-- ##### MACRO GST_IS_QUEUE ##### --> <!-- ##### MACRO GST_IS_QUEUE ##### -->
<para> <para>
@ -339,12 +339,6 @@
</para> </para>
<!-- ##### STRUCT GstFakeSink ##### -->
<para>
</para>
<!-- ##### MACRO GST_THREAD_CLASS ##### --> <!-- ##### MACRO GST_THREAD_CLASS ##### -->
<para> <para>
@ -352,6 +346,12 @@
@klass: @klass:
<!-- ##### STRUCT GstFakeSink ##### -->
<para>
</para>
<!-- ##### MACRO GST_BIN_CLASS ##### --> <!-- ##### MACRO GST_BIN_CLASS ##### -->
<para> <para>
@ -660,14 +660,14 @@ The frequency.
</para> </para>
<!-- ##### MACRO GST_ASYNCDISKSRC_CLASS ##### --> <!-- ##### MACRO GST_ESDSINK_CLASS ##### -->
<para> <para>
</para> </para>
@klass: @klass:
<!-- ##### MACRO GST_ESDSINK_CLASS ##### --> <!-- ##### MACRO GST_ASYNCDISKSRC_CLASS ##### -->
<para> <para>
</para> </para>
@ -1267,13 +1267,6 @@ plugin
</para> </para>
<!-- ##### MACRO GST_META ##### -->
<para>
</para>
@meta:
<!-- ##### FUNCTION gst_audiosink_get_type ##### --> <!-- ##### FUNCTION gst_audiosink_get_type ##### -->
<para> <para>
@ -1281,6 +1274,13 @@ plugin
@Returns: @Returns:
<!-- ##### MACRO GST_META ##### -->
<para>
</para>
@meta:
<!-- ##### FUNCTION gst_httpsrc_get_type ##### --> <!-- ##### FUNCTION gst_httpsrc_get_type ##### -->
<para> <para>
@ -1322,6 +1322,12 @@ plugin
</para> </para>
<!-- ##### MACRO GST_TYPE_FILTER ##### -->
<para>
</para>
<!-- ##### MACRO GST_IS_SINESRC_CLASS ##### --> <!-- ##### MACRO GST_IS_SINESRC_CLASS ##### -->
<para> <para>
@ -1329,12 +1335,6 @@ plugin
@obj: @obj:
<!-- ##### MACRO GST_TYPE_FILTER ##### -->
<para>
</para>
<!-- ##### MACRO GST_IS_AUDIOSRC_CLASS ##### --> <!-- ##### MACRO GST_IS_AUDIOSRC_CLASS ##### -->
<para> <para>
@ -1412,6 +1412,10 @@ GstElement
@obj: @obj:
<!-- ##### SECTION ./tmpl/plugin.sgml:Short_Description ##### -->
<!-- ##### FUNCTION gst_audiosrc_push ##### --> <!-- ##### FUNCTION gst_audiosrc_push ##### -->
<para> <para>
@ -1419,10 +1423,6 @@ GstElement
@src: @src:
<!-- ##### SECTION ./tmpl/plugin.sgml:Short_Description ##### -->
<!-- ##### MACRO GST_HTTPSRC_CLASS ##### --> <!-- ##### MACRO GST_HTTPSRC_CLASS ##### -->
<para> <para>

View file

@ -1,3 +1,3 @@
SUBDIRS = riff colorspace SUBDIRS = riff colorspace getbits
DIST_SUBDIRS = riff colorspace DIST_SUBDIRS = riff colorspace getbits

View file

@ -1,6 +1,5 @@
#include <gst/gst.h> #include <gst/gst.h>
extern gboolean _gst_plugin_spew;
void eof(GstSrc *src) { void eof(GstSrc *src) {
g_print("have eof, quitting\n"); g_print("have eof, quitting\n");
@ -15,10 +14,9 @@ int main(int argc,char *argv[]) {
g_print("have %d args\n",argc); g_print("have %d args\n",argc);
_gst_plugin_spew = TRUE;
gst_init(&argc,&argv); gst_init(&argc,&argv);
// gst_plugin_load("mp3parse"); gst_plugin_load("mp3parse");
gst_plugin_load_all(); gst_plugin_load("mpg123");
pipeline = gst_pipeline_new("pipeline"); pipeline = gst_pipeline_new("pipeline");
g_return_if_fail(pipeline != NULL); g_return_if_fail(pipeline != NULL);