Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove some legacy garbage #12436

Merged
merged 9 commits into from
Sep 21, 2023

Conversation

Dudemanguy
Copy link
Member

There's a bunch of stuff sitting in the code that is there for compatibility reasons. A lot of it is really, really old and there's no point in keeping around at this stage. So I went through and deleted a bunch of crap. Nothing too controversial I think. Anything older than 0.35 was what I used as the cutoff point.

@Dudemanguy Dudemanguy force-pushed the remove-some-legacy-garbage branch 5 times, most recently from 5266421 to 7c4f79d Compare September 20, 2023 04:53
DOCS/man/encode.rst Show resolved Hide resolved
DOCS/man/input.rst Outdated Show resolved Hide resolved
common/encode_lavc.c Show resolved Hide resolved
@Traneptora
Copy link
Member

Do we need to remove recorder.c and recorder.h? Or are those also used for --stream-record?

@Dudemanguy
Copy link
Member Author

Dudemanguy commented Sep 20, 2023

It's used for --stream-record. I could look into simplifying this later since only demux.c uses it and I doubt any other part of the player will need this after we remove --record-file.

@Dudemanguy Dudemanguy force-pushed the remove-some-legacy-garbage branch 2 times, most recently from 7bf3332 to 94c8216 Compare September 20, 2023 18:44
Deprecated in 6597998. 6 years is more
than enough time.
We've got an ungodly amount of OPT_REPLACED and OPT_REMOVED sitting
around in the code. This is harmless, but the vast majority of these are
ancient. 26f4f18 is the last commit
that touched the majority of these and of course that only changed how
options were declared so all of this stuff was deprecated even before
that. No use in keeping these, so just delete them all. As an aside,
there was actually a cocoa_opts but it had only a single option which
was replaced by something else and empty otherwise. So that entire thing
was just simply removed. OPT_REPLACED/OPT_REMOVED declarations that were
added in 0.35 or later were kept as is.
drop-frame-count and vo-drop-frame-count are ancient and have no reason
to exist anymore. The other change is that support for writing to
display-fps has been removed, and the property is strictly read-only
now. 3a2dc8b is what deprecated it with
a warning to users, so we can remove it without much trouble.
e9e93b4 added a warning about writing
the same value to the playlist-pos property that in the future it would
stop restarting playback. Instead, you should use the
playlist-play-index command for that. Well go ahead and drop the old
deprecated behavior now and do what wm4 wanted this to do: just ignore
if the same value is written again.
A bit different from the OPT_REPLACED/OPT_REMOVED ones in that the
options still possibly do something but they have a deprecation
message. Most of these are old and have no real usage. The only
potentially controversial ones are the removal of --oaffset and
--ovoffset which were deprecated years ago and seemingly have no real
replacement. There's a cryptic message about --audio-delay but who
knows. The less encoding mode code we have, the better so just chuck
it.
Easier to keep track of when we do want to remove it.
No wonder wm4 wanted to get rid of this. This option requires touching a
bunch of crap in the core player code. --stream-record works perfectly
fine and is a lot nicer so there's no need for this to exist anymore.
These were deprecated a long time ago and apparently didn't even work
with lavfi filters. Go ahead and remove them and additionally clean up
some code related to them. m_config_from_obj_desc_and_args becomes much
simpler now and a couple of arguments can be completely removed.
f560437 deprecated this since the
--drm-device path option was added as a replacement. Drop the card
number selection logic.
@Dudemanguy
Copy link
Member Author

I documented a few more things in DOCS/interface-changes.rst to be nicer, but this should be good to go.

@Dudemanguy Dudemanguy merged commit be89e07 into mpv-player:master Sep 21, 2023
13 checks passed
@Dudemanguy Dudemanguy deleted the remove-some-legacy-garbage branch September 21, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants