mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-04 05:22:30 +00:00
gst/: Avoid unnecessary class cast check in class_init functions (#337747).
Original commit message from CVS: Patch by: Cody Russell <bratsche at gnome org> * gst/audioresample/gstaudioresample.c: (gst_audioresample_class_init): * gst/playback/gststreamselector.c: (gst_stream_selector_class_init): * gst/subparse/gstsubparse.c: (gst_sub_parse_class_init): * gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_class_init): * gst/tcp/gsttcpclientsink.c: (gst_tcp_client_sink_class_init): * gst/tcp/gsttcpclientsrc.c: (gst_tcp_client_src_class_init): * gst/tcp/gsttcpserversink.c: (gst_tcp_server_sink_class_init): * gst/tcp/gsttcpserversrc.c: (gst_tcp_server_src_class_init): * gst/videoscale/gstvideoscale.c: (gst_video_scale_class_init): * gst/videotestsrc/gstvideotestsrc.c: (gst_video_test_src_class_init): * gst/volume/gstvolume.c: (gst_volume_class_init): Avoid unnecessary class cast check in class_init functions (#337747).
This commit is contained in:
parent
1b54509cf0
commit
c10584ed40
12 changed files with 54 additions and 33 deletions
21
ChangeLog
21
ChangeLog
|
@ -1,3 +1,24 @@
|
|||
2006-06-22 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
Patch by: Cody Russell <bratsche at gnome org>
|
||||
|
||||
* gst/audioresample/gstaudioresample.c:
|
||||
(gst_audioresample_class_init):
|
||||
* gst/playback/gststreamselector.c:
|
||||
(gst_stream_selector_class_init):
|
||||
* gst/subparse/gstsubparse.c: (gst_sub_parse_class_init):
|
||||
* gst/tcp/gstmultifdsink.c: (gst_multi_fd_sink_class_init):
|
||||
* gst/tcp/gsttcpclientsink.c: (gst_tcp_client_sink_class_init):
|
||||
* gst/tcp/gsttcpclientsrc.c: (gst_tcp_client_src_class_init):
|
||||
* gst/tcp/gsttcpserversink.c: (gst_tcp_server_sink_class_init):
|
||||
* gst/tcp/gsttcpserversrc.c: (gst_tcp_server_src_class_init):
|
||||
* gst/videoscale/gstvideoscale.c: (gst_video_scale_class_init):
|
||||
* gst/videotestsrc/gstvideotestsrc.c:
|
||||
(gst_video_test_src_class_init):
|
||||
* gst/volume/gstvolume.c: (gst_volume_class_init):
|
||||
Avoid unnecessary class cast check in class_init
|
||||
functions (#337747).
|
||||
|
||||
2006-06-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
||||
* ext/pango/gsttextoverlay.c: (gst_text_overlay_make_utf8),
|
||||
|
|
|
@ -156,7 +156,7 @@ gst_audioresample_class_init (GstAudioresampleClass * klass)
|
|||
gobject_class->set_property = gst_audioresample_set_property;
|
||||
gobject_class->get_property = gst_audioresample_get_property;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FILTERLEN,
|
||||
g_object_class_install_property (gobject_class, PROP_FILTERLEN,
|
||||
g_param_spec_int ("filter_length", "filter_length", "filter_length",
|
||||
0, G_MAXINT, DEFAULT_FILTERLEN,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||
|
|
|
@ -136,7 +136,7 @@ gst_stream_selector_class_init (GstStreamSelectorClass * klass)
|
|||
gobject_class->get_property =
|
||||
GST_DEBUG_FUNCPTR (gst_stream_selector_get_property);
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ACTIVE_PAD,
|
||||
g_object_class_install_property (gobject_class, PROP_ACTIVE_PAD,
|
||||
g_param_spec_string ("active-pad", "Active pad", "Name of the currently"
|
||||
" active sink pad", NULL, G_PARAM_READWRITE));
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ gst_sub_parse_class_init (GstSubParseClass * klass)
|
|||
|
||||
element_class->change_state = gst_sub_parse_change_state;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ENCODING,
|
||||
g_object_class_install_property (object_class, PROP_ENCODING,
|
||||
g_param_spec_string ("subtitle-encoding", "subtitle charset encoding",
|
||||
"Encoding to assume if input subtitles are not in UTF-8 encoding. "
|
||||
"If not set, the GST_SUBTITLE_ENCODING environment variable will "
|
||||
|
|
|
@ -372,54 +372,54 @@ gst_multi_fd_sink_class_init (GstMultiFdSinkClass * klass)
|
|||
"The mode for selecting activity on the fds", GST_TYPE_FDSET_MODE,
|
||||
DEFAULT_MODE, G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFFERS_MAX,
|
||||
g_object_class_install_property (gobject_class, PROP_BUFFERS_MAX,
|
||||
g_param_spec_int ("buffers-max", "Buffers max",
|
||||
"max number of buffers to queue for a client (-1 = no limit)", -1,
|
||||
G_MAXINT, DEFAULT_BUFFERS_MAX, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass),
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_BUFFERS_SOFT_MAX, g_param_spec_int ("buffers-soft-max",
|
||||
"Buffers soft max",
|
||||
"Recover client when going over this limit (-1 = no limit)", -1,
|
||||
G_MAXINT, DEFAULT_BUFFERS_SOFT_MAX, G_PARAM_READWRITE));
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BYTES_MIN,
|
||||
g_object_class_install_property (gobject_class, PROP_BYTES_MIN,
|
||||
g_param_spec_int ("bytes-min", "Bytes min",
|
||||
"min number of bytes to queue (-1 = as little as possible)", -1,
|
||||
G_MAXINT, DEFAULT_BYTES_MIN, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TIME_MIN,
|
||||
g_object_class_install_property (gobject_class, PROP_TIME_MIN,
|
||||
g_param_spec_int64 ("time-min", "Time min",
|
||||
"min number of time to queue (-1 = as litte as possible)", -1,
|
||||
G_MAXINT64, DEFAULT_TIME_MIN, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFFERS_MIN,
|
||||
g_object_class_install_property (gobject_class, PROP_BUFFERS_MIN,
|
||||
g_param_spec_int64 ("buffers-min", "Buffers min",
|
||||
"min number of buffers to queue (-1 = as litte as possible)", -1,
|
||||
G_MAXINT, DEFAULT_BUFFERS_MIN, G_PARAM_READWRITE));
|
||||
|
||||
#if NOT_IMPLEMENTED
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_UNIT_TYPE,
|
||||
g_object_class_install_property (gobject_class, PROP_UNIT_TYPE,
|
||||
g_param_spec_enum ("unit-type", "Units type",
|
||||
"The unit to measure the max/soft-max/queued properties",
|
||||
GST_TYPE_UNIT_TYPE, DEFAULT_UNIT_TYPE, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_UNITS_MAX,
|
||||
g_object_class_install_property (gobject_class, PROP_UNITS_MAX,
|
||||
g_param_spec_int ("units-max", "Units max",
|
||||
"max number of units to queue (-1 = no limit)", -1, G_MAXINT,
|
||||
DEFAULT_UNITS_MAX, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_UNITS_SOFT_MAX,
|
||||
g_object_class_install_property (gobject_class, PROP_UNITS_SOFT_MAX,
|
||||
g_param_spec_int ("units-soft-max", "Units soft max",
|
||||
"Recover client when going over this limit (-1 = no limit)", -1,
|
||||
G_MAXINT, DEFAULT_UNITS_SOFT_MAX, G_PARAM_READWRITE));
|
||||
#endif
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFFERS_QUEUED,
|
||||
g_object_class_install_property (gobject_class, PROP_BUFFERS_QUEUED,
|
||||
g_param_spec_uint ("buffers-queued", "Buffers queued",
|
||||
"Number of buffers currently queued", 0, G_MAXUINT, 0,
|
||||
G_PARAM_READABLE));
|
||||
#if NOT_IMPLEMENTED
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BYTES_QUEUED,
|
||||
g_object_class_install_property (gobject_class, PROP_BYTES_QUEUED,
|
||||
g_param_spec_uint ("bytes-queued", "Bytes queued",
|
||||
"Number of bytes currently queued", 0, G_MAXUINT, 0,
|
||||
G_PARAM_READABLE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TIME_QUEUED,
|
||||
g_object_class_install_property (gobject_class, PROP_TIME_QUEUED,
|
||||
g_param_spec_uint64 ("time-queued", "Time queued",
|
||||
"Number of time currently queued", 0, G_MAXUINT64, 0,
|
||||
G_PARAM_READABLE));
|
||||
|
@ -429,28 +429,28 @@ gst_multi_fd_sink_class_init (GstMultiFdSinkClass * klass)
|
|||
g_param_spec_enum ("recover-policy", "Recover Policy",
|
||||
"How to recover when client reaches the soft max",
|
||||
GST_TYPE_RECOVER_POLICY, DEFAULT_RECOVER_POLICY, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TIMEOUT,
|
||||
g_object_class_install_property (gobject_class, PROP_TIMEOUT,
|
||||
g_param_spec_uint64 ("timeout", "Timeout",
|
||||
"Maximum inactivity timeout in nanoseconds for a client (0 = no limit)",
|
||||
0, G_MAXUINT64, DEFAULT_TIMEOUT, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SYNC_METHOD,
|
||||
g_object_class_install_property (gobject_class, PROP_SYNC_METHOD,
|
||||
g_param_spec_enum ("sync-method", "Sync Method",
|
||||
"How to sync new clients to the stream",
|
||||
GST_TYPE_SYNC_METHOD, DEFAULT_SYNC_METHOD, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BYTES_TO_SERVE,
|
||||
g_object_class_install_property (gobject_class, PROP_BYTES_TO_SERVE,
|
||||
g_param_spec_uint64 ("bytes-to-serve", "Bytes to serve",
|
||||
"Number of bytes received to serve to clients", 0, G_MAXUINT64, 0,
|
||||
G_PARAM_READABLE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BYTES_SERVED,
|
||||
g_object_class_install_property (gobject_class, PROP_BYTES_SERVED,
|
||||
g_param_spec_uint64 ("bytes-served", "Bytes served",
|
||||
"Total number of bytes send to all clients", 0, G_MAXUINT64, 0,
|
||||
G_PARAM_READABLE));
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BURST_UNIT,
|
||||
g_object_class_install_property (gobject_class, PROP_BURST_UNIT,
|
||||
g_param_spec_enum ("burst-unit", "Burst unit",
|
||||
"The format of the burst units (when sync-method is burst[[-with]-keyframe])",
|
||||
GST_TYPE_UNIT_TYPE, DEFAULT_BURST_UNIT, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BURST_VALUE,
|
||||
g_object_class_install_property (gobject_class, PROP_BURST_VALUE,
|
||||
g_param_spec_uint64 ("burst-value", "Burst value",
|
||||
"The amount of burst expressed in burst-unit",
|
||||
0, G_MAXUINT64, DEFAULT_BURST_VALUE, G_PARAM_READWRITE));
|
||||
|
|
|
@ -136,10 +136,10 @@ gst_tcp_client_sink_class_init (GstTCPClientSink * klass)
|
|||
gobject_class->get_property = gst_tcp_client_sink_get_property;
|
||||
gobject_class->finalize = gst_tcp_client_sink_finalize;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HOST,
|
||||
g_object_class_install_property (gobject_class, ARG_HOST,
|
||||
g_param_spec_string ("host", "Host", "The host/IP to send the packets to",
|
||||
TCP_DEFAULT_HOST, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PORT,
|
||||
g_object_class_install_property (gobject_class, ARG_PORT,
|
||||
g_param_spec_int ("port", "Port", "The port to send the packets to",
|
||||
0, TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (gobject_class, ARG_PROTOCOL,
|
||||
|
|
|
@ -123,11 +123,11 @@ gst_tcp_client_src_class_init (GstTCPClientSrcClass * klass)
|
|||
gobject_class->get_property = gst_tcp_client_src_get_property;
|
||||
gobject_class->finalize = gst_tcp_client_src_finalize;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_HOST,
|
||||
g_object_class_install_property (gobject_class, PROP_HOST,
|
||||
g_param_spec_string ("host", "Host",
|
||||
"The host IP address to receive packets from", TCP_DEFAULT_HOST,
|
||||
G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT,
|
||||
g_object_class_install_property (gobject_class, PROP_PORT,
|
||||
g_param_spec_int ("port", "Port", "The port to receive packets from", 0,
|
||||
TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (gobject_class, PROP_PROTOCOL,
|
||||
|
|
|
@ -99,10 +99,10 @@ gst_tcp_server_sink_class_init (GstTCPServerSinkClass * klass)
|
|||
gobject_class->get_property = gst_tcp_server_sink_get_property;
|
||||
gobject_class->finalize = gst_tcp_server_sink_finalize;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_HOST,
|
||||
g_object_class_install_property (gobject_class, ARG_HOST,
|
||||
g_param_spec_string ("host", "host", "The host/IP to send the packets to",
|
||||
TCP_DEFAULT_HOST, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_PORT,
|
||||
g_object_class_install_property (gobject_class, ARG_PORT,
|
||||
g_param_spec_int ("port", "port", "The port to send the packets to",
|
||||
0, TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE));
|
||||
|
||||
|
|
|
@ -122,10 +122,10 @@ gst_tcp_server_src_class_init (GstTCPServerSrcClass * klass)
|
|||
gobject_class->get_property = gst_tcp_server_src_get_property;
|
||||
gobject_class->finalize = gst_tcp_server_src_finalize;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_HOST,
|
||||
g_object_class_install_property (gobject_class, PROP_HOST,
|
||||
g_param_spec_string ("host", "Host", "The hostname to listen as",
|
||||
TCP_DEFAULT_LISTEN_HOST, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT,
|
||||
g_object_class_install_property (gobject_class, PROP_PORT,
|
||||
g_param_spec_int ("port", "Port", "The port to listen to",
|
||||
0, TCP_HIGHEST_PORT, TCP_DEFAULT_PORT, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (gobject_class, PROP_PROTOCOL,
|
||||
|
|
|
@ -260,7 +260,7 @@ gst_video_scale_class_init (GstVideoScaleClass * klass)
|
|||
gobject_class->set_property = gst_video_scale_set_property;
|
||||
gobject_class->get_property = gst_video_scale_get_property;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_METHOD,
|
||||
g_object_class_install_property (gobject_class, PROP_METHOD,
|
||||
g_param_spec_enum ("method", "method", "method",
|
||||
GST_TYPE_VIDEO_SCALE_METHOD, DEFAULT_PROP_METHOD, G_PARAM_READWRITE));
|
||||
|
||||
|
|
|
@ -141,11 +141,11 @@ gst_video_test_src_class_init (GstVideoTestSrcClass * klass)
|
|||
gobject_class->set_property = gst_video_test_src_set_property;
|
||||
gobject_class->get_property = gst_video_test_src_get_property;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PATTERN,
|
||||
g_object_class_install_property (gobject_class, PROP_PATTERN,
|
||||
g_param_spec_enum ("pattern", "Pattern",
|
||||
"Type of test pattern to generate", GST_TYPE_VIDEO_TEST_SRC_PATTERN,
|
||||
1, G_PARAM_READWRITE));
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass),
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_TIMESTAMP_OFFSET, g_param_spec_int64 ("timestamp-offset",
|
||||
"Timestamp offset",
|
||||
"An offset added to timestamps set on buffers (in ns)", G_MININT64,
|
||||
|
|
|
@ -323,11 +323,11 @@ gst_volume_class_init (GstVolumeClass * klass)
|
|||
gobject_class->get_property = volume_get_property;
|
||||
gobject_class->dispose = gst_volume_dispose;
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MUTE,
|
||||
g_object_class_install_property (gobject_class, PROP_MUTE,
|
||||
g_param_spec_boolean ("mute", "Mute", "mute channel",
|
||||
FALSE, G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
||||
|
||||
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_VOLUME,
|
||||
g_object_class_install_property (gobject_class, PROP_VOLUME,
|
||||
g_param_spec_double ("volume", "Volume", "volume factor",
|
||||
0.0, VOLUME_MAX_DOUBLE, 1.0,
|
||||
G_PARAM_READWRITE | GST_PARAM_CONTROLLABLE));
|
||||
|
|
Loading…
Reference in a new issue