mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
revert part of a patch that broke BE machines
Original commit message from CVS: revert part of a patch that broke BE machines
This commit is contained in:
parent
69e113d4e5
commit
599c0b188a
1 changed files with 12 additions and 7 deletions
|
@ -462,24 +462,29 @@ gst_osssink_chain (GstPad *pad, GstBuffer *buf)
|
||||||
if (!osssink->mute) {
|
if (!osssink->mute) {
|
||||||
guchar *data = GST_BUFFER_DATA (buf);
|
guchar *data = GST_BUFFER_DATA (buf);
|
||||||
gint size = GST_BUFFER_SIZE (buf);
|
gint size = GST_BUFFER_SIZE (buf);
|
||||||
gint frag = osssink->fragment;
|
/* gint frag = osssink->fragment; <-- unused, for reason see above */
|
||||||
|
|
||||||
if (osssink->clock) {
|
if (osssink->clock) {
|
||||||
/* FIXME, NEW_MEDIA/DISCONT?. Try to get our start point */
|
/* FIXME, NEW_MEDIA/DISCONT?. Try to get our start point */
|
||||||
if (osssink->offset == -1LL && buftime != -1LL) {
|
if (osssink->offset == -1LL && buftime != -1LL) {
|
||||||
//g_print ("%lld %lld %lld\n", osssink->offset, buftime, gst_clock_get_time (osssink->clock));
|
/* g_print ("%lld %lld %lld\n", osssink->offset, buftime, gst_clock_get_time (osssink->clock)); */
|
||||||
osssink->offset = buftime;
|
osssink->offset = buftime;
|
||||||
osssink->handled = 0;
|
osssink->handled = 0;
|
||||||
gst_element_clock_wait (GST_ELEMENT (osssink), osssink->clock, buftime);
|
gst_element_clock_wait (GST_ELEMENT (osssink), osssink->clock, buftime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* FIXME: reverted wtay's patch.
|
||||||
|
The way that's commented out isn't working on BE machines.
|
||||||
|
I guess it should be sample accurate and not capped inbetween.
|
||||||
while (size) {
|
while (size) {
|
||||||
gint tosend = MIN (size, frag);
|
gint tosend = MIN (size, frag);
|
||||||
write (osssink->fd, data, tosend);
|
write (osssink->fd, data, tosend);
|
||||||
data += frag;
|
data += tosend;
|
||||||
size -= frag;
|
size -= tosend;
|
||||||
osssink->handled += tosend;
|
osssink->handled += tosend;
|
||||||
}
|
} */
|
||||||
|
write (osssink->fd, data, size);
|
||||||
}
|
}
|
||||||
/* no clock, try to be as fast as possible */
|
/* no clock, try to be as fast as possible */
|
||||||
else {
|
else {
|
||||||
|
@ -687,7 +692,7 @@ gst_osssink_change_state (GstElement *element)
|
||||||
osssink->offset = -1LL;
|
osssink->offset = -1LL;
|
||||||
break;
|
break;
|
||||||
case GST_STATE_PAUSED_TO_PLAYING:
|
case GST_STATE_PAUSED_TO_PLAYING:
|
||||||
//gst_clock_adjust (osssink->clock, osssink->offset - gst_clock_get_time (osssink->clock));
|
/* gst_clock_adjust (osssink->clock, osssink->offset - gst_clock_get_time (osssink->clock)); */
|
||||||
break;
|
break;
|
||||||
case GST_STATE_PLAYING_TO_PAUSED:
|
case GST_STATE_PLAYING_TO_PAUSED:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue