[Bug 679768] mpegaudioparse, baseparse: fix tag handling

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Nov 18 12:23:00 PST 2012


https://bugzilla.gnome.org/show_bug.cgi?id=679768
  GStreamer | gst-plugins-good | 1.x

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |t.i.m at zen.co.uk
            Version|0.11.x                      |1.x
   Target Milestone|HEAD                        |1.1.x
            Summary|[0.11] mpegaudioparse: send |mpegaudioparse, baseparse:
                   |nominal bitrate             |fix tag handling
     Ever Confirmed|0                           |1
         OS/Version|Mac OS                      |All
           Severity|normal                      |major

--- Comment #2 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2012-11-18 20:22:52 UTC ---
I think this patch makes sense, but to me it looks like the tag handling
overall is just as broken after this patch as it is before this patch.

For example, let's look at this:

gst-launch-1.0 filesrc location= /home/tpm/music/foo.mp3 ! id3demux !
mpegaudioparse ! fakesink  silent=false -v | grep event

GstEventStreamStart,
stream-id=(string)992d662179435060860978a505a8f93abd08979f1b4728d45d4501c596db18f3;)
0x22f0860
GstEventCaps, caps=(GstCaps)audio/mpeg, mpegversion=(int)1,
mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2,
parsed=(boolean)true;) 0x22f08c0
GstEventSegment, segment=(GstSegment)"GstSegment,
flags=(GstSegmentFlags)GST_SEGMENT_FLAG_NONE, rate=(double)1,
applied-rate=(double)1, format=(GstFormat)GST_FORMAT_TIME, base=(guint64)0,
start=(guint64)0, stop=(guint64)18446744073709551615, time=(guint64)0,
position=(guint64)0, duration=(guint64)18446744073709551615;";) 0x21649e0

GstTagList-stream, taglist=(taglist)"taglist\,\ bitrate\=\(uint\)171000\;";)
0x22f0980
GstTagList-stream, taglist=(taglist)"taglist\,\
audio-codec\=\(string\)\"MPEG\\\ 1\\\ Audio\\\,\\\ Layer\\\ 3\\\
\\\(MP3\\\)\"\;";) 0x22f09e0
GstTagList-stream, taglist=(taglist)"taglist\,\ has-crc\=\(boolean\)false\,\
channel-mode\=\(string\)joint-stereo\;";) 0x22f0a40
GstTagList-stream, taglist=(taglist)"taglist\,\ title\=\(string\)\"Title\"\,\
artist\=\(string\)\"Artist\"\,\ album\=\(string\)Album\,\
datetime\=\(datetime\)2010\,\ comment\=\(string\)-----\,\
track-number\=\(uint\)1\,\ genre\=\(string\)Indie\,\
container-format\=\(string\)\"ID3\\\ tag\"\,\ encoded-by\=\(string\)\"LAME\\\
Ain\\\'t\\\ an\\\ MP3\\\ Encoder\"\,\
private-id3v2-frame\=\(buffer\)544c414e00000008000000456e676c697368\;";)
0x22f0aa0
GstTagList-stream, taglist=(taglist)"taglist\,\
minimum-bitrate\=\(uint\)159862\,\ bitrate\=\(uint\)171000\,\
maximum-bitrate\=\(uint\)159862\;"
GstTagList-stream, taglist=(taglist)"taglist\,\
maximum-bitrate\=\(uint\)191712\;
GstTagList-stream, taglist=(taglist)"taglist\,\
maximum-bitrate\=\(uint\)223868\;
GstTagList-stream, taglist=(taglist)"taglist\,\
maximum-bitrate\=\(uint\)255718\;
GstTagList-stream, taglist=(taglist)"taglist\,\
maximum-bitrate\=\(uint\)319725\;
GstTagList-stream, taglist=(taglist)"taglist\,\
minimum-bitrate\=\(uint\)111781\;
GstTagList-stream, taglist=(taglist)"taglist\,\
minimum-bitrate\=\(uint\)95856\;"
GstTagList-stream, taglist=(taglist)"taglist\,\
minimum-bitrate\=\(uint\)79931\;"
GstTagList-stream, taglist=(taglist)"taglist\,\
minimum-bitrate\=\(uint\)63700\;"
GstTagList-stream, taglist=(taglist)"taglist\,\
minimum-bitrate\=\(uint\)31850\;"
eos

Since tag events are sticky now (stream tags and global tags separately), we
need to confer the entire tag 'state' in tag lists, I think. We can't just send
random tag lists and then expect downstream to merge them all.

In other words, whenever we want to send an update, we should take the stream
tags we received from upstream, make a copy to make them writable, and then add
*all* of our own tags (audio-codec, bitrates, crc, whatnot) to that, and then
send the whole thing, so downstream has an accurate picture of the entire
state.

Perhaps baseparse needs some API addition to make this easier (it could keep
track of the subclass's additions and take care of the update + merging things
with the upstream tags).

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list