mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
reverting error patch before making a branch.
Original commit message from CVS: reverting error patch before making a branch.
This commit is contained in:
parent
054bbacfab
commit
671eef9b9d
22 changed files with 90 additions and 158 deletions
|
@ -294,9 +294,7 @@ gst_afsink_open_file (GstAFSink *sink)
|
||||||
sink->file = fopen (sink->filename, "w");
|
sink->file = fopen (sink->filename, "w");
|
||||||
if (sink->file == NULL) {
|
if (sink->file == NULL) {
|
||||||
perror ("open");
|
perror ("open");
|
||||||
gst_element_gerror(GST_ELEMENT (sink), g_strconcat("opening file \"", sink->filename, "\"", GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (sink), g_strconcat("opening file \"", sink->filename, "\"", NULL));
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf(NULL)));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
@ -353,9 +351,7 @@ gst_afsink_open_file (GstAFSink *sink)
|
||||||
if (sink->file == AF_NULL_FILEHANDLE)
|
if (sink->file == AF_NULL_FILEHANDLE)
|
||||||
{
|
{
|
||||||
perror ("open");
|
perror ("open");
|
||||||
gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (sink), g_strconcat("opening file \"", sink->filename, "\"", NULL));
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("error openning file %s", sink->filename));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -378,9 +374,7 @@ gst_afsink_close_file (GstAFSink *sink)
|
||||||
{
|
{
|
||||||
g_print ("WARNING: afsink: oops, error closing !\n");
|
g_print ("WARNING: afsink: oops, error closing !\n");
|
||||||
perror ("close");
|
perror ("close");
|
||||||
gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (sink), g_strconcat("closing file \"", sink->filename, "\"", NULL));
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("error closing file %s", sink->filename));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GST_FLAG_UNSET (sink, GST_AFSINK_OPEN);
|
GST_FLAG_UNSET (sink, GST_AFSINK_OPEN);
|
||||||
|
|
|
@ -306,9 +306,8 @@ gst_afsrc_open_file (GstAFSrc *src)
|
||||||
{
|
{
|
||||||
g_print ("ERROR: gstafsrc: Could not open file %s for reading\n",
|
g_print ("ERROR: gstafsrc: Could not open file %s for reading\n",
|
||||||
src->filename);
|
src->filename);
|
||||||
gst_element_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (src), g_strconcat ("opening file \"",
|
||||||
g_strdup ("unconverted error, file a bug"),
|
src->filename, "\"", NULL));
|
||||||
g_strdup_printf ("error opening file %s", src->filename));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -328,11 +327,13 @@ gst_afsrc_open_file (GstAFSrc *src)
|
||||||
break;
|
break;
|
||||||
case AF_SAMPFMT_FLOAT:
|
case AF_SAMPFMT_FLOAT:
|
||||||
case AF_SAMPFMT_DOUBLE:
|
case AF_SAMPFMT_DOUBLE:
|
||||||
GST_DEBUG ("ERROR: float data not supported yet !\n");
|
GST_DEBUG (
|
||||||
|
"ERROR: float data not supported yet !\n");
|
||||||
}
|
}
|
||||||
src->rate = (guint) afGetRate (src->file, AF_DEFAULT_TRACK);
|
src->rate = (guint) afGetRate (src->file, AF_DEFAULT_TRACK);
|
||||||
src->width = sampleWidth;
|
src->width = sampleWidth;
|
||||||
GST_DEBUG ("input file: %d channels, %d width, %d rate, signed %s\n",
|
GST_DEBUG (
|
||||||
|
"input file: %d channels, %d width, %d rate, signed %s\n",
|
||||||
src->channels, src->width, src->rate,
|
src->channels, src->width, src->rate,
|
||||||
src->is_signed ? "yes" : "no");
|
src->is_signed ? "yes" : "no");
|
||||||
}
|
}
|
||||||
|
@ -368,9 +369,7 @@ gst_afsrc_close_file (GstAFSrc *src)
|
||||||
{
|
{
|
||||||
g_print ("WARNING: afsrc: oops, error closing !\n");
|
g_print ("WARNING: afsrc: oops, error closing !\n");
|
||||||
perror ("close");
|
perror ("close");
|
||||||
gst_element_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (src), g_strconcat("closing file \"", src->filename, "\"", NULL));
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("error closing file %s", src->filename));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GST_FLAG_UNSET (src, GST_AFSRC_OPEN);
|
GST_FLAG_UNSET (src, GST_AFSRC_OPEN);
|
||||||
|
|
|
@ -221,10 +221,9 @@ gst_divxdec_setup (GstDivxDec *divxdec)
|
||||||
/* initialize the handle */
|
/* initialize the handle */
|
||||||
memset(&xinit, 0, sizeof(DEC_INIT));
|
memset(&xinit, 0, sizeof(DEC_INIT));
|
||||||
if ((ret = decore(&handle, DEC_OPT_INIT, &xinit, NULL)) != 0) {
|
if ((ret = decore(&handle, DEC_OPT_INIT, &xinit, NULL)) != 0) {
|
||||||
gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(divxdec),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Error initializing divx decoding library: %s (%d)",
|
||||||
g_strdup_printf("Error initializing divx decoding library: %s (%d)",
|
gst_divxdec_error(ret), ret);
|
||||||
gst_divxdec_error(ret), ret));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,10 +240,9 @@ gst_divxdec_setup (GstDivxDec *divxdec)
|
||||||
|
|
||||||
if ((ret = decore(divxdec->handle, DEC_OPT_SETOUT,
|
if ((ret = decore(divxdec->handle, DEC_OPT_SETOUT,
|
||||||
&output, NULL)) != 0) {
|
&output, NULL)) != 0) {
|
||||||
gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(divxdec),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Error setting output format: %s (%d)",
|
||||||
g_strdup_printf("Error setting output format: %s (%d)",
|
gst_divxdec_error(ret), ret);
|
||||||
gst_divxdec_error(ret), ret));
|
|
||||||
gst_divxdec_unset(divxdec);
|
gst_divxdec_unset(divxdec);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -279,9 +277,8 @@ gst_divxdec_chain (GstPad *pad,
|
||||||
|
|
||||||
if (!divxdec->handle) {
|
if (!divxdec->handle) {
|
||||||
if (gst_divxdec_negotiate(divxdec) <= 0) {
|
if (gst_divxdec_negotiate(divxdec) <= 0) {
|
||||||
gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(divxdec),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"No format set - aborting");
|
||||||
g_strdup_printf("No format set - aborting"));
|
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -304,10 +301,9 @@ gst_divxdec_chain (GstPad *pad,
|
||||||
|
|
||||||
if ((ret = decore(divxdec->handle, DEC_OPT_FRAME,
|
if ((ret = decore(divxdec->handle, DEC_OPT_FRAME,
|
||||||
&xframe, NULL))) {
|
&xframe, NULL))) {
|
||||||
gst_element_gerror(GST_ELEMENT(divxdec), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(divxdec),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Error decoding divx frame: %s (%d)",
|
||||||
g_strdup_printf("Error decoding divx frame: %s (%d)",
|
gst_divxdec_error(ret), ret);
|
||||||
gst_divxdec_error(ret), ret));
|
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -302,10 +302,9 @@ gst_divxenc_setup (GstDivxEnc *divxenc)
|
||||||
output.spatial_passes = 0;
|
output.spatial_passes = 0;
|
||||||
|
|
||||||
if ((ret = encore(&handle, ENC_OPT_INIT, &input, &output))) {
|
if ((ret = encore(&handle, ENC_OPT_INIT, &input, &output))) {
|
||||||
gst_element_gerror(GST_ELEMENT(divxenc), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(divxenc),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Error setting up divx encoder: %s (%d)",
|
||||||
g_strdup_printf("Error setting up divx encoder: %s (%d)",
|
gst_divxenc_error(ret), ret);
|
||||||
gst_divxenc_error(ret), ret));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -364,10 +363,9 @@ gst_divxenc_chain (GstPad *pad,
|
||||||
|
|
||||||
if ((ret = encore(divxenc->handle, ENC_OPT_ENCODE,
|
if ((ret = encore(divxenc->handle, ENC_OPT_ENCODE,
|
||||||
&xframe, &xres))) {
|
&xframe, &xres))) {
|
||||||
gst_element_gerror(GST_ELEMENT(divxenc), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(divxenc),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Error encoding divx frame: %s (%d)",
|
||||||
g_strdup_printf("Error encoding divx frame: %s (%d)",
|
gst_divxenc_error(ret), ret);
|
||||||
gst_divxenc_error(ret), ret));
|
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -496,9 +496,7 @@ gst_ivorbisfile_loop (GstElement *element)
|
||||||
/* open our custom ivorbisfile data object with the callbacks we provide */
|
/* open our custom ivorbisfile data object with the callbacks we provide */
|
||||||
if (ov_open_callbacks (ivorbisfile, &ivorbisfile->vf, NULL, 0,
|
if (ov_open_callbacks (ivorbisfile, &ivorbisfile->vf, NULL, 0,
|
||||||
ivorbisfile_ov_callbacks) < 0) {
|
ivorbisfile_ov_callbacks) < 0) {
|
||||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
gst_element_error (element, "this is not a vorbis file");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("this is not a vorbis file"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ivorbisfile->need_discont = TRUE;
|
ivorbisfile->need_discont = TRUE;
|
||||||
|
@ -562,9 +560,7 @@ gst_ivorbisfile_loop (GstElement *element)
|
||||||
/* we update the caps for each logical stream */
|
/* we update the caps for each logical stream */
|
||||||
if (ivorbisfile->vf.current_link != ivorbisfile->current_link) {
|
if (ivorbisfile->vf.current_link != ivorbisfile->current_link) {
|
||||||
if (!gst_ivorbisfile_new_link (ivorbisfile, ivorbisfile->vf.current_link)) {
|
if (!gst_ivorbisfile_new_link (ivorbisfile, ivorbisfile->vf.current_link)) {
|
||||||
gst_element_gerror(GST_ELEMENT (ivorbisfile), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (ivorbisfile), "could not negotiate format");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("could not negotiate format"));
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -701,9 +701,7 @@ gst_ladspa_loop (GstElement *element)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ladspa->bufpool) {
|
if (!ladspa->bufpool) {
|
||||||
gst_element_gerror(element, "Caps were never set, GST_ERROR_UNKNOWN,
|
gst_element_error (element, "Caps were never set, bailing...");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf(bailing..."));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -793,9 +791,7 @@ gst_ladspa_chain (GstPad *pad, GstBuffer *buffer_in)
|
||||||
g_return_if_fail (GST_IS_BUFFER (buffer_in));
|
g_return_if_fail (GST_IS_BUFFER (buffer_in));
|
||||||
|
|
||||||
if (!ladspa->bufpool) {
|
if (!ladspa->bufpool) {
|
||||||
gst_element_gerror((GstElement*)ladspa, "Caps were never set, GST_ERROR_UNKNOWN,
|
gst_element_error ((GstElement*)ladspa, "Caps were never set, bailing...");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf(bailing..."));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -318,9 +318,7 @@ gst_colorspace_srcconnect_func (GstPad *pad, GstCaps *caps, gboolean newcaps)
|
||||||
peercaps = peercaps->next;
|
peercaps = peercaps->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
//gst_element_gerror(GST_ELEMENT (space), GST_ERROR_UNKNOWN,
|
//gst_element_error (GST_ELEMENT (space), "could not agree on caps with peer pads");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("could not agree on caps with peer pads"));
|
|
||||||
/* we disable ourself here */
|
/* we disable ourself here */
|
||||||
space->disabled = TRUE;
|
space->disabled = TRUE;
|
||||||
|
|
||||||
|
|
|
@ -159,10 +159,9 @@ gst_sdlvideosink_get_sdl_from_fourcc (GstSDLVideoSink *sdlvideosink,
|
||||||
case GST_MAKE_FOURCC('Y','V','Y','U'):
|
case GST_MAKE_FOURCC('Y','V','Y','U'):
|
||||||
return SDL_YVYU_OVERLAY;
|
return SDL_YVYU_OVERLAY;
|
||||||
default: {
|
default: {
|
||||||
gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(sdlvideosink),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Unsupported format %08lx (" GST_FOURCC_FORMAT ")",
|
||||||
g_strdup_printf("Unsupported format %08lx (" GST_FOURCC_FORMAT ")",
|
code, GST_FOURCC_ARGS(code));
|
||||||
code, GST_FOURCC_ARGS(code)));
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,17 +176,15 @@ gst_sdlvideosink_lock (GstSDLVideoSink *sdlvideosink)
|
||||||
{
|
{
|
||||||
if (SDL_LockSurface(sdlvideosink->screen) < 0)
|
if (SDL_LockSurface(sdlvideosink->screen) < 0)
|
||||||
{
|
{
|
||||||
gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(sdlvideosink),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"SDL: couldn\'t lock the SDL video window: %s", SDL_GetError());
|
||||||
g_strdup_printf("SDL: couldn\'t lock the SDL video window: %s", SDL_GetError()));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (SDL_LockYUVOverlay(sdlvideosink->yuv_overlay) < 0)
|
if (SDL_LockYUVOverlay(sdlvideosink->yuv_overlay) < 0)
|
||||||
{
|
{
|
||||||
gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(sdlvideosink),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"SDL: couldn\'t lock the SDL YUV overlay: %s", SDL_GetError());
|
||||||
g_strdup_printf("SDL: couldn\'t lock the SDL YUV overlay: %s", SDL_GetError()));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,10 +221,9 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink, gboolean showlogo)
|
||||||
GST_VIDEOSINK_HEIGHT (sdlvideosink), 0, SDL_SWSURFACE | SDL_RESIZABLE);
|
GST_VIDEOSINK_HEIGHT (sdlvideosink), 0, SDL_SWSURFACE | SDL_RESIZABLE);
|
||||||
if ( sdlvideosink->screen == NULL)
|
if ( sdlvideosink->screen == NULL)
|
||||||
{
|
{
|
||||||
gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(sdlvideosink),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"SDL: Couldn't set %dx%d: %s", GST_VIDEOSINK_WIDTH (sdlvideosink),
|
||||||
g_strdup_printf("SDL: Couldn't set %dx%d: %s", GST_VIDEOSINK_WIDTH (sdlvideosink),
|
GST_VIDEOSINK_HEIGHT (sdlvideosink), SDL_GetError());
|
||||||
GST_VIDEOSINK_HEIGHT (sdlvideosink), SDL_GetError()));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,11 +234,10 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink, gboolean showlogo)
|
||||||
GST_VIDEOSINK_WIDTH (sdlvideosink), sdlvideosink->format, sdlvideosink->screen);
|
GST_VIDEOSINK_WIDTH (sdlvideosink), sdlvideosink->format, sdlvideosink->screen);
|
||||||
if ( sdlvideosink->yuv_overlay == NULL )
|
if ( sdlvideosink->yuv_overlay == NULL )
|
||||||
{
|
{
|
||||||
gst_element_gerror(GST_ELEMENT(sdlvideosink), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(sdlvideosink),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"SDL: Couldn't create SDL_yuv_overlay (%dx%d \'" GST_FOURCC_FORMAT "\'): %s",
|
||||||
g_strdup_printf("SDL: Couldn't create SDL_yuv_overlay (%dx%d \'" GST_FOURCC_FORMAT "\'): %s",
|
|
||||||
GST_VIDEOSINK_WIDTH (sdlvideosink), GST_VIDEOSINK_HEIGHT (sdlvideosink),
|
GST_VIDEOSINK_WIDTH (sdlvideosink), GST_VIDEOSINK_HEIGHT (sdlvideosink),
|
||||||
GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError()));
|
GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError());
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -488,9 +483,7 @@ gst_sdlvideosink_change_state (GstElement *element)
|
||||||
}
|
}
|
||||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0 )
|
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0 )
|
||||||
{
|
{
|
||||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
gst_element_error(element, "Couldn't initialize SDL: %s", SDL_GetError());
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("Couldn't initialize SDL: %s", SDL_GetError()));
|
|
||||||
return GST_STATE_FAILURE;
|
return GST_STATE_FAILURE;
|
||||||
}
|
}
|
||||||
GST_FLAG_SET (sdlvideosink, GST_SDLVIDEOSINK_OPEN);
|
GST_FLAG_SET (sdlvideosink, GST_SDLVIDEOSINK_OPEN);
|
||||||
|
|
|
@ -546,9 +546,7 @@ gst_sf_open_file (GstSF *this)
|
||||||
this->time = 0;
|
this->time = 0;
|
||||||
|
|
||||||
if (!this->filename) {
|
if (!this->filename) {
|
||||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (this), "sndfile: 'location' was not set");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("sndfile: 'location' was not set"));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,9 +572,8 @@ gst_sf_open_file (GstSF *this)
|
||||||
this->filename, info.samplerate, info.channels, info.format);
|
this->filename, info.samplerate, info.channels, info.format);
|
||||||
|
|
||||||
if (!sf_format_check (&info)) {
|
if (!sf_format_check (&info)) {
|
||||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (this),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
g_strdup_printf ("Input parameters (rate:%d, channels:%d, format:0x%x) invalid",
|
||||||
g_strdup_printf("Input parameters (rate:%d, channels:%d, format:0x%x) invalid",
|
|
||||||
info.samplerate, info.channels, info.format));
|
info.samplerate, info.channels, info.format));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -585,10 +582,9 @@ gst_sf_open_file (GstSF *this)
|
||||||
this->file = sf_open (this->filename, mode, &info);
|
this->file = sf_open (this->filename, mode, &info);
|
||||||
|
|
||||||
if (!this->file) {
|
if (!this->file) {
|
||||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (this),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
g_strdup_printf ("could not open file \"%s\": %s",
|
||||||
g_strdup_printf ("could not open file \"%s\": %s",
|
this->filename, sf_strerror (NULL)));
|
||||||
this->filename, sf_strerror (NULL)));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -625,10 +621,9 @@ gst_sf_close_file (GstSF *this)
|
||||||
INFO_OBJ (this, "Closing file %s", this->filename);
|
INFO_OBJ (this, "Closing file %s", this->filename);
|
||||||
|
|
||||||
if ((err = sf_close (this->file)))
|
if ((err = sf_close (this->file)))
|
||||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (this),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
g_strdup_printf ("sndfile: could not close file \"%s\": %s",
|
||||||
g_strdup_printf(g_strdup_printf ("sndfile: could not close file \"%s\": %s",
|
this->filename, sf_error_number (err)));
|
||||||
this->filename, sf_error_number (err))));
|
|
||||||
else
|
else
|
||||||
GST_FLAG_UNSET (this, GST_SF_OPEN);
|
GST_FLAG_UNSET (this, GST_SF_OPEN);
|
||||||
|
|
||||||
|
@ -647,9 +642,7 @@ gst_sf_loop (GstElement *element)
|
||||||
this = (GstSF*)element;
|
this = (GstSF*)element;
|
||||||
|
|
||||||
if (this->channels == NULL) {
|
if (this->channels == NULL) {
|
||||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
gst_element_error (element, "You must connect at least one pad to sndfile elements.");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("You must connect at least one pad to sndfile elements."));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -697,10 +690,9 @@ gst_sf_loop (GstElement *element)
|
||||||
gst_caps_set (caps, "rate", GST_PROPS_INT (this->rate), NULL);
|
gst_caps_set (caps, "rate", GST_PROPS_INT (this->rate), NULL);
|
||||||
gst_caps_set (caps, "buffer-frames", GST_PROPS_INT (this->buffer_frames), NULL);
|
gst_caps_set (caps, "buffer-frames", GST_PROPS_INT (this->buffer_frames), NULL);
|
||||||
if (!gst_pad_try_set_caps (GST_SF_CHANNEL (l)->pad, caps)) {
|
if (!gst_pad_try_set_caps (GST_SF_CHANNEL (l)->pad, caps)) {
|
||||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (this),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
g_strdup_printf ("Opened file with sample rate %d, but could not set caps",
|
||||||
g_strdup_printf("Opened file with sample rate %d, but could not set caps",
|
this->rate));
|
||||||
this->rate));
|
|
||||||
gst_sf_close_file (this);
|
gst_sf_close_file (this);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -755,9 +747,7 @@ gst_sf_loop (GstElement *element)
|
||||||
which then would set this->buffer_frames to a new value */
|
which then would set this->buffer_frames to a new value */
|
||||||
buffer_frames = this->buffer_frames;
|
buffer_frames = this->buffer_frames;
|
||||||
if (buffer_frames == 0) {
|
if (buffer_frames == 0) {
|
||||||
gst_element_gerror(element, "Caps were never set, GST_ERROR_UNKNOWN,
|
gst_element_error (element, "Caps were never set, bailing...");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf(bailing..."));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
buf = this->buffer;
|
buf = this->buffer;
|
||||||
|
@ -782,9 +772,7 @@ gst_sf_loop (GstElement *element)
|
||||||
if (num_to_write) {
|
if (num_to_write) {
|
||||||
written = sf_writef_float (this->file, buf, num_to_write);
|
written = sf_writef_float (this->file, buf, num_to_write);
|
||||||
if (written != num_to_write)
|
if (written != num_to_write)
|
||||||
gst_element_gerror(element, "Error writing file: %s", GST_ERROR_UNKNOWN,
|
gst_element_error (element, "Error writing file: %s", sf_strerror (this->file));
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf(sf_strerror (this->file)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this->time += num_to_write * (GST_SECOND / this->rate);
|
this->time += num_to_write * (GST_SECOND / this->rate);
|
||||||
|
|
|
@ -156,9 +156,7 @@ gst_tarkindec_chain (GstPad *pad, GstBuffer *buf)
|
||||||
tarkindec = GST_TARKINDEC (gst_pad_get_parent (pad));
|
tarkindec = GST_TARKINDEC (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
if (!tarkindec->setup) {
|
if (!tarkindec->setup) {
|
||||||
gst_element_gerror(GST_ELEMENT (tarkindec), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (tarkindec), "decoder not initialized (input is not audio?)");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("decoder not initialized (input is not audio?)"));
|
|
||||||
if (GST_IS_BUFFER (buf))
|
if (GST_IS_BUFFER (buf))
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
else
|
else
|
||||||
|
@ -227,9 +225,7 @@ gst_tarkindec_chain (GstPad *pad, GstBuffer *buf)
|
||||||
"framerate", GST_PROPS_FLOAT (0.) /* FIXME!!! */
|
"framerate", GST_PROPS_FLOAT (0.) /* FIXME!!! */
|
||||||
)) <= 0)
|
)) <= 0)
|
||||||
{
|
{
|
||||||
gst_element_gerror(GST_ELEMENT (tarkindec), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (tarkindec), "could not output format");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("could not output format"));
|
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,9 +266,7 @@ gst_tarkinenc_chain (GstPad *pad, GstBuffer *buf)
|
||||||
tarkinenc = GST_TARKINENC (gst_pad_get_parent (pad));
|
tarkinenc = GST_TARKINENC (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
if (!tarkinenc->setup) {
|
if (!tarkinenc->setup) {
|
||||||
gst_element_gerror(GST_ELEMENT (tarkinenc), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (tarkinenc), "encoder not initialized (input is not audio?)");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("encoder not initialized (input is not audio?)"));
|
|
||||||
if (GST_IS_BUFFER (buf))
|
if (GST_IS_BUFFER (buf))
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
else
|
else
|
||||||
|
|
|
@ -192,11 +192,10 @@ gst_xviddec_setup (GstXvidDec *xviddec)
|
||||||
|
|
||||||
if ((ret = xvid_decore(NULL, XVID_DEC_CREATE,
|
if ((ret = xvid_decore(NULL, XVID_DEC_CREATE,
|
||||||
&xdec, NULL)) != XVID_ERR_OK) {
|
&xdec, NULL)) != XVID_ERR_OK) {
|
||||||
gst_element_gerror(GST_ELEMENT(xviddec), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(xviddec),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Setting parameters %dx%d@%d failed: %s (%d)",
|
||||||
g_strdup_printf("Setting parameters %dx%d@%d failed: %s (%d)",
|
|
||||||
xviddec->width, xviddec->height, xviddec->csp,
|
xviddec->width, xviddec->height, xviddec->csp,
|
||||||
gst_xvid_error(ret), ret));
|
gst_xvid_error(ret), ret);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,9 +231,8 @@ gst_xviddec_chain (GstPad *pad,
|
||||||
|
|
||||||
if (!xviddec->handle) {
|
if (!xviddec->handle) {
|
||||||
if (!gst_xviddec_negotiate(xviddec)) {
|
if (!gst_xviddec_negotiate(xviddec)) {
|
||||||
gst_element_gerror(GST_ELEMENT(xviddec), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(xviddec),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"No format set - aborting");
|
||||||
g_strdup_printf("No format set - aborting"));
|
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -257,10 +255,9 @@ gst_xviddec_chain (GstPad *pad,
|
||||||
|
|
||||||
if ((ret = xvid_decore(xviddec->handle, XVID_DEC_DECODE,
|
if ((ret = xvid_decore(xviddec->handle, XVID_DEC_DECODE,
|
||||||
&xframe, NULL))) {
|
&xframe, NULL))) {
|
||||||
gst_element_gerror(GST_ELEMENT(xviddec), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(xviddec),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Error decoding xvid frame: %s (%d)\n",
|
||||||
g_strdup_printf("Error decoding xvid frame: %s (%d)\n",
|
gst_xvid_error(ret), ret);
|
||||||
gst_xvid_error(ret), ret));
|
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,10 +237,9 @@ gst_xvidenc_setup (GstXvidEnc *xvidenc)
|
||||||
|
|
||||||
if ((ret = xvid_encore(NULL, XVID_ENC_CREATE,
|
if ((ret = xvid_encore(NULL, XVID_ENC_CREATE,
|
||||||
&xenc, NULL)) != XVID_ERR_OK) {
|
&xenc, NULL)) != XVID_ERR_OK) {
|
||||||
gst_element_gerror(GST_ELEMENT(xvidenc), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(xvidenc),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Error setting up xvid encoder: %s (%d)",
|
||||||
g_strdup_printf("Error setting up xvid encoder: %s (%d)",
|
gst_xvid_error(ret), ret);
|
||||||
gst_xvid_error(ret), ret));
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,10 +285,9 @@ gst_xvidenc_chain (GstPad *pad,
|
||||||
|
|
||||||
if ((ret = xvid_encore(xvidenc->handle, XVID_ENC_ENCODE,
|
if ((ret = xvid_encore(xvidenc->handle, XVID_ENC_ENCODE,
|
||||||
&xframe, NULL)) != XVID_ERR_OK) {
|
&xframe, NULL)) != XVID_ERR_OK) {
|
||||||
gst_element_gerror(GST_ELEMENT(xvidenc), GST_ERROR_UNKNOWN,
|
gst_element_error(GST_ELEMENT(xvidenc),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"Error encoding xvid frame: %s (%d)",
|
||||||
g_strdup_printf("Error encoding xvid frame: %s (%d)",
|
gst_xvid_error(ret), ret);
|
||||||
gst_xvid_error(ret), ret));
|
|
||||||
gst_buffer_unref(buf);
|
gst_buffer_unref(buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -372,9 +372,8 @@ gst_chart_chain (GstPad *pad, GstBuffer *bufin)
|
||||||
"height", GST_PROPS_INT (chart->height),
|
"height", GST_PROPS_INT (chart->height),
|
||||||
"framerate", GST_PROPS_FLOAT (chart->framerate));
|
"framerate", GST_PROPS_FLOAT (chart->framerate));
|
||||||
if (gst_pad_try_set_caps (chart->srcpad, newcaps) <= 0) {
|
if (gst_pad_try_set_caps (chart->srcpad, newcaps) <= 0) {
|
||||||
gst_element_gerror(GST_ELEMENT (chart), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (chart),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"chart: could not negotiate format");
|
||||||
g_strdup ("chart: could not negotiate format"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -499,9 +499,7 @@ gst_flxdec_loop (GstElement *element)
|
||||||
if (flxh->type != FLX_MAGICHDR_FLI &&
|
if (flxh->type != FLX_MAGICHDR_FLI &&
|
||||||
flxh->type != FLX_MAGICHDR_FLC &&
|
flxh->type != FLX_MAGICHDR_FLC &&
|
||||||
flxh->type != FLX_MAGICHDR_FLX) {
|
flxh->type != FLX_MAGICHDR_FLX) {
|
||||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
gst_element_error (element, "not a flx file (type %d)\n", flxh->type);
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("not a flx file (type %d)\n", flxh->type));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -625,9 +625,7 @@ gst_modplug_loop (GstElement *element)
|
||||||
|
|
||||||
if (!GST_PAD_CAPS (modplug->srcpad) &&
|
if (!GST_PAD_CAPS (modplug->srcpad) &&
|
||||||
modplug_negotiate (modplug) <= 0) {
|
modplug_negotiate (modplug) <= 0) {
|
||||||
gst_element_gerror (GST_ELEMENT (modplug), GST_ERROR_CAPS_NEGOTIATION,
|
gst_element_error (GST_ELEMENT (modplug), "could not negotiate format");
|
||||||
g_strdup ("could not negotiate format"),
|
|
||||||
g_strdup ("could not negotiate format"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -198,9 +198,8 @@ mp1videoparse_parse_seq (Mp1VideoParse *mp1videoparse, GstBuffer *buf)
|
||||||
gst_caps_debug (caps, "New mpeg1videoparse caps");
|
gst_caps_debug (caps, "New mpeg1videoparse caps");
|
||||||
|
|
||||||
if (gst_pad_try_set_caps (mp1videoparse->srcpad, caps) <= 0) {
|
if (gst_pad_try_set_caps (mp1videoparse->srcpad, caps) <= 0) {
|
||||||
gst_element_gerror(GST_ELEMENT (mp1videoparse), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (mp1videoparse),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"mp1videoparse: failed to negotiate a new format");
|
||||||
g_strdup_printf ("mp1videoparse: failed to negotiate a new format"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -360,9 +360,8 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
|
||||||
"channels", GST_PROPS_INT (channels),
|
"channels", GST_PROPS_INT (channels),
|
||||||
"rate", GST_PROPS_INT (rate));
|
"rate", GST_PROPS_INT (rate));
|
||||||
if (gst_pad_try_set_caps(parse->srcpad, caps) <= 0) {
|
if (gst_pad_try_set_caps(parse->srcpad, caps) <= 0) {
|
||||||
gst_element_gerror(GST_ELEMENT (parse), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (parse),
|
||||||
g_strdup ("unconverted error, file a bug"),
|
"mp3parse: failed to negotiate format with next element");
|
||||||
g_strdup_printf ("mp3parse: failed to negotiate format with next element"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parse->channels = channels;
|
parse->channels = channels;
|
||||||
|
|
|
@ -315,9 +315,7 @@ gst_overlay_loop (GstElement *element)
|
||||||
"framerate",GST_PROPS_FLOAT (overlay->framerate)
|
"framerate",GST_PROPS_FLOAT (overlay->framerate)
|
||||||
)))
|
)))
|
||||||
{
|
{
|
||||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
gst_element_error (element, "cannot set caps");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("cannot set caps"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -364,9 +364,7 @@ gst_smpte_loop (GstElement *element)
|
||||||
"framerate", GST_PROPS_FLOAT (smpte->fps)
|
"framerate", GST_PROPS_FLOAT (smpte->fps)
|
||||||
)))
|
)))
|
||||||
{
|
{
|
||||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
gst_element_error (element, "cannot set caps");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("cannot set caps"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -280,9 +280,7 @@ speed_loop (GstElement *element)
|
||||||
#include "filter.func"
|
#include "filter.func"
|
||||||
#undef _FORMAT
|
#undef _FORMAT
|
||||||
} else {
|
} else {
|
||||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
gst_element_error (element, "capsnego was never performed, bailing...");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("capsnego was never performed, bailing..."));
|
|
||||||
gst_element_yield (element);
|
gst_element_yield (element);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -380,9 +380,7 @@ gst_video_crop_chain (GstPad *pad, GstBuffer *buffer)
|
||||||
"framerate", GST_PROPS_FLOAT (video_crop->fps)
|
"framerate", GST_PROPS_FLOAT (video_crop->fps)
|
||||||
)) <= 0)
|
)) <= 0)
|
||||||
{
|
{
|
||||||
gst_element_gerror(GST_ELEMENT (video_crop), GST_ERROR_UNKNOWN,
|
gst_element_error (GST_ELEMENT (video_crop), "could not negotiate pads");
|
||||||
g_strdup ("unconverted error, file a bug"),
|
|
||||||
g_strdup_printf("could not negotiate pads"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue