[Gstreamer-bugs] [Bug 119159] Changed - cannot play certain mp3s with gstreamer backend

bugzilla-daemon at widget.gnome.org bugzilla-daemon at widget.gnome.org
Thu Aug 21 17:20:36 PDT 2003


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

http://bugzilla.gnome.org/show_bug.cgi?id=119159

Changed by scriptguru at gmx.net.

--- shadow/119159	Thu Aug 21 05:54:52 2003
+++ shadow/119159.tmp.911	Thu Aug 21 20:20:36 2003
@@ -92,6 +92,52 @@
 
 ------- Additional Comments From scriptguru at gmx.net  2003-08-21 05:54 -------
 (Just clarifying, since I haven't read the docs yet) You take a 8(4)KB
 buffer from the beginning of a file/stream and use that to determine
 the media type (similar to gnome-vfs's method for mime-types)? And the
 issue is, if the stream type isn't found in that buffer, you error?
+
+------- Additional Comments From scriptguru at gmx.net  2003-08-21 20:20 -------
+OK, I just got CVS and that fixed the problems the seek scanning in 
+
+I did discover another problem though. I have another file; it has a
+proper sync right after its tag, but the tag has a picture in it so
+its 14KB long.
+If gstreamer finds a tag in a stream, it should offset the buffer past
+the tag before looking for the media type. Remember ID3 tags can be up
+to 256MB + 20B long.
+
+
+Also, in regards to increasing the buffer size (just an idea):
+Each media type should have a reference to where in a stream its type
+can be found, eg: First KB, First 20KB, Whole Stream; and how many
+bytes make up its type header, 4, 8, 256, etc.
+Then you would have a simple method for finding the types of media
+where their first header is corrupted:
+
+// Everything in this code block is made up
+int offset = 0, max_size;
+do {
+
+  // get the buffer at an offset of "offset" in the stream the size of
+  //  "BUFFER_SIZE"
+  buffer = get_buffer( offset, BUFFER_SIZE );
+
+  // Check for media types which can be found after "offset", so if a
+  //  media type can only be found in the first 100 bytes of a stream,
+  //  and the offset is 101, you won't look for that type.
+  type = check_for_types( offset, buffer );
+
+  // stop seaching if the type is found
+  if( type != unknown ) break;
+
+  // Get the maximum type header size that can be found beyond 
+  //  "offset".
+  max_size = get_maximum_type_header_size( offset );
+
+  // Move the offset to the "BUFFER_SIZE" - "max_size" so if a header
+  //  is cut in half by a buffer, it can still fe found.
+  offset += BUFFER_SIZE - max_size;
+
+  // Loop until the end of the stream.
+} while( offset + BUFFER_SIZE < stream_size );
+




More information about the Gstreamer-bugs mailing list