-
cal0pteryx
Yes, I had that planned
-
debacle
> Yes, I had that planned Will animated images be part of the new preview? That would be nice. ↺
-
cal0pteryx
It's not really scoped yet. It was more of a design overhaul ;)
-
debacle
> It's not really scoped yet. It was more of a design overhaul ;) Can I motivate you with a pizza or something similar in Brussels? 😀️🍕️ ↺
-
Louis2
I would like to pay Gajim developer to make plug-in for org-protocol, that I can quickly send single or multiple messages to org-protocol, including pictures, voice or videos.
-
cal0pteryx
debacle: nice try :D all it misses for me is proper UX, where it doesn't bother people too much if they don't want that much motion in the app's UI. Something like an autoplay setting and/or a play button overlay (which is what meson is working on)
❤ 1 -
meson
> Org protocol is a tool to trigger custom actions in Emacs from external applications.
-
meson
I'm out in that case :)
-
meson
👍 1debacle, cal0pteryx: for playing gifs in gstreamer one need ffmpeg plugins and for webp (giphy) bad plugins. I've installed the latter but the gtk4 media player fails to play a giphy.webp: ``` glupload gstglupload.c:890:_append_drm_formats_from_video_format:<glcontextegl0> Undefined modifiers list for Y412 webpdec gstwebpdec.c:472:gst_webp_dec_handle_frame:<webpdec0> Failed to decode the webp frame ``` I don't know if I miss something, but it seems you either convert it webp first to something the media player supports or you write your own gstreamer pipeline.✎ -
meson
debacle, cal0pteryx: for playing gifs in gstreamer one need ffmpeg plugins and for webp (giphy) bad plugins. I've installed the latter but the gtk4 media player fails to play a giphy.webp: ``` glupload gstglupload.c:890:_append_drm_formats_from_video_format:<glcontextegl0> Undefined modifiers list for Y412 webpdec gstwebpdec.c:472:gst_webp_dec_handle_frame:<webpdec0> Failed to decode the webp frame ``` I don't know if I'm missing something, but it seems you either convert webp first to something the media player supports or you write your own gstreamer pipeline. ✏
-
meson
https://paste.opensuse.org/pastes/74fef7412d23 if you want to try it out yourself
-
lovetox
meson: gif can be done easier you can use a image lib like pillow or pixbuf and draw each image of the gif with some timeout and pack that into a printable object
👍 1 -
lovetox
There are various examples out there
-
lovetox
*paintable
-
lovetox
Problem is most services don't use gif anymore
-
meson
> or you write your own gstreamer pipeline and it's the same issue as with the gtk media player with `gst-launch-1.0 filesrc location="giphy.webp" ! webpdec ! videoconvert ! autovideosink` as it obviously uses the same decoder. So no idea how it is supposed to work ;) There's also an `rswebpdec` plugin, but that's not even packaged for my distro.
-
lovetox
If it's webp then pillow may have support
-
lovetox
And we can draw the pictures ourself
-
lovetox
Not sure how animated pictures in webp work
-
lovetox
https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#webp
-
lovetox
It's the same as gif
-
lovetox
Pillow gives us all frames in a list
-
lovetox
And we can simply draw it ourself
-
Link Mauve
Doesn’t that take a huge amount of memory if you keep all frames in memory at all times?
-
Link Mauve
Video decoders usually keep a small cache of previous frames needed to decode future ones, and a bigger cache of future frames to smooth the decoding cost in case it spikes for a frame and they couldn’t meet the deadline.
-
Link Mauve
You would have to implement that yourself if you were to avoid using Gstreamer/ffmpeg and the GTK widgets.
-
lovetox
Huge memory ? What are you talking about a webp file has average 5kb
-
meson
> keep all frames in memory at all times? but for an animated webp/gif those aren't many and they aren't huge?
-
lovetox
Also it's not clear if webp even works like that
-
Link Mauve
Even for the animations people share from random websites?
-
Link Mauve
lovetox, like what?
-
lovetox
Why do you think you need a past frame to decide the next?
-
Link Mauve
Because I’ve written a WebP decoder, and I know the spec.
-
Link Mauve
Both GIF and WebP rely on a single previous frame in some modes.
-
Link Mauve
Modern animated image formats like AVIF may need more than one reference frame, including hidden frames.
-
lovetox
Its winging cost and benefit✎ -
lovetox
Its weighing cost and benefit ✏
-
meson
https://developers.google.com/speed/webp/docs/riff_container
-
meson
here's a nice explanation of the webp container
-
debacle
> I would like to pay Gajim developer to make plug-in for org-protocol, that I can quickly send single or multiple messages to org-protocol, including pictures, voice or videos. Am I right, that this needs mainly an API? E.g. dbus? IIRC, Gajim already has a dbus API, and Emacs can already speak dbus. Maybe there is only a little bit of elisp glue needed? The right room to discuss this is probably xmpp:emacs@conference.conversations.im?join ↺
-
Benson
>> I would like to pay Gajim developer to make plug-in for org-protocol, that I can quickly send single or multiple messages to org-protocol, including pictures, voice or videos. > Am I right, that this needs mainly an API? > E.g. dbus? IIRC, Gajim already has a dbus API, and Emacs can already speak dbus. Maybe there is only a little bit of elisp glue needed? > The right room to discuss this is probably xmpp:emacs@conference.conversations.im?join May also find xmpp:jabber-el@conference.hmm.st?join useful
-
Louis2
debacle: no need for Emacs thinking, I just need to be able to capture selected messages or link to image/media on disk I can do parsing with Emacs myself It's just to open clickable links to give data it of Gajim, can you do that?
-
Louis2
I don't think dbus API can invoke menu option to appear send data out
-
Louis2
I need Gajim developer
-
meson
lovetox, basic migration works for the media browser (ignoring file properties other than file size, path) using `conn.execute(stmt)` stuff. If I wanted to insert a new row into FileTransfer, I thought I could do that by `pk = app.storage.archive.insert_row(mod.FileTransfer({...}, ignore_on_conflict=True)` in but that raises an error `AttributeError: 'FileTransferJingleRow' object has no attribute '_file_props'`. Can you tell me what I'm doing wrong or how it is supposed to work?
-
lovetox
Seems not to be an error with the database
-
lovetox
The error says you access a attribute which is not there
-
meson
Oh, wait, I got confused
-
John Livingston
Hello. I have a new computer. Is it safe to copy .config/gajim on the new computer? Won't it break OMEMO? (i plan to use the 2 computers at the same time)
-
Link Mauve
John Livingston, don’t copy the OMEMO keys, you can copy ~/.config/gajim, but in ~/.local/share/gajim remove the omemo* files before starting Gajim.
-
lovetox__
why copy anything at all
-
Link Mauve
You You may also want to change the resource, otherwise they will conflict.
-
lovetox
you are setting up a new client
-
Link Mauve
lovetox__, to keep the logs for instance.
-
lovetox
dont copy anything
-
Link Mauve
And the workspaces.
-
John Livingston
have i to copy .local/share/gajim?
-
John Livingston
I want to copy just to get back my accounts and workspaces✎ -
lovetox
no workspaces are not shared
-
lovetox
they are not synced anymore after one day
-
lovetox
so it makes not much sense to copy them to beginn with
-
lovetox
i dont assume you have 20 workspaces setup
-
mathieui
lovetox, well, conversation logs would be one thing (setup time would be another, depending on the number of accounts)
-
lovetox
but we dont have that feature
-
lovetox
just setup a new client
-
John Livingston
> You You may also want to change the resource, otherwise they will conflict. where is the resource? ✏
-
John Livingston
ok, found it
-
John Livingston
So, i have a procedure to quickly migrate your gajim preferences to a new computer: * copy .config/gajim * launch gajim * go to your account(s) preference(s), open the "connection" tab, and just change the "resource" field.
-
John Livingston
(this does not migrate message history)
-
meson
lovetox, I've opened a MR for the db stuff, I'm not sure if I am on the right track though :)
-
lovetox
great thank, i look into it✎ -
lovetox
great thanks, i look into it ✏
-
lovetox
meson, why are you doing the dance with checking if a file is previewable and if its available?
-
lovetox
both seems irrelevant, whatever code afterwards in the media browser follows must deal with both things anyway
-
meson
alright, makes sense. will get rid of it
-
lovetox
just as a side node, you dont need to call magic methods like that
👍 1 -
lovetox
orig_path.parent.__str__()
-
lovetox
str(orig_path.parent)
-
lovetox
does exactly that, it calls the magic method on the object
-
meson
so you would add all messages into the filetranfer table as long as they have oob data attached?
-
joeDoe
scrolling up isn't loading backlog. What am I doing wrong?
-
cal0pteryx
joeDoe, nothing, it's not implemented
-
joeDoe
ack
-
lovetox
meson, yes
-
lovetox
either you decide that a message with oob is a filetransfer or not
-
lovetox
but it certainly does not depend on if we can preview the file or not
-
lovetox
filetransfer is a user decision, an intention that someone wants to send you a file
-
lovetox
and we store that intention in the form of a filetransfer in the database
-
lovetox
if a media browser later can display this or not is a different topic
-
lovetox
thats also why you code to insert something into the FT table needs to move into common/message
-
lovetox
where we receive the message. Following the logic we already know its a filetransfer, no need to do this in the preview code
-
meson
I see, but at at some point we have to update the filetransfer entry with the path to the original file and other properties? that belongs to common/preview again?
-
meson
and for the media browser we select all entries from the filetransfer table with an existing original file path?
-
lovetox
yes, the idea is that the filetransfer table holds possible filetransfers, not necessarily finished onces
-
lovetox
thats why there is also a state column
-
lovetox
the idea is that then some other code picks up that filetransfer and does the downloading
-
lovetox
this could be of course something triggert in the UI, like clicking download✎ -
lovetox
this could be of course something triggert in the UI, like clicking download in the preview widget ✏
-
lovetox
my idea for the route of events would be something like
-
lovetox
incoming message -> store message data and ft into database -> Event to GUI that new message is received -> GUI displays message and notices Filetransfer data -> some code does filetransfer -> updates database with original path to file✎ -
lovetox
incoming message -> store message data and ft into database -> Event to GUI that new message is received -> GUI displays message and notices Filetransfer data -> some code does filetransfer -> updates database with original path to file, and updates state to finished ✏
-
meson
thanks, now the pictures has been come a bit clearer
-
bot
wurstsalat pushed 1 commits to branch gajim/master fix: RosterItemExchange: Fix accessing contact subscription - https://dev.gajim.org/gajim/gajim/-/commit/abac5860313a792159fb75f7f3e08dec18dd1c80