mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-05 09:00:54 +00:00
gst/elements/gstfilesrc.c: Fix broken handling of mmapsize property. Remove useless g_object_notify(). Fixes #171400.
Original commit message from CVS: Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net> * gst/elements/gstfilesrc.c: (gst_filesrc_set_property): Fix broken handling of mmapsize property. Remove useless g_object_notify(). Fixes #171400.
This commit is contained in:
parent
b27ab8bfb5
commit
ccd1b69b71
3 changed files with 21 additions and 15 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,7 +1,15 @@
|
||||||
|
2005-03-23 Tristan van Berkom <tristan.van.berkom@gmail.com>
|
||||||
|
|
||||||
|
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||||
|
|
||||||
|
* gst/elements/gstfilesrc.c: (gst_filesrc_set_property):
|
||||||
|
Fix broken handling of mmapsize property. Remove useless
|
||||||
|
g_object_notify(). Fixes #171400.
|
||||||
|
|
||||||
2005-03-23 Stefan Kost <ensonic@users.sf.net>
|
2005-03-23 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
* tools/gst-inspect.c: (print_interfaces), (print_element_info):
|
* tools/gst-inspect.c: (print_interfaces), (print_element_info):
|
||||||
added listing implemented interfaces to gst-inspect
|
added listing implemented interfaces to gst-inspect
|
||||||
|
|
||||||
2005-03-21 Tim-Philipp Müller <tim at centricular dot net>
|
2005-03-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
|
|
@ -320,6 +320,7 @@ gst_filesrc_set_property (GObject * object, guint prop_id, const GValue * value,
|
||||||
GParamSpec * pspec)
|
GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstFileSrc *src;
|
GstFileSrc *src;
|
||||||
|
gulong ul;
|
||||||
|
|
||||||
/* it's not null if we got it, but it might not be ours */
|
/* it's not null if we got it, but it might not be ours */
|
||||||
g_return_if_fail (GST_IS_FILESRC (object));
|
g_return_if_fail (GST_IS_FILESRC (object));
|
||||||
|
@ -332,21 +333,19 @@ gst_filesrc_set_property (GObject * object, guint prop_id, const GValue * value,
|
||||||
break;
|
break;
|
||||||
case ARG_BLOCKSIZE:
|
case ARG_BLOCKSIZE:
|
||||||
src->block_size = g_value_get_ulong (value);
|
src->block_size = g_value_get_ulong (value);
|
||||||
g_object_notify (G_OBJECT (src), "blocksize");
|
|
||||||
break;
|
break;
|
||||||
case ARG_MMAPSIZE:
|
case ARG_MMAPSIZE:
|
||||||
if ((src->mapsize % src->pagesize) == 0) {
|
ul = g_value_get_ulong (value);
|
||||||
src->mapsize = g_value_get_ulong (value);
|
if ((ul % src->pagesize) == 0) {
|
||||||
g_object_notify (G_OBJECT (src), "mmapsize");
|
src->mapsize = ul;
|
||||||
} else {
|
} else {
|
||||||
GST_INFO_OBJECT (src,
|
GST_INFO_OBJECT (src,
|
||||||
"invalid mapsize, must be a multiple of pagesize, which is %d",
|
"invalid mapsize %d, must be a multiple of pagesize, which is %d",
|
||||||
src->pagesize);
|
ul, src->pagesize);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ARG_TOUCH:
|
case ARG_TOUCH:
|
||||||
src->touch = g_value_get_boolean (value);
|
src->touch = g_value_get_boolean (value);
|
||||||
g_object_notify (G_OBJECT (src), "touch");
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
|
|
@ -320,6 +320,7 @@ gst_filesrc_set_property (GObject * object, guint prop_id, const GValue * value,
|
||||||
GParamSpec * pspec)
|
GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstFileSrc *src;
|
GstFileSrc *src;
|
||||||
|
gulong ul;
|
||||||
|
|
||||||
/* it's not null if we got it, but it might not be ours */
|
/* it's not null if we got it, but it might not be ours */
|
||||||
g_return_if_fail (GST_IS_FILESRC (object));
|
g_return_if_fail (GST_IS_FILESRC (object));
|
||||||
|
@ -332,21 +333,19 @@ gst_filesrc_set_property (GObject * object, guint prop_id, const GValue * value,
|
||||||
break;
|
break;
|
||||||
case ARG_BLOCKSIZE:
|
case ARG_BLOCKSIZE:
|
||||||
src->block_size = g_value_get_ulong (value);
|
src->block_size = g_value_get_ulong (value);
|
||||||
g_object_notify (G_OBJECT (src), "blocksize");
|
|
||||||
break;
|
break;
|
||||||
case ARG_MMAPSIZE:
|
case ARG_MMAPSIZE:
|
||||||
if ((src->mapsize % src->pagesize) == 0) {
|
ul = g_value_get_ulong (value);
|
||||||
src->mapsize = g_value_get_ulong (value);
|
if ((ul % src->pagesize) == 0) {
|
||||||
g_object_notify (G_OBJECT (src), "mmapsize");
|
src->mapsize = ul;
|
||||||
} else {
|
} else {
|
||||||
GST_INFO_OBJECT (src,
|
GST_INFO_OBJECT (src,
|
||||||
"invalid mapsize, must be a multiple of pagesize, which is %d",
|
"invalid mapsize %d, must be a multiple of pagesize, which is %d",
|
||||||
src->pagesize);
|
ul, src->pagesize);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ARG_TOUCH:
|
case ARG_TOUCH:
|
||||||
src->touch = g_value_get_boolean (value);
|
src->touch = g_value_get_boolean (value);
|
||||||
g_object_notify (G_OBJECT (src), "touch");
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
|
|
Loading…
Reference in a new issue