Commit graph

114 commits

Author SHA1 Message Date
krakotay
e040f7fbc7
fix: playback of malformed MP4 files with invalid framerates
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.

Some malformed MP4 files previously wouldn't play at all because they
reported a 0/1 framerate.
Other files suffered from severe audio stuttering caused by repeated
long GAP events emitted from malformed edit lists.
This patch treats invalid framerates as unknown (allowing the existing
fallback to be used) and suppresses suspicious long audio GAP events
before they reach the audio sink.
As a result, both kinds of videos now play correctly.
2026-08-29 02:31:43 +02:00
Ashley Wulber
e3b610271f fix: custom style with transparent clear is buggy 2026-07-07 20:48:00 +02:00
Ashley Wulber
54ed6b0a93 feat: blur 2026-07-01 22:59:45 -04:00
jklgrasso
26465d8d1b Fix frameskip playhead handling 2026-06-05 18:32:28 -04:00
Andrei Ivanou
a853ed23a5 Clamp forward seek and sync frame stepping position 2026-06-03 17:46:11 +02:00
Andrei Ivanou
26f396e4c8 Fix playback speed configuration after change playback options 2026-06-03 10:44:40 -04:00
Andrei Ivanou
8ad4f00c26 Add playback speed controls & minor UI \ UX improvements 2026-06-03 10:44:40 -04:00
Jeremy Soller
be02779570 Fixes for new libcosmic 2026-05-26 13:14:56 -06:00
Rodrigo Rivero
f3d6469bed
feat: add skip forward and backward playback controls 2026-05-08 00:53:08 +02:00
Vukašin Vojinović
2aa2c841fa chore: update dependencies 2026-04-30 01:33:39 +02:00
Ashley Wulber
bc9d118de0 chore: update libcosmic after reexports 2026-04-09 16:05:48 -06:00
Ashley Wulber
edb755eefc fix: disable next frame and previous frame for audio 2026-04-06 15:07:35 -04:00
Ashley Wulber
2c6f8599ee fix: audio player interface issues
the video player doesn't draw when playing audio, so the logic for emitting new frame messages is broken.
2026-04-06 12:40:34 -04:00
nz366
6f5040a953
[Feat] AB repeat and frame stepping (#241)
* feat: Add A-B repeat and frame  navigation features with new key binds and menu entries.

* playback options

* fix merge
2026-04-03 14:16:01 -04:00
Ashley Wulber
00395d27dc chore: thumbnails and patches 2026-03-20 18:18:32 -04:00
Ashley Wulber
6c401d7030 chore: update iced 2026-03-20 18:11:32 -04:00
norepro
8762185629 Fix ignored repeat with folder 2026-02-28 12:41:00 -08:00
Will Sheehan
f161863c09 Merge branch 'master' into feat/repeat-toggle 2026-02-20 23:15:50 -08:00
therealmate
261a038710 Unmute when changing volume
Fixes https://github.com/pop-os/cosmic-player/issues/212
2026-02-19 14:47:04 -07:00
Guillaume-fgt
91d09b8bda removed unnecessary urls truncating 2026-02-06 08:26:57 +01:00
Guillaume-fgt
74fa8baa55 implementing PlayNext media 2026-02-05 16:01:36 +01:00
Jeremy Soller
ceb8f57ec7
Mute when thumbnailing 2026-01-16 13:42:55 -07:00
norepro
a83951f1ba Use set_looping from iced_video instead of EOS signal 2025-11-30 20:58:28 -08:00
norepro
42b1f6e5e8 Remove Playlist repeat option 2025-11-27 21:03:57 -08:00
norepro
b559de8fc5 Rename repeat options to Disabled, Track, and Playlist
Change track and playlist to repeat current track indefinitely.
2025-11-27 20:48:32 -08:00
norepro
ff97fa2f62 Workaround double EOS with explicit seek 2025-11-27 11:41:45 -08:00
norepro
2476557ec3 mpris 2025-11-27 02:02:46 -08:00
norepro
636a73a27f Fix incorrect match arm guard 2025-11-27 01:27:29 -08:00
norepro
ca0de9d07e Add tooltip to repeat control 2025-11-27 00:08:05 -08:00
norepro
de70009ed2 Add three-state repeat button
Add a new button to the controls that defines whether the media repeats
at the end of the stream. The states are:

- Disabled: Media does not repeat. This is existing behavior and the
default state.
- Always: Media always repeats.
- Once: Media repeats once. Flag is reset when loading new media.

Tested all three states with both audio and video.

Added a `rustfmt.toml` to avoid reordering imports. They keep moving
around in previous pull requests, best to just define what we want in
the repository.

Fixes: #39
2025-11-26 18:26:06 -08:00
Josh Megnauth
bb087578df
Prevent screen turning off during playback
Closes: #157

XDG portals expose a D-Bus interface allowing apps to prevent screen
idling, user switching, and other actions. That interface,
org.freedesktop.portal.Inhibit, does all of the heavy lifting here.

Idling = the screen dimming or shutting off.

Idling is inhibited when a video is actively playing.
Idling is NOT inhibited when videos aren't playing - this includes
paused or stopped videos.
2025-11-13 13:26:23 -05:00
Jeremy Soller
fa1637fe51
Merge pull request #183 from Dewb/feat/thumb-orientation
Correctly orient videos in thumbnail mode
2025-11-11 18:59:32 -07:00
Jeremy Soller
b3642ac5e4
Merge pull request #179 from joshuamegnauth54/cleanup-dependencies
Clean up dependencies, lints
2025-11-11 18:57:14 -07:00
Michael Dewberry
823fd0e521 Use same video creation method for player and thumbnailer 2025-11-08 15:38:09 -05:00
Josh Megnauth
27ea8d2770
Clean up dependencies, lints
`lazy_static` and `smol_str` weren't used. COSMIC Player used `dirs`
once to find the user's home directory. Rust fixed and undeprecated its
`home_dir` function in 1.85, which released earlier this year and is the
MSRV of libcosmic.
2025-11-03 16:12:38 -05:00
Guillaume Fgt
99f1ab8382 fix mouse cursor showing in Fullscreen video 2025-10-15 16:14:37 +02:00
Josh Megnauth
04c354584d
Clear recent media button
Closes: #141
2025-10-12 20:28:55 -04:00
Jeremy Soller
27b7b373b9
Correctly handle videos with no subtitles 2025-10-06 11:49:46 -06:00
Jeremy Soller
f2a48870f5
Allow toggling subtitles, fixes #151 2025-10-06 11:39:02 -06:00
Mitchel Stewart
3dc76ba60d set agent for souphttpsrc 2025-09-11 08:38:24 -06:00
Jeremy Soller
58c778832b
Respond to duration changes, fixes #107 2025-08-15 10:15:28 -06:00
Jeremy Soller
0e0718e45d
Handle codec install during file open, fixes #23 2025-08-14 20:31:47 -06:00
Michael Dewberry
21866486bd Add videoflip filter to automatically handle orientation metadata 2025-08-13 16:16:49 -06:00
Jeremy Soller
55654e1231
Provide thumbnailing 2025-07-11 11:27:48 -06:00
Roman Avdeev
13d3d1b604 Fixed volume scroll 2025-06-27 17:55:47 +00:00
Josh Megnauth
7c16f3e0b4 Retain paused/playing state on scrub
Closes: #110

Prior to this patch, seeking incorrectly resumed playing even if the
player was paused when it should stay paused.
2025-06-27 17:55:06 +00:00
user0-07161
fadecd0068 fix: don't change volume on scroll when sidebar is toggled
otherwise, potential scrolling in the sidebar inferes with volume
control by scrolling
2025-05-19 08:36:19 -06:00
user0-07161
94982b4a4a feat: change volume on mousewheel scroll, #112 2025-05-19 08:36:19 -06:00
Cristian Dinu
6d5c2f020d feat(controls): Hide header bar if no mouse movement
We hide the title bar similarly on how we hide the controls bar.

The difference between the header bar and the controls bar is that in
`Fullscreen` mode we don't display the header bar even if we have mouse
movement.

If a menu or sub-menu is open, but then the user makes no mouse
movement, then the menus will be hidden when the header bar is hidden.

I'm not sure how to handle the side panel, the `nav_bar`, what I call
"the playlist". I decided to not handle it's hiding based on mouse
movement because it is still displayed when we put the window in
`Fullscreen` mode.

Closes #37
2025-03-31 09:22:42 -06:00
Cristian Dinu
59cd966a30 fix(args): Eliminate the binary from arguments
For an executable the first argument is always the binary itself.
Because of this we have to skip it.

If we don't skip it, then it will be treated as another URL, therefore
`cosmic-player` will end up opening two URLs, one for the binary and one
for the actual file we want to play.

When opening multiple files `cosmic-player` will show the side panel /
playlist with the list of files.

The regression this commit fixed was introduced by `01be9152`.

Closes #96.
2025-03-27 08:49:09 +01:00