[gst-cvs] gst-plugins-bad: baseparse: cleanup struct and remove unused member
Mark Nauwelaerts
mnauw at kemper.freedesktop.org
Fri Oct 1 03:53:45 PDT 2010
Module: gst-plugins-bad
Branch: master
Commit: a1f51f3d17891ebda902fef6fdba808390bc9b01
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=a1f51f3d17891ebda902fef6fdba808390bc9b01
Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date: Thu Sep 16 11:51:20 2010 +0200
baseparse: cleanup struct and remove unused member
---
gst/audioparsers/gstbaseparse.c | 4 +---
gst/audioparsers/gstbaseparse.h | 15 ++++++---------
2 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/gst/audioparsers/gstbaseparse.c b/gst/audioparsers/gstbaseparse.c
index 3bea83b..91192ce 100644
--- a/gst/audioparsers/gstbaseparse.c
+++ b/gst/audioparsers/gstbaseparse.c
@@ -802,7 +802,6 @@ gst_base_parse_convert (GstBaseParse * parse,
if (dest_format == GST_FORMAT_TIME) {
/* BYTES -> TIME conversion */
GST_DEBUG_OBJECT (parse, "converting bytes -> time");
-
*dest_value = gst_util_uint64_scale (src_value, duration, bytes);
*dest_value *= GST_MSECOND;
GST_DEBUG_OBJECT (parse, "conversion result: %" G_GINT64_FORMAT " ms",
@@ -810,8 +809,8 @@ gst_base_parse_convert (GstBaseParse * parse,
ret = TRUE;
}
} else if (src_format == GST_FORMAT_TIME) {
- GST_DEBUG_OBJECT (parse, "converting time -> bytes");
if (dest_format == GST_FORMAT_BYTES) {
+ GST_DEBUG_OBJECT (parse, "converting time -> bytes");
*dest_value = gst_util_uint64_scale (src_value / GST_MSECOND, bytes,
duration);
GST_DEBUG_OBJECT (parse,
@@ -2267,6 +2266,5 @@ gst_base_parse_sink_setcaps (GstPad * pad, GstCaps * caps)
if (klass->set_sink_caps)
res = klass->set_sink_caps (parse, caps);
- parse->negotiated = res;
return res && gst_pad_set_caps (pad, caps);
}
diff --git a/gst/audioparsers/gstbaseparse.h b/gst/audioparsers/gstbaseparse.h
index 9c48155..733fa85 100644
--- a/gst/audioparsers/gstbaseparse.h
+++ b/gst/audioparsers/gstbaseparse.h
@@ -120,16 +120,16 @@ typedef struct _GstBaseParsePrivate GstBaseParsePrivate;
* The opaque #GstBaseParse data structure.
*/
struct _GstBaseParse {
- GstElement element;
- GstAdapter *adapter;
+ GstElement element;
+ GstAdapter *adapter;
/*< protected >*/
/* source and sink pads */
- GstPad *sinkpad;
- GstPad *srcpad;
+ GstPad *sinkpad;
+ GstPad *srcpad;
/* MT-protected (with STREAM_LOCK) */
- GstSegment segment;
+ GstSegment segment;
/* Newsegment event to be sent after SEEK */
GstEvent *pending_segment;
@@ -137,10 +137,7 @@ struct _GstBaseParse {
/* Segment event that closes the running segment prior to SEEK */
GstEvent *close_segment;
- /* Caps nego done already? */
- gboolean negotiated;
-
- GMutex *parse_lock;
+ GMutex *parse_lock;
/*< private >*/
gpointer _gst_reserved[GST_PADDING_LARGE];
More information about the Gstreamer-commits
mailing list