/** * fs_session_set_send_codec: * @session: a #FsSession * @send_codec: a #FsCodec representing the codec to send * @error: location of a #GError, or %NULL if no error occured * * This function will set the currently being sent codec for all streams in this * session. The given #FsCodec must be taken directly from the #codecs * property of the session. If the given codec is not in the codecs * list, @error will be set and %FALSE will be returned. The @send_codec will be * copied so it must be free'd using fs_codec_destroy() when done. * * Returns: %FALSE if the send codec couldn't be set. */ gboolean fs_session_set_send_codec (FsSession *session, FsCodec *send_codec, GError **error) { FsSessionClass *klass = FS_SESSION_GET_CLASS (session); if (klass->set_send_codec) { return klass->set_send_codec (session, send_codec, error); } else { g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "set_send_codec not defined in class"); } return FALSE; }
/** * fs_session_set_send_codec: * @session: a #FsSession * @send_codec: a #FsCodec representing the codec to send * @error: location of a #GError, or %NULL if no error occured * * This function will set the currently being sent codec for all streams in this * session. The given #FsCodec must be taken directly from the #codecs * property of the session. If the given codec is not in the codecs * list, @error will be set and %FALSE will be returned. The @send_codec will be * copied so it must be free'd using fs_codec_destroy() when done. * * Returns: %FALSE if the send codec couldn't be set. */ gboolean fs_session_set_send_codec (FsSession *session, FsCodec *send_codec, GError **error) { FsSessionClass *klass; g_return_val_if_fail (session, FALSE); g_return_val_if_fail (FS_IS_SESSION (session), FALSE); klass = FS_SESSION_GET_CLASS (session); if (klass->set_send_codec) { return klass->set_send_codec (session, send_codec, error); } else { GST_WARNING ("set_send_codec not defined in class"); g_set_error (error, FS_ERROR, FS_ERROR_NOT_IMPLEMENTED, "set_send_codec not defined in class"); } return FALSE; }