Commit graph

65 commits

Author SHA1 Message Date
Wim Taymans
1980f16731 gst-libs/gst/audio/gstbaseaudiosink.c: Add some more info in a WARNING.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Add some more info in a WARNING.
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_create):
Handle PAUSE in create function, use new -core addition to
wait for playing. Fixes pausing and resuming capture from an
audiosrc.
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_commit),
(gst_ring_buffer_read):
Constify some more.
Caller supports interrupted reads now.
2006-09-27 13:52:14 +00:00
Wim Taymans
7367722509 Added docs for the audio libs.
Original commit message from CVS:
* docs/libs/gst-plugins-base-libs-docs.sgml:
* docs/libs/gst-plugins-base-libs-sections.txt:
* gst-libs/gst/audio/gstaudioclock.c:
* gst-libs/gst/audio/gstaudioclock.h:
* gst-libs/gst/audio/gstaudiosink.c:
* gst-libs/gst/audio/gstaudiosink.h:
* gst-libs/gst/audio/gstaudiosrc.c:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
* gst-libs/gst/audio/gstbaseaudiosink.h:
* gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_init):
* gst-libs/gst/audio/gstbaseaudiosrc.h:
* gst-libs/gst/audio/gstringbuffer.h:
Added docs for the audio libs.
2006-09-27 11:05:08 +00:00
Wim Taymans
65b1938b38 gst-libs/gst/audio/: Do the delay calculation in the source/sink base classes as this is specific for the capture/pla...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_time), (gst_base_audio_sink_callback):
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_get_time), (gst_base_audio_src_fixate),
(gst_base_audio_src_get_times), (gst_base_audio_src_get_offset),
(gst_base_audio_src_create), (gst_base_audio_src_change_state):
Do the delay calculation in the source/sink base classes as this is
specific for the capture/playback mode.
Try to fixate a bit better, like round depth up to a multiple of 8
bigger than width.
Handle underruns correctly by marking DISCONT on buffers and adjusting
timestamps to handle the gap.
Set offset/offset_end correctly on buffers.
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_pause),
(gst_ring_buffer_samples_done), (gst_ring_buffer_commit),
(gst_ring_buffer_read):
Remove resync and underrun recovery from the ringbuffer.
Fix ringbuffer read code on under/overrun.
2006-09-15 14:53:44 +00:00
Wim Taymans
557b367295 configure.ac: We require 0.10.10.1 now because of _wait_preroll().
Original commit message from CVS:
* configure.ac:
We require 0.10.10.1 now because of _wait_preroll().
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Use gst_base_sink_wait_preroll().
2006-09-15 09:13:50 +00:00
Wim Taymans
d5a10b05c2 gst-libs/gst/audio/gstbaseaudiosink.c: Don't try to align a sample to an unknown value.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Don't try to align a sample to an unknown value.
2006-07-24 16:47:10 +00:00
Wim Taymans
f3ae89426a gst-libs/gst/audio/gstbaseaudiosink.c: When the audio clock is slaved to another clock, never try to align samples bu...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_provide_clock), (gst_base_audio_sink_render):
When the audio clock is slaved to another clock, never try to align
samples but trust the rate interpolation algorithm.
2006-07-24 15:14:17 +00:00
Wim Taymans
fa5dacc998 gst-libs/gst/audio/gstbaseaudiosink.c: Use gobject_class instead of G_OBJECT_CLASS (klass)
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init),
(gst_base_audio_sink_provide_clock):
Use gobject_class instead of G_OBJECT_CLASS (klass)
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_class_init), (gst_base_audio_src_init),
(gst_base_audio_src_set_clock), (gst_base_audio_src_provide_clock),
(gst_base_audio_src_get_time),
(gst_base_audio_src_check_get_range), (gst_base_audio_src_create),
(gst_base_audio_src_create_ringbuffer):
Fix latency and buffer-time constants and properties ala basesink.
Implement pull based scheduling. Fixes #346527.
Set default blocksize in GstBaseSrc to 0, we default to pushing out
one segment.
Refuse slaving to another clock instead of silently not working.
Only provide a clock when we are actually able to do so.
Various small cleanups and compiler hints.
2006-07-06 15:54:50 +00:00
Jan Schmidt
45e06fe704 gst-libs/gst/audio/: Document better the fact that latency_time and buffer_time are values stored in microseconds, an...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init), (gst_base_audio_sink_setcaps):
* gst-libs/gst/audio/gstbaseaudiosink.h:
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_parse_caps),
(gst_ring_buffer_samples_done):
* gst-libs/gst/audio/gstringbuffer.h:
Document better the fact that latency_time and buffer_time are values
stored in microseconds, and not the usual GStreamer nanoseconds.
Change the variables (compatibly) that store them from GstClockTime
to guint64 to make it more clear that they're not storing clock times.
Also, remove the bogus property description that says the user can
specify -1 to get the default value, since that's never been the case.
When computing the default segment size for the ring buffer, make it
an integer number of samples.
When the sub-class indicates a delay greater than the number of
samples we've written return 0 from the audio sink get_time method.
2006-06-03 21:06:49 +00:00
Wim Taymans
102b79e46e gst-libs/gst/audio/gstbaseaudiosink.c: patch to make timestamp checking more tollerant to rounding errors given that ...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_drain), (gst_base_audio_sink_event),
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
patch to make timestamp checking more tollerant to rounding
errors given that real discontinuities are to be marked on
buffers. Fixes some asf files and #338778.
Also avoid some crashers when we receive an event in the
NULL state.
2006-04-28 15:08:09 +00:00
Wim Taymans
35058f78c1 gst-libs/gst/audio/gstbaseaudiosink.c: Starting the ringbuffer when we did not acquire it can cause a deadlock, is po...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_event):
Starting the ringbuffer when we did not acquire it can cause
a deadlock, is pointless and causes nasty things for
subclasses.
Fixes gst-launch audiotestsrc num-buffers=0 ! alsasink.
2006-04-10 17:05:46 +00:00
Wim Taymans
227474e464 gst-libs/gst/audio/gstbaseaudiosink.c: Implement new async_play vmethod to start slaving and allow playback start in ...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init), (gst_base_audio_sink_async_play),
(gst_base_audio_sink_do_play), (gst_base_audio_sink_change_state):
Implement new async_play vmethod to start slaving and allow
playback start in case of async PLAY state changes.
* gst-libs/gst/video/gstvideosink.c: (gst_video_sink_init):
Enable QoS with new method in base class.
2006-03-23 16:24:23 +00:00
Wim Taymans
747d560fb5 gst-libs/gst/audio/gstbaseaudiosink.c: Since we _parent the ringbuffer, we also need to _unparent instead of a plain ...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_dispose):
Since we _parent the ringbuffer, we also need to
_unparent instead of a plain _unref.
2006-03-22 12:33:09 +00:00
Wim Taymans
82fd38fbcf gst-libs/gst/audio/: Only start playback if we are playing. should fix #330748.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_change_state):
* gst-libs/gst/audio/gstringbuffer.c: (wait_segment),
(gst_ring_buffer_may_start):
* gst-libs/gst/audio/gstringbuffer.h:
Only start playback if we are playing.
should fix #330748.
2006-03-17 17:48:33 +00:00
Wim Taymans
77ff8c9fdb gst-libs/gst/audio/gstbaseaudiosink.c: Don't try to provide a clock in the NULL state.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_provide_clock):
Don't try to provide a clock in the NULL state.
2006-02-28 11:06:24 +00:00
Wim Taymans
454618e9b9 gst-libs/gst/audio/TODO: Update TODO
Original commit message from CVS:
* gst-libs/gst/audio/TODO:
Update TODO

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_offset):
When trying to play samples ASAP and we don't have a
previous sample, try to play at position 0 instead of
an invalid position.
2006-02-17 10:15:52 +00:00
Wim Taymans
16dbdc5c21 gst-libs/gst/audio/gstbaseaudiosink.c: Always sync on first sample we receive when starting.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_time), (gst_base_audio_sink_preroll),
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
Always sync on first sample we receive when starting.
2006-02-13 18:49:02 +00:00
Wim Taymans
0be7d56eb9 gst-libs/gst/audio/gstbaseaudiosink.c: Use scale functions when possible.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_time), (gst_base_audio_sink_setcaps),
(gst_base_audio_sink_drain), (gst_base_audio_sink_preroll),
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
Use scale functions when possible.
Fix error messages.
Free clockid when after waiting for EOS.
Use G_(UN_)LIKLY when it makes sense.
Fix sample clipping bug found by Arwed v. Merkatz fixes #330789.
2006-02-12 14:54:55 +00:00
Wim Taymans
260b5295c9 gst-libs/gst/audio/gstbaseaudiosink.c: Ugh.. getting late I guess...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_provide_clock):
Ugh.. getting late I guess...
2006-02-02 18:18:31 +00:00
Wim Taymans
c78a5d7e1e gst-libs/gst/audio/gstbaseaudiosink.c: Don't try to provide a clock when we are not negotiated since we might not be ...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_provide_clock),
(gst_base_audio_sink_set_property),
(gst_base_audio_sink_get_property), (gst_base_audio_sink_render):
Don't try to provide a clock when we are not negotiated since
we might not be able to make it run.
2006-02-02 18:13:26 +00:00
Wim Taymans
416c011f11 gst-libs/gst/audio/TODO: Updated.
Original commit message from CVS:
* gst-libs/gst/audio/TODO:
Updated.

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_drain), (gst_base_audio_sink_event):
On EOS, wait till the last sample is played before posting EOS.
2006-02-02 12:14:35 +00:00
Wim Taymans
a169abc679 gst-libs/gst/audio/gstaudiosink.c: Implement pause that does not wait for completion.
Original commit message from CVS:
* gst-libs/gst/audio/gstaudiosink.c:
(gst_audioringbuffer_class_init), (gst_audioringbuffer_release),
(gst_audioringbuffer_pause):
Implement pause that does not wait for completion.

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
Don't drop buffers when going to PAUSED but perform preroll on
remaining samples now that core base class supports this.

* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_release),
(gst_ring_buffer_pause_unlocked), (gst_ring_buffer_stop),
(gst_ring_buffer_commit):
Pause should not signal waiters.
Implement return value of _commit correctly.
2006-01-30 16:19:33 +00:00
Sébastien Moutte
dc46970cdf gst-libs/gst/audio/audio.h: (GST_CLOCK_TIME_TO_FRAMES)
Original commit message from CVS:
* gst-libs/gst/audio/audio.h: (GST_CLOCK_TIME_TO_FRAMES)
* gst-libs/gst/audio/gstbaseaudiosink.c: (gst_base_audio_sink_render)
use of gst_guint64_to_gdouble to be compliant with vs6
* gst/playback/gstdecodebin.c: (try_to_link_1)
* gst/videorate/videorate.c: (gst_video_rate_blank_data)
use of G_GINT64_CONSTANT for int64 constants
* win32/common/libgstinterfaces.def:
export some symbols (gst_mixer_get_type,gst_mixer_track_get_type)
* win32/vs6:
update and add new project files
2006-01-29 19:13:39 +00:00
Wim Taymans
ccd05fa086 gst-libs/gst/audio/gstbaseaudiosink.c: Undo previous commit, it breaks resume after pause.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
Undo previous commit, it breaks resume after pause.
2006-01-25 10:50:32 +00:00
Wim Taymans
2bc5ca1786 gst-libs/gst/audio/gstbaseaudiosink.c: Improve debugging.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_setcaps), (gst_base_audio_sink_event),
(gst_base_audio_sink_preroll), (gst_base_audio_sink_render):
Improve debugging.
Post error when caps cannot be parsed.
Resync on discontinuity in the stream.
Clip samples to segment boundaries.
return WRONG_STATE sooner when we are flushing.

* gst-libs/gst/audio/gstbaseaudiosrc.c: (gst_base_audio_src_init),
(gst_base_audio_src_get_time), (gst_base_audio_src_create):
Make audiosrc operate in TIME.
Set TIMESTAMP and DURATION on buffers.
2006-01-25 09:27:01 +00:00
Jan Schmidt
04333a568c gst-libs/gst/audio/gstbaseaudiosink.c: Fix playback of non-synchronised streams by assuming a rate of 1.0 instead of ...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Fix playback of non-synchronised streams by assuming a rate
of 1.0 instead of a random one.

Makes this work again:

gst-launch filesrc location=raw_audio.file ! 'audio/x-raw-int,
endianness=(int)4321, signed=(boolean)true, width=(int)16,
depth=(int)16, rate=(int)44100, channels=(int)2' ! audioconvert !
audioresample ! alsasink
2006-01-17 11:43:49 +00:00
Thomas Vander Stichele
01bc68f918 stop making fun of older compilers
Original commit message from CVS:
stop making fun of older compilers
2005-12-20 12:24:29 +00:00
Thomas Vander Stichele
b4b2b62a74 gst-libs/gst/audio/: update strings, values are in microseconds change the default sink buffer time to something that...
Original commit message from CVS:

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init):
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_class_init):
update strings, values are in microseconds
change the default sink buffer time to something that is smaller
(to help software volume mixing have a slightly lower delay) but
still be acceptable on Wim's laptop
2005-12-20 12:00:26 +00:00
Thomas Vander Stichele
5f83aa7dfa expand tabs
Original commit message from CVS:
expand tabs
2005-12-06 19:42:02 +00:00
Wim Taymans
3f05db1828 gst-libs/gst/audio/TODO: Updated TODO
Original commit message from CVS:
* gst-libs/gst/audio/TODO:
Updated TODO

