Commit fcf64e92 authored by David Schleef's avatar David Schleef

Global change from "caps2" to "caps"

Original commit message from CVS:
Global change from "caps2" to "caps"
parent 5ce27f2e
This diff is collapsed.
......@@ -31,7 +31,7 @@
* a certain CodecID for a pad with compressed data.
*/
GstCaps2 *
GstCaps *
gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
AVCodecContext *context);
......@@ -39,7 +39,7 @@ gst_ffmpeg_codecid_to_caps (enum CodecID codec_id,
* a certain CodecType for a pad with uncompressed data.
*/
GstCaps2 *
GstCaps *
gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
AVCodecContext *context);
......@@ -49,7 +49,7 @@ gst_ffmpeg_codectype_to_caps (enum CodecType codec_type,
*/
enum CodecID
gst_ffmpeg_caps_to_codecid (const GstCaps2 *caps,
gst_ffmpeg_caps_to_codecid (const GstCaps *caps,
AVCodecContext *context);
/* caps_to_codectype () transforms a GstCaps that belongs to
......@@ -58,7 +58,7 @@ gst_ffmpeg_caps_to_codecid (const GstCaps2 *caps,
void
gst_ffmpeg_caps_to_codectype (enum CodecType type,
const GstCaps2 *caps,
const GstCaps *caps,
AVCodecContext *context);
/* _formatid_to_caps () is meant for muxers/demuxers, it
......@@ -67,7 +67,7 @@ gst_ffmpeg_caps_to_codectype (enum CodecType type,
* caps belonging to that mux-format
*/
GstCaps2 *
GstCaps *
gst_ffmpeg_formatid_to_caps (const gchar *format_name);
#endif /* __GST_FFMPEG_CODECMAP_H__ */
......@@ -97,7 +97,7 @@ static void gst_ffmpegcsp_init (GTypeInstance *instance, gpointer g_class);
static GstPadLinkReturn
gst_ffmpegcsp_connect (GstPad *pad,
const GstCaps2 *caps);
const GstCaps *caps);
static GstPadLinkReturn
gst_ffmpegcsp_try_connect (GstPad *pad,
AVCodecContext *ctx,
......@@ -117,7 +117,7 @@ gst_ffmpegcsp_try_connect (GstPad *pad, AVCodecContext *ctx, double fps)
{
gint i, ret;
GstFFMpegCsp *space;
GstCaps2 *caps;
GstCaps *caps;
gboolean try_all = (ctx->pix_fmt != PIX_FMT_NB);
space = GST_FFMPEG_CSP (gst_pad_get_parent (pad));
......@@ -125,21 +125,21 @@ gst_ffmpegcsp_try_connect (GstPad *pad, AVCodecContext *ctx, double fps)
/* loop over all possibilities and select the first one we can convert and
* is accepted by the peer */
caps = gst_ffmpeg_codectype_to_caps (CODEC_TYPE_VIDEO, ctx);
for (i = 0; i < gst_caps2_get_n_structures (caps); i++) {
GstStructure *structure = gst_caps2_get_nth_cap (caps, i);
GstCaps2 *setcaps;
for (i = 0; i < gst_caps_get_size (caps); i++) {
GstStructure *structure = gst_caps_get_structure (caps, i);
GstCaps *setcaps;
if (fps > 0)
gst_structure_set (structure, "framerate", G_TYPE_DOUBLE, fps, NULL);
setcaps = gst_caps2_new_full (gst_structure_copy (structure), NULL);
setcaps = gst_caps_new_full (gst_structure_copy (structure), NULL);
ret = gst_pad_try_set_caps (pad, setcaps);
gst_caps2_free (setcaps);
gst_caps_free (setcaps);
if (ret >= 0) {
if (ctx->pix_fmt == PIX_FMT_NB)
gst_ffmpeg_caps_to_codectype (CODEC_TYPE_VIDEO, caps, ctx);
gst_caps2_free (caps);
gst_caps_free (caps);
return ret;
}
......@@ -154,7 +154,7 @@ gst_ffmpegcsp_try_connect (GstPad *pad, AVCodecContext *ctx, double fps)
}
static GstPadLinkReturn
gst_ffmpegcsp_connect (GstPad *pad, const GstCaps2 *caps)
gst_ffmpegcsp_connect (GstPad *pad, const GstCaps *caps)
{
AVCodecContext *ctx;
GstFFMpegCsp *space;
......@@ -188,7 +188,7 @@ gst_ffmpegcsp_connect (GstPad *pad, const GstCaps2 *caps)
return GST_PAD_LINK_REFUSED;
}
if (!gst_structure_get_double (gst_caps2_get_nth_cap (caps, 0),
if (!gst_structure_get_double (gst_caps_get_structure (caps, 0),
"framerate", &fps))
fps = 0;
......@@ -249,12 +249,12 @@ gst_ffmpegcsp_get_type (void)
static void
gst_ffmpegcsp_base_init (gpointer g_class)
{
GstCaps2 *caps, *capscopy;
GstCaps *caps, *capscopy;
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
/* template caps */
caps = gst_ffmpeg_codectype_to_caps (CODEC_TYPE_VIDEO, NULL);
capscopy = gst_caps2_copy (caps);
capscopy = gst_caps_copy (caps);
/* build templates */
gst_element_class_add_pad_template (element_class,
......
......@@ -59,7 +59,7 @@ typedef struct _GstFFMpegDecClassParams GstFFMpegDecClassParams;
struct _GstFFMpegDecClassParams {
AVCodec *in_plugin;
GstCaps2 *srccaps, *sinkcaps;
GstCaps *srccaps, *sinkcaps;
};
#define GST_TYPE_FFMPEGDEC \
......@@ -92,7 +92,7 @@ static void gst_ffmpegdec_init (GstFFMpegDec *ffmpegdec);
static void gst_ffmpegdec_dispose (GObject *object);
static GstPadLinkReturn gst_ffmpegdec_connect (GstPad *pad,
const GstCaps2 *caps);
const GstCaps *caps);
static void gst_ffmpegdec_chain (GstPad *pad,
GstData *data);
......@@ -206,7 +206,7 @@ gst_ffmpegdec_dispose (GObject *object)
static GstPadLinkReturn
gst_ffmpegdec_connect (GstPad *pad,
const GstCaps2 *caps)
const GstCaps *caps)
{
GstFFMpegDec *ffmpegdec = (GstFFMpegDec *)(gst_pad_get_parent (pad));
GstFFMpegDecClass *oclass = (GstFFMpegDecClass*)(G_OBJECT_GET_CLASS (ffmpegdec));
......@@ -405,7 +405,7 @@ gst_ffmpegdec_chain (GstPad *pad,
if (have_data) {
if (!GST_PAD_CAPS (ffmpegdec->srcpad)) {
GstCaps2 *caps;
GstCaps *caps;
caps = gst_ffmpeg_codectype_to_caps (oclass->in_plugin->type,
ffmpegdec->context);
if (caps == NULL ||
......@@ -473,7 +473,7 @@ gst_ffmpegdec_register (GstPlugin *plugin)
while (in_plugin) {
GstFFMpegDecClassParams *params;
GstCaps2 *srccaps, *sinkcaps;
GstCaps *srccaps, *sinkcaps;
gchar *type_name;
/* no quasi-codecs, please */
......
......@@ -51,7 +51,7 @@ struct _GstFFMpegDemux {
typedef struct _GstFFMpegDemuxClassParams {
AVInputFormat *in_plugin;
GstCaps2 *sinkcaps, *videosrccaps, *audiosrccaps;
GstCaps *sinkcaps, *videosrccaps, *audiosrccaps;
} GstFFMpegDemuxClassParams;
typedef struct _GstFFMpegDemuxClass GstFFMpegDemuxClass;
......@@ -287,7 +287,7 @@ gst_ffmpegdemux_loop (GstElement *element)
/* create the pad/stream if we didn't do so already */
if (st->codec_info_state == 0) {
GstPadTemplate *templ = NULL;
GstCaps2 *caps;
GstCaps *caps;
gchar *padname;
gint num;
......@@ -398,7 +398,7 @@ gst_ffmpegdemux_register (GstPlugin *plugin)
0,
(GInstanceInitFunc)gst_ffmpegdemux_init,
};
GstCaps2 *any_caps = gst_caps2_new_any ();
GstCaps *any_caps = gst_caps_new_any ();
in_plugin = first_iformat;
......@@ -407,7 +407,7 @@ gst_ffmpegdemux_register (GstPlugin *plugin)
while (in_plugin) {
gchar *type_name, *typefind_name;
gchar *p;
GstCaps2 *sinkcaps, *audiosrccaps, *videosrccaps;
GstCaps *sinkcaps, *audiosrccaps, *videosrccaps;
/* Try to find the caps that belongs here */
sinkcaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
......@@ -421,19 +421,19 @@ gst_ffmpegdemux_register (GstPlugin *plugin)
videosrccaps = NULL;
for (in_codec = first_avcodec; in_codec != NULL;
in_codec = in_codec->next) {
GstCaps2 *temp = gst_ffmpeg_codecid_to_caps (in_codec->id, NULL);
GstCaps *temp = gst_ffmpeg_codecid_to_caps (in_codec->id, NULL);
if (!temp) {
continue;
}
switch (in_codec->type) {
case CODEC_TYPE_VIDEO:
gst_caps2_append (videosrccaps, temp);
gst_caps_append (videosrccaps, temp);
break;
case CODEC_TYPE_AUDIO:
gst_caps2_append (audiosrccaps, temp);
gst_caps_append (audiosrccaps, temp);
break;
default:
gst_caps2_free (temp);
gst_caps_free (temp);
break;
}
}
......@@ -484,7 +484,7 @@ gst_ffmpegdemux_register (GstPlugin *plugin)
next:
in_plugin = in_plugin->next;
}
gst_caps2_free (any_caps);
gst_caps_free (any_caps);
g_hash_table_remove (global_plugins, GINT_TO_POINTER (0));
return TRUE;
......
......@@ -64,7 +64,7 @@ struct _GstFFMpegEncClass {
typedef struct {
AVCodec *in_plugin;
GstCaps2 *srccaps, *sinkcaps;
GstCaps *srccaps, *sinkcaps;
} GstFFMpegEncClassParams;
#define GST_TYPE_FFMPEGENC \
......@@ -123,7 +123,7 @@ static void gst_ffmpegenc_init (GstFFMpegEnc *ffmpegenc);
static void gst_ffmpegenc_dispose (GObject *object);
static GstPadLinkReturn
gst_ffmpegenc_connect (GstPad *pad, const GstCaps2 *caps);
gst_ffmpegenc_connect (GstPad *pad, const GstCaps *caps);
static void gst_ffmpegenc_chain_video (GstPad *pad, GstData *_data);
static void gst_ffmpegenc_chain_audio (GstPad *pad, GstData *_data);
......@@ -282,9 +282,9 @@ gst_ffmpegenc_dispose (GObject *object)
static GstPadLinkReturn
gst_ffmpegenc_connect (GstPad *pad,
const GstCaps2 *caps)
const GstCaps *caps)
{
GstCaps2 *other_caps;
GstCaps *other_caps;
GstPadLinkReturn ret;
enum PixelFormat pix_fmt;
GstFFMpegEnc *ffmpegenc = (GstFFMpegEnc *) gst_pad_get_parent (pad);
......@@ -594,7 +594,7 @@ gst_ffmpegenc_register (GstPlugin *plugin)
while (in_plugin) {
gchar *type_name;
GstCaps2 *srccaps, *sinkcaps;
GstCaps *srccaps, *sinkcaps;
GstFFMpegEncClassParams *params;
/* no quasi codecs, please */
......
......@@ -51,7 +51,7 @@ struct _GstFFMpegMux {
typedef struct _GstFFMpegMuxClassParams {
AVOutputFormat *in_plugin;
GstCaps2 *srccaps, *videosinkcaps, *audiosinkcaps;
GstCaps *srccaps, *videosinkcaps, *audiosinkcaps;
} GstFFMpegMuxClassParams;
typedef struct _GstFFMpegMuxClass GstFFMpegMuxClass;
......@@ -96,7 +96,7 @@ static void gst_ffmpegmux_dispose (GObject *object);
static GstPadLinkReturn
gst_ffmpegmux_connect (GstPad *pad,
const GstCaps2 *caps);
const GstCaps *caps);
static GstPad * gst_ffmpegmux_request_new_pad (GstElement *element,
GstPadTemplate *templ,
const gchar *name);
......@@ -272,7 +272,7 @@ gst_ffmpegmux_request_new_pad (GstElement *element,
static GstPadLinkReturn
gst_ffmpegmux_connect (GstPad *pad,
const GstCaps2 *caps)
const GstCaps *caps)
{
GstFFMpegMux *ffmpegmux = (GstFFMpegMux *)(gst_pad_get_parent (pad));
gint i;
......@@ -458,7 +458,7 @@ gst_ffmpegmux_register (GstPlugin *plugin)
while (in_plugin) {
gchar *type_name;
gchar *p;
GstCaps2 *srccaps, *audiosinkcaps, *videosinkcaps;
GstCaps *srccaps, *audiosinkcaps, *videosinkcaps;
/* Try to find the caps that belongs here */
srccaps = gst_ffmpeg_formatid_to_caps (in_plugin->name);
......@@ -472,19 +472,19 @@ gst_ffmpegmux_register (GstPlugin *plugin)
videosinkcaps = NULL;
for (in_codec = first_avcodec; in_codec != NULL;
in_codec = in_codec->next) {
GstCaps2 *temp = gst_ffmpeg_codecid_to_caps (in_codec->id, NULL);
GstCaps *temp = gst_ffmpeg_codecid_to_caps (in_codec->id, NULL);
if (!temp) {
continue;
}
switch (in_codec->type) {
case CODEC_TYPE_VIDEO:
gst_caps2_append (videosinkcaps, temp);
gst_caps_append (videosinkcaps, temp);
break;
case CODEC_TYPE_AUDIO:
gst_caps2_append (audiosinkcaps, temp);
gst_caps_append (audiosinkcaps, temp);
break;
default:
gst_caps2_free (temp);
gst_caps_free (temp);
break;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment