1 /* 2 * Farstream - Farstream RTP Discover Codecs 3 * 4 * Copyright 2007 Collabora Ltd. 5 * @author: Olivier Crete <olivier.crete@collabora.co.uk> 6 * Copyright 2007 Nokia Corp. 7 * 8 * fs-discover-codecs.h - A Farstream RTP Codec Discovery 9 * 10 * This library is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU Lesser General Public 12 * License as published by the Free Software Foundation; either 13 * version 2.1 of the License, or (at your option) any later version. 14 * 15 * This library is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 * Lesser General Public License for more details. 19 * 20 * You should have received a copy of the GNU Lesser General Public 21 * License along with this library; if not, write to the Free Software 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 */ 24 25 #ifndef __FS_RTP_DISCOVER_CODECS_H__ 26 #define __FS_RTP_DISCOVER_CODECS_H__ 27 28 #include <gst/gst.h> 29 30 #include <farstream/fs-codec.h> 31 #include <farstream/fs-stream.h> 32 33 G_BEGIN_DECLS 34 35 /** 36 * CodecBlueprint: 37 * 38 * All the members MUST be filled, except for send_pipeline_factory in the 39 * case of a #FsRtpSpecialSource 40 */ 41 42 typedef struct _CodecBlueprint 43 { 44 FsCodec *codec; 45 GstCaps *media_caps; 46 GstCaps *rtp_caps; 47 48 GstCaps *input_caps; 49 GstCaps *output_caps; 50 51 /* 52 * These are #GList of #GList of #GstElementFactory 53 */ 54 GList *send_pipeline_factory; 55 GList *receive_pipeline_factory; 56 } CodecBlueprint; 57 58 GList *fs_rtp_blueprints_get (FsMediaType media_type, GError **error); 59 void fs_rtp_blueprints_unref (FsMediaType media_type); 60 61 gboolean codec_blueprint_has_factory (CodecBlueprint *blueprint, 62 FsStreamDirection direction); 63 64 GstElement * create_codec_bin_from_blueprint (const FsCodec *codec, 65 CodecBlueprint *blueprint, const gchar *name, FsStreamDirection direction, 66 GError **error); 67 68 GstCaps *codec_get_in_out_caps (FsCodec *codec, GstCaps *rtp_caps, 69 FsStreamDirection direction, GstElement *codecbin); 70 71 /* 72 * Only exported for the caching stuff 73 */ 74 75 void codec_blueprint_destroy (CodecBlueprint *codec_blueprint); 76 77 G_END_DECLS 78 79 #endif /* __FS_RTP_DISCOVER_CODECS_H__ */ 80