Remove media specific seeking type in favour of unit. xvimage compile fix.

Original commit message from CVS:
Remove media specific seeking type in favour of unit.
xvimage compile fix.
This commit is contained in:
Wim Taymans 2002-06-02 11:57:13 +00:00
parent c717ac899e
commit 8b094e02a9
2 changed files with 8 additions and 20 deletions

View file

@ -755,15 +755,10 @@ gst_avi_demux_handle_src_query (GstPad *pad, GstPadQueryType type,
else
res = FALSE;
break;
case GST_FORMAT_SAMPLES:
case GST_FORMAT_UNIT:
if (stream->strh.type == GST_RIFF_FCC_auds)
*value = stream->strh.length * stream->strh.samplesize;
else
res = FALSE;
break;
case GST_FORMAT_FRAMES:
case GST_FORMAT_FIELDS:
if (stream->strh.type == GST_RIFF_FCC_vids)
else if (stream->strh.type == GST_RIFF_FCC_vids)
*value = stream->strh.length;
else
res = FALSE;
@ -787,15 +782,10 @@ gst_avi_demux_handle_src_query (GstPad *pad, GstPadQueryType type,
case GST_FORMAT_BYTES:
*value = stream->current_byte;
break;
case GST_FORMAT_SAMPLES:
case GST_FORMAT_UNIT:
if (stream->strh.type == GST_RIFF_FCC_auds)
*value = stream->current_byte * stream->strh.samplesize;
else
res = FALSE;
break;
case GST_FORMAT_FRAMES:
case GST_FORMAT_FIELDS:
if (stream->strh.type == GST_RIFF_FCC_vids)
else if (stream->strh.type == GST_RIFF_FCC_vids)
*value = stream->current_frame;
else
res = FALSE;
@ -890,9 +880,7 @@ gst_avi_demux_handle_src_event (GstPad *pad, GstEvent *event)
case GST_EVENT_SEEK:
switch (GST_EVENT_SEEK_FORMAT (event)) {
case GST_FORMAT_BYTES:
case GST_FORMAT_SAMPLES:
case GST_FORMAT_FRAMES:
case GST_FORMAT_FIELDS:
case GST_FORMAT_UNIT:
break;
case GST_FORMAT_TIME:
{

View file

@ -595,7 +595,7 @@ gst_osssink_convert (GstPad *pad, GstFormat src_format, gint64 src_value,
case GST_FORMAT_TIME:
*dest_value = src_value * GST_SECOND / osssink->bps;
break;
case GST_FORMAT_SAMPLES:
case GST_FORMAT_UNIT:
*dest_value = src_value / (osssink->channels * osssink->width);
break;
default:
@ -609,14 +609,14 @@ gst_osssink_convert (GstPad *pad, GstFormat src_format, gint64 src_value,
case GST_FORMAT_BYTES:
*dest_value = src_value * osssink->bps / GST_SECOND;
break;
case GST_FORMAT_SAMPLES:
case GST_FORMAT_UNIT:
*dest_value = osssink->frequency;
break;
default:
res = FALSE;
}
break;
case GST_FORMAT_SAMPLES:
case GST_FORMAT_UNIT:
switch (*dest_format) {
case GST_FORMAT_DEFAULT:
*dest_format = GST_FORMAT_TIME;