diff options
-rw-r--r-- | docs/libs/farsight2-libs-sections.txt | 3 | ||||
-rw-r--r-- | gst-libs/gst/farsight/fs-session.c | 22 | ||||
-rw-r--r-- | gst-libs/gst/farsight/fs-session.h | 2 | ||||
-rw-r--r-- | python/pyfarsight.defs | 7 |
4 files changed, 33 insertions, 1 deletions
diff --git a/docs/libs/farsight2-libs-sections.txt b/docs/libs/farsight2-libs-sections.txt index 18ddb2c6..2362eb22 100644 --- a/docs/libs/farsight2-libs-sections.txt +++ b/docs/libs/farsight2-libs-sections.txt @@ -56,10 +56,11 @@ FsDTMFMethod FsSession FsSessionClass fs_session_new_stream +fs_session_set_codec_preferences +fs_session_destroy fs_session_start_telephony_event fs_session_stop_telephony_event fs_session_set_send_codec -fs_session_set_codec_preferences fs_session_list_transmitters fs_session_get_stream_transmitter_type fs_session_codecs_need_resend diff --git a/gst-libs/gst/farsight/fs-session.c b/gst-libs/gst/farsight/fs-session.c index a84807bd..062e0a27 100644 --- a/gst-libs/gst/farsight/fs-session.c +++ b/gst-libs/gst/farsight/fs-session.c @@ -658,3 +658,25 @@ fs_session_codecs_need_resend (FsSession *session, return NULL; } + +/** + * fs_session_destroy: + * @session: a #FsSession + * + * This will cause the session to remove all links to other objects and to + * remove itself from the #FsConference, it will also destroy all #FsStream + * inside this #FsSession Once a #FsSession has been destroyed, it + * can not be used anymore. + * + * It is strongly recommended to call this function from the main thread because + * releasing the application's reference to a session. + */ + +void +fs_session_destroy (FsSession *session) +{ + g_return_if_fail (session); + g_return_if_fail (FS_IS_SESSION (session)); + + g_object_run_dispose (G_OBJECT (session)); +} diff --git a/gst-libs/gst/farsight/fs-session.h b/gst-libs/gst/farsight/fs-session.h index e731d276..05af5df9 100644 --- a/gst-libs/gst/farsight/fs-session.h +++ b/gst-libs/gst/farsight/fs-session.h @@ -196,6 +196,8 @@ GType fs_session_get_stream_transmitter_type (FsSession *session, GList* fs_session_codecs_need_resend (FsSession *session, GList *old_codecs, GList *new_codecs); +void fs_session_destroy (FsSession *session); + G_END_DECLS diff --git a/python/pyfarsight.defs b/python/pyfarsight.defs index b3b3c02e..4eecaa0e 100644 --- a/python/pyfarsight.defs +++ b/python/pyfarsight.defs @@ -507,6 +507,13 @@ ) ) +(define-method destroy + (of-object "FsSession") + (unblock-threads t) + (c-name "fs_session_destroy") + (return-type "none") +) + ;; -*- scheme -*- ; object definitions ... |