[Bug 705129] androidmedia: add support for video encoding

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Oct 8 15:58:46 CEST 2013


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

--- Comment #9 from cee1 <fykcee1 at gmail.com> 2013-10-08 13:58:38 UTC ---
(In reply to comment #7)
> > > You probably also have to handle (differently) codec_data or header buffers
> > > here. They might appear in the GstAmcFormat as csd-0, csd-1, etc fields. Or
> > > maybe inside the stream. Depending on codec/stream-format they need to be put
> > > in-stream or into the caps
> > I have no idea.
> > For gst-omx, it will get the codec_data from omx_buf of
> > OMX_BUFFERFLAG_CODECCONFIG type.
> > For h264, it is in stream.
> > For other format which may have codec_data in GstAmcFormat, but no 
> > INFO_OUTPUT_FORMAT_CHANGED returned for the first time... 
> 
> Is it actually returned in the output format if you get it later? If that is
> the case I think it is safe to assume that the output format is final once you
> get the first output buffer.
> 
> For in-stream codec_data you probably get a flag set on the buffer too, like in
> gst-omx.
Here is the patch:
https://github.com/cee1/gst-plugins-bad/commit/fd81d227da591db89c320317cd4cba587695fc94
Notes:
1. MPEG4 encoding is not tested, since the pad at hand does not support it. 
2. For H264 encoding, the message "got codecconfig in byte-stream format" is
printed.

And it seems android will not return INFO_OUTPUT_FORMAT_CHANGED for an encoder
(see
https://android.googlesource.com/platform/cts/+/android-4.3_r3.1/tests/tests/media/src/android/media/cts/EncodeDecodeTest.java,
line 539), I have to maintain the setting format -- the patch is here:
https://github.com/cee1/gst-plugins-bad/commit/1f683738886b4447c68bd325035cad07dd28cd2f

(In reply to comment #6)
> (In reply to comment #4)
> > Review of attachment 250440 [details] [details]:
> > @@ +720,3 @@
> > +  gst_element_class_add_pad_template (element_class, templ);
> > +
> > +  caps = create_src_caps (codec_info);
> > 
> > create_sink_caps() and create_src_caps() look like almost copies of the decoder
> > variants. Maybe refactor and put them into gstamc.c
> I'll try to do this when all other parts are OK.
Here is the patch:
https://github.com/cee1/gst-plugins-bad/commit/ae0b7a92d5a6f0ac21a7cc736eb56f6dce5ccffd
Note:
1. The audio/video decoding is not tested.
2. Not merge the logic of "Don't put the level restrictions on the sinkpad
caps"
 * Shall we remove "level" restrictions from both decoder and encoder?

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