1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
Commit Graph

90967 Commits

Author SHA1 Message Date
Carl Eugen Hoyos
3027056160 lavc/dxva2_internal: Cast the dxva2 and d3d11 decoders and cfgs to (void *).
Silences several warnings:
libavcodec/dxva2_internal.h:107:98: warning: pointer type mismatch in conditional expression
libavcodec/dxva2_internal.h:109:94: warning: pointer type mismatch in conditional expression

Reported-by: Reino Wijnsma
2018-04-18 20:28:25 +02:00
Carl Eugen Hoyos
9d6c168764 lavd/vfwcap: Pass pointers to int instead of long to av_parse_video_size().
Fixes the following warnings:
libavdevice/vfwcap.c:331:35: warning: passing argument 1 of 'av_parse_video_size' from incompatible pointer type
libavdevice/vfwcap.c:331:59: warning: passing argument 2 of 'av_parse_video_size' from incompatible pointer type

Reported-by: Reino Wijnsma
2018-04-18 20:26:44 +02:00
Paul B Mahol
396c019795 avfilter/avf_avectorscope: disable mirroring
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-18 18:14:35 +02:00
Matt Oliver
6be690685a ffplay: Fix realloc_texture when input texture is NULL.
SDL_QueryTexture and SDL_DestroyTexture require that the input texture
pointer be non-null. Debug builds of SDL will correctly check for this
and break program execution. This patch fixes this by checking the
status of the texture pointer.

Signed-off-by: Matt Oliver <protogonoi@gmail.com>
2018-04-18 18:57:07 +10:00
Steven Liu
223f3dff8c avformat/hls: remove redundant code
Suggested-by: Richard Shaffer <rshaffer@tunein.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-04-18 11:22:23 +08:00
Paul B Mahol
3c6f701524 avcodec/proresdec_lgpl: pass return values instead of discarding them
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-18 00:05:33 +02:00
Richard Shaffer
9a8811f478 libavformat/http: Fix memory leak in get_cookies. 2018-04-17 22:00:54 +02:00
Timo Teräs
9af71b326f avformat/movenc: support writing iTunes cover image
Fixes https://trac.ffmpeg.org/ticket/2798

This makes movenc handle AV_DISPOSITION_ATTACHED_PIC and write
the associated pictures in iTunes cover atom. This corresponds
to how 'mov' demuxer parses and exposes the cover images when
reading.

Most of the existing track handling loops properly ignore
these 'virtual streams' as MOVTrack->entry is never incremented
for them. However, additional tests are added as needed to ignore
them.

Tested to produce valid output with:
  ffmpeg -i movie.mp4 -i thumb.jpg -disposition✌️1 attached_pic \
         -map 0 -map 1 -c copy movie-with-cover.mp4

The cover image is also copied correctly with:
  ffmpeg -i movie-with-cover.mp4 -map 0 -c copy out.mp4

AtomicParseley says that the attached_pic stream is properly
not visible in the main tracks of the file.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2018-04-17 20:11:34 +01:00
Timo Teräs
c663dce031 ffprobe: report unavailable SAR correctly in stream info
av_guess_sample_aspect_ratio() will return undefined or missing
value as {0,1}. This fixes show_stream() to check numerator to
display 'N/A' when appropriate. show_frame() does this already
correctly.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
2018-04-17 20:11:31 +01:00
Paul B Mahol
2fc12f4971 avfilter: add lowshelf and highshelf filters
These are old bass and treble filters.
Make bass and treble filters better at boosting.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-17 12:40:27 +02:00
Vishwanath Dixit
d10cefbfe5 avformat/dashenc: addition of segment index correction logic
The logic is applicable only when use_template is enabled and use_timeline
is disabled. The logic monitors the flow of segment indexes. If a streams's
segment index value is not at the expected real time position, then
the logic corrects that index value.

Typically this logic is needed in live streaming use cases. The network
bandwidth fluctuations are common during long run streaming. Each
fluctuation can cause the segment indexes fall behind the expected real
time position. Without this logic, players will not be able to consume
the content, even after encoder's network condition comes back to
normal state.
2018-04-17 14:35:40 +05:30
Vishwanath Dixit
2c51e33bc1 avformat/dashenc: addition of muxer overhead for @bandwidth param in MPD 2018-04-17 14:35:16 +05:30
Vishwanath Dixit
af6058d03b avformat/dashenc: constructing MPD's bandwidth string locally 2018-04-17 14:34:52 +05:30
Vishwanath Dixit
0c7bc7eb47 avformat/dashenc: addition of muxer overhead in master playlist's bandwidth 2018-04-17 14:34:25 +05:30
Vishwanath Dixit
85ae55eca3 avformat/dashenc: logic to compute muxer overhead 2018-04-17 14:34:03 +05:30
Vishwanath Dixit
990380367b avformat/dashenc: addition of @availabilityTimeOffset in MPD
availability time of Nth segment = availabilityStartTime + (N*segment duration) - availabilityTimeOffset.
This field helps to reduce the latency by about a segment duration in streaming mode.
2018-04-17 14:33:37 +05:30
Vishwanath Dixit
3e75057a1d avformat/dashenc: setting @availabilityStartTime when the first frame is ready
@availabilityStartTime specifies the anchor for the computation of the earliest
availability time (in UTC) for any Segment in the Media Presentation.

