Commit Graph

21 Commits

Author SHA1 Message Date
Andreas Rheinhardt b800327f4c avformat/avformat: Add FFInputFormat, hide internals of AVInputFormat
This commit does for AVInputFormat what commit
59c9dc82f4 did for AVOutputFormat:
It adds a new type FFInputFormat, moves all the internals
of AVInputFormat to it and adds a now reduced AVInputFormat
as first member.

This does not affect/improve extensibility of both public
or private fields for demuxers (it is still a mess due to lavd).

This is possible since 50f34172e0
(which removed the last usage of an internal field of AVInputFormat
in fftools).

(Hint: tools/probetest.c accesses the internals of FFInputFormat
as well, but given that it is a testing tool this is not considered
a problem.)

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-07 08:53:31 -03:00
Anton Khirnov 08bebeb1be Revert "all: Don't set AVClass.item_name to its default value"
Some callers assume that item_name is always set, so this may be
considered an API break.

This reverts commit 0c6203c97a.
2024-01-20 10:34:48 +01:00
Andreas Rheinhardt 0c6203c97a all: Don't set AVClass.item_name to its default value
Unnecessary since acf63d5350adeae551d412db699f8ca03f7e76b9;
also avoids relocations.

Reviewed-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2023-12-22 15:12:33 +01:00
Andreas Rheinhardt 72c601e0f7 avutil/internal: Move avpriv-file API to a header of its own
It is not used by the large majority of files that include
lavu/internal.h.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-09-03 15:41:44 +02:00
Andreas Rheinhardt 4608f7cc6a Remove unnecessary mem.h inclusions
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 14:47:57 +02:00
Andreas Rheinhardt d92f38c179 avdevice: Constify all devices
This is possible now that the next-API is gone.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 11:48:05 -03:00
Marton Balint 2d32aed85c avdevice: use av_gettime_relative() for elapsed time calculations
av_gettime_relative() is using the monotonic clock therefore more suitable for
elapsed time calculations. Packet timestamps are still kept absolute, although
that should be configurable in the future.

Related to ticket #9089.

Signed-off-by: Marton Balint <cus@passwd.hu>
2021-02-27 21:41:50 +01:00
Marton Balint 4bb0409820 avdevice: migrate to AVFormatContext->url
Signed-off-by: Marton Balint <cus@passwd.hu>
2018-01-28 23:06:43 +01:00
Carl Eugen Hoyos 724cf83f10 Remove some unneeded casts of bit_rate. 2017-09-22 01:33:22 +02:00
Michael Niedermayer 584fff9478 avdevice: Fix max value of AV_OPT_TYPE_VIDEO_RATE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-09 10:34:42 +02:00
Derek Buitenhuis 6f69f7a8bf Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf':
  lavf: replace AVStream.codec with AVStream.codecpar

This has been a HUGE effort from:
    - Derek Buitenhuis <derek.buitenhuis@gmail.com>
    - Hendrik Leppkes <h.leppkes@gmail.com>
    - wm4 <nfxjfg@googlemail.com>
    - Clément Bœsch <clement@stupeflix.com>
    - James Almer <jamrial@gmail.com>
    - Michael Niedermayer <michael@niedermayer.cc>
    - Rostislav Pehlivanov <atomnuker@gmail.com>

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-10 20:59:55 +01:00
Michael Niedermayer 7404f3bdb9 lavc: Switch bitrate to 64bit unless compatibility with avconv was requested. 2015-09-15 18:02:43 +02:00
Michael Niedermayer 40d552dae6 Merge commit '1a3eb042c704dea190c644def5b32c9cee8832b8'
* commit '1a3eb042c704dea190c644def5b32c9cee8832b8':
  Replace av_dlog with normal av_log at trace level

Conflicts:
	ffplay.c
	libavdevice/fbdev_dec.c
	libavfilter/avfilter.c
	libavfilter/internal.h
	libavfilter/setpts.c
	libavfilter/src_movie.c
	libavfilter/vf_crop.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fieldorder.c
	libavformat/assdec.c
	libavformat/avidec.c
	libavformat/flvdec.c
	libavformat/http.c
	libavformat/ipmovie.c
	libavformat/isom.c
	libavformat/mov.c
	libavformat/mpegenc.c
	libavformat/mpegts.c
	libavformat/mpegtsenc.c
	libavformat/mux.c
	libavformat/mxfdec.c
	libavformat/nsvdec.c
	libavformat/oggdec.c
	libavformat/r3d.c
	libavformat/rtspdec.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 03:19:47 +02:00
Michael Niedermayer 7729f43312 avdevice/fbdev_dec: use errno instead of ret for av_log
Should fix printing the wrong value

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 21:44:19 +01:00
Michael Niedermayer 265c4771cc Merge commit '043ea6f7bfc59399b6b3659da785ec4cc68a008e'
* commit '043ea6f7bfc59399b6b3659da785ec4cc68a008e':
  fbdev: Use av_strerror

Conflicts:
	libavdevice/fbdev_dec.c

See: f6b56b1f26
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-10-29 21:43:25 +01:00
Lukasz Marek da833a6d09 lavd/fbdev_dec: use default device when not provided
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-10-21 22:57:32 +02:00
Michael Niedermayer f6ed5df9c0 Merge commit 'c0de9159a7ba5707aa0a5c2bc73ae78b7b87ec46'
* commit 'c0de9159a7ba5707aa0a5c2bc73ae78b7b87ec46':
  avdevice: Give names to anonymously typedeffed structs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-07-18 21:48:37 +02:00
Lukasz Marek e2ebaa0933 lavd/fbdev_dec: implement fbdev_get_device_list callback
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-30 00:35:42 +02:00
Lukasz Marek f607767d93 lavd: add categories to device implementations
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-03 23:34:46 +01:00
Lukasz Marek a547c496e9 lavd/fbdev: move common code to separate file
Move common fbdev dec/enc for separate file.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-24 08:45:59 +02:00
Lukasz Marek c720d0d9df lavd: rename fbdev.c into fbdev_dec.c
Rename existing fbdev.c to make it a more meaningful name.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-10-24 08:38:33 +02:00