Luca Barbato
eef9f06508
avplay: Allow to override the codec
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-25 09:12:02 +01:00
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>
2016-01-25 09:12:02 +01:00
Luca Barbato
611ba89b89
avplay: Rename cur_stream to player
...
The name was misleading.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-25 09:12:02 +01:00
Luca Barbato
21bbc345cc
avplay: Rename VideoState to PlayerState
...
The structure is not video-specific.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-01-25 09:12:02 +01:00
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>
2016-01-25 09:12:02 +01:00
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>
2016-01-25 09:10:34 +01:00
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`.
2015-10-26 18:00:55 +01:00
Luca Barbato
a5d4204309
avformat: Always return ref-counted AVPacket
...
And drop the av_dup_packet from the input_thread.
2015-10-26 18:00:55 +01:00
Vittorio Giovara
ff7956fcbf
avplay: Replace avpicture functions with imgutils
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-10-21 12:02:47 +02:00
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>
2015-10-21 12:02:29 +02:00
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
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>
2015-07-27 15:24:58 +01:00
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>
2015-05-02 22:06:29 +03:00
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>
2015-05-02 22:06:29 +03:00
Luca Barbato
06f4b1e37a
avplay: Do not print a possibly uninitialized value
...
Initialize `diff` to 0.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-04-30 14:15:12 +02:00
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>
2015-04-19 23:45:35 +01:00
Vittorio Giovara
1a3eb042c7
Replace av_dlog with normal av_log at trace level
...
This applies to every library where performance is not critical.
2015-04-19 12:41:59 +01:00
Federico Tomassetti
d450cb07d9
avplay: Check memory allocation
...
Bug-Id: CID 1288294
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-03-21 23:18:14 +01:00
Vittorio Giovara
733f4b05f0
avplay: Check format allocation inside decode_thread()
...
CC: libav-stable@libav.org
Bug-Id: CID 1265718
2015-02-17 11:27:41 -05:00
Vittorio Giovara
266f241193
avplay: Check frame allocation inside video_thread()
...
CC: libav-stable@libav.org
Bug-Id: CID 1267893
2015-02-17 11:27:41 -05:00
Martin Storsjö
248d8fb60c
avplay: Use av_gettime_relative
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-10-24 09:53:44 +03:00
Luca Barbato
e58a140cf9
avplay: Always free opts
...
CC: libav-stable@libav.org
Bug-Id: CID 733793
2014-10-17 09:55:46 +01:00
Luca Barbato
cf83c01739
avplay: Always free find_stream_info options
...
CC: libav-stable@libav.org
Bug-Id: CID 1238794
2014-10-17 09:55:46 +01:00
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
2014-09-06 16:52:59 +02:00
Gabriel Dume
f929ab0569
cosmetics: Write NULL pointer equality checks more compactly
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-08-15 03:18:18 -07:00
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>
2014-07-08 21:14:43 +03:00
Anton Khirnov
b36bc81cca
avplay: add support for seeking to chapter marks
2014-02-10 11:23:01 +01:00
Anton Khirnov
84f131921f
avplay: do not call avcodec_get_frame_defaults().
...
avcodec_decode_audio4() will reset the frame itself.
2013-12-11 20:39:55 +01:00
Anton Khirnov
eb891b3114
Replace all uses of avcodec_free_frame with av_frame_free().
2013-12-11 20:39:54 +01:00
Diego Biurrun
8f8bc92365
Add missing #includes for *INT64_MAX and *INT64_C
2013-11-23 21:55:52 +01:00
Anton Khirnov
5b9c3b4505
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
2013-11-16 12:44:20 +01:00
Anton Khirnov
fae753af70
avplay: drop -vismv option which does not do anything anymore
2013-10-31 20:22:22 +01:00
Diego Biurrun
03039f4c8c
miscellaneous typo fixes
2013-07-25 19:43:32 +02:00
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.
2013-04-27 10:51:28 +02:00
Anton Khirnov
fa2a34cd40
lavfi: change the filter registering system to match the other libraries
...
Removes an arbitrary hardcoded limit on the number of filters.
2013-04-11 20:44:03 +02:00
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.
2013-04-11 20:33:33 +02:00
Anton Khirnov
e5c32d6da7
avplay: remove the -debug option.
...
It just shadows the corresponding AVOption and prevents using named
constants.
2013-03-19 11:12:13 +01:00
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>
2013-03-09 14:33:54 +01:00
Anton Khirnov
354468fc12
avplay: switch to new refcounted frames API
...
Remove now unused cmdutils get_buffer() implementation.
2013-03-08 07:40:59 +01:00
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>
2013-02-09 18:57:21 +01:00
Anton Khirnov
e2718e7a70
avplay: Do not use removed av_get_int()
...
Fixes build with lavfi disabled.
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2012-11-29 10:52:23 +01:00
Justin Ruggles
6304f78edf
avplay: support mid-stream sample rate changes
...
Resample to the rate that was configured in SDL.
2012-10-13 00:19:00 -04:00
Justin Ruggles
f5962229bf
avplay: use audio parameters from the decoded frame instead of AVCodecContext
2012-10-13 00:18:48 -04:00
Diego Biurrun
c1ef30a6ba
De-doxygenize some top-level files
2012-10-12 20:56:54 +02:00
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
2012-10-08 07:13:26 +02:00
Anton Khirnov
e7ba5b1de0
lavr: change the type of the data buffers to uint8_t**.
...
This is more consistent with what the rest of Libav does.
This breaks API.
2012-10-05 13:49:44 +02:00
Diego Elio Pettenò
5e3f9979fa
Use atexit() instead of defining a custom exit_program() interface.
2012-10-01 17:17:42 -04:00
Anton Khirnov
11d1ca4b2c
Use avcodec_free_frame() to free AVFrames.
2012-09-24 12:31:25 +02:00
Anton Khirnov
0e8dccb79b
avplay: get rid of ugly casts in the options table
2012-09-11 09:19:03 +02:00
Anton Khirnov
4e82cbb629
avplay: fix prototypes for option callbacks.
...
They have been wrong since 11d957fbd8
2012-09-11 09:18:57 +02:00