Blame gst/gststreams.h

Packit Service 963350
/* GStreamer
Packit Service 963350
 * Copyright (C) 2015 Centricular Ltd
Packit Service 963350
 *  @author: Edward Hervey <edward@centricular.com>
Packit Service 963350
 *  @author: Jan Schmidt <jan@centricular.com>
Packit Service 963350
 *
Packit Service 963350
 * gststreams.h : Header for GstStream subsystem
Packit Service 963350
 *
Packit Service 963350
 * This library is free software; you can redistribute it and/or
Packit Service 963350
 * modify it under the terms of the GNU Library General Public
Packit Service 963350
 * License as published by the Free Software Foundation; either
Packit Service 963350
 * version 2 of the License, or (at your option) any later version.
Packit Service 963350
 *
Packit Service 963350
 * This library is distributed in the hope that it will be useful,
Packit Service 963350
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 963350
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 963350
 * Library General Public License for more details.
Packit Service 963350
 *
Packit Service 963350
 * You should have received a copy of the GNU Library General Public
Packit Service 963350
 * License along with this library; if not, write to the
Packit Service 963350
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit Service 963350
 * Boston, MA 02110-1301, USA.
Packit Service 963350
 */
Packit Service 963350
Packit Service 963350
Packit Service 963350
#ifndef __GST_STREAMS_H__
Packit Service 963350
#define __GST_STREAMS_H__
Packit Service 963350
Packit Service 963350
#include <gst/gstobject.h>
Packit Service 963350
Packit Service 963350
G_BEGIN_DECLS
Packit Service 963350
Packit Service 963350
#define GST_TYPE_STREAM             (gst_stream_get_type ())
Packit Service 963350
#define GST_IS_STREAM(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_STREAM))
Packit Service 963350
#define GST_IS_STREAM_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_STREAM))
Packit Service 963350
#define GST_STREAM_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_STREAM, GstStreamClass))
Packit Service 963350
#define GST_STREAM(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_STREAM, GstStream))
Packit Service 963350
#define GST_STREAM_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_STREAM, GstStreamClass))
Packit Service 963350
#define GST_STREAM_CAST(obj)        ((GstStream*)(obj))
Packit Service 963350
Packit Service 963350
/**
Packit Service 963350
 * GstStreamType:
Packit Service 963350
 * @GST_STREAM_TYPE_UNKNOWN: The stream is of unknown (unclassified) type.
Packit Service 963350
 * @GST_STREAM_TYPE_AUDIO: The stream is of audio data
Packit Service 963350
 * @GST_STREAM_TYPE_VIDEO: The stream carries video data
Packit Service 963350
 * @GST_STREAM_TYPE_CONTAINER: The stream is a muxed container type
Packit Service 963350
 * @GST_STREAM_TYPE_TEXT: The stream contains subtitle / subpicture data.
Packit Service 963350
 *
Packit Service 963350
 * #GstStreamType describes a high level classification set for
Packit Service 963350
 * flows of data in #GstStream objects.
Packit Service 963350
 *
Packit Service 963350
 * Note that this is a flag, and therefore users should not assume it
Packit Service 963350
 * will be a single value. Do not use the equality operator for checking
Packit Service 963350
 * whether a stream is of a certain type.
Packit Service 963350
 *
Packit Service 963350
 * Since: 1.10
Packit Service 963350
 */
