FreeBSD Bugzilla – Attachment 136434 Details for
Bug 181655
[patch] multimedia/gstreamer1-plugins-good: add more sample formats to oss plugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
oss_formats.diff
oss_formats.diff (text/plain), 6.23 KB, created by
Jan Beich
on 2013-08-29 17:50:00 UTC
(
hide
)
Description:
oss_formats.diff
Filename:
MIME Type:
Creator:
Jan Beich
Created:
2013-08-29 17:50:00 UTC
Size:
6.23 KB
patch
obsolete
>--- sys/oss/gstosshelper.c~ >+++ sys/oss/gstosshelper.c >@@ -95,9 +95,13 @@ gst_oss_helper_probe_caps (gint fd) > format_mask = AFMT_U8 | AFMT_S8; > > if (G_BYTE_ORDER == G_LITTLE_ENDIAN) >- format_mask |= AFMT_S16_LE | AFMT_U16_LE; >+ format_mask |= AFMT_S16_LE | AFMT_U16_LE >+ | AFMT_S24_LE | AFMT_U24_LE >+ | AFMT_S32_LE | AFMT_U32_LE; > else >- format_mask |= AFMT_S16_BE | AFMT_U16_BE; >+ format_mask |= AFMT_S16_BE | AFMT_U16_BE >+ | AFMT_S24_BE | AFMT_U24_BE >+ | AFMT_S32_BE | AFMT_U32_BE; > > caps = gst_caps_new_empty (); > >@@ -169,6 +173,9 @@ gst_oss_helper_get_format_structure (uns > const gchar *format; > > switch (format_bit) { >+ case AFMT_S8: >+ format = "S8"; >+ break; > case AFMT_U8: > format = "U8"; > break; >@@ -178,15 +185,36 @@ gst_oss_helper_get_format_structure (uns > case AFMT_S16_BE: > format = "S16BE"; > break; >- case AFMT_S8: >- format = "S8"; >- break; > case AFMT_U16_LE: > format = "U16LE"; > break; > case AFMT_U16_BE: > format = "U16BE"; > break; >+ case AFMT_S24_LE: >+ format = "S24LE"; >+ break; >+ case AFMT_S24_BE: >+ format = "S24BE"; >+ break; >+ case AFMT_U24_LE: >+ format = "U24LE"; >+ break; >+ case AFMT_U24_BE: >+ format = "U24BE"; >+ break; >+ case AFMT_S32_LE: >+ format = "S32LE"; >+ break; >+ case AFMT_S32_BE: >+ format = "S32BE"; >+ break; >+ case AFMT_U32_LE: >+ format = "U32LE"; >+ break; >+ case AFMT_U32_BE: >+ format = "U32BE"; >+ break; > default: > g_assert_not_reached (); > return NULL; >--- sys/oss/gstosssink.c~ >+++ sys/oss/gstosssink.c >@@ -106,7 +106,10 @@ enum > PROP_DEVICE, > }; > >-#define FORMATS "{" GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)", S8, U8 }" >+#define FORMATS "{" GST_AUDIO_NE(S32)","GST_AUDIO_NE(U32)"," \ >+ GST_AUDIO_NE(S24)","GST_AUDIO_NE(U24)"," \ >+ GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)"," \ >+ "S8, U8 }" > > static GstStaticPadTemplate osssink_sink_factory = > GST_STATIC_PAD_TEMPLATE ("sink", >@@ -321,6 +324,9 @@ gst_oss_sink_get_format (GstAudioRingBuf > case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW: > { > switch (rfmt) { >+ case GST_AUDIO_FORMAT_S8: >+ result = AFMT_S8; >+ break; > case GST_AUDIO_FORMAT_U8: > result = AFMT_U8; > break; >@@ -330,15 +336,36 @@ gst_oss_sink_get_format (GstAudioRingBuf > case GST_AUDIO_FORMAT_S16BE: > result = AFMT_S16_BE; > break; >- case GST_AUDIO_FORMAT_S8: >- result = AFMT_S8; >- break; > case GST_AUDIO_FORMAT_U16LE: > result = AFMT_U16_LE; > break; > case GST_AUDIO_FORMAT_U16BE: > result = AFMT_U16_BE; > break; >+ case GST_AUDIO_FORMAT_S24LE: >+ result = AFMT_S24_LE; >+ break; >+ case GST_AUDIO_FORMAT_S24BE: >+ result = AFMT_S24_BE; >+ break; >+ case GST_AUDIO_FORMAT_U24LE: >+ result = AFMT_U24_LE; >+ break; >+ case GST_AUDIO_FORMAT_U24BE: >+ result = AFMT_U24_BE; >+ break; >+ case GST_AUDIO_FORMAT_S32LE: >+ result = AFMT_S32_LE; >+ break; >+ case GST_AUDIO_FORMAT_S32BE: >+ result = AFMT_S32_BE; >+ break; >+ case GST_AUDIO_FORMAT_U32LE: >+ result = AFMT_U32_LE; >+ break; >+ case GST_AUDIO_FORMAT_U32BE: >+ result = AFMT_U32_BE; >+ break; > default: > result = 0; > break; >@@ -441,7 +468,7 @@ gst_oss_sink_prepare (GstAudioSink * asi > rate = GST_AUDIO_INFO_RATE (&spec->info); > channels = GST_AUDIO_INFO_CHANNELS (&spec->info); > >- if (width != 16 && width != 8) >+ if (width != 32 && width != 24 && width != 16 && width != 8) > goto dodgy_width; > > SET_PARAM (oss, SNDCTL_DSP_SETFMT, tmp, "SETFMT"); >--- sys/oss/gstosssrc.c~ >+++ sys/oss/gstosssrc.c >@@ -100,7 +100,10 @@ static guint gst_oss_src_read (GstAudioS > static guint gst_oss_src_delay (GstAudioSrc * asrc); > static void gst_oss_src_reset (GstAudioSrc * asrc); > >-#define FORMATS "{" GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)", S8, U8 }" >+#define FORMATS "{" GST_AUDIO_NE(S32)","GST_AUDIO_NE(U32)"," \ >+ GST_AUDIO_NE(S24)","GST_AUDIO_NE(U24)"," \ >+ GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)"," \ >+ "S8, U8 }" > > static GstStaticPadTemplate osssrc_src_factory = GST_STATIC_PAD_TEMPLATE ("src", > GST_PAD_SRC, >@@ -314,6 +317,9 @@ gst_oss_src_get_format (GstAudioRingBuff > case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW: > { > switch (rfmt) { >+ case GST_AUDIO_FORMAT_S8: >+ result = AFMT_S8; >+ break; > case GST_AUDIO_FORMAT_U8: > result = AFMT_U8; > break; >@@ -323,15 +329,36 @@ gst_oss_src_get_format (GstAudioRingBuff > case GST_AUDIO_FORMAT_S16BE: > result = AFMT_S16_BE; > break; >- case GST_AUDIO_FORMAT_S8: >- result = AFMT_S8; >- break; > case GST_AUDIO_FORMAT_U16LE: > result = AFMT_U16_LE; > break; > case GST_AUDIO_FORMAT_U16BE: > result = AFMT_U16_BE; > break; >+ case GST_AUDIO_FORMAT_S24LE: >+ result = AFMT_S24_LE; >+ break; >+ case GST_AUDIO_FORMAT_S24BE: >+ result = AFMT_S24_BE; >+ break; >+ case GST_AUDIO_FORMAT_U24LE: >+ result = AFMT_U24_LE; >+ break; >+ case GST_AUDIO_FORMAT_U24BE: >+ result = AFMT_U24_BE; >+ break; >+ case GST_AUDIO_FORMAT_S32LE: >+ result = AFMT_S32_LE; >+ break; >+ case GST_AUDIO_FORMAT_S32BE: >+ result = AFMT_S32_BE; >+ break; >+ case GST_AUDIO_FORMAT_U32LE: >+ result = AFMT_U32_LE; >+ break; >+ case GST_AUDIO_FORMAT_U32BE: >+ result = AFMT_U32_BE; >+ break; > default: > result = 0; > break; >@@ -428,7 +455,7 @@ gst_oss_src_prepare (GstAudioSrc * asrc, > rate = GST_AUDIO_INFO_RATE (&spec->info); > channels = GST_AUDIO_INFO_CHANNELS (&spec->info); > >- if (width != 16 && width != 8) >+ if (width != 32 && width != 24 && width != 16 && width != 8) > goto dodgy_width; > > tmp = ilog2 (spec->segsize);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 181655
: 136434