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 545853 - [basetransform] rewrite
[basetransform] rewrite
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-01 13:49 UTC by Wim Taymans
Modified: 2008-08-21 00:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rewritten basetransform (69.20 KB, patch)
2008-08-01 13:59 UTC, Wim Taymans
none Details | Review

Description Wim Taymans 2008-08-01 13:49:03 UTC
Attached is a patch that rewrites basetransform. No ABI/API changes were made and it does not seem to cause any regressions, but it needs more testing.
Comment 1 Wim Taymans 2008-08-01 13:59:36 UTC
Created attachment 115684 [details] [review]
rewritten basetransform
Comment 2 Wim Taymans 2008-08-05 11:10:59 UTC
        * docs/libs/gstreamer-libs-sections.txt:
        Add new function:
        API: GstBaseTransform::gst_base_transform_suggest()

        * libs/gst/base/gstbasetransform.c: (gst_base_transform_finalize),
        (gst_base_transform_init), (gst_base_transform_transform_caps),
        (gst_base_transform_transform_size),
        (gst_base_transform_configure_caps),
        (gst_base_transform_can_transform),
        (gst_base_transform_find_transform), (gst_base_transform_setcaps),
        (gst_base_transform_prepare_output_buffer),
        (gst_base_transform_buffer_alloc),
        (gst_base_transform_handle_buffer), (gst_base_transform_getrange),
        (gst_base_transform_chain), (gst_base_transform_activate),
        (gst_base_transform_set_passthrough),
        (gst_base_transform_is_passthrough),
        (gst_base_transform_set_in_place),
        (gst_base_transform_is_in_place), (gst_base_transform_update_qos),
        (gst_base_transform_set_qos_enabled),
        (gst_base_transform_is_qos_enabled),
        (gst_base_transform_set_gap_aware), (gst_base_transform_suggest),
        (gst_base_transform_reconfigure):
        * libs/gst/base/gstbasetransform.h:
        Rewrite of basetransform to perform negotiation outside of the
        buffer_alloc functions.  Fixes #545853.

        * tests/check/libs/transform1.c: (GST_START_TEST),
        (buffer_alloc_ct2):
        Update unit test.
Comment 3 Aurelien Grimaud 2008-08-21 00:20:08 UTC
gassert(*out_buf != NULL) in gst_base_transform_prepare_output_buffer fails for some capsfilter.

For instance : 
send mpeg4
gst-launch -v videotestsrc is-live=TRUE ! ffenc_mpeg4 ! rtpmp4vpay ! udpsink host=localhost port=5000 sync=TRUE
Setting pipeline to PAUSED ...
/pipeline0/videotestsrc0.src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
/pipeline0/ffenc_mpeg40.src: caps = video/mpeg, width=(int)320, height=(int)240, framerate=(fraction)30/1, mpegversion=(int)4, systemstream=(boolean)false
/pipeline0/ffenc_mpeg40.sink: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)320, height=(int)240, framerate=(fraction)30/1
/pipeline0/rtpmp4vpay0.sink: caps = video/mpeg, width=(int)320, height=(int)240, framerate=(fraction)30/1, mpegversion=(int)4, systemstream=(boolean)false
/pipeline0/rtpmp4vpay0.src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335312e34382e30, payload=(int)96, ssrc=(guint)554304604, clock-base=(guint)1573512221, seqnum-base=(guint)25873
New clock: GstSystemClock
/pipeline0/udpsink0.sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335312e34382e30, payload=(int)96, ssrc=(guint)554304604, clock-base=(guint)1573512221, seqnum-base=(guint)25873

recv mpeg4
gst-launch -v udpsrc port=5000 ! "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335312e34382e30" ! rtpmp4vdepay !  mpeg4videoparse ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

** ERROR **: file gstbasetransform.c: line 1141 (gst_base_transform_prepare_output_buffer): assertion failed: (*out_buf != NULL)
aborting...
Abort (core dumped)

If payload is specified in capsfilter, all goes ok.

Problem is capsfilter does not always allocate buffer in its prepare_output_buffer function.
What should capsfilter do in such case ?