Michael Niedermayer
e87c1cdbb5
ffplay: replace opaque/params for buffersinks
...
This fixes a regression caused by droping opaque.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Marton Balint
85b9bf5693
ffplay: simplify video pts calculation
...
Also use frame->pts instead of a standalone variable
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
5dacf7b1ab
ffplay: fix indentation
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
0b24e341ed
ffplay: handle audio buffersink output properly with buffering filters
...
Fixes cases when the audio filter generates less or more frames than the input.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
325846aac0
ffplay: set time_base of audio filter buffer src
...
Fixes ticket #2408 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Michael Niedermayer
7f4b588fdf
ffplay: use seek per time for ogg by default
...
Fixes Ticket2383
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Marton Balint
1c2ac44947
ffplay: always queue attachment pictures after flushing the video packet queue
...
Requeue them after seeking and also after opening a video stream. Also don't
fill the video queue in case of an attached picture video stream since there
will be no more than one packet from that stream.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
de81d8da47
ffplay: fix early frame dropped pts serial
...
Fixes early frame drop which was kind of broken since
26c208cf0f
.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Michael Niedermayer
612d9cdbe9
ffplay: use av_guess_frame_rate()
...
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Marton Balint
c46a8c613e
ffplay: avoid frame data leak on early frame drop
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Paul B Mahol
4d16ba2dd8
ffplay: silence warning of mixed enumeration types
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Stefano Sabatini
5fe542d7e1
ffplay: remove options skiploop, skipidct, skipframe
...
The corresponding codec options (skip_loop, skip_idct, skip_frame) can be
set in a more flexible way.
This technically causes a user interface break, but since the options
were not even documented and we just released a major version that should
not be a serious issue.
12 years ago
Stefano Sabatini
f7d1a18c90
ffplay: remove unused variable "codec"
...
Fix warning:
ffplay.c: In function ‘video_thread’:
ffplay.c:1890:21: warning: unused variable ‘codec’ [-Wunused-variable]
12 years ago
Marton Balint
e96175ad7b
ffplay: add -af option
...
Based on a patch by Stefano Sabatini <stefasab@gmail.com>:
http://ffmpeg.org/pipermail/ffmpeg-devel/2013-February/138452.html
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
738487f8db
ffplay: use refcounted frames for audio
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
9eafdd518c
ffplay: use frame->pts if available for setting the audio clock
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
1822519d2a
ffplay: restructure audio stream opening code
...
Preparation for -af support.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Nicolas George
ceac5c54dd
Remove references to the "ff" variant of buffersink.
12 years ago
Michael Niedermayer
ec1d2e2fb0
ffplay: use AVFrame accessor functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Marton Balint
ac37d21f49
ffplay: do not cycle through unavailable show modes
...
Fixes ticket #2200 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
d0c6ed7da0
ffplay: add option to disable subtitling
...
Fixes ticket #2201 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
daece4c674
ffplay: use NAN to signal invalid external clock
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
26c208cf0f
ffplay: if audio or video clock is invalid return NAN
...
This helps us not to make bad decision (frame dropping, audio compensation)
right after seeking when we do not know yet the recent audio or video clock.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
38f649662c
ffplay: allow frame dropping if we redisplay an already displayed frame
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
36dc476f83
ffplay: return true for pictq_prev_picture if it was successful
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
3070600d9b
ffplay: only quit from audio_decode_frame before decoding when paused
...
This way the audio clock is updated to a proper value even when the video is
paused.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
48e43a1999
ffplay: drop remaining frames in current audio avpacket when seeking
...
Fixes ticket #1928 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
4be7d578a3
ffplay: signal seek event to read thread
...
Improves seek delay.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Stefano Sabatini
394130efe3
ffplay: reindent and remove pointless cast in audio_decode_frame() code
12 years ago
Stefano Sabatini
a3fa27e366
ffplay: set type for channel_layout AudioParams field to int64_t
...
Reflect the type of the corresponding field in lavc/lavfi.
12 years ago
Marton Balint
77ab702a84
ffplay: only display frames if there are no pending events
...
Otherwise events could just pile up if displaying a frame takes more time than
the duration of the frame.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
5534d8f75e
ffplay: remove remains of video_clock
...
We are now using a pts based approach, libavutil/libavcodec should provide the
correct pts-es anyway. This also fixes an issue when seeking to a frame with a
pts set to zero.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
b853cfe7ea
ffplay: remove refresh thread to achieve more precise frame delay
...
We use a refresh loop which displays the frames and also does the polling for
pending events in a non-blocking way. If we know the required delay until the
next frame, then exactly that amount of sleeping will be done. After each
handled event we check if we have to display a frame which kind of makes
displaying the frame a high priority event.
This improves greatly the smoothness of the video output especially with 50fps
content.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Michael Niedermayer
2c5e4ae291
Revert "Merge commit 'db0a943266be29ff0596872ebb418dfed75d00de'"
...
This reverts commit d808206553
, reversing
changes made to 30085bd43e
.
This is not needed
Requested-by: Marton Balint
12 years ago
Stefano Sabatini
212bb6490f
ffplay: report video frame changes only in debug mode
...
In particular, remove distracting message:
"Video frame changed from size:0x0 format:none serial:-1 to ..."
12 years ago
Stefano Sabatini
58c4b0f990
ffplay: extend feedback in case of video changes
12 years ago
Stefano Sabatini
c44281906a
ffplay: remove misleading comment from audio_decode_frame()
12 years ago
Stefano Sabatini
02af4e9a97
ffplay: rename audio_decode_frame() variable "pts" to "audio_clock0"
...
The new name better expresses what the variable is.
12 years ago
Stefano Sabatini
6e32b377bb
ffplay: remove pts_ptr argument from audio_decode_frame()
...
The argument is no longer used outside the function. Simplify.
12 years ago
Stefano Sabatini
c91f1f3f92
ffplay: drop redundant NULL sws_freeContext() check in stream_close()
...
sws_freeContext() already checks for NULL, simplify.
12 years ago
Stefano Sabatini
6032a1c977
ffplay: extend doxy for audio_decode_frame()
12 years ago
Marton Balint
4ea7fbb2ec
ffplay: step to next frame if paused when seeking
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
c5eab4bb70
ffplay: move up pause functions
...
No change in functionality.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
5de3f724f1
ffplay: remember last window dimensions
...
After this change the dimensions of single image videos will be remembered when
coming back from full screen. The issue was mentioned in ticket #2174 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
4fd6e5af1e
ffplay: fix order of setting show_mode
...
Without the fix the refresh event may have got called with unset show mode.
Fixes ticket #2174 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
571ef42dd4
ffplay: dynamically allocate audio buffer
...
We simply remove the fixed length VideoState->audio_buf2 and use
the previously unused VideoState->audio_buf1.
Fixes ticket #2191 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
f65e57124f
ffplay: flush video filters on seek
...
Actually we just re-create the filters, since there is no way to flush them.
Fixes hangup with yadif filter on seeking forward caused by a filtered frame
with a pts before the seek.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
1427c6842d
ffplay: use videoq.serial to detect obsolete frames
...
Previously VideoPicture->skip was used for that, using videoq.serial enables us
to detect obsolete frames right after pushing flush_pkt to the packet queue, so
we don't have to wait for the decoder thread to pop the flush packet anymore.
This is good because until now a full video picture queue may have blocked the
decoder thread.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Michael Niedermayer
2d8d63a9a0
ffplay: fix sws_flags
...
Fixes Ticket45
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
e8bab4c6fc
ffplay: extend documentation for the -vf option
...
In particular, make it consistent with the ffmpeg docs.
12 years ago