Packit Service 963350
typedef enum {
Packit Service 963350
  GST_STREAM_TYPE_UNKNOWN   = 1 << 0,
Packit Service 963350
  GST_STREAM_TYPE_AUDIO     = 1 << 1,
Packit Service 963350
  GST_STREAM_TYPE_VIDEO     = 1 << 2,
Packit Service 963350
  GST_STREAM_TYPE_CONTAINER = 1 << 3,
Packit Service 963350
  GST_STREAM_TYPE_TEXT      = 1 << 4
Packit Service 963350
} GstStreamType;
Packit Service 963350
Packit Service 963350
Packit Service 963350
typedef struct _GstStream GstStream;
Packit Service 963350
typedef struct _GstStreamClass GstStreamClass;
Packit Service 963350
typedef struct _GstStreamPrivate GstStreamPrivate;
Packit Service 963350
Packit Service 963350
/**
Packit Service 963350
 * GstStream:
Packit Service 963350
 * @stream_id: The Stream Identifier for this #GstStream
Packit Service 963350
 *
Packit Service 963350
 * A high-level object representing a single stream. It might be backed, or
Packit Service 963350
 * not, by an actual flow of data in a pipeline (#GstPad).
Packit Service 963350
 *
Packit Service 963350
 * A #GstStream does not care about data changes (such as decoding, encoding,
Packit Service 963350
 * parsing,...) as long as the underlying data flow corresponds to the same
Packit Service 963350
 * high-level flow (ex: a certain audio track).
Packit Service 963350
 *
Packit Service 963350
 * A #GstStream contains all the information pertinent to a stream, such as
Packit Service 963350
 * stream-id, tags, caps, type, ...
Packit Service 963350
 *
Packit Service 963350
 * Elements can subclass a #GstStream for internal usage (to contain information
Packit Service 963350
 * pertinent to streams of data).
Packit Service 963350
 *
Packit Service 963350
 * Since: 1.10
Packit Service 963350
 */
Packit Service 963350
struct _GstStream {
Packit Service 963350
  /*< private >*/
Packit Service 963350
  GstObject object;
Packit Service 963350
Packit Service 963350
  /*< public >*/
Packit Service 963350
  const gchar *stream_id;
Packit Service 963350
Packit Service 963350
  /*< private >*/
Packit Service 963350
  GstStreamPrivate *priv;
Packit Service 963350
Packit Service 963350
  gpointer _gst_reserved[GST_PADDING];
Packit Service 963350
};
Packit Service 963350
Packit Service 963350
/**
Packit Service 963350
 * GstStreamClass:
Packit Service 963350
 * @parent_class: the parent class structure
Packit Service 963350
 *
Packit Service 963350
 * GstStream class structure
Packit Service 963350
 */
Packit Service 963350
struct _GstStreamClass {
Packit Service 963350
  GstObjectClass parent_class;
Packit Service 963350
Packit Service 963350
  /*< private >*/
Packit Service 963350
  gpointer _gst_reserved[GST_PADDING];
Packit Service 963350
};
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
GType     gst_stream_get_type (void);
Packit Service 963350
Packit Service 963350
#include <gst/gstevent.h>
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
GstStream *gst_stream_new            (const gchar *stream_id,
Packit Service 963350
				      GstCaps *caps,
Packit Service 963350
				      GstStreamType type,
Packit Service 963350
				      GstStreamFlags flags);
Packit Service 963350
GST_API
Packit Service 963350
const gchar *  gst_stream_get_stream_id (GstStream *stream);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
void           gst_stream_set_stream_flags (GstStream *stream, GstStreamFlags flags);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
GstStreamFlags gst_stream_get_stream_flags (GstStream *stream);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
void           gst_stream_set_stream_type (GstStream *stream, GstStreamType stream_type);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
GstStreamType  gst_stream_get_stream_type (GstStream *stream);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
void           gst_stream_set_tags (GstStream *stream, GstTagList *tags);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
GstTagList *   gst_stream_get_tags (GstStream *stream);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
void           gst_stream_set_caps (GstStream *stream, GstCaps *caps);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
GstCaps *      gst_stream_get_caps (GstStream *stream);
Packit Service 963350
Packit Service 963350
GST_API
Packit Service 963350
const gchar *  gst_stream_type_get_name (GstStreamType stype);
Packit Service 963350
Packit Service 963350
#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
Packit Service 963350
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstStream, gst_object_unref)
Packit Service 963350
#endif
Packit Service 963350
Packit Service 963350
G_END_DECLS
Packit Service 963350
Packit Service 963350
#endif /* __GST_STREAMS_H__ */