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
Clément Bœsch
491ca0e89f
Replace references to "que" with the appropriate word.
...
"que" sounds like a slang word to me. This commit renames a few
variables, fix the comments and the logging messages (sometimes along
with small other typo fixes).
12 years ago
Marton Balint
92b50b71a1
ffplay: fix type of time_diff in waveform display
...
Fixes time diff overflow visible as showing the same few waveforms in a loop at
the end of file.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
ec89ea3022
ffplay: always display audio visualization if mode is set
...
Fixes ticket #1903 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
ef7f3b0870
ffplay: hide cursor on no mouse movement
...
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
0ca4e9f014
ffplay: reset external clock to unknown on start
...
Fixes a delay and initial frame drops on starting realtime streams with
external clock.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
4e33d8ebb3
ffplay: only drop frames if not in frame step mode
...
Fixes ticket #2053 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
97660b8b13
ffplay: move frame step pause from the video thread to video_refresh
...
This way we pause the video right after we displayed a new frame. Partially
fixes ticket #2053 .
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Marton Balint
cf0c63d99a
ffplay: fix greenish line on the right edge with some xv sizes
...
If the XV image linesize was different from the width, SDL would create an
overlay wider than the actually requested one. This causes a greenish line on
the right, because the rightmost texel is blended with unset data. This patch
introduces a function which duplicates the rightmost texel to the unset space,
that way the blending will be done with duplicated border texels.
Signed-off-by: Marton Balint <cus@passwd.hu>
12 years ago
Michael Niedermayer
3f72dbe462
ffplay: fix another use of context instead of frame parameters
...
Fixes Ticket2050
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
230bef0a89
ffplay: fix handling of resolution changes with h264-mt
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
013b700771
ffplay: provide some feedback in case the codec cannot be set
12 years ago
Stefano Sabatini
1cbb11cda7
ffplay: set codec_id in codec context
...
Set codec id in case another codec is forced on the context (e.g. when
the user specify the codec with -codec).
For example fix:
ffplay -vcodec pgmyuv -i "tests/vsynth1/%02d.pgm"
12 years ago
Stefano Sabatini
cb0f97b59d
ffplay: improve robustness of opt_codec(), and add options acodec,vcodec,scodec
...
Fail with a meaningfull error message in case of bogus input.
Also the new options are more consistent with the rest of the tool
options, since it does not support generic stream specifiers.
12 years ago
Marton Balint
f7eb50f3c0
ffplay: increase maximum frame duration to 1 hour for streams without TS discontinuity
...
Partially fixes ticket #1707 . A-V sync still needs some work after seeking...
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
2efd01a32f
ffplay: fix updating external clock after seeking
...
Now it should work for the timestamp based and the byte based case as well.
Also only update the external clock if the seeking was successful.
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
fc38bbcd6a
ffplay: disallow seeking before the start of the file
...
In timestamp based seeking we update the external clock to the seek target,
therefore we should use sane timestamps even if libavformat could handle
seeking before the start of the file.
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
747c749d42
ffplay: adjust external clock speed based on buffer fullness for realtime sources
...
This provides a means to synchronize the player clock to the clock of the
encoder.
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
fec39d99d6
ffplay: remove redundant !codec check
...
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
fdb933444a
ffplay: only initialize codec opts before using it
...
Fixes Coverity CID 733793.
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
8cb740245d
ffplay: always free buffersink_params in configure_video_filters
...
Fixes Coverity CID 733792.
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
09214f494b
ffplay: remove uneeded format filter, buffersink format is set
...
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
afd9e705de
ffplay: check for buffersink_params allocation success
...
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
abd49a7524
ffplay: always free inputs and outputs in configure_filtergraph
...
Fixes Coverity CID 733791.
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago
Marton Balint
65f6c42a9f
ffplay: fill the unused part of the window with black
...
Should fix ticket #1667 .
Signed-off-by: Marton Balint <cus@passwd.hu>
13 years ago