Commit Graph

39 Commits

Author SHA1 Message Date
Andreas Rheinhardt 790f793844 avutil/common: Don't auto-include mem.h
There are lots of files that don't need it: The number of object
files that actually need it went down from 2011 to 884 here.

Keep it for external users in order to not cause breakages.

Also improve the other headers a bit while just at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2024-03-31 00:08:43 +01:00
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
James Almer 4fcd6c82cf avdevice: remove FF_API_DEVICE_CAPABILITIES
Signed-off-by: James Almer <jamrial@gmail.com>
2023-02-09 15:35:14 +01:00
Andreas Rheinhardt 59c9dc82f4 avformat/avformat: Move AVOutputFormat internals out of public header
This commit does for AVOutputFormat what commit
20f9727018 did for AVCodec:
It adds a new type FFOutputFormat, moves all the internals
of AVOutputFormat to it and adds a now reduced AVOutputFormat
as first member.

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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2023-02-09 15:24:15 +01:00
Marton Balint 64f04df379 avdevice/avdevice: fix return value of avdevice_list_devices()
According to API docs avdevice_list_devices(), avdevice_list_input_sources()
and avdevice_list_input_sinks() should return the number of autodetected
devices on success. This is redundant with AVDeviceInfoList->nb_devices so it
was not noticed earlier that none of the underlying device list functions work
like that.

Let's fix it in generic code to make it in line with the API docs.

Fixes ticket #9820.

Signed-off-by: Marton Balint <cus@passwd.hu>
2022-07-17 22:03:41 +02:00
Andreas Rheinhardt f2b79c5b85 lib*/version: Move library version functions into files of their own
This avoids having to rebuild big files every time FFMPEG_VERSION
changes (which it does with every commit).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-05-10 06:49:32 +02:00
Martin Storsjö 884c597659 libavdevice: Split version.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-03-16 14:05:26 +02:00
Diederick Niehorster a8a530331f avdevice: add info about media types(s) to AVDeviceInfo
An avdevice, regardless of whether its category says its an audio or
video device, may provide access to devices providing different media
types, or even single devices providing multiple media types. Also, some
devices may provide no media types. dshow is an example encompassing all
of these cases. Users should be provided with this information, so
AVDeviceInfo is extended to provide it.

Bump avdevice version

Signed-off-by: Diederick Niehorster <dcnieho@gmail.com>
Reviewed-by: Roger Pack <rogerdpack2@gmail.com>
2021-12-24 14:06:45 +05:30
Andreas Rheinhardt 25c8507818 Remove/replace some unnecessary avcodec.h inclusions
Also remove other unnecessary headers and include headers directly while
at it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2021-07-22 15:29:46 +02:00
Andreas Rheinhardt d7e0d428fa avdevice/avdevice: Constify avdevice_list_input_sources/output_sinks
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2021-04-27 10:43:14 -03:00
Andreas Rheinhardt 4f49ca7bbc avdevice/avdevice: Deprecate AVDevice Capabilities API
It has been added in 6db42a2b6b,
yet since then none of the necessary create/free_device_capabilities
functions has been implemented, making this API completely useless.

Because of this one can already simplify
avdevice_capabilities_free/create and can already remove the function
pointers at the next major bump; given that the documentation explicitly
states that av_device_capabilities is not to be used by a user, it's
options can already be removed (save for the sentinel).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-02-14 21:07:57 +01:00
James Almer ac36080b2d avdevice/alldevices: stop using deprecated linked list API
Signed-off-by: James Almer <jamrial@gmail.com>
2020-10-19 11:54:45 -03:00
Carl Eugen Hoyos 96fab29e96 Silence "string-plus-int" warning shown by clang.
libswscale/utils.c:89:42: warning: adding 'unsigned long' to a string does not append to the string [-Wstring-plus-int]
2020-01-06 22:38:56 +01:00
Josh de Kock d8ae40611b Revert "lavd: add new API for iterating input and output devices"
This reverts commit 0fd475704e.

Revert "lavd: fix iterating of input and output devices"

This reverts commit ce1d77a5e7.