* gst-libs/gst/audio/gstaudiosink.c:
(gst_audioringbuffer_open_device),
(gst_audioringbuffer_close_device), (gst_audioringbuffer_acquire),
(gst_audioringbuffer_release):
Small cleanups.

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init), (gst_base_audio_sink_render),
(gst_base_audio_sink_change_state):
Slave to the master clock when going to PLAYING and unslave when
going to PAUSED.

* gst-libs/gst/audio/gstringbuffer.c:
(gst_ring_buffer_open_device), (gst_ring_buffer_close_device),
(gst_ring_buffer_acquire), (gst_ring_buffer_release),
(gst_ring_buffer_samples_done), (gst_ring_buffer_set_sample),
(gst_ring_buffer_clear_all), (wait_segment),
(gst_ring_buffer_commit), (gst_ring_buffer_read),
(gst_ring_buffer_advance):
* gst-libs/gst/audio/gstringbuffer.h:
Add some docs and cleanups.
2005-11-28 15:53:55 +00:00
Wim Taymans
67b21a9033 gst-libs/gst/audio/gstbaseaudiosink.c: Fix for calibration API change.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init), (gst_base_audio_sink_set_clock),
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
Fix for calibration API change.
2005-11-23 13:08:54 +00:00
Wim Taymans
af2acb6eea gst-libs/gst/audio/gstbaseaudiosink.c: And we provide a clock by default, of course...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init), (gst_base_audio_sink_set_clock),
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
And we provide a clock by default, of course...
2005-11-22 18:54:56 +00:00
Wim Taymans
a3cb4d4937 gst-libs/gst/audio/gstaudioclock.c: This clock can be slaved to a master clock now.
Original commit message from CVS:
* gst-libs/gst/audio/gstaudioclock.c: (gst_audio_clock_init):
This clock can be slaved to a master clock now.

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init), (gst_base_audio_sink_init),
(gst_base_audio_sink_dispose), (gst_base_audio_sink_provide_clock),
(gst_base_audio_sink_set_clock),
(gst_base_audio_sink_set_property),
(gst_base_audio_sink_get_property), (gst_base_audio_sink_preroll),
(gst_base_audio_sink_render), (gst_base_audio_sink_change_state):
* gst-libs/gst/audio/gstbaseaudiosink.h:
Handle slaving the internal clock to the clock selected in the
pipeline.
Add property to make the basesink not provide a clock.

* gst-libs/gst/rtp/gstbasertpdepayload.c:
(gst_base_rtp_depayload_class_init), (gst_base_rtp_depayload_init),
(gst_base_rtp_depayload_wait):
* gst-libs/gst/rtp/gstbasertpdepayload.h:
We can use the clock in GstElement, no need to store it ourselves.
2005-11-22 18:32:09 +00:00
Wim Taymans
0f2336cff6 gst/: Segment update fix.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init), (gst_base_audio_sink_init),
(gst_base_audio_sink_provide_clock),
(gst_base_audio_sink_set_clock), (gst_base_audio_sink_render),
(gst_base_audio_sink_change_state):
* gst/audioresample/gstaudioresample.c:
Segment update fix.
2005-11-21 17:14:02 +00:00
Wim Taymans
99fb91493e gst-libs/gst/audio/gstbaseaudiosink.c: Set ringbuffer to non-flushing when going to PAUSED, set to flushing again whe...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_provide_clock),
(gst_base_audio_sink_change_state):
Set ringbuffer to non-flushing when going to PAUSED, set to
flushing again when going to READY.

* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_init),
(gst_ring_buffer_stop):
Start in flushing mode by default.
Don't set flushing in the _stop method, let the app call
this explicitly.
2005-11-16 16:48:35 +00:00
Wim Taymans
b886b99345 gst-libs/gst/audio/gstbaseaudiosink.c: No need to do a typecheck.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
No need to do a typecheck.
2005-11-08 11:41:52 +00:00
Wim Taymans
09ca2ec93b gst-libs/gst/audio/: Add flushing mode to the ringbuffer so that it in all cases does not try to handle more audio. T...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_event), (gst_base_audio_sink_get_offset),
(gst_base_audio_sink_render):
* gst-libs/gst/audio/gstringbuffer.c:
(gst_ring_buffer_open_device), (gst_ring_buffer_close_device),
(gst_ring_buffer_set_flushing), (gst_ring_buffer_start),
(gst_ring_buffer_pause_unlocked), (gst_ring_buffer_pause),
(gst_ring_buffer_stop), (wait_segment), (gst_ring_buffer_commit),
(gst_ring_buffer_read):
* gst-libs/gst/audio/gstringbuffer.h:
Add flushing mode to the ringbuffer so that it in all cases does
not try to handle more audio. This makes sure it does not try to
block anymore when flushing and fixes a livelock.
2005-10-31 10:30:41 +00:00
Wim Taymans
a878cbdfe1 gst-libs/gst/audio/gstbaseaudiosink.c: Remove g_print
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_offset), (gst_base_audio_sink_render):
Remove g_print
Use sync property from baseclass to disable sync.
2005-10-24 14:59:55 +00:00
Wim Taymans
cfadd55297 gst-libs/gst/audio/gstbaseaudiosink.c: Buffers with no timestamps get aligned with previous buffers or on underrun, p...
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_get_offset), (gst_base_audio_sink_render):
Buffers with no timestamps get aligned with previous buffers or
on underrun, played ASAP.
2005-10-24 14:52:22 +00:00
Wim Taymans
7879080357 ext/: Fix old naming.
Original commit message from CVS:
* ext/theora/theoradec.c: (theora_dec_src_query),
(theora_dec_sink_event):
* ext/vorbis/vorbisdec.c: (vorbis_dec_src_query),
(vorbis_dec_sink_event), (vorbis_handle_identification_packet),
(vorbis_handle_data_packet):
* ext/vorbis/vorbisdec.h:
Fix old naming.

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Don't try to sync on buffers without a timestamp.
2005-10-21 15:14:36 +00:00
Wim Taymans
5c17d94013 gst-libs/gst/audio/: Cleanups.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_create):
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_commit),
(gst_ring_buffer_read):
Cleanups.
Commit and read from ringbuffer in samples rather than bytes.
2005-10-11 18:32:01 +00:00
Wim Taymans
0c71c6348f gst-libs/gst/audio/gstbaseaudiosink.c: Respect segment rate and accum when scheduling samples.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Respect segment rate and accum when scheduling samples.
2005-10-11 17:31:48 +00:00
Wim Taymans
bd80afd2d1 gst-libs/gst/audio/gstbaseaudiosink.c: If we receive EOS we can start playback of what we had.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_event), (gst_base_audio_sink_render):
If we receive EOS we can start playback of what we had.
2005-10-08 11:47:52 +00:00
Wim Taymans
79be8760f0 gst-libs/gst/audio/: get_clock -> provide_clock
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init),
(gst_base_audio_sink_provide_clock), (gst_base_audio_sink_render):
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_class_init),
(gst_base_audio_src_provide_clock):
get_clock -> provide_clock
2005-09-28 13:41:29 +00:00
Wim Taymans
b17856db22 Fix sync again. Moved sample alignment to basesink.
Original commit message from CVS:
* ext/alsa/gstalsasink.c: (gst_alsasink_reset):
* gst-libs/gst/audio/gstaudiosink.c:
(gst_audioringbuffer_class_init), (audioringbuffer_thread_func),
(gst_audioringbuffer_stop):
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_event), (gst_base_audio_sink_render),
(gst_base_audio_sink_change_state):
* gst-libs/gst/audio/gstbaseaudiosink.h:
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_stop),
(gst_ring_buffer_set_sample), (gst_ring_buffer_clear_all),
(gst_ring_buffer_commit), (gst_ring_buffer_read):
* gst-libs/gst/audio/gstringbuffer.h:
Fix sync again. Moved sample alignment to basesink.
2005-09-24 13:06:03 +00:00
Stefan Kost
1aa698fefa gst/: fixing lost sync, some more debugging
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
* gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_commit):
* gst/volume/gstvolume.c: (gst_volume_class_init),
(volume_transform):
fixing lost sync, some more debugging
2005-09-08 22:42:11 +00:00
Andy Wingo
6665c3084c All plugins updated for element state changes.
Original commit message from CVS:
2005-09-02  Andy Wingo  <wingo@pobox.com>

* All plugins updated for element state changes.
2005-09-02 15:43:18 +00:00
Wim Taymans
44cc3421a0 gst-libs/gst/audio/gstbaseaudiosink.c: Resync if the buffer timestamps drift more than a 10th of a second.
Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_render):
Resync if the buffer timestamps drift more than a 10th
of a second.
2005-08-31 10:57:35 +00:00
Andy Wingo
c32721723b Updates for two-arg init from GST_BOILERPLATE_FULL.
Original commit message from CVS:
2005-08-28  Andy Wingo  <wingo@pobox.com>

* Updates for two-arg init from GST_BOILERPLATE_FULL.
2005-08-28 17:52:45 +00:00
Wim Taymans
7824216cef ext/ogg/gstoggdemux.c: Parse seeking events better.
Original commit message from CVS:
* ext/ogg/gstoggdemux.c: (gst_ogg_pad_src_query),
(gst_ogg_pad_event), (gst_ogg_demux_factory_filter),
(gst_ogg_pad_submit_packet), (gst_ogg_chain_new),
(gst_ogg_demux_init), (gst_ogg_demux_perform_seek),
(gst_ogg_demux_collect_chain_info), (gst_ogg_demux_collect_info),
(gst_ogg_demux_chain), (gst_ogg_demux_loop), (gst_ogg_print):
Parse seeking events better.
Unref static caps.
Generate correct newsegment events, fixes seeking in live oggs.

* ext/theora/theoradec.c: (theora_dec_src_query),
(theora_dec_src_event), (theora_dec_src_getcaps),
(theora_dec_sink_event), (theora_dec_push), (theora_dec_chain):
Use newsegment values to report correct play time.

* ext/vorbis/vorbisdec.c: (vorbis_dec_src_query),
(vorbis_dec_src_event), (vorbis_dec_sink_event):
* ext/vorbis/vorbisdec.h:
Parse and use newsegment values to report correct play time.

* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_event), (gst_base_audio_sink_render):
Clear ringbuffer on flush.
Use newsegment values to calculate playback time.

* sys/ximage/ximagesink.c: (gst_ximagesink_get_times):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_times):
Basesink does newsegment calculations for us now.
2005-08-24 18:04:45 +00:00
Andy Wingo
69d36f02ce gst-libs/gst/audio/gstbaseaudiosink.c
Original commit message from CVS:
2005-08-08  Andy Wingo  <wingo@pobox.com>

* gst-libs/gst/audio/gstbaseaudiosink.c
(gst_base_audio_sink_change_state): Open the device in NULL->READY
like good elements should. Close on READY->NULL too.

* gst-libs/gst/audio/gstaudiosink.c
(gst_audioringbuffer_open_device,
(gst_audioringbuffer_close_device, gst_audioringbuffer_acquire)
(gst_audioringbuffer_release): Updates for new ring buffer API,
hook into the new audio sink api.

* gst-libs/gst/audio/gstaudiosink.h (GstAudioSinkClass.open)
(GstAudioSinkClass.close): Just open and close the device -- no
resource allocation or configuration.
(GstAudioSinkClass.prepare, GstAudioSinkClass.unprepare): New
vmethods, handle device setup and resource allocation.

* ext/alsa/gstalsasink.c (gst_alsasink_open, gst_alsasink_close)
(gst_alsasink_prepare, gst_alsasink_unprepare): Update for new
base class API.

* gst-libs/gst/audio/gstringbuffer.h
(GstRingBufferClass.open_device, GstRingBufferClass.close_device):
New vmethods.

* gst-libs/gst/audio/gstringbuffer.c (gst_ring_buffer_open_device)
(gst_ring_buffer_close_device, gst_ring_buffer_device_is_open):
New API functions. The device should be opened before acquiring
and closed after releasing.
2005-08-08 16:42:10 +00:00