Due to popular demand :-), I added a vorbis decoder.
Original commit message from CVS: Due to popular demand :-), I added a vorbis decoder. The encoder is not yet functional. Small cosmetic changes to gstcpu.c Beware: You *need* to install libvorbis.a from the main vorbis CVS. you *have* to change the line in libtool to deplibs_check_method="pass_all" because else the plugin shared library refuses to link against the static libvorbis.a library. This is a hack. I have no intention in including libvorbis into the gstreamer CVS tree and making it libtool compatible.
This commit is contained in:
		
							parent
							
								
									56e7d38238
								
							
						
					
					
						commit
						8051d54c36
					
				| @ -420,6 +420,7 @@ plugins/dvdsrc/Makefile | ||||
| plugins/vcdsrc/Makefile | ||||
| plugins/cobin/Makefile | ||||
| plugins/rtjpeg/Makefile | ||||
| plugins/vorbis/Makefile | ||||
| plugins/capture/Makefile | ||||
| plugins/capture/v4l/Makefile | ||||
| gstplay/Makefile | ||||
|  | ||||
| @ -62,7 +62,7 @@ libgstinclude_HEADERS =	\ | ||||
| 	gstxml.h	\
 | ||||
| 	cothreads.h | ||||
| 
 | ||||
| CFLAGS += -g -O2 -Wall | ||||
| CFLAGS += -O2 -Wall | ||||
| 
 | ||||
