media: remove MTU property

It is a stream property
This commit is contained in:
Wim Taymans 2012-11-15 15:32:43 +01:00
parent 2160d6dbd3
commit 1b4ac6e5b0
3 changed files with 0 additions and 71 deletions

View file

@ -99,8 +99,6 @@ gst_rtsp_media_set_buffer_size
gst_rtsp_media_get_buffer_size gst_rtsp_media_get_buffer_size
gst_rtsp_media_set_multicast_group gst_rtsp_media_set_multicast_group
gst_rtsp_media_get_multicast_group gst_rtsp_media_get_multicast_group
gst_rtsp_media_get_mtu
gst_rtsp_media_set_mtu
gst_rtsp_media_prepare gst_rtsp_media_prepare
gst_rtsp_media_unprepare gst_rtsp_media_unprepare

View file

@ -31,7 +31,6 @@
//#define DEFAULT_PROTOCOLS GST_RTSP_LOWER_TRANS_UDP_MCAST //#define DEFAULT_PROTOCOLS GST_RTSP_LOWER_TRANS_UDP_MCAST
#define DEFAULT_EOS_SHUTDOWN FALSE #define DEFAULT_EOS_SHUTDOWN FALSE
#define DEFAULT_BUFFER_SIZE 0x80000 #define DEFAULT_BUFFER_SIZE 0x80000
#define DEFAULT_MTU 0
/* define to dump received RTCP packets */ /* define to dump received RTCP packets */
#undef DUMP_STATS #undef DUMP_STATS
@ -44,7 +43,6 @@ enum
PROP_PROTOCOLS, PROP_PROTOCOLS,
PROP_EOS_SHUTDOWN, PROP_EOS_SHUTDOWN,
PROP_BUFFER_SIZE, PROP_BUFFER_SIZE,
PROP_MTU,
PROP_LAST PROP_LAST
}; };
@ -111,12 +109,6 @@ gst_rtsp_media_class_init (GstRTSPMediaClass * klass)
"The kernel UDP buffer size to use", 0, G_MAXUINT, "The kernel UDP buffer size to use", 0, G_MAXUINT,
DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_MTU,
g_param_spec_uint ("mtu", "MTU",
"The MTU for the payloaders (0 = default)",
0, G_MAXUINT, DEFAULT_MTU,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
gst_rtsp_media_signals[SIGNAL_PREPARED] = gst_rtsp_media_signals[SIGNAL_PREPARED] =
g_signal_new ("prepared", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, g_signal_new ("prepared", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstRTSPMediaClass, prepared), NULL, NULL, G_STRUCT_OFFSET (GstRTSPMediaClass, prepared), NULL, NULL,
@ -210,9 +202,6 @@ gst_rtsp_media_get_property (GObject * object, guint propid,
case PROP_BUFFER_SIZE: case PROP_BUFFER_SIZE:
g_value_set_uint (value, gst_rtsp_media_get_buffer_size (media)); g_value_set_uint (value, gst_rtsp_media_get_buffer_size (media));
break; break;
case PROP_MTU:
g_value_set_uint (value, gst_rtsp_media_get_mtu (media));
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec);
} }
@ -240,9 +229,6 @@ gst_rtsp_media_set_property (GObject * object, guint propid,
case PROP_BUFFER_SIZE: case PROP_BUFFER_SIZE:
gst_rtsp_media_set_buffer_size (media, g_value_get_uint (value)); gst_rtsp_media_set_buffer_size (media, g_value_get_uint (value));
break; break;
case PROP_MTU:
gst_rtsp_media_set_mtu (media, g_value_get_uint (value));
break;
default: default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, propid, pspec);
} }
@ -627,54 +613,6 @@ gst_rtsp_media_get_address_pool (GstRTSPMedia * media)
return result; return result;
} }
/**
* gst_rtsp_media_set_mtu:
* @media: a #GstRTSPMedia
* @mtu: a new MTU
*
* Set maximum size of one RTP packet on the payloaders.
* The @mtu will be set on all streams.
*/
void
gst_rtsp_media_set_mtu (GstRTSPMedia * media, guint mtu)
{
gint i;
g_return_if_fail (GST_IS_RTSP_MEDIA (media));
g_mutex_lock (&media->lock);
media->mtu = mtu;
for (i = 0; i < media->streams->len; i++) {
GstRTSPStream *stream;
GST_INFO ("Setting mtu %u for stream %d", mtu, i);
stream = g_ptr_array_index (media->streams, i);
gst_rtsp_stream_set_mtu (stream, mtu);
}
g_mutex_unlock (&media->lock);
}
/**
* gst_rtsp_media_get_mtu:
* @media: a #GstRTSPMedia
*
* Get the configured MTU.
*/
guint
gst_rtsp_media_get_mtu (GstRTSPMedia * media)
{
guint res;
g_return_val_if_fail (GST_IS_RTSP_MEDIA (media), 0);
g_mutex_lock (&media->lock);
res = media->mtu;
g_mutex_unlock (&media->lock);
return res;
}
/** /**
* gst_rtsp_media_collect_streams: * gst_rtsp_media_collect_streams:
* @media: a #GstRTSPMedia * @media: a #GstRTSPMedia
@ -771,8 +709,6 @@ gst_rtsp_media_create_stream (GstRTSPMedia * media, GstElement * payloader,
g_free (name); g_free (name);
stream = gst_rtsp_stream_new (idx, payloader, srcpad); stream = gst_rtsp_stream_new (idx, payloader, srcpad);
if (media->mtu)
gst_rtsp_stream_set_mtu (stream, media->mtu);
g_ptr_array_add (media->streams, stream); g_ptr_array_add (media->streams, stream);
g_mutex_unlock (&media->lock); g_mutex_unlock (&media->lock);

View file

@ -76,7 +76,6 @@ typedef enum {
* @buffer_size: The UDP buffer size * @buffer_size: The UDP buffer size
* @auth: the authentication service in use * @auth: the authentication service in use
* @multicast_group: the multicast group to use * @multicast_group: the multicast group to use
* @mtu: the MTU of the payloaders
* @element: the data providing element * @element: the data providing element
* @streams: the different #GstRTSPStream provided by @element * @streams: the different #GstRTSPStream provided by @element
* @dynamic: list of dynamic elements managed by @element * @dynamic: list of dynamic elements managed by @element
@ -114,7 +113,6 @@ struct _GstRTSPMedia {
guint buffer_size; guint buffer_size;
GstRTSPAuth *auth; GstRTSPAuth *auth;
GstRTSPAddressPool*pool; GstRTSPAddressPool*pool;
guint mtu;
GstElement *element; GstElement *element;
GRecMutex state_lock; GRecMutex state_lock;
@ -198,9 +196,6 @@ GstRTSPAddressPool * gst_rtsp_media_get_address_pool (GstRTSPMedia *media);
void gst_rtsp_media_set_buffer_size (GstRTSPMedia *media, guint size); void gst_rtsp_media_set_buffer_size (GstRTSPMedia *media, guint size);
guint gst_rtsp_media_get_buffer_size (GstRTSPMedia *media); guint gst_rtsp_media_get_buffer_size (GstRTSPMedia *media);
void gst_rtsp_media_set_mtu (GstRTSPMedia *media, guint mtu);
guint gst_rtsp_media_get_mtu (GstRTSPMedia *media);
/* prepare the media for playback */ /* prepare the media for playback */
gboolean gst_rtsp_media_prepare (GstRTSPMedia *media); gboolean gst_rtsp_media_prepare (GstRTSPMedia *media);