After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336898 - Port musicbrainz/trm plugin to 0.10
Port musicbrainz/trm plugin to 0.10
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-02 07:28 UTC by James "Doc" Livingston
Modified: 2006-05-03 21:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
port trm element to 0.10 (13.76 KB, patch)
2006-04-02 07:42 UTC, James "Doc" Livingston
committed Details | Review

Description James "Doc" Livingston 2006-04-02 07:28:05 UTC
The MusicBrainz/TRM tag-generating plugin hasn't been ported to 0.10 yet.

Instead of emitting a signal when the tag is ready and making it availabel through gobject properties, it would be better to send it downstream. That would mean apps like Sound-Juicer could just insert the element before the encoders, and the MB tags would automatically be inserted into the file.
Comment 1 James "Doc" Livingston 2006-04-02 07:42:59 UTC
Created attachment 62585 [details] [review]
port trm element to 0.10

Ports the trm element to 0.10, including the signature-emission change described above.

I'm not sure whether the tag GST_TAG_MUSICBRAINZ_TRMID is supposed to use the raw or ascii versions of the tag; I've used the ascii version in the patch, but it is trivial to change.

"src ! decodebin ! audioconvert ! trm ! fakesink" correctly generates the tags for me, I haven't done furthur testing yet.
Comment 2 Tim-Philipp Müller 2006-05-03 11:29:14 UTC
Nice work, thanks for porting this!

Comitted to CVS with some clean-ups:

2006-05-03  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: James "Doc" Livingston  <doclivingston gmail com>

        * configure.ac:
        * ext/musicbrainz/Makefile.am:
        * ext/musicbrainz/gsttrm.c: (gst_trm_base_init),
        (gst_trm_class_init), (gst_trm_init), (gst_trm_setcaps),
        (gst_trm_chain), (gst_trm_emit_signature), (gst_trm_set_property),
        (gst_trm_get_property), (gst_trm_change_state), (plugin_init):
        * ext/musicbrainz/gsttrm.h:
          Port MusicBrainz TRM plugin (#336898).

(took the liberty to rename everything to gst_trm_ in the process, since the element itself is called "trm" and the debug category is "trm" as well).

Some comments for future stuff:

 - gst_pad_get_peer (pad) and gst_pad_get_parent (pad)
   return a reference, so gst_object_unref() must be called on
   the returned object after that.

 - in a chain function you should always pass the return
   value of gst_pad_push() back to the caller/upstream.

 - when you throw an error with GST_ELEMENT_ERROR, you
   should also return GST_FLOW_ERROR in the chain function.