| libgst_la_LIBADD = $(GLIB_LIBS) $(GTK_LIBS) $(XML_LIBS) | ||||
| libgst_la_LDFLAGS = -version-info $(STREAMER_CURRENT):$(STREAMER_REVISION):$(STREAMER_AGE) | ||||
|  | ||||
							
								
								
									
										10
									
								
								gst/gst.c
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								gst/gst.c
									
									
									
									
									
								
							| @ -59,12 +59,22 @@ void gst_init(int *argc,char **argv[]) { | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_main: | ||||
|  * | ||||
|  * Enter the main GStreamer processing loop  | ||||
|  */ | ||||
| void gst_main() { | ||||
|   gdk_threads_enter(); | ||||
|   gtk_main(); | ||||
|   gdk_threads_leave(); | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_main_quit: | ||||
|  * | ||||
|  * Exits the main GStreamer processing loop  | ||||
|  */ | ||||
| void gst_main_quit() { | ||||
|   gtk_main_quit(); | ||||
| } | ||||
|  | ||||
							
								
								
									
										17
									
								
								gst/gstbin.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								gst/gstbin.c
									
									
									
									
									
								
							| @ -277,7 +277,16 @@ static gboolean gst_bin_change_state_type(GstBin *bin, | ||||
|   return TRUE; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_bin_set_state_type: | ||||
|  * @bin: #GstBin to set the state | ||||
|  * @state: the new state to set the elements to | ||||
|  * @type: the type of elements to change | ||||
|  * | ||||
|  * Sets the state of only those objects of the given type. | ||||
|  * | ||||
|  * Returns: indication if the state change was successfull | ||||
|  */ | ||||
| gboolean gst_bin_set_state_type(GstBin *bin, | ||||
|                                 GstElementState state, | ||||
|                                 GtkType type) { | ||||
| @ -398,6 +407,12 @@ void gst_bin_iterate(GstBin *bin) { | ||||
|     (oclass->iterate)(bin); | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_bin_create_plan: | ||||
|  * @bin: #Gstbin to create the plan for | ||||
|  * | ||||
|  * let the bin figure out how to handle the plugins in it. | ||||
|  */ | ||||
| void gst_bin_create_plan(GstBin *bin) { | ||||
|   GstBinClass *oclass; | ||||
| 
 | ||||
|  | ||||
| @ -67,12 +67,19 @@ GstBuffer *gst_buffer_new() { | ||||
|   return buffer; | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_buffer_new_from_pool: | ||||
|  * @pool: the buffer pool to use | ||||
|  * | ||||
|  * Create a new buffer using the specified bufferpool. | ||||
|  * | ||||
|  * Returns: new buffer | ||||
|  */ | ||||
| GstBuffer *gst_buffer_new_from_pool(GstBufferPool *pool) | ||||
| { | ||||
|   return gst_buffer_pool_new_buffer(pool); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_buffer_create_sub: | ||||
|  * @parent: parent buffer | ||||
| @ -126,12 +133,12 @@ GstBuffer *gst_buffer_create_sub(GstBuffer *parent,guint32 offset,guint32 size) | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_buffer_append_: | ||||
|  * gst_buffer_append: | ||||
|  * @buffer: a buffer | ||||
|  * @append: the buffer to append | ||||
|  * | ||||
|  * Creates a new buffer by appending the data of eppend to the | ||||
|  *  existing data of buffer. | ||||
|  * Creates a new buffer by appending the data of append to the | ||||
|  * existing data of buffer. | ||||
|  * | ||||
|  * Returns: new buffer | ||||
|  */ | ||||
|  | ||||
							
								
								
									
										18
									
								
								gst/gstcpu.c
									
									
									
									
									
								
							
							
						
						
									
										18
									
								
								gst/gstcpu.c
									
									
									
									
									
								
							| @ -37,10 +37,22 @@ void _gst_cpu_initialize(void) | ||||
| 
 | ||||
|   gst_cpuid(1, &eax, &ebx, &ecx, &edx); | ||||
| 
 | ||||
|   if (edx & (1<<23)) _gst_cpu_flags |= GST_CPU_FLAG_MMX; | ||||
|   if (edx & (1<<25)) _gst_cpu_flags |= GST_CPU_FLAG_SSE; | ||||
|   g_print("CPU features : "); | ||||
| 
 | ||||
|   if (edx & (1<<23)) { | ||||
|     _gst_cpu_flags |= GST_CPU_FLAG_MMX; | ||||
|     g_print("MMX "); | ||||
|   } | ||||
|   if (edx & (1<<25)) { | ||||
|     _gst_cpu_flags |= GST_CPU_FLAG_SSE; | ||||
|     g_print("SSE "); | ||||
|   } | ||||
| 
 | ||||
|   if (!_gst_cpu_flags) { | ||||
|     g_print("NONE"); | ||||
|   } | ||||
|   g_print("\n"); | ||||
| 
 | ||||
|   g_print("CPU features (%08x)\n", _gst_cpu_flags); | ||||
| } | ||||
| 
 | ||||
| guint32 gst_cpu_get_flags(void)  | ||||
|  | ||||
| @ -277,10 +277,8 @@ void gst_element_error(GstElement *element,gchar *error) { | ||||
|  * @element: element to change state of | ||||
|  * @state: new element state | ||||
|  * | ||||
|  * Sets the state of the element, but more importantly fires off a signal | ||||
|  * indicating the new state.  You can clear state by simply prefixing the | ||||
|  * GstElementState value with ~, it will be detected and used to turn off | ||||
|  * that bit. | ||||
|  * Sets the state of the element. This function will only set | ||||
|  * the elements pending state. | ||||
|  * | ||||
|  * Returns: whether or not the state was successfully set. | ||||
|  */ | ||||
| @ -306,6 +304,14 @@ gint gst_element_set_state(GstElement *element,GstElementState state) { | ||||
|   return return_val; | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_element_get_factory: | ||||
|  * @element: element to request the factory | ||||
|  * | ||||
|  * Retrieves the factory that was used to create this element | ||||
|  * | ||||
|  * Returns: the factory used for creating this element | ||||
|  */ | ||||
| GstElementFactory *gst_element_get_factory(GstElement *element) { | ||||
|   GstElementClass *oclass; | ||||
| 
 | ||||
| @ -322,9 +328,8 @@ GstElementFactory *gst_element_get_factory(GstElement *element) { | ||||
|  * @element: element to change state of | ||||
|  * | ||||
|  * Changes the state of the element, but more importantly fires off a signal | ||||
|  * indicating the new state.  You can clear state by simply prefixing the | ||||
|  * GstElementState value with ~, it will be detected and used to turn off | ||||
|  * that bit. | ||||
|  * indicating the new state.   | ||||
|  * The element will have no pending states anymore. | ||||
|  * | ||||
|  * Returns: whether or not the state change was successfully set. | ||||
|  */ | ||||
|  | ||||
| @ -134,6 +134,17 @@ GstElement *gst_elementfactory_create(GstElementFactory *factory, | ||||
|   return element; | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_elementfactory_make: | ||||
|  * @factoryname: a named factory to instantiate | ||||
|  * @name: name of new element | ||||
|  * | ||||
|  * Create a new element of the type defined by the given elementfactory. | ||||
|  * It wll be given the name supplied, since all elements require a name as | ||||
|  * their first argument. | ||||
|  * | ||||
|  * Returns: new #GstElement | ||||
|  */ | ||||
| GstElement *gst_elementfactory_make(gchar *factoryname,gchar *name) { | ||||
|   GstElementFactory *factory; | ||||
|   GstElement *element; | ||||
| @ -145,18 +156,43 @@ GstElement *gst_elementfactory_make(gchar *factoryname,gchar *name) { | ||||
|   return element; | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_elementfactory_add_src: | ||||
|  * @elementfactory: factory to add the src id to | ||||
|  * @id: the mime id of the src  | ||||
|  * | ||||
|  * Use this function to indicate that this factory can src | ||||
|  * the given type id. | ||||
|  */ | ||||
| void gst_elementfactory_add_src(GstElementFactory *elementfactory, guint16 id) { | ||||
|   guint type = id; | ||||
| 
 | ||||
|   elementfactory->src_types = g_list_prepend(elementfactory->src_types, GUINT_TO_POINTER(type)); | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_elementfactory_add_sink: | ||||
|  * @elementfactory: factory to add the sink id to | ||||
|  * @id: the type id of the sink  | ||||
|  * | ||||
|  * Use this function to indicate that this factory can sink | ||||
|  * the given type id. | ||||
|  */ | ||||
| void gst_elementfactory_add_sink(GstElementFactory *elementfactory, guint16 id) { | ||||
|   guint type = id; | ||||
| 
 | ||||
|   elementfactory->sink_types = g_list_prepend(elementfactory->sink_types, GUINT_TO_POINTER(type)); | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_elementfactory_save_thyself: | ||||
|  * @factory: factory to save | ||||
|  * @parent: the parent xmlNodePtr  | ||||
|  * | ||||
|  * Saves the factory into an XML tree | ||||
|  *  | ||||
|  * Returns: the new xmlNodePtr | ||||
|  */ | ||||
| xmlNodePtr gst_elementfactory_save_thyself(GstElementFactory *factory, xmlNodePtr parent) { | ||||
|   GList *types; | ||||
|   xmlNodePtr subtree; | ||||
| @ -197,6 +233,14 @@ xmlNodePtr gst_elementfactory_save_thyself(GstElementFactory *factory, xmlNodePt | ||||
|   return parent; | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_elementfactory_load_thyself: | ||||
|  * @parent: the parent xmlNodePtr  | ||||
|  * | ||||
|  * Creates a new factory from an xmlNodePtr | ||||
|  *  | ||||
|  * Returns: the new factory | ||||
|  */ | ||||
| GstElementFactory *gst_elementfactory_load_thyself(xmlNodePtr parent) { | ||||
|   GstElementFactory *factory = g_new0(GstElementFactory, 1); | ||||
|   xmlNodePtr children = parent->childs; | ||||
|  | ||||
| @ -262,8 +262,8 @@ void gst_pad_chain(GstPad *pad) { | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_pad_handle_qos: | ||||
|  * @element: element to change state of | ||||
|  * @state: new element state | ||||
|  * @pad: the pad to handle the QoS message | ||||
|  * @qos_message: the QoS message to handle | ||||
|  * | ||||
|  */ | ||||
| void gst_pad_handle_qos(GstPad *pad, | ||||
|  | ||||
| @ -222,6 +222,15 @@ end: | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| /**
 | ||||
|  * gst_pipeline_autoplug: | ||||
|  * @pipeline: the pipeline to autoplug | ||||
|  * | ||||
|  * Constructs a complete pipeline by automatically | ||||
|  * detecting the plugins needed. | ||||
|  * | ||||
|  * Returns: a gboolean indicating success or failure. | ||||
|  */ | ||||
| gboolean gst_pipeline_autoplug(GstPipeline *pipeline) { | ||||
|   GList *elements; | ||||
|   GstElement *element, *srcelement = NULL, *sinkelement= NULL; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user