mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
Remove trivial unused variables detected by CLang static analyzer.
This commit is contained in:
parent
cdb03bdc2b
commit
0cb5b42d54
49 changed files with 31 additions and 211 deletions
|
@ -1032,7 +1032,7 @@ gst_dvdemux_handle_pull_seek (GstDVDemux * demux, GstPad * pad,
|
|||
|
||||
/* convert input format to TIME */
|
||||
conv = GST_FORMAT_TIME;
|
||||
if (!(res = gst_dvdemux_convert_src_pair (demux, pad,
|
||||
if (!(gst_dvdemux_convert_src_pair (demux, pad,
|
||||
format, cur, stop, conv, &cur, &stop)))
|
||||
goto no_format;
|
||||
|
||||
|
@ -1379,11 +1379,10 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, GstBuffer * buffer)
|
|||
if (G_UNLIKELY (dvdemux->need_segment)) {
|
||||
GstEvent *event;
|
||||
GstFormat format;
|
||||
gboolean res;
|
||||
|
||||
/* convert to time and store as start/end_timestamp */
|
||||
format = GST_FORMAT_TIME;
|
||||
if (!(res = gst_dvdemux_convert_sink_pair (dvdemux,
|
||||
if (!(gst_dvdemux_convert_sink_pair (dvdemux,
|
||||
GST_FORMAT_BYTES, dvdemux->byte_segment.start,
|
||||
dvdemux->byte_segment.stop, format,
|
||||
&dvdemux->time_segment.start, &dvdemux->time_segment.stop)))
|
||||
|
@ -1395,7 +1394,7 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, GstBuffer * buffer)
|
|||
|
||||
/* calculate current frame number */
|
||||
format = GST_FORMAT_DEFAULT;
|
||||
if (!(res = gst_dvdemux_src_convert (dvdemux, dvdemux->videosrcpad,
|
||||
if (!(gst_dvdemux_src_convert (dvdemux, dvdemux->videosrcpad,
|
||||
GST_FORMAT_TIME, dvdemux->time_segment.start,
|
||||
&format, &dvdemux->frame_offset)))
|
||||
goto segment_error;
|
||||
|
|
|
@ -420,10 +420,6 @@ static void
|
|||
gst_gdk_pixbuf_set_property (GObject * object, guint prop_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstGdkPixbuf *filter;
|
||||
|
||||
filter = GST_GDK_PIXBUF (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case ARG_SILENT:
|
||||
/* filter->silent = g_value_get_boolean (value); */
|
||||
|
@ -438,10 +434,6 @@ static void
|
|||
gst_gdk_pixbuf_get_property (GObject * object, guint prop_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstGdkPixbuf *filter;
|
||||
|
||||
filter = GST_GDK_PIXBUF (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case ARG_SILENT:
|
||||
/* g_value_set_boolean (value, filter->silent); */
|
||||
|
|
|
@ -237,11 +237,9 @@ static GstCaps *
|
|||
gst_pixbufscale_transform_caps (GstBaseTransform * trans,
|
||||
GstPadDirection direction, GstCaps * caps)
|
||||
{
|
||||
GstPixbufScale *pixbufscale;
|
||||
GstCaps *ret;
|
||||
int i;
|
||||
|
||||
pixbufscale = GST_PIXBUFSCALE (trans);
|
||||
ret = gst_caps_copy (caps);
|
||||
|
||||
for (i = 0; i < gst_caps_get_size (ret); i++) {
|
||||
|
@ -303,13 +301,10 @@ static gboolean
|
|||
gst_pixbufscale_get_unit_size (GstBaseTransform * trans,
|
||||
GstCaps * caps, guint * size)
|
||||
{
|
||||
GstPixbufScale *pixbufscale;
|
||||
gint width, height;
|
||||
|
||||
g_assert (size);
|
||||
|
||||
pixbufscale = GST_PIXBUFSCALE (trans);
|
||||
|
||||
if (!parse_caps (caps, &width, &height))
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -261,11 +261,6 @@ gst_cacasink_setcaps (GstBaseSink * basesink, GstCaps * caps)
|
|||
static void
|
||||
gst_cacasink_init (GstCACASink * cacasink)
|
||||
{
|
||||
GstPad *pad;
|
||||
|
||||
pad = GST_BASE_SINK_PAD (cacasink);
|
||||
/* gst_pad_set_fixatecaps_function (pad, gst_cacasink_fixate); */
|
||||
|
||||
cacasink->screen_width = GST_CACA_DEFAULT_SCREEN_WIDTH;
|
||||
cacasink->screen_height = GST_CACA_DEFAULT_SCREEN_HEIGHT;
|
||||
cacasink->bpp = GST_CACA_DEFAULT_BPP;
|
||||
|
|
|
@ -856,10 +856,6 @@ setup_failed:
|
|||
static gboolean
|
||||
gst_pngdec_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
||||
{
|
||||
GstPngDec *pngdec;
|
||||
|
||||
pngdec = GST_PNGDEC (GST_OBJECT_PARENT (sinkpad));
|
||||
|
||||
if (active) {
|
||||
return gst_pad_start_task (sinkpad, (GstTaskFunction) gst_pngdec_task,
|
||||
sinkpad);
|
||||
|
|
|
@ -1036,7 +1036,6 @@ gst_dv1394src_get_query_types (GstPad * pad)
|
|||
static gboolean
|
||||
gst_dv1394src_query (GstPad * pad, GstQuery * query)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstDV1394Src *src;
|
||||
|
||||
src = GST_DV1394SRC (gst_pad_get_parent (pad));
|
||||
|
@ -1050,7 +1049,7 @@ gst_dv1394src_query (GstPad * pad, GstQuery * query)
|
|||
gst_query_parse_position (query, &format, NULL);
|
||||
|
||||
/* bring our current frame to the requested format */
|
||||
res = gst_pad_query_convert (pad,
|
||||
gst_pad_query_convert (pad,
|
||||
GST_FORMAT_DEFAULT, src->frame_sequence, &format, ¤t);
|
||||
|
||||
gst_query_set_position (query, format, current);
|
||||
|
@ -1062,8 +1061,7 @@ gst_dv1394src_query (GstPad * pad, GstQuery * query)
|
|||
gint64 src_val, dest_val;
|
||||
|
||||
gst_query_parse_convert (query, &src_fmt, &src_val, &dest_fmt, &dest_val);
|
||||
if (!(res =
|
||||
gst_dv1394src_convert (pad, src_fmt, src_val, &dest_fmt,
|
||||
if (!(gst_dv1394src_convert (pad, src_fmt, src_val, &dest_fmt,
|
||||
&dest_val)))
|
||||
goto not_supported;
|
||||
gst_query_set_convert (query, src_fmt, src_val, dest_fmt, dest_val);
|
||||
|
|
|
@ -480,7 +480,6 @@ gst_hdv1394src_discover_avc_node (GstHDV1394Src * src)
|
|||
/* loop over all our ports */
|
||||
for (; j < m && node == -1; j++) {
|
||||
raw1394handle_t handle;
|
||||
gint n_ports;
|
||||
struct raw1394_portinfo pinf[16];
|
||||
|
||||
/* open the port */
|
||||
|
@ -489,7 +488,7 @@ gst_hdv1394src_discover_avc_node (GstHDV1394Src * src)
|
|||
GST_WARNING ("raw1394 - failed to get handle: %s.\n", strerror (errno));
|
||||
continue;
|
||||
}
|
||||
if ((n_ports = raw1394_get_port_info (handle, pinf, 16)) < 0) {
|
||||
if (raw1394_get_port_info (handle, pinf, 16) < 0) {
|
||||
GST_WARNING ("raw1394 - failed to get port info: %s.\n",
|
||||
strerror (errno));
|
||||
goto next;
|
||||
|
|
|
@ -527,9 +527,6 @@ static gboolean
|
|||
gst_speex_enc_sink_query (GstPad * pad, GstQuery * query)
|
||||
{
|
||||
gboolean res = TRUE;
|
||||
GstSpeexEnc *enc;
|
||||
|
||||
enc = GST_SPEEX_ENC (GST_PAD_PARENT (pad));
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_CONVERT:
|
||||
|
|
|
@ -472,11 +472,6 @@ gst_alpha_set_ayuv (guint8 * src, guint8 * dest, gint width, gint height,
|
|||
{
|
||||
gint b_alpha = (gint) (alpha * 255);
|
||||
gint y, x;
|
||||
gint size;
|
||||
gint stride;
|
||||
|
||||
stride = gst_video_format_get_row_stride (GST_VIDEO_FORMAT_AYUV, 0, width);
|
||||
size = gst_video_format_get_size (GST_VIDEO_FORMAT_AYUV, width, height);
|
||||
|
||||
for (y = 0; y < height; y++) {
|
||||
for (x = 0; x < width; x++) {
|
||||
|
|
|
@ -112,13 +112,10 @@ static GstCaps *
|
|||
gst_alpha_color_transform_caps (GstBaseTransform * btrans,
|
||||
GstPadDirection direction, GstCaps * caps)
|
||||
{
|
||||
GstAlphaColor *alpha = NULL;
|
||||
const GstCaps *tmpl_caps = NULL;
|
||||
GstCaps *result = NULL, *local_caps = NULL;
|
||||
guint i;
|
||||
|
||||
alpha = GST_ALPHA_COLOR (btrans);
|
||||
|
||||
local_caps = gst_caps_copy (caps);
|
||||
|
||||
for (i = 0; i < gst_caps_get_size (local_caps); i++) {
|
||||
|
|
|
@ -169,7 +169,6 @@ static GstTagList *
|
|||
ape_demux_parse_tags (const guint8 * data, gint size)
|
||||
{
|
||||
GstTagList *taglist = gst_tag_list_new ();
|
||||
gboolean have_tag = FALSE;
|
||||
|
||||
GST_LOG ("Reading tags from chunk of size %u bytes", size);
|
||||
|
||||
|
@ -310,7 +309,6 @@ ape_demux_parse_tags (const guint8 * data, gint size)
|
|||
gst_tag_list_add_values (taglist, GST_TAG_MERGE_APPEND,
|
||||
gst_tag, &v, NULL);
|
||||
g_value_unset (&v);
|
||||
have_tag = TRUE;
|
||||
}
|
||||
}
|
||||
GST_DEBUG ("Read tag %s: %s", tag, val);
|
||||
|
|
|
@ -162,8 +162,6 @@ gst_au_parse_reset (GstAuParse * auparse)
|
|||
static gboolean
|
||||
gst_au_parse_add_srcpad (GstAuParse * auparse, GstCaps * new_caps)
|
||||
{
|
||||
GstPad *srcpad = NULL;
|
||||
|
||||
if (auparse->src_caps && gst_caps_is_equal (new_caps, auparse->src_caps)) {
|
||||
GST_LOG_OBJECT (auparse, "same caps, nothing to do");
|
||||
return TRUE;
|
||||
|
@ -177,8 +175,7 @@ gst_au_parse_add_srcpad (GstAuParse * auparse, GstCaps * new_caps)
|
|||
}
|
||||
|
||||
if (auparse->srcpad == NULL) {
|
||||
srcpad = auparse->srcpad =
|
||||
gst_pad_new_from_static_template (&src_template, "src");
|
||||
auparse->srcpad = gst_pad_new_from_static_template (&src_template, "src");
|
||||
g_return_val_if_fail (auparse->srcpad != NULL, FALSE);
|
||||
|
||||
#if 0
|
||||
|
@ -500,7 +497,6 @@ gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format,
|
|||
gint64 srcval, GstFormat dest_format, gint64 * destval)
|
||||
{
|
||||
gboolean ret = TRUE;
|
||||
gint64 offset;
|
||||
guint samplesize, rate;
|
||||
|
||||
if (dest_format == src_format) {
|
||||
|
@ -510,7 +506,6 @@ gst_au_parse_src_convert (GstAuParse * auparse, GstFormat src_format,
|
|||
|
||||
GST_OBJECT_LOCK (auparse);
|
||||
samplesize = auparse->sample_size;
|
||||
offset = auparse->offset;
|
||||
rate = auparse->samplerate;
|
||||
GST_OBJECT_UNLOCK (auparse);
|
||||
|
||||
|
|
|
@ -156,7 +156,7 @@ gst_quarktv_transform (GstBaseTransform * trans, GstBuffer * in,
|
|||
{
|
||||
GstQuarkTV *filter;
|
||||
gint area;
|
||||
guint32 *src, *dest;
|
||||
guint32 *dest;
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
||||
filter = GST_QUARKTV (trans);
|
||||
|
@ -164,7 +164,6 @@ gst_quarktv_transform (GstBaseTransform * trans, GstBuffer * in,
|
|||
gst_buffer_copy_metadata (out, in, GST_BUFFER_COPY_TIMESTAMPS);
|
||||
|
||||
area = filter->area;
|
||||
src = (guint32 *) GST_BUFFER_DATA (in);
|
||||
dest = (guint32 *) GST_BUFFER_DATA (out);
|
||||
|
||||
if (G_UNLIKELY (filter->planetable == NULL))
|
||||
|
|
|
@ -359,7 +359,7 @@ flx_decode_brun (GstFlxDec * flxdec, guchar * data, guchar * dest)
|
|||
static void
|
||||
flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
|
||||
{
|
||||
gulong count, packets, lines, start_line, start_l;
|
||||
gulong count, packets, lines, start_line;
|
||||
guchar *start_p, x;
|
||||
|
||||
g_return_if_fail (flxdec != NULL);
|
||||
|
@ -376,7 +376,6 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
|
|||
/* start position of delta */
|
||||
dest += (flxdec->hdr.width * start_line);
|
||||
start_p = dest;
|
||||
start_l = lines;
|
||||
|
||||
while (lines--) {
|
||||
/* packet count */
|
||||
|
|
|
@ -234,8 +234,6 @@ gst_icydemux_dispose (GObject * object)
|
|||
static gboolean
|
||||
gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
|
||||
{
|
||||
GstPad *srcpad = NULL;
|
||||
|
||||
if (icydemux->src_caps == NULL ||
|
||||
!gst_caps_is_equal (new_caps, icydemux->src_caps)) {
|
||||
gst_caps_replace (&(icydemux->src_caps), new_caps);
|
||||
|
@ -251,7 +249,7 @@ gst_icydemux_add_srcpad (GstICYDemux * icydemux, GstCaps * new_caps)
|
|||
}
|
||||
|
||||
if (icydemux->srcpad == NULL) {
|
||||
srcpad = icydemux->srcpad =
|
||||
icydemux->srcpad =
|
||||
gst_pad_new_from_template (gst_element_class_get_pad_template
|
||||
(GST_ELEMENT_GET_CLASS (icydemux), "src"), "src");
|
||||
g_return_val_if_fail (icydemux->srcpad != NULL, FALSE);
|
||||
|
|
|
@ -1143,16 +1143,12 @@ forward_event_func (GstPad * pad, GValue * ret, GstEvent * event)
|
|||
static gboolean
|
||||
forward_event (GstInterleave * self, GstEvent * event)
|
||||
{
|
||||
gboolean ret;
|
||||
|
||||
GstIterator *it;
|
||||
GValue vret = { 0 };
|
||||
|
||||
GST_LOG_OBJECT (self, "Forwarding event %p (%s)", event,
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
g_value_init (&vret, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean (&vret, TRUE);
|
||||
it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (self));
|
||||
|
@ -1161,9 +1157,7 @@ forward_event (GstInterleave * self, GstEvent * event)
|
|||
gst_iterator_free (it);
|
||||
gst_event_unref (event);
|
||||
|
||||
ret = g_value_get_boolean (&vret);
|
||||
|
||||
return ret;
|
||||
return g_value_get_boolean (&vret);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -497,10 +497,8 @@ gst_matroska_mux_reset (GstElement * element)
|
|||
|
||||
for (walk = mux->collect->data; walk; walk = g_slist_next (walk)) {
|
||||
GstMatroskaPad *collect_pad;
|
||||
GstPad *thepad;
|
||||
|
||||
collect_pad = (GstMatroskaPad *) walk->data;
|
||||
thepad = collect_pad->collect.pad;
|
||||
|
||||
/* reset collect pad to pristine state */
|
||||
gst_matroska_pad_reset (collect_pad, FALSE);
|
||||
|
@ -2246,7 +2244,7 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad)
|
|||
{
|
||||
GstEbmlWrite *ebml = mux->ebml_write;
|
||||
GstBuffer *buf, *hdr;
|
||||
guint64 cluster, blockgroup;
|
||||
guint64 blockgroup;
|
||||
gboolean write_duration;
|
||||
gint16 relative_timestamp;
|
||||
gint64 relative_timestamp64;
|
||||
|
@ -2317,7 +2315,6 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad)
|
|||
GST_BUFFER_TIMESTAMP (buf) / mux->time_scale);
|
||||
mux->cluster_time = GST_BUFFER_TIMESTAMP (buf);
|
||||
}
|
||||
cluster = mux->cluster;
|
||||
|
||||
/* update duration of this track */
|
||||
if (GST_BUFFER_DURATION_IS_VALID (buf))
|
||||
|
|
|
@ -115,10 +115,6 @@ static void
|
|||
gst_multi_file_sink_init (GstMultiFileSink * multifilesink,
|
||||
GstMultiFileSinkClass * g_class)
|
||||
{
|
||||
GstPad *pad;
|
||||
|
||||
pad = GST_BASE_SINK_PAD (multifilesink);
|
||||
|
||||
multifilesink->filename = g_strdup (DEFAULT_LOCATION);
|
||||
multifilesink->index = DEFAULT_INDEX;
|
||||
|
||||
|
|
|
@ -145,10 +145,6 @@ static void
|
|||
gst_multi_file_src_init (GstMultiFileSrc * multifilesrc,
|
||||
GstMultiFileSrcClass * g_class)
|
||||
{
|
||||
GstPad *pad;
|
||||
|
||||
pad = GST_BASE_SRC_PAD (multifilesrc);
|
||||
|
||||
multifilesrc->index = DEFAULT_INDEX;
|
||||
multifilesrc->filename = g_strdup (DEFAULT_LOCATION);
|
||||
multifilesrc->successful_read = FALSE;
|
||||
|
|
|
@ -245,11 +245,8 @@ static gboolean
|
|||
gst_rtp_xqt_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GstRtpXQTDepay *rtpxqtdepay;
|
||||
gint clock_rate = 90000; /* default */
|
||||
|
||||
rtpxqtdepay = GST_RTP_XQT_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
gst_structure_get_int (structure, "clock-rate", &clock_rate);
|
||||
|
|
|
@ -102,13 +102,10 @@ static gboolean
|
|||
gst_rtp_ac3_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GstRtpAC3Depay *rtpac3depay;
|
||||
gint clock_rate;
|
||||
GstCaps *srccaps;
|
||||
gboolean res;
|
||||
|
||||
rtpac3depay = GST_RTP_AC3_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
||||
|
|
|
@ -180,10 +180,6 @@ gst_dv_pay_get_property (GObject * object,
|
|||
static gboolean
|
||||
gst_rtp_dv_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
||||
{
|
||||
GstRTPDVPay *rtpdvpay;
|
||||
|
||||
rtpdvpay = GST_RTP_DV_PAY (payload);
|
||||
|
||||
/* We don't do anything here, but we could check if it's a system stream and if
|
||||
* it's not, default to sending the video only. We will negotiate downstream
|
||||
* caps when we get to see the first frame. */
|
||||
|
|
|
@ -1823,12 +1823,10 @@ gst_rtp_h263_pay_handle_buffer (GstBaseRTPPayload * payload, GstBuffer * buffer)
|
|||
|
||||
GstRtpH263Pay *rtph263pay;
|
||||
GstFlowReturn ret;
|
||||
guint size;
|
||||
|
||||
GST_DEBUG ("-------------------- NEW FRAME ---------------");
|
||||
rtph263pay = GST_RTP_H263_PAY (payload);
|
||||
|
||||
size = GST_BUFFER_SIZE (buffer);
|
||||
rtph263pay->first_ts = GST_BUFFER_TIMESTAMP (buffer);
|
||||
|
||||
/* we always encode and flush a full picture */
|
||||
|
|
|
@ -349,11 +349,9 @@ gst_rtp_h263p_pay_handle_buffer (GstBaseRTPPayload * payload,
|
|||
{
|
||||
GstRtpH263PPay *rtph263ppay;
|
||||
GstFlowReturn ret;
|
||||
guint size;
|
||||
|
||||
rtph263ppay = GST_RTP_H263P_PAY (payload);
|
||||
|
||||
size = GST_BUFFER_SIZE (buffer);
|
||||
rtph263ppay->first_timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||
rtph263ppay->first_duration = GST_BUFFER_DURATION (buffer);
|
||||
|
||||
|
|
|
@ -135,10 +135,6 @@ static void
|
|||
gst_rtp_ilbc_depay_init (GstRTPiLBCDepay * rtpilbcdepay,
|
||||
GstRTPiLBCDepayClass * klass)
|
||||
{
|
||||
GstBaseRTPDepayload *depayload;
|
||||
|
||||
depayload = GST_BASE_RTP_DEPAYLOAD (rtpilbcdepay);
|
||||
|
||||
/* Set default mode */
|
||||
rtpilbcdepay->mode = DEFAULT_MODE;
|
||||
}
|
||||
|
|
|
@ -381,13 +381,10 @@ static gboolean
|
|||
gst_rtp_jpeg_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GstRtpJPEGDepay *rtpjpegdepay;
|
||||
GstCaps *outcaps;
|
||||
gint clock_rate;
|
||||
gboolean res;
|
||||
|
||||
rtpjpegdepay = GST_RTP_JPEG_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
||||
|
|
|
@ -115,12 +115,9 @@ gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||
{
|
||||
GstCaps *srccaps;
|
||||
GstStructure *structure;
|
||||
GstRtpMP1SDepay *rtpmp1sdepay;
|
||||
gint clock_rate;
|
||||
gboolean res;
|
||||
|
||||
rtpmp1sdepay = GST_RTP_MP1S_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
||||
clock_rate = 90000; /* default */
|
||||
|
@ -137,11 +134,8 @@ gst_rtp_mp1s_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||
static GstBuffer *
|
||||
gst_rtp_mp1s_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
||||
{
|
||||
GstRtpMP1SDepay *rtpmp1sdepay;
|
||||
GstBuffer *outbuf;
|
||||
|
||||
rtpmp1sdepay = GST_RTP_MP1S_DEPAY (depayload);
|
||||
|
||||
outbuf = gst_rtp_buffer_get_payload_buffer (buf);
|
||||
|
||||
GST_DEBUG ("gst_rtp_mp1s_depay_chain: pushing buffer of size %d",
|
||||
|
|
|
@ -140,12 +140,9 @@ gst_rtp_mp2t_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
|||
{
|
||||
GstCaps *srccaps;
|
||||
GstStructure *structure;
|
||||
GstRtpMP2TDepay *rtpmp2tdepay;
|
||||
gint clock_rate;
|
||||
gboolean res;
|
||||
|
||||
rtpmp2tdepay = GST_RTP_MP2T_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
||||
clock_rate = 90000; /* default */
|
||||
|
|
|
@ -114,13 +114,6 @@ gst_rtp_mp2t_pay_finalize (GObject * object)
|
|||
static gboolean
|
||||
gst_rtp_mp2t_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
||||
{
|
||||
const char *stname;
|
||||
GstStructure *structure;
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
stname = gst_structure_get_name (structure);
|
||||
|
||||
gst_basertppayload_set_options (payload, "video", TRUE, "MP2T-ES", 90000);
|
||||
gst_basertppayload_set_outcaps (payload, NULL);
|
||||
|
||||
|
@ -164,14 +157,12 @@ gst_rtp_mp2t_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
{
|
||||
GstRTPMP2TPay *rtpmp2tpay;
|
||||
guint size, avail, packet_len;
|
||||
guint8 *data;
|
||||
GstClockTime timestamp, duration;
|
||||
GstFlowReturn ret;
|
||||
|
||||
rtpmp2tpay = GST_RTP_MP2T_PAY (basepayload);
|
||||
|
||||
size = GST_BUFFER_SIZE (buffer);
|
||||
data = GST_BUFFER_DATA (buffer);
|
||||
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||
duration = GST_BUFFER_DURATION (buffer);
|
||||
|
||||
|
|
|
@ -528,9 +528,6 @@ gst_rtp_mp4g_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
GstBuffer * buffer)
|
||||
{
|
||||
GstRtpMP4GPay *rtpmp4gpay;
|
||||
GstFlowReturn ret;
|
||||
|
||||
ret = GST_FLOW_OK;
|
||||
|
||||
rtpmp4gpay = GST_RTP_MP4G_PAY (basepayload);
|
||||
|
||||
|
@ -539,9 +536,7 @@ gst_rtp_mp4g_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
|
||||
/* we always encode and flush a full AU */
|
||||
gst_adapter_push (rtpmp4gpay->adapter, buffer);
|
||||
ret = gst_rtp_mp4g_pay_flush (rtpmp4gpay);
|
||||
|
||||
return ret;
|
||||
return gst_rtp_mp4g_pay_flush (rtpmp4gpay);
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
|
@ -133,14 +133,11 @@ static gboolean
|
|||
gst_rtp_mp4v_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GstRtpMP4VDepay *rtpmp4vdepay;
|
||||
GstCaps *srccaps;
|
||||
const gchar *str;
|
||||
gint clock_rate;
|
||||
gboolean res;
|
||||
|
||||
rtpmp4vdepay = GST_RTP_MP4V_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
||||
|
|
|
@ -105,13 +105,10 @@ static gboolean
|
|||
gst_rtp_mpa_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GstRtpMPADepay *rtpmpadepay;
|
||||
GstCaps *outcaps;
|
||||
gint clock_rate;
|
||||
gboolean res;
|
||||
|
||||
rtpmpadepay = GST_RTP_MPA_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
||||
|
|
|
@ -108,13 +108,10 @@ static gboolean
|
|||
gst_rtp_mpv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
|
||||
{
|
||||
GstStructure *structure;
|
||||
GstRtpMPVDepay *rtpmpvdepay;
|
||||
gint clock_rate;
|
||||
GstCaps *outcaps;
|
||||
gboolean res;
|
||||
|
||||
rtpmpvdepay = GST_RTP_MPV_DEPAY (depayload);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
|
||||
|
|
|
@ -114,18 +114,8 @@ gst_rtp_mpv_pay_finalize (GObject * object)
|
|||
static gboolean
|
||||
gst_rtp_mpv_pay_setcaps (GstBaseRTPPayload * payload, GstCaps * caps)
|
||||
{
|
||||
const char *stname;
|
||||
GstStructure *structure;
|
||||
gboolean res;
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
stname = gst_structure_get_name (structure);
|
||||
|
||||
gst_basertppayload_set_options (payload, "video", FALSE, "MPV", 90000);
|
||||
res = gst_basertppayload_set_outcaps (payload, NULL);
|
||||
|
||||
return res;
|
||||
return gst_basertppayload_set_outcaps (payload, NULL);
|
||||
}
|
||||
|
||||
static GstFlowReturn
|
||||
|
@ -193,15 +183,12 @@ gst_rtp_mpv_pay_handle_buffer (GstBaseRTPPayload * basepayload,
|
|||
GstBuffer * buffer)
|
||||
{
|
||||
GstRTPMPVPay *rtpmpvpay;
|
||||
guint size, avail, packet_len;
|
||||
guint8 *data;
|
||||
guint avail, packet_len;
|
||||
GstClockTime timestamp, duration;
|
||||
GstFlowReturn ret;
|
||||
|
||||
rtpmpvpay = GST_RTP_MPV_PAY (basepayload);
|
||||
|
||||
size = GST_BUFFER_SIZE (buffer);
|
||||
data = GST_BUFFER_DATA (buffer);
|
||||
timestamp = GST_BUFFER_TIMESTAMP (buffer);
|
||||
duration = GST_BUFFER_DURATION (buffer);
|
||||
|
||||
|
|
|
@ -110,7 +110,6 @@ gst_rtpsirenpay_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
|
|||
{
|
||||
GstRTPSirenPay *rtpsirenpay;
|
||||
GstBaseRTPAudioPayload *basertpaudiopayload;
|
||||
gboolean ret;
|
||||
gint dct_length;
|
||||
GstStructure *structure;
|
||||
const char *payload_name;
|
||||
|
@ -133,9 +132,7 @@ gst_rtpsirenpay_setcaps (GstBaseRTPPayload * basertppayload, GstCaps * caps)
|
|||
/* set options for this frame based audio codec */
|
||||
gst_base_rtp_audio_payload_set_frame_options (basertpaudiopayload, 20, 40);
|
||||
|
||||
ret = gst_basertppayload_set_outcaps (basertppayload, NULL);
|
||||
|
||||
return TRUE;
|
||||
return gst_basertppayload_set_outcaps (basertppayload, NULL);
|
||||
|
||||
/* ERRORS */
|
||||
wrong_dct:
|
||||
|
|
|
@ -410,7 +410,6 @@ gst_rtp_vorbis_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
guint32 timestamp;
|
||||
guint32 header, ident;
|
||||
guint8 F, VDT, packets;
|
||||
gboolean free_payload;
|
||||
|
||||
rtpvorbisdepay = GST_RTP_VORBIS_DEPAY (depayload);
|
||||
|
||||
|
@ -423,7 +422,6 @@ gst_rtp_vorbis_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
|||
goto packet_short;
|
||||
|
||||
payload = gst_rtp_buffer_get_payload (buf);
|
||||
free_payload = FALSE;
|
||||
|
||||
header = GST_READ_UINT32_BE (payload);
|
||||
/*
|
||||
|
|
|
@ -272,15 +272,12 @@ static GstBuffer *
|
|||
gst_rtp_vraw_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
|
||||
{
|
||||
GstRtpVRawDepay *rtpvrawdepay;
|
||||
gint payload_len;
|
||||
guint8 *payload, *data, *yp, *up, *vp, *headers;
|
||||
guint32 timestamp;
|
||||
guint cont, ystride, uvstride, pgroup;
|
||||
|
||||
rtpvrawdepay = GST_RTP_VRAW_DEPAY (depayload);
|
||||
|
||||
payload_len = gst_rtp_buffer_get_payload_len (buf);
|
||||
|
||||
timestamp = gst_rtp_buffer_get_timestamp (buf);
|
||||
|
||||
if (timestamp != rtpvrawdepay->timestamp || rtpvrawdepay->outbuf == NULL) {
|
||||
|
|
|
@ -442,11 +442,8 @@ gst_rtp_dec_finalize (GObject * object)
|
|||
static gboolean
|
||||
gst_rtp_dec_query_src (GstPad * pad, GstQuery * query)
|
||||
{
|
||||
GstRTPDec *rtpdec;
|
||||
gboolean res;
|
||||
|
||||
rtpdec = GST_RTP_DEC (GST_PAD_PARENT (pad));
|
||||
|
||||
switch (GST_QUERY_TYPE (query)) {
|
||||
case GST_QUERY_LATENCY:
|
||||
{
|
||||
|
@ -755,9 +752,6 @@ static GstStateChangeReturn
|
|||
gst_rtp_dec_change_state (GstElement * element, GstStateChange transition)
|
||||
{
|
||||
GstStateChangeReturn ret;
|
||||
GstRTPDec *rtpdec;
|
||||
|
||||
rtpdec = GST_RTP_DEC (element);
|
||||
|
||||
switch (transition) {
|
||||
default:
|
||||
|
|
|
@ -1376,7 +1376,6 @@ gst_rtspsrc_do_seek (GstRTSPSrc * src, GstSegment * segment)
|
|||
static gboolean
|
||||
gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
||||
{
|
||||
gboolean res;
|
||||
gdouble rate;
|
||||
GstFormat format;
|
||||
GstSeekFlags flags;
|
||||
|
@ -1458,11 +1457,11 @@ gst_rtspsrc_perform_seek (GstRTSPSrc * src, GstEvent * event)
|
|||
if (playing)
|
||||
gst_rtspsrc_pause (src);
|
||||
|
||||
res = gst_rtspsrc_do_seek (src, &seeksegment);
|
||||
gst_rtspsrc_do_seek (src, &seeksegment);
|
||||
|
||||
/* and continue playing */
|
||||
if (playing)
|
||||
res = gst_rtspsrc_play (src, &seeksegment);
|
||||
gst_rtspsrc_play (src, &seeksegment);
|
||||
|
||||
/* prepare for streaming again */
|
||||
if (flush) {
|
||||
|
@ -1899,12 +1898,10 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream,
|
|||
{
|
||||
const gchar *manager;
|
||||
gchar *name;
|
||||
GstRTSPResult res;
|
||||
GstStateChangeReturn ret;
|
||||
|
||||
/* find a manager */
|
||||
if ((res =
|
||||
gst_rtsp_transport_get_manager (transport->trans, &manager, 0)) < 0)
|
||||
if (gst_rtsp_transport_get_manager (transport->trans, &manager, 0) < 0)
|
||||
goto no_manager;
|
||||
|
||||
if (manager) {
|
||||
|
@ -1914,9 +1911,7 @@ gst_rtspsrc_stream_configure_manager (GstRTSPSrc * src, GstRTSPStream * stream,
|
|||
if (src->session == NULL) {
|
||||
if (!(src->session = gst_element_factory_make (manager, NULL))) {
|
||||
/* fallback */
|
||||
if ((res =
|
||||
gst_rtsp_transport_get_manager (transport->trans, &manager,
|
||||
1)) < 0)
|
||||
if (gst_rtsp_transport_get_manager (transport->trans, &manager, 1) < 0)
|
||||
goto no_manager;
|
||||
|
||||
if (!manager)
|
||||
|
@ -2367,7 +2362,6 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream,
|
|||
gchar *name;
|
||||
GstStructure *s;
|
||||
const gchar *mime;
|
||||
GstRTSPResult res;
|
||||
|
||||
src = stream->parent;
|
||||
|
||||
|
@ -2376,7 +2370,7 @@ gst_rtspsrc_stream_configure_transport (GstRTSPStream * stream,
|
|||
s = gst_caps_get_structure (stream->caps, 0);
|
||||
|
||||
/* get the proper mime type for this stream now */
|
||||
if ((res = gst_rtsp_transport_get_mime (transport->trans, &mime)) < 0)
|
||||
if (gst_rtsp_transport_get_mime (transport->trans, &mime) < 0)
|
||||
goto unknown_transport;
|
||||
if (!mime)
|
||||
goto unknown_transport;
|
||||
|
@ -2763,7 +2757,7 @@ gst_rtspsrc_loop_interleaved (GstRTSPSrc * src)
|
|||
if ((tv_timeout.tv_sec | tv_timeout.tv_usec) == 0) {
|
||||
GST_DEBUG_OBJECT (src, "timout, sending keep-alive");
|
||||
/* send keep-alive, ignore the result, a warning will be posted. */
|
||||
res = gst_rtspsrc_send_keep_alive (src);
|
||||
gst_rtspsrc_send_keep_alive (src);
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (src, "doing receive");
|
||||
|
@ -3044,7 +3038,7 @@ gst_rtspsrc_loop_udp (GstRTSPSrc * src)
|
|||
case GST_RTSP_ETIMEOUT:
|
||||
/* send keep-alive, ignore the result, a warning will be posted. */
|
||||
GST_DEBUG_OBJECT (src, "timout, sending keep-alive");
|
||||
res = gst_rtspsrc_send_keep_alive (src);
|
||||
gst_rtspsrc_send_keep_alive (src);
|
||||
continue;
|
||||
case GST_RTSP_EEOF:
|
||||
/* server closed the connection. not very fatal for UDP, reconnect and
|
||||
|
|
|
@ -346,14 +346,11 @@ static gboolean
|
|||
gst_smpte_alpha_get_unit_size (GstBaseTransform * btrans, GstCaps * caps,
|
||||
guint * size)
|
||||
{
|
||||
GstSMPTEAlpha *smpte;
|
||||
GstStructure *structure;
|
||||
gboolean ret;
|
||||
gint width, height;
|
||||
guint32 fourcc;
|
||||
|
||||
smpte = GST_SMPTE_ALPHA (btrans);
|
||||
|
||||
structure = gst_caps_get_structure (caps, 0);
|
||||
|
||||
ret = gst_structure_get_int (structure, "width", &width);
|
||||
|
|
|
@ -263,10 +263,9 @@ gst_smpte_paint_triangle_clock (guint32 * dest, gint stride,
|
|||
{
|
||||
gint i;
|
||||
gint sign;
|
||||
gfloat angle, angle_s, angle_e;
|
||||
gfloat angle, angle_e;
|
||||
gfloat len1;
|
||||
|
||||
angle_s = 0.0;
|
||||
angle_e = acos (((x1 - x0) * (x2 - x0) + (y1 - y0) * (y2 - y0)) /
|
||||
(sqrt ((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) *
|
||||
sqrt ((x2 - x0) * (x2 - x0) + (y2 - y0) * (y2 - y0))));
|
||||
|
|
|
@ -320,7 +320,6 @@ static gboolean
|
|||
gst_dynudpsink_init_send (GstDynUDPSink * sink)
|
||||
{
|
||||
guint bc_val;
|
||||
gint ret;
|
||||
|
||||
if (sink->sockfd == -1) {
|
||||
/* create sender socket if none available */
|
||||
|
@ -328,9 +327,8 @@ gst_dynudpsink_init_send (GstDynUDPSink * sink)
|
|||
goto no_socket;
|
||||
|
||||
bc_val = 1;
|
||||
if ((ret =
|
||||
setsockopt (sink->sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
|
||||
sizeof (bc_val))) < 0)
|
||||
if (setsockopt (sink->sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
|
||||
sizeof (bc_val)) < 0)
|
||||
goto no_broadcast;
|
||||
|
||||
sink->externalfd = TRUE;
|
||||
|
|
|
@ -602,7 +602,6 @@ static gboolean
|
|||
gst_multiudpsink_init_send (GstMultiUDPSink * sink)
|
||||
{
|
||||
guint bc_val;
|
||||
gint ret;
|
||||
GList *clients;
|
||||
GstUDPClient *client;
|
||||
|
||||
|
@ -620,9 +619,8 @@ gst_multiudpsink_init_send (GstMultiUDPSink * sink)
|
|||
}
|
||||
|
||||
bc_val = 1;
|
||||
if ((ret =
|
||||
setsockopt (sink->sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
|
||||
sizeof (bc_val))) < 0)
|
||||
if (setsockopt (sink->sock, SOL_SOCKET, SO_BROADCAST, &bc_val,
|
||||
sizeof (bc_val)) < 0)
|
||||
goto no_broadcast;
|
||||
|
||||
sink->bytes_to_serve = 0;
|
||||
|
|
|
@ -949,7 +949,7 @@ gst_video_box_i420_ayuv (GstVideoBox * video_box, guint8 * src, guint8 * dest)
|
|||
{
|
||||
guint8 *srcY, *srcU, *srcV;
|
||||
gint crop_width, crop_width2, crop_height;
|
||||
gint out_width, out_height;
|
||||
gint out_width;
|
||||
gint src_stridey, src_strideu, src_stridev;
|
||||
gint br, bl, bt, bb;
|
||||
gint colorY, colorU, colorV;
|
||||
|
@ -966,7 +966,6 @@ gst_video_box_i420_ayuv (GstVideoBox * video_box, guint8 * src, guint8 * dest)
|
|||
bb = video_box->border_bottom;
|
||||
|
||||
out_width = video_box->out_width;
|
||||
out_height = video_box->out_height;
|
||||
|
||||
src_stridey = GST_VIDEO_I420_Y_ROWSTRIDE (video_box->in_width);
|
||||
src_strideu = GST_VIDEO_I420_U_ROWSTRIDE (video_box->in_width);
|
||||
|
|
|
@ -259,7 +259,6 @@ gst_video_balance_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
|
|||
GstVideoBalance *videobalance;
|
||||
guint8 *data;
|
||||
guint size;
|
||||
gint width, height;
|
||||
|
||||
videobalance = GST_VIDEO_BALANCE (base);
|
||||
|
||||
|
@ -270,9 +269,6 @@ gst_video_balance_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
|
|||
data = GST_BUFFER_DATA (outbuf);
|
||||
size = GST_BUFFER_SIZE (outbuf);
|
||||
|
||||
width = videobalance->width;
|
||||
height = videobalance->height;
|
||||
|
||||
if (size < videobalance->size)
|
||||
goto wrong_size;
|
||||
|
||||
|
@ -401,7 +397,6 @@ static void
|
|||
gst_video_balance_init (GTypeInstance * instance, gpointer g_class)
|
||||
{
|
||||
GstVideoBalance *videobalance = GST_VIDEO_BALANCE (instance);
|
||||
GstVideoFilter *videofilter;
|
||||
char *channels[4] = { "HUE", "SATURATION",
|
||||
"BRIGHTNESS", "CONTRAST"
|
||||
};
|
||||
|
@ -409,8 +404,6 @@ gst_video_balance_init (GTypeInstance * instance, gpointer g_class)
|
|||
|
||||
GST_DEBUG ("gst_video_balance_init");
|
||||
|
||||
videofilter = GST_VIDEO_FILTER (videobalance);
|
||||
|
||||
/* do stuff */
|
||||
videobalance->contrast = DEFAULT_PROP_CONTRAST;
|
||||
videobalance->brightness = DEFAULT_PROP_BRIGHTNESS;
|
||||
|
|
|
@ -564,11 +564,9 @@ gst_video_flip_set_property (GObject * object, guint prop_id,
|
|||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GstVideoFlip *videoflip;
|
||||
GstVideoFilter *videofilter;
|
||||
|
||||
g_return_if_fail (GST_IS_VIDEO_FLIP (object));
|
||||
videoflip = GST_VIDEO_FLIP (object);
|
||||
videofilter = GST_VIDEO_FILTER (object);
|
||||
|
||||
switch (prop_id) {
|
||||
case ARG_METHOD:
|
||||
|
|
|
@ -1474,15 +1474,12 @@ forward_event_func (GstPad * pad, GValue * ret, GstEvent * event)
|
|||
static gboolean
|
||||
forward_event (GstVideoMixer * mix, GstEvent * event)
|
||||
{
|
||||
gboolean ret;
|
||||
GstIterator *it;
|
||||
GValue vret = { 0 };
|
||||
|
||||
GST_LOG_OBJECT (mix, "Forwarding event %p (%s)", event,
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
g_value_init (&vret, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean (&vret, TRUE);
|
||||
it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (mix));
|
||||
|
@ -1491,9 +1488,7 @@ forward_event (GstVideoMixer * mix, GstEvent * event)
|
|||
gst_iterator_free (it);
|
||||
gst_event_unref (event);
|
||||
|
||||
ret = g_value_get_boolean (&vret);
|
||||
|
||||
return ret;
|
||||
return g_value_get_boolean (&vret);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
@ -1314,8 +1314,6 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
*/
|
||||
switch (tag) {
|
||||
case GST_RIFF_TAG_data:{
|
||||
GstFormat fmt;
|
||||
|
||||
GST_DEBUG_OBJECT (wav, "Got 'data' TAG, size : %d", size);
|
||||
if (wav->streaming) {
|
||||
gst_adapter_flush (wav->adapter, 8);
|
||||
|
@ -1326,7 +1324,6 @@ gst_wavparse_stream_headers (GstWavParse * wav)
|
|||
wav->offset += 8;
|
||||
wav->datastart = wav->offset;
|
||||
/* file might be truncated */
|
||||
fmt = GST_FORMAT_BYTES;
|
||||
if (upstream_size) {
|
||||
size = MIN (size, (upstream_size - wav->datastart));
|
||||
}
|
||||
|
|
|
@ -933,7 +933,7 @@ gst_ximage_src_get_caps (GstBaseSrc * bs)
|
|||
{
|
||||
GstXImageSrc *s = GST_XIMAGE_SRC (bs);
|
||||
GstXContext *xcontext;
|
||||
gint x, y, width, height;
|
||||
gint width, height;
|
||||
|
||||
if ((!s->xcontext) && (!gst_ximage_src_open_display (s, s->display_name)))
|
||||
return
|
||||
|
@ -947,7 +947,6 @@ gst_ximage_src_get_caps (GstBaseSrc * bs)
|
|||
|
||||
xcontext = s->xcontext;
|
||||
|
||||
x = y = 0;
|
||||
width = xcontext->width;
|
||||
height = xcontext->height;
|
||||
if (s->endx > s->startx && s->endy > s->starty) {
|
||||
|
@ -955,8 +954,6 @@ gst_ximage_src_get_caps (GstBaseSrc * bs)
|
|||
if (s->startx < xcontext->width && s->endx < xcontext->width &&
|
||||
s->starty < xcontext->height && s->endy < xcontext->height) {
|
||||
/* values are fine */
|
||||
x = s->startx;
|
||||
y = s->starty;
|
||||
s->width = width = s->endx - s->startx;
|
||||
s->height = height = s->endy - s->starty;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue