GNOME Bugzilla – Bug 774782
set vaapi allocators in allocation queries
Last modified: 2016-11-24 12:03:21 UTC
Set the vaapi allocator in the allocation queries decide_allocation() and propose_allocation() In this way we avoid to set the allocators computed frame size in the elements, since the vaapivideobufferpool takes care of that. Side commits are related with documentation and update correctly the video info which will be used by the GstVideo meta.
Created attachment 340411 [details] [review] vaapivideobufferpool: set correct buffer size We should set the correct buffer size when we are configuring the pool, otherwise the buffer will be discarded when it returns to the pool. Indeed when the ref-count of a buffer reaches zero, its pool will queue it back (and ref it) if, and only if, the buffer size matches the configured buffer size on the pool. This issue can be debugged with GST_DEBUG=*PERF*:6, see gstbufferpool.c https://bugzilla.gnome.org/show_bug.cgi?id=755072
Created attachment 340412 [details] [review] plugins: add allocator to allocation query This patch adds the created allocator to the allocation query either in decide_allocation() and propose_allocation() vmehtods. With it, there's no need to set the modified allocator's size in the pool configuration.
Created attachment 340413 [details] [review] plugins: use early return without goto
Created attachment 340414 [details] [review] vaapivideomemory: add missing documentation
Created attachment 340415 [details] [review] plugins: update the src pad allocator video info Update the size, stride and offset of the source pad allocator video info, so the pool could set the correct GstVideoMeta
Created attachment 340438 [details] [review] vaapivideobufferpool: set correct buffer size We should set the correct buffer size when we are configuring the pool, otherwise the buffer will be discarded when it returns to the pool. Indeed when the ref-count of a buffer reaches zero, its pool will queue it back (and ref it) if, and only if, the buffer size matches the configured buffer size on the pool. This issue can be debugged with GST_DEBUG=*PERF*:6, see gstbufferpool.c
Created attachment 340439 [details] [review] plugins: add allocator to allocation query This patch adds the created allocator to the allocation query either in decide_allocation() and propose_allocation() vmehtods. With it, there's no need to set the modified allocator's size in the pool configuration.
Created attachment 340440 [details] [review] plugins: use early return without goto
Created attachment 340441 [details] [review] vaapivideomemory: add missing documentation
Created attachment 340443 [details] [review] plugins: update the src pad allocator video info Update the size, stride and offset of the source pad allocator video info, so the pool could set the correct GstVideoMeta
Created attachment 340444 [details] [review] vaapivideomemory: remove GST_VAAPI_TYPE_VIDEO_INFO Remove redundant GST_VAAPI_TYPE_VIDEO_INFO, since it is a duplicate of GST_TYPE_VIDEO_INFO created before gstreamer 1.6, where the boxed type was created.
Wow, fast! I Tested these patches and seems everything is Okay :)
Attachment 340439 [details] pushed as acefc7e - plugins: add allocator to allocation query Attachment 340440 [details] pushed as ac18e04 - plugins: use early return without goto Attachment 340441 [details] pushed as 432731e - vaapivideomemory: add missing documentation Attachment 340443 [details] pushed as d799bb3 - plugins: update the src pad allocator video info Attachment 340444 [details] pushed as 22463b9 - vaapivideomemory: remove GST_VAAPI_TYPE_VIDEO_INFO