Diego Biurrun
c95169f0ec
build: Move cli tool sources to a separate subdirectory
...
This unclutters the top-level directory and groups related files together.
8 years ago
Diego Biurrun
122de16dd8
Replace cmdutils_common_opts.h by a macro
8 years ago
Diego Biurrun
88f0cf8cd3
avplay: Correct function pointer assignments in options array
...
avplay.c:2928:5: warning: ISO C forbids initialization between function pointer and ‘void *’ [-Wpedantic]
8 years ago
Anton Khirnov
beb62dac62
Use AVFrame.pts instead of deprecated pkt_pts.
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Anton Khirnov
c23152a903
avplay: convert do codecpar
9 years ago
Anton Khirnov
0705f5960c
avplay: do not use AVStream.codec for decoding
...
AVStream.codec is now deprecated. Allocate a separate codec context
instead.
9 years ago
Anton Khirnov
dd53af4b37
avplay: drop support for building without lavfi
...
lavfi has been considered to be stable for a while now, so it is enabled
in most configurations. Supporting avplay without lavfi requires a lot
of nontrivial ifdef mess for no good reason.
9 years ago
Luca Barbato
eef9f06508
avplay: Allow to override the codec
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
6fa464f8d2
avplay: Statically allocate the player state
...
And move the resource deallocation in stream_open failure path.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
611ba89b89
avplay: Rename cur_stream to player
...
The name was misleading.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
21bbc345cc
avplay: Rename VideoState to PlayerState
...
The structure is not video-specific.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
fdd464cb70
avplay: Allocate the refresh thread next to the decode thread
...
It does not belong to the stream setup.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
f22f900594
avplay: Move the stream setup in the main thread
...
And refactor the code in preparation of the following
patches.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Luca Barbato
ce70f28a17
avpacket: Replace av_free_packet with av_packet_unref
...
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.
Deprecate `av_free_packet`.
9 years ago
Luca Barbato
a5d4204309
avformat: Always return ref-counted AVPacket
...
And drop the av_dup_packet from the input_thread.
9 years ago
Vittorio Giovara
ff7956fcbf
avplay: Replace avpicture functions with imgutils
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
a17a766190
lavc: Add data and linesize to AVSubtitleRect
...
Use the new fields directly instead of the ones from AVPicture.
This removes a layer of indirection which serves no pratical purpose
whatsoever, and will help in removing AVPicture structure completely
later.
Every subtitle encoder/decoder seamlessly points to the new arrays,
so it is possible to deprecate AVSubtitleRect.pict.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Martin Storsjö
e2d50fc2f5
avplay: Add support for rotated video
...
This is enabled by default, but can be disbled via the -noautorotate
option.
Based on a patch by Clément Bœsch.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Martin Storsjö
21180b7323
avplay: Factorize code for adding filters to the filter pipeline
...
Significantly based on a patch by Clément Bœsch.
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Luca Barbato
06f4b1e37a
avplay: Do not print a possibly uninitialized value
...
Initialize `diff` to 0.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Federico Tomassetti
336d2f0979
avplay: Free frame and graph when memory allocation fails
...
Bug-Id: CID 1291564
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years ago
Vittorio Giovara
1a3eb042c7
Replace av_dlog with normal av_log at trace level
...
This applies to every library where performance is not critical.
10 years ago
Federico Tomassetti
d450cb07d9
avplay: Check memory allocation
...
Bug-Id: CID 1288294
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Vittorio Giovara
733f4b05f0
avplay: Check format allocation inside decode_thread()
...
CC: libav-stable@libav.org
Bug-Id: CID 1265718
10 years ago
Vittorio Giovara
266f241193
avplay: Check frame allocation inside video_thread()
...
CC: libav-stable@libav.org
Bug-Id: CID 1267893
10 years ago
Martin Storsjö
248d8fb60c
avplay: Use av_gettime_relative
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Luca Barbato
e58a140cf9
avplay: Always free opts
...
CC: libav-stable@libav.org
Bug-Id: CID 733793
10 years ago
Luca Barbato
cf83c01739
avplay: Always free find_stream_info options
...
CC: libav-stable@libav.org
Bug-Id: CID 1238794
10 years ago
Diego Biurrun
041caf1a63
avplay: Exit by default at the end of playback
...
This is the expected behavior shared by all other cli multimedia players.
Bug-Id: 732
10 years ago
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years ago
Martin Storsjö
cf280ed004
avplay: Handle pixel aspect ratio properly
...
This was broken (left half-implemented) in 354468fc12
.
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Anton Khirnov
b36bc81cca
avplay: add support for seeking to chapter marks
11 years ago
Anton Khirnov
84f131921f
avplay: do not call avcodec_get_frame_defaults().
...
avcodec_decode_audio4() will reset the frame itself.
11 years ago
Anton Khirnov
eb891b3114
Replace all uses of avcodec_free_frame with av_frame_free().
11 years ago
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
11 years ago
Anton Khirnov
5b9c3b4505
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
11 years ago
Anton Khirnov
fae753af70
avplay: drop -vismv option which does not do anything anymore
11 years ago
Diego Biurrun
03039f4c8c
miscellaneous typo fixes
11 years ago
Luca Barbato
26a44143ef
avplay: remove a warning
...
Set the data field in the flush_pkt to the pointer to the actual packet.
The field needs to contain a valid unique pointer, no read nor writes
are ever made to it.
12 years ago
Anton Khirnov
fa2a34cd40
lavfi: change the filter registering system to match the other libraries
...
Removes an arbitrary hardcoded limit on the number of filters.
12 years ago
Anton Khirnov
38f0c0781a
lavfi: merge avfiltergraph.h into avfilter.h
...
We do not support using filters without AVFilterGraph in practice
anyway, so there is no point in pretending we do.
12 years ago
Anton Khirnov
e5c32d6da7
avplay: remove the -debug option.
...
It just shadows the corresponding AVOption and prevents using named
constants.
12 years ago
Vittorio Giovara
2eaa3663fd
avplay: enable only when SDL 1.2 is found
...
SDL 2 is API incompatible.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
12 years ago
Anton Khirnov
354468fc12
avplay: switch to new refcounted frames API
...
Remove now unused cmdutils get_buffer() implementation.
12 years ago
Vladimir Pantelic
db0a943266
avplay: apply the stream sample_aspect_ratio to decoded video frames
...
If there is a sample_aspect_ratio in the stream, then apply it to every
decoded frame in the same way as avconv does. This also makes sure that
the avfilter chain has access to the aspect ratio.
Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Anton Khirnov
e2718e7a70
avplay: Do not use removed av_get_int()
...
Fixes build with lavfi disabled.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
12 years ago
Justin Ruggles
6304f78edf
avplay: support mid-stream sample rate changes
...
Resample to the rate that was configured in SDL.
12 years ago