wang-bin
d108834fcc
simplify AVThread.waitForStarted
2016-05-14 20:35:56 +08:00
wang-bin
8bc760312a
use semphore in AVThread.waitForStarted
2016-05-12 21:48:39 +08:00
wang-bin
9566b5834b
fix blocking at eof if sync to external clock
2016-02-07 19:44:36 +08:00
wang-bin
ead419acd5
use frame pts for ao and fix pts update
2016-02-06 16:59:18 +08:00
wang-bin
ccf3bd3ca4
pause avthread after seek finished
2016-02-03 19:41:43 +08:00
wang-bin
5a3af9b503
ao: rename to flush() and clear(). add backend apis
2016-02-03 17:43:29 +08:00
wang-bin
5af055a729
clear audio output buffer after seek
...
if old audio data is playing, when send new data to ao, clock update use
the old timestamp which is wrong
2016-01-28 01:55:58 +08:00
wang-bin
af0df77701
avsync: improve sync after seek
...
sometimes video thread seek finished but audio thread seek is not
started. so if video thread start to take a packet, the av time diff can
be large, and video thread may drop frames until the next key frame. The
solution is wait all threads finish the seek. For some reasons I didn't
do it. But seems no better solution. New apis in AVClock is used
internally. Maybe we can add class to manage avsync and keep the clock
clean.
2016-01-23 17:58:32 +08:00
wang-bin
92f42de7e5
fix avsync after seek if last packet decode failed
...
Will not take seek packet until the last packet is decoded successfully.
So audio clock is wrong and results in bad sync
2016-01-23 03:31:39 +08:00
wang-bin
03445f7dc9
workaround long wait if seek on a video with short audio
2016-01-16 20:45:45 +08:00
wang-bin
28032fbe00
fix stepForward on eof
2016-01-16 14:29:09 +08:00
wang-bin
c957663016
do not decode invalid packets(not eof) to avoid crash
...
demuxer thread does not block queue empty at eof, so avthreads may gets
lots of invalid packets
TODO: do in videothread
2016-01-16 00:18:59 +08:00
wang-bin
395b1684ad
fix playback block if audio is too short than video
2016-01-15 22:34:53 +08:00
wang-bin
4a14966d2a
athread: reset packet before continue to take next
2016-01-13 18:53:42 +08:00
wang-bin
452e38c3f1
correctly check clock type in audio thread
2016-01-13 18:03:18 +08:00
wang-bin
01d300a3bc
fix exit too early near eof. may fix #478
2016-01-07 17:30:16 +08:00
wang-bin
c546534924
decode delayed audio frames at eof
2015-07-05 22:39:03 +08:00
wang-bin
0b547413ea
minor optimizatoin. less copy/move
2015-06-18 11:50:42 +08:00
wang-bin
bbce8103fe
reduce a/v desync
2015-06-12 20:00:01 +08:00
wang-bin
acf469a189
pulse: drain audio before close
2015-05-28 14:01:09 +08:00
wang-bin
84700f2340
simplify seek. emit seekFinished correctly
...
TODO: refine playNextFrame()
2015-05-08 15:54:15 +08:00
wang-bin
5c471fe618
support audio filters (avfilter)
2015-03-28 15:31:42 +08:00
wang-bin
6b80fc822d
fix demux thread exit too early
2015-03-25 17:05:39 +08:00
wang-bin
e85da06d39
always resample the decoded audio frame
...
why no sound if no resample?
2015-03-24 09:50:34 +08:00
wang-bin
947a65b34c
implememt AudioDecoder.frame()
2015-03-12 13:41:53 +08:00
wang-bin
923aa19879
ao: display oal information. update year
2015-02-12 14:19:18 +08:00
wang-bin
097bb915e2
ao: software volume control
...
Previous volume control was in AudioThread. Thas not reasonable because
user must use AVPlayer. Now audio samples are scaled in AudioOutput.
Also scale function is updated less.
TODO: if SetVolume feature is set (for example backend supports volume
control or set by user), use backend implemention
2015-02-12 12:53:30 +08:00
wang-bin
6f546b7e2f
ao: add a simple play(data,pts) function
...
waitForNextBuffer and receiveData is used internally
2015-02-12 11:59:21 +08:00
wang-bin
8d374070d5
fix wrong volume scaling for int samples
...
code from libavfilter/af_volume.c
the result sound was noisy if volume changed. now it's better.
2015-02-09 15:37:35 +08:00
wang-bin
eda1a5e01b
faster audio track switch
...
previous implemention reloads the media and seek.
TODO: video track switch. no reopen ao if format is not changed.
2015-01-16 22:43:36 +08:00
wang-bin
f50fa77528
fix wrong audio format result in wrong audio clock. #291
2015-01-14 18:38:15 +08:00
wang-bin
a2df3ec274
rename AVClock.videoPts to videoTime
2014-12-24 17:39:40 +08:00
wang-bin
4d138021a0
move waitAndCheck to AVThread for common use
2014-12-24 17:36:56 +08:00
wang-bin
46f8861a33
decode() use Packet as parameter
2014-12-16 19:43:11 +08:00
wang-bin
fbd94ee12f
avoid out of sync after seek
...
before pakcet queue.clear(), a/v thread may takes 1 packet and
later compares to new packets after seek. the diff will be large. just
ignore once
when seeking, can not contunue without decoding video.
2014-12-09 23:35:56 +08:00
wang-bin
4c487ae824
only drops frames not referenced by others to get complete images
2014-11-28 12:20:36 +08:00
wang-bin
b8121a0e9d
speed up seeking
2014-11-24 19:17:10 +08:00
wang-bin
f867ccafd8
show the first frame after seek on pause. 1.4.1 regression. issue325
...
the way of seeking was changed after 1.4.0 to avoid frequent seek
request better. old seeking solution is ugly using a timer. but new
code result in no video frame update after seek on pause.
TODO: play frame by frame may not work still
2014-11-12 12:15:26 +08:00
wang-bin
6d13c53ba0
move non-public headers
2014-11-04 11:12:11 +08:00
wang-bin
74cba4bb09
fix wrong logging logic etc
...
log level takes affect for ffmpeg and libass log
TODO:
remove qDebug() in headers
2014-10-16 12:28:44 +08:00
wang-bin
2798a30584
simplify stop logic.
2014-09-23 16:48:17 +08:00
wang-bin
5e3dccd22e
dir change
2014-09-10 15:46:43 +08:00
wang-bin
4cc921a0f9
ao: comments. add an audio playback example
2014-08-03 17:00:51 +08:00
wang-bin
e99069c21e
ao: split audio data with the size of audio output's buffer size
2014-08-02 23:00:19 +08:00
wang-bin
e24b42cb1e
audio: new api
2014-08-01 23:38:11 +08:00
wang-bin
64c791949d
mv some non-public headers to private or other places. rename AVCompat.h
2014-07-26 15:29:35 +08:00
wang-bin
4ca91b89b8
misc
2014-07-25 21:22:07 +08:00
wang-bin
c3cec97400
audio: new design for all audio apis. OpenAL works fine now.
...
TODO: refine api and code
2014-06-08 18:41:32 +08:00
wang-bin
cbb78a20aa
add prefix QtAV to all include to avoid potential build error
...
why it happens? e.g. meego toolchain
2014-03-18 12:44:47 +08:00
wang-bin
8a73f02612
accurate seek. slow if target is far away from last nearest key frame
2014-03-14 02:02:49 +08:00