diff options
author | Olivier CrĂȘte <olivier.crete@collabora.com> | 2015-02-23 14:34:37 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2015-02-25 16:26:48 -0500 |
commit | 98235c97645ff81cac4078b97d8f30d06eea1fff (patch) | |
tree | a02dd5cd49644699f2e39f5ccad59bb4beaf552e /farstream | |
parent | 9a8e68e837029031bf082350ff5dfb2ef5cf4f7a (diff) | |
download | farstream-98235c97645ff81cac4078b97d8f30d06eea1fff.tar.gz |
stream: Add "require-encryption" parameter
If it is set to TRUE, then all buffers will be dropped before
the decryption key is set.
https://bugs.freedesktop.org/show_bug.cgi?id=89288
Diffstat (limited to 'farstream')
-rw-r--r-- | farstream/fs-stream.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/farstream/fs-stream.c b/farstream/fs-stream.c index 481ac596..a2b0734b 100644 --- a/farstream/fs-stream.c +++ b/farstream/fs-stream.c @@ -130,7 +130,8 @@ enum PROP_DIRECTION, PROP_PARTICIPANT, PROP_SESSION, - PROP_DECRYPTION_PARAMETERS + PROP_DECRYPTION_PARAMETERS, + PROP_REQUIRE_ENCRYPTION }; @@ -291,6 +292,20 @@ fs_stream_class_init (FsStreamClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** + * FsStream:require-encryption: + * + * If set to TRUE, only encrypted content will be accepted on this + * stream. + */ + g_object_class_install_property (gobject_class, + PROP_REQUIRE_ENCRYPTION, + g_param_spec_boolean ("require-encryption", + "Require Encryption", + "If TRUE, only encrypted content will be accepted", + FALSE, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + + /** * FsStream::error: * @self: #FsStream that emitted the signal * @errorno: The number of the error @@ -376,6 +391,9 @@ fs_stream_get_property (GObject *object, g_value_set_boxed (value, NULL); /* Not having parameters is valid, in this case set nothing */ break; + case PROP_REQUIRE_ENCRYPTION: + g_value_set_boxed (value, FALSE); + break; default: GST_WARNING ("Subclass %s of FsStream does not override the %s property" " getter", |