[Bug 743155] applemedia: new AVSampleBufferLayerSink

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jan 21 01:37:09 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=743155
  GStreamer | gst-plugins-bad | git master

Sebastian Dröge (slomo) <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slomo at coaxion.net

--- Comment #4 from Sebastian Dröge (slomo) <slomo at coaxion.net> 2015-01-21 09:37:03 UTC ---
(In reply to comment #3)
> Created an attachment (id=295070)
 View: https://bugzilla.gnome.org/attachment.cgi?id=295070
 Review: https://bugzilla.gnome.org/review?bug=743155&attachment=295070

> applemedia: new AVSampleBufferLayerSink
> 
> Anything not replied to below has been addressed.
> 
> (In reply to comment #2)
> > Review of attachment 294835 [details] [details]:
> > @@ +119,3 @@
> > +    GST_PAD_SINK,
> > +    GST_PAD_ALWAYS,
> > +    GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ RGB, BGR, ARGB, BGRA, ABGR, RGBA
> > }"))
> > 
> > Support for I420 and/or NV12 would be nice :) It should support that in theory,
> > at least for the VideoToolbox encoder we can wrap I420 and NV12 in
> > CVPixelBuffers.
> 
> No matter what I try, I cannot seem to get CVPixelBufferCreateWithPlanarBytes
> to work with NV12 so it has been commented out.  There's still YUY2 and UYVY
> support though.

There is code for vtenc to put I420 and NV12 into pixel buffers. But maybe that
only works for VideoToolbox and not AVSampleBufferLayer.

> > @@ +493,3 @@
> > +    GST_DEBUG ("keeping video width");
> > +    GST_VIDEO_SINK_WIDTH (av_sink) = width;
> > +    GST_VIDEO_SINK_HEIGHT (av_sink) = (guint)
> > 
> > These values should probably be set as size of the layer or something like
> > that, so that CA knows the "original" size and the aspect ratio at least
> 
> I have not looked extensively at the aspect ratio and how CA handle positioning
> and sizing but it seems that it works on a similar concept to the wayland model
> where sublayers are defined relative to their parent layer and so maybe a
> similar solution as waylandsink with its window inside a window for aspect
> ratio handling needs to be implemented here.

Needs some research then, but this is a necessary feature IMHO :)

CALayer has a contentsRect property though, and frame and bounds. Also the
preferredFrameSize method. Maybe modifying one of these is already enough, or
are they expected to be modified by the application?

For NSView IIRC the frame is what we modify.

> > @@ +582,3 @@
> > +  buf_attrs = CFDictionaryCreate (NULL, NULL, NULL, 0,
> > &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
> > +
> > +  if (kCVReturnSuccess != CVPixelBufferCreateWithBytes (NULL,
> > GST_VIDEO_INFO_WIDTH (&av_sink->info),
> > 
> > There already is API to wrap a CVPixelBuffer around a GstBuffer inside
> > corevideo.m IIRC
> 
> No, there's only functions to create GstBuffers from CVPixelBuffer's not create
> CVPixelBuffer's from a GstBuffer (unless you count a potential copy case).

Yeah, it's in vtenc.c in gst_vtenc_encode_frame() in the #ifndef HAVE_IOS case
(in the IOS case we copy).

-- 
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