As per this requirement, the @AvailabilityStartTime should be set to the
wallclock time at which the first frame of the first segment begins encoding.
But, it was getting set only when the first segment was completely ready. Making
the required correction in this patch. This correction is mainly needed to reduce
the latency in live streaming use cases.
2018-04-17 14:32:50 +05:30
Vishwanath Dixit
1263d91198 avformat/dashenc: removed 'write_manifest' call from 'write_header'
Calling 'write_manifest' from 'write_header' was causing creation of
first MPD with invalid values. Ex: zero @duration param value. Also,
the manifest files (MPD or M3U8s) should be created when at-least
one media frame is ready for consumption.
2018-04-17 14:32:24 +05:30
Vishwanath Dixit
51888c85d4 avformat/dashenc: writing average segment duration for @duration in template mode 2018-04-17 14:32:01 +05:30
Vishwanath Dixit
ab789e184c avformat/dashenc: segmentation at the configured segment duration rate
When use_template is enabled and use_timeline is disabled, typically
it is required to generate the segments at the configured segment duration
rate on an average. This commit is particularly needed to handle the
segmentation when video frame rates are fractional like 29.97 or 59.94 fps.
2018-04-17 14:31:22 +05:30
Vishwanath Dixit
01ba52852d avformat/dashenc: replacing 'min_seg_duration' with 'seg_duration'
There are use cases where average segment duration needs to be configured
and muxer is expected to maintain the average segment duration. So, using
the name 'min_seg_duration' will be misleading. So, changing the parameter
name to 'seg_duration', where it can be minimum segment duration or average
segment duration based on the use-case. The additional updates needed for
this functinality are made the sub-sequent patches of this patch series.
2018-04-17 14:30:47 +05:30
Richard Shaffer
c116221d90 avformat/hls: clean up duplicate option fields
The HLSContext struct contains fields which duplicate the data stored in the
avio_opts field. This change removes those fields in favor of avio_opts, and
updates the code accordingly.
The original patch caused the buffer pointed to by new_cookies in open_url to be
leaked. The only thing that buffer is used for is to store the value until it
can be passed to av_dict_set. To fix the leak, v2 of the patch simply calls
av_dict_set with the AV_DICT_DONT_STRDUP_VAL flag, so that the dictionary takes
ownership of the memory instead of copying it again.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Richard Shaffer <rshaffer@tunein.com>
2018-04-17 14:40:06 +08:00
Richard Shaffer
6a1be7561c avformat/hls: copy rw_timeout from parent to child AVIOContexts.
The rw_timeout option is currently not applied when opening media playlist,
segment, or encryption key URLs. This can cause the HLS demuxer to block
indefinitely, even when the rw_timeout option has been specified. This change
simply enables carrying over the rw_timeout option when the demuxer opens these
URLs.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Richard Shaffer <rshaffer@tunein.com>
2018-04-17 14:39:26 +08:00
sanilraut
9e2b4c7ecc libavformat/dashdec: Avoid multiple HTTP requests for initialization segment that is common among all representations
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: sanilraut <raut.sanil@gmail.com>
2018-04-17 14:36:45 +08:00
Steven Liu
0b3c1854cb Revert "avformat/hls: copy rw_timeout from parent to child AVIOContexts."
This reverts commit 36deec010c.
2018-04-17 14:33:36 +08:00
Steven Liu
6eaaad37f8 Revert "avformat/dashdec: Avoid multiple HTTP requests for initialization segment that is common among all representations"
This reverts commit 4effd1c4a2.
2018-04-17 14:32:27 +08:00
Steven Liu
36deec010c avformat/hls: copy rw_timeout from parent to child AVIOContexts.
The rw_timeout option is currently not applied when opening media playlist,
segment, or encryption key URLs. This can cause the HLS demuxer to block
indefinitely, even when the rw_timeout option has been specified. This change
simply enables carrying over the rw_timeout option when the demuxer opens these
URLs.

Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: Richard Shaffer <rshaffer@tunein.com>
2018-04-17 14:25:07 +08:00
Steven Liu
4effd1c4a2 avformat/dashdec: Avoid multiple HTTP requests for initialization segment that is common among all representations
Reviewed-by: Steven Liu <lq@chinaffmpeg.org>
Signed-off-by: sanilraut <raut.sanil@gmail.com>
2018-04-17 14:19:00 +08:00
Steven Liu
6fbfb20faf avformat/hls: remove redundant code
Reviewed-by: Jun Zhao <mypopydev@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-04-17 13:16:33 +08:00
Timo Rothenpieler
b3b3a3e3ce configure: add nvcc to CMDLINE_SET
This was somehow forgotten and nobody noticed until now.
2018-04-16 22:35:26 +02:00
Michael Niedermayer
ec8a5262b0 doc/APIchanges: Fix typos in hashes
Thanks-to: Moritz Barsnick <barsnick@gmx.net> for finding the correct ones

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 19:24:31 +02:00
Paul B Mahol
6e05a11e89 avfilter/af_afir: make max IR length configurable
Also increase max allowed dry/wet value.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 19:11:35 +02:00
James Almer
6838359448 avformat/flacenc: add flac_init()
Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-16 13:46:10 -03:00
Rodger Combs
00d8598eba avformat/flacenc: support writing attached pictures
Usage of packet queueing API and some cleaning done by the committer.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-16 13:46:09 -03:00
Paul B Mahol
9cf0079638 avfilter/af_headphone: switch to activate
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 18:29:34 +02:00
James Almer
62bdbb5ce0 avformat/movenc: forbid muxing AV1 streams until the spec is finished
This prevents creating potentially broken files, as both the AV1 and
the AV1 in ISOMBFF specs are unfinished.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-16 10:20:46 -03:00
James Almer
c04609eefc configure: extend the check for bcrypt
Some old mingw-w64 builds seem to provide an incomplete implementation
of the API. Add an extra check to make sure it's disabled for those.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-04-16 10:20:46 -03:00
Michael Niedermayer
3c1ecb057d Bump minor versions after release/4.0 branching
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Michael Niedermayer
7e3a070d9a Bump minor versions for branching release/4.0
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Michael Niedermayer
1b7b7c6a62 doc/APIchanges: Add 4.0 cut point
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Michael Niedermayer
e8be46dfe0 doc/APIchanges: Fill in missing stuff
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2018-04-16 12:35:12 +02:00
Martin Vignali
56315df32c avfilter/showvolume : cosmetic move bracket after func declaration to a new line 2018-04-16 11:35:07 +02:00
Martin Vignali
fd10a6e2f2 avfilter/showvolume : add persistent max display
draw a color line for the max level in the given duration
2018-04-16 11:35:03 +02:00
Martin Vignali
cb2f52b6a7 avfilter/showvolume : add display scale option
linear (current behaviour) or log display (more close to classic audio meter)
2018-04-16 11:34:59 +02:00
Paul B Mahol
e1c8bd2389 avfilter/af_headphone: fix type=time with hrir=multich
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2018-04-16 09:31:11 +02:00
Steven Liu
783df2eb59 avformat/hlsenc: avformat/hlsenc: add error message for encrypt fmp4 mode
and refine the warning message when use both hls_key_info_file and hls_enc

Reviewed-by: Gyan Doshi <ffmpeg@gyani.pro>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
2018-04-16 14:35:14 +08:00
Mark Thompson
edecd723f3 amfenc: Remove spurious initialisations
Also minor cosmetics.
2018-04-15 16:46:17 +01:00
Alexander Kravchenko
2c6ca2b549 amfenc: Add DXVA2 hardware frame input support
Adds support for AMF initialisation from a DXVA2 (Direct3D9) device, and
then allows passing DXVA2 surfaces into an AMF encoder.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-04-15 16:46:17 +01:00
Alexander Kravchenko
ab7eed13a7 amfenc: Ensure that the software format of hardware frames is valid
Signed-off-by: Mark Thompson <sw@jkqxz.net>
2018-04-15 16:46:17 +01:00
Mark Thompson
73ed6fa9d7 amfenc: Do not automatically download/upload unknown hardware input frames
Supplying a hardware input frame which is not in the input hardware frames
context is not allowed by the API, so additional code to handle it is not
necessary.  Further, handling it automatically results in very low
performance - it is more appropriate to fail immediately so that the user
can fix their incorrect setup.
2018-04-15 16:46:12 +01:00