souphttpsrc and mpeg-ts paket size

Patrick Fischer patrick.fischer at vitec.com
Mon Aug 26 14:34:59 UTC 2019


Am 23.08.19 um 15:54 schrieb Krzysztof Konopko:

On Fri, 2019-08-23 at 13:32 +0000, Patrick Fischer wrote:


Hello list

I have a souphttpsrc -> queue -> typefind -> ownElement

i have the problem that i have an element of my own that wants to
process mpegts packets.
Unfortunately the http payload is not a multiple of 188 and therefore
my
element gets problems processing it.
Is there a way I can tell the souphttpsrc element to always query a
multiple of 188 bytes?
Or a way to tell the queue that it should always pass a multiple of
188
bytes?

Alternatively I have to keep a buffer in my element and manage it
myself. But I would prefer a general solution.




I don't think that there can be a general solution to this as the
correct approach is to look for TS sync bytes.  A hypothetical element
could provide you buffers aligned to 188 bytes but what if for some
reason (errors in transit) they did not start with TS sync byte?

Typically elements consuming TS byte stream have to use a buffer (for
example based on `GstAdapter`) and look up sync bytes first (which can
be crude and work in most of the cases but is not trivial to make it
robust).

Maybe there are other options, like asking 'tsparse' to output aligned
and properly sync-ed buffers.  It does already all of the above
(although not employing super-robust sync byte detection mechanisms)
but AFAICT the output is still the same as input, ie. not aligned.
Maybe adding an option to 'tsparse' could make sense?

Kris

_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

I'm trying to use the gstAdapter solution but i have a problem with it.

My application is an Android App and i use the NDK with the prebuild gst libs.

If i compile my code with gstAdapter i allways got an error.

error: undefined reference to 'gst_adapter_new'

(or any other gst_adapter_* function)


I'm not sure i the problem is a kind of linking plugins problem:

GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_SYS) $(GSTREAMER_PLUGINS_EFFECTS) $(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_CODECS_RESTRICTED) $(GSTREAMER_PLUGINS_CODECS) $(GSTREAMER_PLUGINS_PLAYBACK)

The Android Studio don't have a problem with
#include <gst/base/gstadapter.h>

i have tried with:
GSTREAMER_PLUGINS         := $(GST_BASE_LIBS) $(GST_LIBS)
with no success :-(

Can anybody give me a hint how to use gstAdapter within Android?

interestingly, i have no problems with other gst_buffer, gst_element, ....

regards
Patrick


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190826/86bf6e02/attachment.html>


More information about the gstreamer-devel mailing list