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 672637 - no compare function for GstSample in gstvalue.c
no compare function for GstSample in gstvalue.c
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.11.x
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-22 16:36 UTC by Alban Browaeys
Modified: 2012-06-23 16:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
initial compare/serialize/deserialize for gstsample (5.64 KB, patch)
2012-03-23 12:29 UTC, Alban Browaeys
none Details | Review
initial compare/serialize/deserialize for gstsample v2 (5.74 KB, patch)
2012-03-23 13:04 UTC, Alban Browaeys
needs-work Details | Review

Description Alban Browaeys 2012-03-22 16:36:36 UTC
With rhythmbox port to 0.11 (and local fixes not yet submitted) I get :
unable to compare values of type GstSample.

Indeed there is no compare function in gstreamer gstvalue.c.

Backtrace of where the issue is triggered:
  • #0 g_logv
    at gmessages.c line 768
  • #1 g_log
    at gmessages.c line 792
  • #2 gst_value_compare
    at gstvalue.c line 4059
  • #3 gst_value_list_merge
    at gstvalue.c line 567
  • #4 gst_tag_list_add_value_internal
    at gsttaglist.c line 924
  • #5 gst_tag_list_add_valist
    at gsttaglist.c line 1182
  • #6 gst_tag_list_add
    at gsttaglist.c line 1113
  • #7 gst_tag_list_add_id3_image
    at gstid3tag.c line 378
  • #8 parse_picture_frame
    at id3v2frames.c line 590
  • #9 id3v2_parse_frame
    at id3v2frames.c line 197
  • #10 id3v2_frames_to_tag_list
    at id3v2.c line 586
  • #11 gst_tag_list_from_id3v2_tag
    at id3v2.c line 257
  • #12 gst_id3demux_parse_tag
    at gstid3demux.c line 182
  • #13 gst_tag_demux_pull_start_tag
    at gsttagdemux.c line 1056
  • #14 gst_tag_demux_element_find
    at gsttagdemux.c line 1118
  • #15 gst_tag_demux_element_loop
    at gsttagdemux.c line 1217
  • #16 gst_task_func
    at gsttask.c line 316
  • #17 default_func
    at gsttaskpool.c line 70
  • #18 g_thread_pool_thread_proxy
    at gthreadpool.c line 309
  • #19 g_thread_proxy
    at gthread.c line 801
  • #20 start_thread
    at pthread_create.c line 304
  • #21 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #22 ??

Comment 1 Alban Browaeys 2012-03-23 12:29:58 UTC
Created attachment 210410 [details] [review]
initial compare/serialize/deserialize for gstsample

This is gross though might save some time. Needs work (the comparison only happens on GstBuffer, the serialize/deserialize do not manage GstSegment item of the GstSample)
Comment 2 Alban Browaeys 2012-03-23 13:04:15 UTC
Created attachment 210424 [details] [review]
initial compare/serialize/deserialize for gstsample v2

V2- Dup the strings and allocate dynamically.
Comment 3 Wim Taymans 2012-03-27 09:54:17 UTC
Some comments:

 - reuse the GstBuffer compare function instead of copying it. Make a new 
   compare_buffer() function and call it from gst_value_compare_buffer() and
   gst_value_compare_sample()

 - Reuse the (de)serialize buffer code instead of copying it around.

Why do you need (de)serialisation?
Comment 4 Akhil Laddha 2012-06-18 17:07:48 UTC
Alban, can you please provide updated patch ?
Comment 5 Tim-Philipp Müller 2012-06-23 16:06:23 UTC
commit bc28ebf08d2be4d8cc05b3c5e8ca1826f7187be2
Author: Tim-Philipp Müller <tim@centricular.net>
Date:   Sat Jun 23 16:59:10 2012 +0100

    sample: add compare function for GstSample
    
    Should make gst_tag_list_is_equal() work properly with image tags.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672637

commit 533ecb884007a167ee5735385d7cb4949b8273f1
Author: Tim-Philipp Müller <tim@centricular.net>
Date:   Sat Jun 23 16:30:03 2012 +0100

    value: fix buffer compare function