GNOME Bugzilla – Bug 441264
queue2 support to do buffering on a file
Last modified: 2007-06-05 16:14:45 UTC
This patch adds the support for queue2 to use a file to buffer stream data when the temp-location property is set to something other than null. Example: filesrc location=mymp3.mp3 ! queue2 ! mad ! alsasink (this will buffer on memory) filesrc location=mymp3.mp3 ! queue2 temp-location=/tmp/file ! mad ! alsasink (this will buffer on file "/tmp/file")
Created attachment 88818 [details] [review] The patch.
Created attachment 89014 [details] [review] Fixes the previous patch The previous patch had a problem while reading buffers from the file, it didn't initialize the offset, timestamp and duration attributes to the default values. This patch fixes it.
Created attachment 89017 [details] [review] Updated patch Updated patch, make _create block when the queue does not yet have the required data when in temp-file mode.
Created attachment 89186 [details] [review] Fixes previous patch. Same as previous patch, but fixes the gst_queue_set_temp_location that called GST_OBJECT_LOCK but no UNLOCK.
Based on patch by: Thiago Sousa Santos <thiagossantos at gmail dot com> * gst/playback/gstqueue2.c: (gst_queue_class_init), (gst_queue_init), (gst_queue_finalize), (gst_queue_write_buffer_to_file), (gst_queue_have_data), (gst_queue_create_read), (gst_queue_read_item_from_file), (gst_queue_open_temp_location_file), (gst_queue_close_temp_location_file), (gst_queue_locked_flush), (gst_queue_locked_enqueue), (gst_queue_locked_dequeue), (gst_queue_is_empty), (gst_queue_is_filled), (gst_queue_change_state), (gst_queue_set_temp_location), (gst_queue_set_property): Add support for filebased buffering. Fixes #441264.