mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
ext/divx/gstdivxdec.*: Fix divx3 ("msmpeg4") playback using divxdec.
Original commit message from CVS: 2004-01-23 Ronald Bultje <rbultje@ronald.bitfreak.net> * ext/divx/gstdivxdec.c: (gst_divxdec_init), (gst_divxdec_setup): * ext/divx/gstdivxdec.h: Fix divx3 ("msmpeg4") playback using divxdec.
This commit is contained in:
parent
0b4511b951
commit
0c2e4e1cc2
3 changed files with 23 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-01-23 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* ext/divx/gstdivxdec.c: (gst_divxdec_init), (gst_divxdec_setup):
|
||||
* ext/divx/gstdivxdec.h:
|
||||
Fix divx3 ("msmpeg4") playback using divxdec.
|
||||
|
||||
2004-01-23 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* gst/typefind/gsttypefindfunctions.c:
|
||||
|
|
|
@ -185,6 +185,7 @@ gst_divxdec_init (GstDivxDec *divxdec)
|
|||
|
||||
/* bitrate, etc. */
|
||||
divxdec->width = divxdec->height = divxdec->csp = divxdec->bitcnt = -1;
|
||||
divxdec->version = 0;
|
||||
|
||||
/* set divx handle to NULL */
|
||||
divxdec->handle = NULL;
|
||||
|
@ -213,7 +214,20 @@ gst_divxdec_setup (GstDivxDec *divxdec)
|
|||
/* initialize the handle */
|
||||
memset(&xinit, 0, sizeof(DEC_INIT));
|
||||
xinit.smooth_playback = 0;
|
||||
xinit.codec_version = 500;
|
||||
switch (divxdec->version) {
|
||||
case 3:
|
||||
xinit.codec_version = 311;
|
||||
break;
|
||||
case 4:
|
||||
xinit.codec_version = 400;
|
||||
break;
|
||||
case 5:
|
||||
xinit.codec_version = 500;
|
||||
break;
|
||||
default:
|
||||
xinit.codec_version = 0;
|
||||
break;
|
||||
}
|
||||
if ((ret = decore(&handle, DEC_OPT_INIT, &xinit, NULL)) != 0) {
|
||||
gst_element_error (divxdec, LIBRARY, INIT, NULL,
|
||||
("divx library error: %s (%d)", gst_divxdec_error (ret), ret));
|
||||
|
@ -439,6 +453,7 @@ gst_divxdec_connect (GstPad *pad,
|
|||
gst_structure_get_int(structure, "width", &divxdec->width);
|
||||
gst_structure_get_int(structure, "height", &divxdec->height);
|
||||
gst_structure_get_double(structure, "framerate", &divxdec->fps);
|
||||
gst_structure_get_int(structure, "divxversion", &divxdec->version);
|
||||
|
||||
return gst_divxdec_negotiate(divxdec);
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ struct _GstDivxDec {
|
|||
/* video (output) settings */
|
||||
guint32 csp;
|
||||
int bitcnt, bpp;
|
||||
int version;
|
||||
int width, height;
|
||||
gdouble fps;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue