LinuxTV

CVS log for libsoftmpeg/src/audio.c

[BACK] Up to [DVB] / libsoftmpeg / src

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.33: download - view: text, markup, annotated - select for diffs
Mon Jul 12 16:48:04 2004 UTC (19 years, 11 months ago) by hunold
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +0 -19 lines
- remove individual xxx_handle_ts_packet() functions for audio and video
- handle ts packet filtering in softmpeg.c, do some sanity checks against payload_len
=> enhances stability on very broken reception

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Mar 23 15:32:30 2004 UTC (20 years, 2 months ago) by hunold
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +1 -1 lines
- increase audio buffer slightly again

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Mar 23 15:23:00 2004 UTC (20 years, 2 months ago) by hunold
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -4 lines
- adjust watermarks slighty
- try to restart audio playback if it ended unexpectedly (possibly buffer underrun)

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Mar 23 11:20:50 2004 UTC (20 years, 2 months ago) by hunold
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +28 -24 lines
- include SOFTMPEG_DEBUG_AVSYNC if build with "--enable-debug"
- make some debug messages more verbose
- simplify / fix calculation of additional wait cycles to compensate non-50Hz timings
- adjust high watermark down to 50% (66% before)
- simplify handling in audio_playout

Revision 1.29: download - view: text, markup, annotated - select for diffs
Wed Mar 17 14:23:06 2004 UTC (20 years, 2 months ago) by hunold
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +76 -160 lines
- rip out all fusionsound stuff from main audio.c, put it to a_fusionsound.c, put a lean api around it
- check for availble audio ouput "devices" in audio.c, support fusionsound, follow changes in audio.c
- add copyright headers to all of the new files
- make all functions static in v_directfb.c

Revision 1.28: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:18:58 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
- replace ..._pause() function with a more generic softmpeg_decoder_set_mode() function
- follow these changes in demo application

Revision 1.27: download - view: text, markup, annotated - select for diffs
Thu Mar 11 13:40:15 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +35 -6 lines
- added a simple pause function. basically works, but won't work this way with rewind/fast forward

Revision 1.26: download - view: text, markup, annotated - select for diffs
Wed Mar 10 19:58:33 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -2 lines
- make sure to set the fd to O_NONBLOCK, so that the feed thread doesn't block in read()
- add softmpeg_decoder_hard_resync(), call that if audio.c detects pts skew and other weird stuff where a resync is necessary
- extend softmpeg_decoder_set_pids() so you can specify an fd. the polling thread will use this new fd afterwards. useful for switching between live-tv and recordings
- fixed some debug messages in audio.c

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Mar 9 11:28:39 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +24 -4 lines
- implement audio_set_volume() for easier and safer muting/unmuting
- add structure init to video_create()/audio_create()
- move inital_sync handling to function

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Mar 4 11:22:40 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +2 -2 lines
- add directfb and fusionsound to the "required" list of the package config file
- small debug message fix in audio.c
- explicitely call softmpeg_decoder_stop() in softmpeg_decoder_set_pids(),
otherwise the decoder core gets messed up seriously due to changed pids et. al.
- call DirectFBInit() if we are called before any other programs has
initialized DirectFB, so that we can give out a proper error message

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Mar 2 13:47:26 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +12 -6 lines
- shuffle around some debug messages:
  - replace AUDIO_PES with AUDIO_DEBUG and VIDEO_PES with VIDEO_DEBUG
    to make debugging a/v desyncing easier
  - add debug messages that the pts of every video frame and the pts
    of every audio chunk
  - disable VIDEO_PES and AUDIO_PES messages by default, the produce too
    much noise when debugging
- if the audio buffer has not enough data, make sure that we insert enough
  silence, make sure that our ->len information is accurate, otherwise
  audio underflow occurs when enough data is lost

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Feb 26 17:09:19 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +4 -2 lines
- enable audio when audio prebuffering has finished, this makes audio-only channels/radio work again
- because of this, audio will be played a few 100ms before the corresponding pictures is visible
(before, audio and video were unmuted/made visible exactly at the same time). this has probably to
be discussed
----------------------------------------------------------------------

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sat Feb 21 16:01:22 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +6 -12 lines
- fix calculation of delay when high watermark is reached
- remove some dead code
- don't sleep inside the handler, but return appropriate delay in ms to the caller

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sat Feb 21 14:54:43 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +1 -1 lines
- fix type: 41000 => 44100

Revision 1.19: download - view: text, markup, annotated - select for diffs
Thu Feb 19 00:26:36 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +11 -13 lines
- make the various softmpeg_decoder_process_...() functions use an unsigned char to ease byte stream parsing
- fix calculation of delay in ms, when audio data is feeded too fast
- don't abort when an audio delay is necessary, but return the delay insead (tststs...)
- make softmpeg_decoder_process_pes_data() aware that multiple pes packets can be send, don't rely that each chunk only contains one video or one audio pes packet -- this basically fixes reccoding playback in vdr

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Feb 18 22:20:50 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -2 lines
- accidently turned on audio debugging again
- remove some debugging stuff
- make sure to query the playback interface only when it's available

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Feb 18 22:15:49 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +22 -18 lines
- add mutex to protect the FusionSound stream, needed because the
  stream may be changed anytime when the sample rate changes
- don't exit(-1) when audio decoding fails (usefull for vdr...)
- add a avsync_thread for long term av sync, currently it only fetches
  some informations and prints it out
- don't let the feed thread catch any signals

Revision 1.16: download - view: text, markup, annotated - select for diffs
Tue Feb 17 12:02:16 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +48 -5 lines
- disable SOFMPEG_AUDIO_DEBUG by default again
- enhance the audio experience while zapping: mute the FusionSound stream before zapping, unmute it when a/v sync is achieved
- enhance the video experience while zapping: blank the video before zapping
- lock access to the audio setting with video mutex
- add a couple of sanity checks to check_and_write_audio_pes() to make the code more robust
- check for multiple creation of the feed thread, wait for init using sched_yield()
- upon softmpec_decoder_stop(), set alls pids to 0x1fff, so nothing is decoded anymore
- fix debug output if VIDEO_AVSYNC() is used

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Feb 16 17:11:16 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +81 -46 lines
- enable SOFTMPEG_DEBUG_AUDIO by default
- change AUDIO_BUFFER_XXX_MARK to percent values
- add audio_reconfigure()
- call audio_reconfigure() for sample rate and mono/stereo changes
- clear buffer len of finished audio buffers accordingly
- fix number of bytes written to FusionSound for mono/stereo

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Feb 13 19:01:06 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +14 -15 lines
- don't erase the buffer ptr when resetting the audio decoder
- remove some dead code
- make ERRORs about decoding failures only WARNings
- keep the video threads from catching any signals

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Feb 13 18:19:53 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +1 -1 lines
- disable MPEG_PES_TO_FRAME debugging by default
- skip pes headers for all pes packets, not only for the ones conatining a pts
- add new VIDEO_PES_TO_FRAME_DEBUG, use VIDEO_PES() for debugging messages
- add define MAX_VIDEO_MPEG_FRAME_SIZE, currently 128kB (hints are welcome)
- actually implement video_handle_pes_data()

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Feb 13 14:32:53 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +150 -68 lines
- make is_pes_packet_start() return the stream identifier in case it is a pes packet start
- make raw audio pes buffer use malloc() instead of a static array
- add audio_decoder_destroy(), use it in softmpeg core
- change all AUDIO_PES_TO_FRAME_DEBUG message to use new AUDIO_PES()
- move sync logic from audio_handle_pes_data() to separate function
- fix pes deconding for raw pes frames (like vdr spits out)

Revision 1.11: download - view: text, markup, annotated - select for diffs
Fri Feb 13 13:29:42 2004 UTC (20 years, 3 months ago) by hunold
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +20 -15 lines
- remove some obsolete debug messages from demo application
- add c++ foo to external softmpeg header file
- split packet handling into ts handling and pes packet handling for both audio and video (pes handling isn't working yet)
- remove some commonly used pes header parsing stuff to internal.h

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Feb 13 10:56:03 2004 UTC (20 years, 4 months ago) by hunold
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -4 lines
- forgot to change 2 fprintf()s in audio.c
- add VIDEO_DEBUG(), VIDEO_AVSYNC() and VIDEO_PES_TO_FRAME_DEBUG() and change all usages of unconditional fprintf()s
- use softmpeg_get_millis() instead of dfb_get_millis()
- remove obsolete comments
- remove bogus double creation of DirectFB master interface
- emit a SOFTMPEG_WARN() upon usage of non-tested video output configuration
- remove obsolte stc display in display_thread()

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Feb 13 10:17:58 2004 UTC (20 years, 4 months ago) by hunold
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +1 -1 lines
DOKs last changes:
- fix return code handling for feed thread
- use softmpeg_sleep() to sleep if audio buffer is filled too much (useful for file playback)

Other changes:
- add SOFTMPEG_FATAL() which terminates execution (currently only used if avcodec cannot be reinitialized, although it was initialized before)
- remove some dead code that was only used in the very beginning
- change lots of fprintf()s from critical erros to SOFTMPEG_ERROR
- remove old style pprintf()
- add a couple of "fixme"s for important things to do
-

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Feb 13 09:53:14 2004 UTC (20 years, 4 months ago) by hunold
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +119 -97 lines
some more of DOKs changes:
- add SOFTMPEG_DEBUG(), SOFTMPEG_ERROR() and SOFTMPEG_WARN() macros inspired from DirectFB
- replace audio printf()s with SOFTMPEG_DEBUG_AUDIO macro (maps to SOFTMPEG_DEBUG())
- replace fixed prebuffering delay with low/mid/high watermarks (should be in 16.16 percent though) change code accordingly
- remove bogus "manual prebuffering" hack (fixed in FusionSound)
- add "DFBBoolean playing;" to audio_decocer, keep track of current playback status
- add softmpeg_sleep() replacement for dozens of nanosleep() calls
- add softmpeg_get_millis() replacement for gettimeofday() calls
- compile fix for missing variable in video.c caused by last checking

Revision 1.7: download - view: text, markup, annotated - select for diffs
Fri Feb 13 09:27:45 2004 UTC (20 years, 4 months ago) by hunold
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +1 -1 lines
- apply DOKs cosmetic changes

Revision 1.6: download - view: text, markup, annotated - select for diffs
Tue Feb 10 18:41:56 2004 UTC (20 years, 4 months ago) by hunold
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -1 lines
- if audio sync is lost, set begin_pts=end_pts=last_pts; this fixes problems
when begin_pts and end_pts drift too far apart when sync is lost. otherwise
memset()s with wrong sizes were done
- if av_sync is not present, discard the frame, but wait 40ms -- don't do a
busy while() loop -- on channel switches, the system would hang otherwise

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Feb 10 12:46:49 2004 UTC (20 years, 4 months ago) by dok
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +2 -1 lines
Avoid endless loop in feed thread.

Added myself to the copyright headers.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Tue Feb 10 12:32:56 2004 UTC (20 years, 4 months ago) by dok
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -6 lines
Stabilized A/V sync and decoding by using correct arrangements
of Flip(), WaitForSync(), SetField() and fine tuned timings.

Automatically use deinterlacing if supported.

Increased audio prebuffering from 25% to 50%.

Use SCHED_RR for feed thread.

Use dfb_memcpy() by adding a hackish extern declaration for it.

Enhanced debugging output.

Cleaned up demo application code.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Feb 9 16:49:53 2004 UTC (20 years, 4 months ago) by hunold
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +14 -10 lines
- add some deinterlacing code, but disable it by default
- measure AUDIO_BUFFER_FULLNESS in percent
- lower AUDIO_BUFFER_FULLNESS to 25% => faster switching
- code cleanup in decode thread
- don't display bogus frame after resync

Revision 1.2: download - view: text, markup, annotated - select for diffs
Mon Feb 9 13:58:36 2004 UTC (20 years, 4 months ago) by hunold
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +21 -30 lines
- simplify list handling in audio_manage()
- set "audio pts" to "end pts" not "begin pts". this has caused a
constant audio offset of the size of the audio chunk
- remove AUDIO_OFFSET define

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Feb 6 10:56:16 2004 UTC (20 years, 4 months ago) by hunold
Branches: MAIN
Initial release. It's done.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

LinuxTV legacy CVS <linuxtv.org/cvs>