Signed-off-by: Josh de Kock <josh@itanimul.li>
2018-03-31 23:26:31 +01:00
Josh de Kock 0fd475704e lavd: add new API for iterating input and output devices
This also adds an avpriv function to register devices in
libavformat
2018-02-06 18:57:42 +00:00
James Almer 2245476e5c avdevice: remove usage of deprecated setter and getter functions
Signed-off-by: James Almer <jamrial@gmail.com>
2017-10-29 14:42:48 -03:00
Michael Niedermayer ba97cf2c45 avdevice: Use av_format_get_control_message_cb()
This is required as the location of this field could change and is
specified in libavformat not avdevice

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-01-16 02:13:01 +01:00
Lukasz Marek 007c33df0a lavd/avdevice: introduce helper functions for sink/sources listing
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2015-01-11 18:58:26 +01:00
Lukasz Marek 9241e544ff lavd/avdevice: remove av_ prefix from private function
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2015-01-11 18:54:49 +01:00
Michael Niedermayer 649c158e8c Add FFMPEG_VERSION into the binary libs
This simplifies identifying from which revision a binary of a lib came from

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-12-19 19:32:40 +01:00
Lukasz Marek 279412c833 lavd/avdevice: use better option types for caps options
Using dedicated types allows to use format/layout names,
not just raw int values.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-12-14 23:55:41 +01:00
Michael Niedermayer 6995be43ae avdevice/avdevice.c: Use av_freep(), avoid leaving stale pointers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-11-21 18:03:11 +01:00
Lukasz Marek c1c3c3611e lavd: no default device unless explicitly set
AVDeviceInfoList was allocated with first device set as default
even though there is no device after allocation.

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2014-04-12 19:14:57 +02:00
Lukasz Marek 6db42a2b6b lavd: add device capabilities API
Provides API to query device capabilities.
Each device must implement callbacks to benefit from this API.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-04-11 15:37:43 +02:00
Lukasz Marek 2475fdbd04 lavd/avdevice: always free detected devices on error
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-06 00:34:50 +01:00
Lukasz Marek 06fed44051 lavd/avdevice: add device iterators
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-03-03 23:39:07 +01:00
Lukasz Marek 81c3f81d6f lavd: add list devices API
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-02-16 20:07:08 +01:00
Lukasz Marek 102bd64168 lavd: add avdevice_dev_to_app_control_message API
New API allows to send messages from devices to application.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-01-27 15:18:17 +01:00
Lukasz Marek 7151411b9c lavd: add avdevice_app_to_dev_control_message API
New API allows to send messages from application to devices.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
2014-01-27 15:18:17 +01:00
Michael Niedermayer c581cb4e4f Merge remote-tracking branch 'qatar/master'
* qatar/master:
  Fix even more missing includes after the common.h removal
  build: Factor out rangecoder dependencies to CONFIG_RANGECODER
  build: Factor out error resilience dependencies to CONFIG_ERROR_RESILIENCE
  x86: avcodec: Consistently name all init files
  Add more missing includes after removing the implicit common.h
  Add some more missing includes after removing the implicit common.h
  Don't include common.h from avutil.h
  rtmp: Automatically compute the hash for SWFVerification

Conflicts:
	configure
	doc/APIchanges
	doc/examples/decoding_encoding.c
	libavcodec/Makefile
	libavcodec/assdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/avpacket.c
	libavcodec/dv_profile.c
	libavcodec/dwt.c
	libavcodec/libtheoraenc.c
	libavcodec/rawdec.c
	libavcodec/rv40dsp.c
	libavcodec/tiff.c
	libavcodec/tiffenc.c
	libavcodec/v210dec.h
	libavcodec/vc1dsp.c
	libavcodec/x86/Makefile
	libavfilter/asrc_anullsrc.c
	libavfilter/avfilter.c
	libavfilter/buffer.c
	libavfilter/formats.c
	libavfilter/vf_ass.c
	libavfilter/vf_drawtext.c
	libavfilter/vf_fade.c
	libavfilter/vf_select.c
	libavfilter/video.c
	libavfilter/vsrc_testsrc.c
	libavformat/version.h
	libavutil/audioconvert.c
	libavutil/error.h
	libavutil/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-08-16 16:20:30 +02:00
Martin Storsjö 1d9c2dc89a Don't include common.h from avutil.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:32:06 +03:00
Michael Niedermayer d5874e9c2c libavdevice: increase LIBAVDEVICE_VERSION_MICRO to 100
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-12-22 03:06:33 +01:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Michael Niedermayer e528cdac8a Revert "replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION"
This reverts commit 29ba091136.
2011-03-17 17:26:45 +01:00
Michael Niedermayer 0cb88628fb Revert "use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_*"
This reverts commit a03be6e1ba.
2011-03-17 17:26:45 +01:00
Janne Grunau a03be6e1ba use LIBAV_LICENSE and LIBAV_VERSION instead of FFMPEG_* 2011-03-16 21:54:39 +01:00
Janne Grunau 29ba091136 replace FFMPEG with LIBAV in FFMPEG_CONFIGURATION
also update the multiple inclusion guards in config.h|mak
2011-03-16 21:54:39 +01:00
Diego Biurrun c173693698 Add functions to return library license and library configuration.
Originally committed as revision 20547 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-18 17:15:17 +00:00
Diego Biurrun d7a0e29f31 Split avdevice.c off from alldevices.c.
alldevices.c is not a good place for avdevice_version().

Originally committed as revision 20546 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-18 17:01:25 +00:00