Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
/* GStreamer xvid encoder/decoder plugin
|
2003-04-22 14:55:12 +00:00
|
|
|
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2003-06-01 15:13:56 +00:00
|
|
|
#include <string.h>
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
#include <xvid.h>
|
2003-06-01 15:13:56 +00:00
|
|
|
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
#include <gst/video/video.h>
|
2003-04-22 14:55:12 +00:00
|
|
|
#include "gstxviddec.h"
|
|
|
|
#include "gstxvidenc.h"
|
|
|
|
|
2003-07-29 11:59:09 +00:00
|
|
|
gboolean
|
|
|
|
gst_xvid_init (void)
|
|
|
|
{
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
xvid_gbl_init_t xinit;
|
2003-07-29 11:59:09 +00:00
|
|
|
gint ret;
|
|
|
|
static gboolean is_init = FALSE;
|
|
|
|
|
|
|
|
/* only init once */
|
|
|
|
if (is_init == TRUE) {
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* set up xvid initially (function pointers, CPU flags) */
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
gst_xvid_init_struct (xinit);
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
if ((ret = xvid_global (NULL, XVID_GBL_INIT, &xinit, NULL)) < 0) {
|
|
|
|
g_warning ("Failed to initialize XviD: %s (%d)", gst_xvid_error (ret), ret);
|
2003-07-29 11:59:09 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
|
|
|
|
GST_LOG ("Initted XviD version %d.%d.%d (API %d.%d)",
|
2004-03-14 22:34:33 +00:00
|
|
|
XVID_VERSION_MAJOR (XVID_VERSION),
|
|
|
|
XVID_VERSION_MINOR (XVID_VERSION),
|
|
|
|
XVID_VERSION_PATCH (XVID_VERSION),
|
|
|
|
XVID_API_MAJOR (XVID_API), XVID_API_MINOR (XVID_API));
|
2003-07-29 11:59:09 +00:00
|
|
|
|
|
|
|
is_init = TRUE;
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2003-06-01 15:13:56 +00:00
|
|
|
gchar *
|
|
|
|
gst_xvid_error (int errorcode)
|
|
|
|
{
|
|
|
|
gchar *error;
|
|
|
|
|
|
|
|
switch (errorcode) {
|
|
|
|
case XVID_ERR_FAIL:
|
|
|
|
error = "Operation failed";
|
|
|
|
break;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
case 0:
|
2003-06-01 15:13:56 +00:00
|
|
|
error = "No error";
|
|
|
|
break;
|
|
|
|
case XVID_ERR_MEMORY:
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
error = "Memory allocation error";
|
2003-06-01 15:13:56 +00:00
|
|
|
break;
|
|
|
|
case XVID_ERR_FORMAT:
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
error = "File format not supported";
|
|
|
|
break;
|
|
|
|
case XVID_ERR_VERSION:
|
|
|
|
error = "Structure version not supported";
|
2003-06-01 15:13:56 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
error = "Unknown error";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return error;
|
|
|
|
}
|
|
|
|
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
gint
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
gst_xvid_structure_to_csp (GstStructure * structure)
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
{
|
|
|
|
const gchar *mime = gst_structure_get_name (structure);
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
gint xvid_cs = -1;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
|
|
|
|
if (!strcmp (mime, "video/x-raw-yuv")) {
|
|
|
|
guint32 fourcc;
|
|
|
|
|
|
|
|
gst_structure_get_fourcc (structure, "format", &fourcc);
|
|
|
|
switch (fourcc) {
|
2004-03-14 22:34:33 +00:00
|
|
|
case GST_MAKE_FOURCC ('I', '4', '2', '0'):
|
2004-03-15 19:32:27 +00:00
|
|
|
xvid_cs = XVID_CSP_I420;
|
|
|
|
break;
|
2004-03-14 22:34:33 +00:00
|
|
|
case GST_MAKE_FOURCC ('Y', 'U', 'Y', '2'):
|
2004-03-15 19:32:27 +00:00
|
|
|
xvid_cs = XVID_CSP_YUY2;
|
|
|
|
break;
|
2004-03-14 22:34:33 +00:00
|
|
|
case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
|
2004-03-15 19:32:27 +00:00
|
|
|
xvid_cs = XVID_CSP_YV12;
|
|
|
|
break;
|
2004-03-14 22:34:33 +00:00
|
|
|
case GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y'):
|
2004-03-15 19:32:27 +00:00
|
|
|
xvid_cs = XVID_CSP_UYVY;
|
|
|
|
break;
|
2004-03-14 22:34:33 +00:00
|
|
|
case GST_MAKE_FOURCC ('Y', 'V', 'Y', 'U'):
|
2004-03-15 19:32:27 +00:00
|
|
|
xvid_cs = XVID_CSP_YVYU;
|
|
|
|
break;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
}
|
|
|
|
} else {
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
gint depth, bpp, r_mask;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
gst_structure_get_int (structure, "depth", &depth);
|
|
|
|
gst_structure_get_int (structure, "bpp", &bpp);
|
|
|
|
gst_structure_get_int (structure, "red_mask", &r_mask);
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
|
|
|
|
switch (depth) {
|
|
|
|
case 15:
|
2004-03-15 19:32:27 +00:00
|
|
|
xvid_cs = XVID_CSP_RGB555;
|
|
|
|
break;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
case 16:
|
2004-03-15 19:32:27 +00:00
|
|
|
xvid_cs = XVID_CSP_RGB565;
|
|
|
|
break;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
case 24:
|
2004-03-15 19:32:27 +00:00
|
|
|
if (bpp == 24) {
|
|
|
|
xvid_cs = XVID_CSP_BGR;
|
|
|
|
} else {
|
|
|
|
switch (r_mask) {
|
|
|
|
case 0xff000000:
|
|
|
|
xvid_cs = XVID_CSP_RGBA;
|
|
|
|
break;
|
2004-01-06 14:34:52 +00:00
|
|
|
#ifdef XVID_CSP_ARGB
|
2004-03-15 19:32:27 +00:00
|
|
|
case 0x00ff0000:
|
|
|
|
xvid_cs = XVID_CSP_ARGB;
|
|
|
|
break;
|
2004-01-06 14:34:52 +00:00
|
|
|
#endif
|
2004-03-15 19:32:27 +00:00
|
|
|
case 0x0000ff00:
|
|
|
|
xvid_cs = XVID_CSP_BGRA;
|
|
|
|
break;
|
|
|
|
case 0x000000ff:
|
|
|
|
xvid_cs = XVID_CSP_ABGR;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
default:
|
2004-03-15 19:32:27 +00:00
|
|
|
break;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return xvid_cs;
|
|
|
|
}
|
|
|
|
|
|
|
|
GstCaps *
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
gst_xvid_csp_to_caps (gint csp, gint w, gint h)
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
{
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
GstStructure *structure = NULL;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
|
|
|
|
switch (csp) {
|
|
|
|
case XVID_CSP_RGB555:
|
|
|
|
case XVID_CSP_RGB565:
|
|
|
|
case XVID_CSP_BGR:
|
|
|
|
case XVID_CSP_ABGR:
|
|
|
|
case XVID_CSP_BGRA:
|
2004-01-06 14:34:52 +00:00
|
|
|
#ifdef XVID_CSP_ARGB
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
case XVID_CSP_ARGB:
|
2004-01-06 14:34:52 +00:00
|
|
|
#endif
|
2004-03-14 22:34:33 +00:00
|
|
|
case XVID_CSP_RGBA:{
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
gint r_mask = 0, b_mask = 0, g_mask = 0,
|
2004-03-15 19:32:27 +00:00
|
|
|
endianness = 0, bpp = 0, depth = 0;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
|
|
|
|
switch (csp) {
|
2004-03-15 19:32:27 +00:00
|
|
|
case XVID_CSP_RGB555:
|
|
|
|
r_mask = GST_VIDEO_RED_MASK_15_INT;
|
|
|
|
g_mask = GST_VIDEO_GREEN_MASK_15_INT;
|
|
|
|
b_mask = GST_VIDEO_BLUE_MASK_15_INT;
|
|
|
|
endianness = G_BYTE_ORDER;
|
|
|
|
depth = 15;
|
|
|
|
bpp = 16;
|
|
|
|
break;
|
|
|
|
case XVID_CSP_RGB565:
|
|
|
|
r_mask = GST_VIDEO_RED_MASK_16_INT;
|
|
|
|
g_mask = GST_VIDEO_GREEN_MASK_16_INT;
|
|
|
|
b_mask = GST_VIDEO_BLUE_MASK_16_INT;
|
|
|
|
endianness = G_BYTE_ORDER;
|
|
|
|
depth = 16;
|
|
|
|
bpp = 16;
|
|
|
|
break;
|
|
|
|
case XVID_CSP_BGR:
|
|
|
|
r_mask = 0x0000ff;
|
|
|
|
g_mask = 0x00ff00;
|
|
|
|
b_mask = 0xff0000;
|
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
depth = 24;
|
|
|
|
bpp = 24;
|
|
|
|
break;
|
|
|
|
case XVID_CSP_ABGR:
|
|
|
|
r_mask = 0x000000ff;
|
|
|
|
g_mask = 0x0000ff00;
|
|
|
|
b_mask = 0x00ff0000;
|
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
depth = 24;
|
|
|
|
bpp = 32;
|
|
|
|
break;
|
|
|
|
case XVID_CSP_BGRA:
|
|
|
|
r_mask = 0x0000ff00;
|
|
|
|
g_mask = 0x00ff0000;
|
|
|
|
b_mask = 0xff000000;
|
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
depth = 24;
|
|
|
|
bpp = 32;
|
|
|
|
break;
|
2004-01-06 14:34:52 +00:00
|
|
|
#ifdef XVID_CSP_ARGB
|
2004-03-15 19:32:27 +00:00
|
|
|
case XVID_CSP_ARGB:
|
|
|
|
r_mask = 0x00ff0000;
|
|
|
|
g_mask = 0x0000ff00;
|
|
|
|
b_mask = 0x000000ff;
|
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
depth = 24;
|
|
|
|
bpp = 32;
|
|
|
|
break;
|
2004-01-06 14:34:52 +00:00
|
|
|
#endif
|
2004-03-15 19:32:27 +00:00
|
|
|
case XVID_CSP_RGBA:
|
|
|
|
r_mask = 0xff000000;
|
|
|
|
g_mask = 0x00ff0000;
|
|
|
|
b_mask = 0x0000ff00;
|
|
|
|
endianness = G_BIG_ENDIAN;
|
|
|
|
depth = 24;
|
|
|
|
bpp = 32;
|
|
|
|
break;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
}
|
|
|
|
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
structure = gst_structure_new ("video/x-raw-rgb",
|
2004-03-15 19:32:27 +00:00
|
|
|
"width", G_TYPE_INT, w,
|
|
|
|
"height", G_TYPE_INT, h,
|
|
|
|
"depth", G_TYPE_INT, depth,
|
|
|
|
"bpp", G_TYPE_INT, bpp,
|
|
|
|
"endianness", G_TYPE_INT, endianness,
|
|
|
|
"red_mask", G_TYPE_INT, r_mask,
|
|
|
|
"green_mask", G_TYPE_INT, g_mask,
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
"blue_mask", G_TYPE_INT, b_mask, NULL);
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case XVID_CSP_YUY2:
|
|
|
|
case XVID_CSP_YVYU:
|
|
|
|
case XVID_CSP_UYVY:
|
|
|
|
case XVID_CSP_I420:
|
2004-03-14 22:34:33 +00:00
|
|
|
case XVID_CSP_YV12:{
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
guint32 fourcc = 0;
|
|
|
|
|
|
|
|
switch (csp) {
|
2004-03-15 19:32:27 +00:00
|
|
|
case XVID_CSP_YUY2:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('Y', 'U', 'Y', '2');
|
|
|
|
break;
|
|
|
|
case XVID_CSP_YVYU:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('Y', 'V', 'Y', 'U');
|
|
|
|
break;
|
|
|
|
case XVID_CSP_UYVY:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('U', 'Y', 'V', 'Y');
|
|
|
|
break;
|
|
|
|
case XVID_CSP_I420:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('I', '4', '2', '0');
|
|
|
|
break;
|
|
|
|
case XVID_CSP_YV12:
|
|
|
|
fourcc = GST_MAKE_FOURCC ('Y', 'V', '1', '2');
|
|
|
|
break;
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
}
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
|
|
|
|
structure = gst_structure_new ("video/x-raw-yuv",
|
2004-03-15 19:32:27 +00:00
|
|
|
"width", G_TYPE_INT, w,
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
"height", G_TYPE_INT, h, "format", GST_TYPE_FOURCC, fourcc, NULL);
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
return gst_caps_new_full (structure, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gint
|
|
|
|
gst_xvid_image_get_size (gint csp, gint width, gint height)
|
|
|
|
{
|
|
|
|
xvid_image_t dummy_im;
|
|
|
|
|
|
|
|
return gst_xvid_image_fill (&dummy_im, NULL, csp, width, height);
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
}
|
|
|
|
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
gint
|
|
|
|
gst_xvid_image_fill (xvid_image_t * im, void *ptr, gint csp,
|
|
|
|
gint width, gint height)
|
|
|
|
{
|
|
|
|
gint stride, h2, size = 0;
|
|
|
|
|
|
|
|
im->csp = csp;
|
|
|
|
|
|
|
|
switch (csp) {
|
|
|
|
case XVID_CSP_I420:
|
|
|
|
case XVID_CSP_YV12:
|
|
|
|
/* planar */
|
|
|
|
/* luma */
|
|
|
|
stride = GST_ROUND_UP_4 (width);
|
|
|
|
h2 = GST_ROUND_UP_2 (height);
|
|
|
|
im->stride[0] = stride;
|
|
|
|
im->plane[0] = ptr;
|
|
|
|
/* chroma */
|
2009-02-22 12:17:54 +00:00
|
|
|
im->plane[1] = ((guint8 *) im->plane[0]) + (stride * h2);
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
size += stride * height;
|
|
|
|
stride = GST_ROUND_UP_8 (width) / 2;
|
|
|
|
h2 = GST_ROUND_UP_2 (height) / 2;
|
|
|
|
im->stride[1] = stride;
|
|
|
|
|
2009-02-22 12:17:54 +00:00
|
|
|
im->plane[2] = ((guint8 *) im->plane[1]) + (stride * h2);
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
im->stride[2] = stride;
|
2006-07-28 10:19:02 +00:00
|
|
|
size += 2 * (stride * h2);
|
ext/xvid/: xvid plugin to support more capabilities of XviD codec.
Original commit message from CVS:
Patch by: Mark Nauwelaerts <manauw at skynet dot be>
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_structure_to_csp),
(gst_xvid_csp_to_caps), (gst_xvid_image_get_size),
(gst_xvid_image_fill):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_reset), (gst_xviddec_unset),
(gst_xviddec_handle_sink_event), (gst_xviddec_setup),
(gst_xviddec_add_par), (gst_xviddec_negotiate),
(gst_xviddec_decode), (gst_xviddec_chain),
(gst_xviddec_flush_buffers), (gst_xviddec_src_getcaps),
(gst_xviddec_src_link), (gst_xviddec_setcaps),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_quant_type_get_type), (gst_xvidenc_pass_get_type),
(gst_xvidenc_get_type), (gst_xvidenc_base_init),
(gst_xvidenc_class_init), (gst_xvidenc_init),
(gst_xvidenc_finalize), (gst_xvidenc_handle_sink_event),
(gst_xvidenc_setup), (gst_xvidenc_setcaps), (gst_xvidenc_encode),
(gst_xvidenc_chain), (gst_xvidenc_flush_buffers),
(gst_xvidenc_set_property), (gst_xvidenc_get_property),
(gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
xvid plugin to support more capabilities of XviD codec.
Fixes #339462.
Some more cleanups here and there.
2006-05-12 09:28:15 +00:00
|
|
|
break;
|
|
|
|
case XVID_CSP_RGB555:
|
|
|
|
case XVID_CSP_RGB565:
|
|
|
|
case XVID_CSP_YUY2:
|
|
|
|
case XVID_CSP_UYVY:
|
|
|
|
case XVID_CSP_YVYU:
|
|
|
|
/* packed */
|
|
|
|
stride = GST_ROUND_UP_4 (width * 2);
|
|
|
|
im->plane[0] = ptr;
|
|
|
|
im->stride[0] = stride;
|
|
|
|
size = stride * height;
|
|
|
|
break;
|
|
|
|
case XVID_CSP_BGR:
|
|
|
|
stride = GST_ROUND_UP_4 (width * 3);
|
|
|
|
im->plane[0] = ptr;
|
|
|
|
im->stride[0] = stride;
|
|
|
|
size = stride * height * 2;
|
|
|
|
break;
|
|
|
|
case XVID_CSP_ABGR:
|
|
|
|
case XVID_CSP_BGRA:
|
|
|
|
case XVID_CSP_RGBA:
|
|
|
|
#ifdef XVID_CSP_ARGB
|
|
|
|
case XVID_CSP_ARGB:
|
|
|
|
#endif
|
|
|
|
stride = width * 4;
|
|
|
|
im->plane[0] = ptr;
|
|
|
|
im->stride[0] = stride;
|
|
|
|
size = stride * height;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return size;
|
|
|
|
}
|
Update xvid plugin to latest xvid (1.0.0-beta3) API.
Original commit message from CVS:
2004-01-03 Ronald Bultje <rbultje@ronald.bitfreak.net>
reviewed by: <delete if not using a buddy>
* configure.ac:
* ext/xvid/gstxvid.c: (gst_xvid_init), (gst_xvid_error),
(gst_xvid_structure_to_csp), (gst_xvid_csp_to_caps):
* ext/xvid/gstxvid.h:
* ext/xvid/gstxviddec.c: (gst_xviddec_class_init),
(gst_xviddec_init), (gst_xviddec_setup), (gst_xviddec_chain),
(gst_xviddec_src_link), (gst_xviddec_sink_link),
(gst_xviddec_change_state):
* ext/xvid/gstxviddec.h:
* ext/xvid/gstxvidenc.c: (gst_xvidenc_profile_get_type),
(gst_xvidenc_base_init), (gst_xvidenc_class_init),
(gst_xvidenc_init), (gst_xvidenc_setup), (gst_xvidenc_chain),
(gst_xvidenc_link), (gst_xvidenc_set_property),
(gst_xvidenc_get_property), (gst_xvidenc_change_state):
* ext/xvid/gstxvidenc.h:
Update xvid plugin to latest xvid (1.0.0-beta3) API.
2004-01-03 19:38:40 +00:00
|
|
|
|
2003-04-22 14:55:12 +00:00
|
|
|
static gboolean
|
2004-03-14 22:34:33 +00:00
|
|
|
plugin_init (GstPlugin * plugin)
|
2003-04-22 14:55:12 +00:00
|
|
|
{
|
2003-11-05 11:01:03 +00:00
|
|
|
return (gst_element_register (plugin, "xvidenc",
|
2009-11-18 16:58:53 +00:00
|
|
|
GST_RANK_SECONDARY, GST_TYPE_XVIDENC) &&
|
2004-03-14 22:34:33 +00:00
|
|
|
gst_element_register (plugin, "xviddec",
|
2006-10-02 13:28:49 +00:00
|
|
|
GST_RANK_NONE, GST_TYPE_XVIDDEC));
|
2003-04-22 14:55:12 +00:00
|
|
|
}
|
|
|
|
|
2004-03-14 22:34:33 +00:00
|
|
|
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
|
|
|
GST_VERSION_MINOR,
|
|
|
|
"xvid",
|
2006-04-01 10:09:11 +00:00
|
|
|
"XviD plugin library", plugin_init, VERSION, "GPL", GST_PACKAGE_NAME,
|
|
|
|
GST_PACKAGE_ORIGIN)
|