mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
mpegtsdemux: Don't use liboil functions
glibc memcpy() will be faster than liboil's/orc's for now anyway and we can use orc's later, after orc has support for loop unrolling.
This commit is contained in:
parent
3a2f40e160
commit
b1a12c3a2d
2 changed files with 6 additions and 9 deletions
|
@ -15,10 +15,10 @@ libgstmpegdemux_la_SOURCES = \
|
||||||
|
|
||||||
libgstmpegdemux_la_CFLAGS = \
|
libgstmpegdemux_la_CFLAGS = \
|
||||||
$(GST_PLUGINS_BASE_CFLAGS) \
|
$(GST_PLUGINS_BASE_CFLAGS) \
|
||||||
$(GST_BASE_CFLAGS) $(GST_CFLAGS) $(LIBOIL_CFLAGS)
|
$(GST_BASE_CFLAGS) $(GST_CFLAGS)
|
||||||
libgstmpegdemux_la_LIBADD = \
|
libgstmpegdemux_la_LIBADD = \
|
||||||
$(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) \
|
$(GST_PLUGINS_BASE_LIBS) -lgsttag-$(GST_MAJORMINOR) \
|
||||||
$(GST_BASE_LIBS) $(GST_LIBS) $(LIBOIL_LIBS)
|
$(GST_BASE_LIBS) $(GST_LIBS)
|
||||||
libgstmpegdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
libgstmpegdemux_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||||
libgstmpegdemux_la_LIBTOOLFLAGS = --tag=disable-static
|
libgstmpegdemux_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
|
|
|
@ -48,8 +48,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <liboil/liboil.h>
|
|
||||||
|
|
||||||
#include <gst/tag/tag.h>
|
#include <gst/tag/tag.h>
|
||||||
|
|
||||||
#include "gstmpegdefs.h"
|
#include "gstmpegdefs.h"
|
||||||
|
@ -329,7 +327,6 @@ gst_mpegts_demux_init (GstMpegTSDemux * demux)
|
||||||
demux->pcr[1] = -1;
|
demux->pcr[1] = -1;
|
||||||
demux->cache_duration = GST_CLOCK_TIME_NONE;
|
demux->cache_duration = GST_CLOCK_TIME_NONE;
|
||||||
demux->base_pts = GST_CLOCK_TIME_NONE;
|
demux->base_pts = GST_CLOCK_TIME_NONE;
|
||||||
oil_init ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1599,7 +1596,7 @@ gst_mpegts_stream_parse_private_section (GstMpegTSStream * stream,
|
||||||
/* just dump this down the pad */
|
/* just dump this down the pad */
|
||||||
if (gst_pad_alloc_buffer (stream->pad, 0, datalen, NULL, &buffer) ==
|
if (gst_pad_alloc_buffer (stream->pad, 0, datalen, NULL, &buffer) ==
|
||||||
GST_FLOW_OK) {
|
GST_FLOW_OK) {
|
||||||
oil_memcpy (buffer->data, data, datalen);
|
memcpy (buffer->data, data, datalen);
|
||||||
gst_pad_push (stream->pad, buffer);
|
gst_pad_push (stream->pad, buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2163,7 +2160,7 @@ gst_mpegts_stream_pes_buffer_push (GstMpegTSStream * stream,
|
||||||
stream->pes_buffer_used = 0;
|
stream->pes_buffer_used = 0;
|
||||||
}
|
}
|
||||||
out_data = GST_BUFFER_DATA (stream->pes_buffer) + stream->pes_buffer_used;
|
out_data = GST_BUFFER_DATA (stream->pes_buffer) + stream->pes_buffer_used;
|
||||||
oil_memcpy (out_data, in_data, in_size);
|
memcpy (out_data, in_data, in_size);
|
||||||
stream->pes_buffer_used += in_size;
|
stream->pes_buffer_used += in_size;
|
||||||
done:
|
done:
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2191,7 +2188,7 @@ gst_mpegts_demux_push_fragment (GstMpegTSStream * stream,
|
||||||
{
|
{
|
||||||
GstFlowReturn ret;
|
GstFlowReturn ret;
|
||||||
GstBuffer *es_buf = gst_buffer_new_and_alloc (in_size);
|
GstBuffer *es_buf = gst_buffer_new_and_alloc (in_size);
|
||||||
oil_memcpy (GST_BUFFER_DATA (es_buf), in_data, in_size);
|
memcpy (GST_BUFFER_DATA (es_buf), in_data, in_size);
|
||||||
ret = gst_pes_filter_push (&stream->filter, es_buf);
|
ret = gst_pes_filter_push (&stream->filter, es_buf);
|
||||||
|
|
||||||
/* If PES filter return ok then PES fragment buffering
|
/* If PES filter return ok then PES fragment buffering
|
||||||
|
@ -2331,7 +2328,7 @@ gst_mpegts_demux_parse_stream (GstMpegTSDemux * demux, GstMpegTSStream * stream,
|
||||||
/* FIXME: try to use data directly instead of creating a buffer and
|
/* FIXME: try to use data directly instead of creating a buffer and
|
||||||
pushing in into adapter at section filter */
|
pushing in into adapter at section filter */
|
||||||
sec_buf = gst_buffer_new_and_alloc (datalen);
|
sec_buf = gst_buffer_new_and_alloc (datalen);
|
||||||
oil_memcpy (GST_BUFFER_DATA (sec_buf), data, datalen);
|
memcpy (GST_BUFFER_DATA (sec_buf), data, datalen);
|
||||||
if (gst_section_filter_push (&stream->section_filter,
|
if (gst_section_filter_push (&stream->section_filter,
|
||||||
payload_unit_start_indicator, continuity_counter, sec_buf)) {
|
payload_unit_start_indicator, continuity_counter, sec_buf)) {
|
||||||
GST_DEBUG_OBJECT (demux, "section finished");
|
GST_DEBUG_OBJECT (demux, "section finished");
|
||||||
|
|
Loading…
Reference in a new issue