mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
UNITS -> DEFAULT
Original commit message from CVS: UNITS -> DEFAULT
This commit is contained in:
parent
26e26d1aa4
commit
9ba5e6cfe6
3 changed files with 5 additions and 15 deletions
|
@ -476,13 +476,11 @@ gst_siddec_src_convert (GstPad *pad, GstFormat src_format, gint64 src_value,
|
|||
switch (src_format) {
|
||||
case GST_FORMAT_BYTES:
|
||||
switch (*dest_format) {
|
||||
case GST_FORMAT_UNITS:
|
||||
case GST_FORMAT_DEFAULT:
|
||||
if (bytes_per_sample == 0)
|
||||
return FALSE;
|
||||
*dest_value = src_value / bytes_per_sample;
|
||||
break;
|
||||
case GST_FORMAT_DEFAULT:
|
||||
*dest_format = GST_FORMAT_TIME;
|
||||
case GST_FORMAT_TIME:
|
||||
{
|
||||
gint byterate = bytes_per_sample * siddec->config->frequency;
|
||||
|
@ -496,13 +494,11 @@ gst_siddec_src_convert (GstPad *pad, GstFormat src_format, gint64 src_value,
|
|||
res = FALSE;
|
||||
}
|
||||
break;
|
||||
case GST_FORMAT_UNITS:
|
||||
case GST_FORMAT_DEFAULT:
|
||||
switch (*dest_format) {
|
||||
case GST_FORMAT_BYTES:
|
||||
*dest_value = src_value * bytes_per_sample;
|
||||
break;
|
||||
case GST_FORMAT_DEFAULT:
|
||||
*dest_format = GST_FORMAT_TIME;
|
||||
case GST_FORMAT_TIME:
|
||||
if (siddec->config->frequency == 0)
|
||||
return FALSE;
|
||||
|
@ -514,12 +510,10 @@ gst_siddec_src_convert (GstPad *pad, GstFormat src_format, gint64 src_value,
|
|||
break;
|
||||
case GST_FORMAT_TIME:
|
||||
switch (*dest_format) {
|
||||
case GST_FORMAT_DEFAULT:
|
||||
*dest_format = GST_FORMAT_BYTES;
|
||||
case GST_FORMAT_BYTES:
|
||||
scale = bytes_per_sample;
|
||||
/* fallthrough */
|
||||
case GST_FORMAT_UNITS:
|
||||
case GST_FORMAT_DEFAULT:
|
||||
*dest_value = src_value * scale * siddec->config->frequency / GST_SECOND;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
gdouble
|
||||
gst_video_frame_rate (GstPad *pad)
|
||||
{
|
||||
GstFormat dest_format = GST_FORMAT_UNITS;
|
||||
GstFormat dest_format = GST_FORMAT_DEFAULT;
|
||||
gint64 dest_value = 0;
|
||||
gdouble fps;
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ gst_monkeydec_get_formats (GstPad *pad)
|
|||
{
|
||||
static const GstFormat src_formats[] = {
|
||||
/* GST_FORMAT_BYTES,
|
||||
GST_FORMAT_UNITS,*/
|
||||
GST_FORMAT_DEFAULT,*/
|
||||
GST_FORMAT_TIME,
|
||||
(GstFormat)0
|
||||
};
|
||||
|
@ -177,8 +177,6 @@ gst_monkeydec_src_query (GstPad *pad, GstQueryType type,
|
|||
switch (type) {
|
||||
case GST_QUERY_TOTAL:
|
||||
switch (*format) {
|
||||
case GST_FORMAT_DEFAULT:
|
||||
*format = GST_FORMAT_TIME;
|
||||
case GST_FORMAT_TIME:
|
||||
*value = monkeydec->decomp->GetInfo (APE_DECOMPRESS_LENGTH_MS) * 1000000LL;
|
||||
break;
|
||||
|
@ -189,8 +187,6 @@ gst_monkeydec_src_query (GstPad *pad, GstQueryType type,
|
|||
break;
|
||||
case GST_QUERY_POSITION:
|
||||
switch (*format) {
|
||||
case GST_FORMAT_DEFAULT:
|
||||
*format = GST_FORMAT_TIME;
|
||||
default:
|
||||
*value = monkeydec->decomp->GetInfo (APE_DECOMPRESS_CURRENT_MS) * 1000000LL;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue