Gajim - 2024-11-07


  1. cal0pteryx

    Yes, I had that planned

  2. debacle

    > Yes, I had that planned Will animated images be part of the new preview? That would be nice.

  3. cal0pteryx

    It's not really scoped yet. It was more of a design overhaul ;)

  4. 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? 😀️🍕️

  5. 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.

  6. 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
  7. meson

    > Org protocol is a tool to trigger custom actions in Emacs from external applications.

  8. meson

    I'm out in that case :)

  9. 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 miss something, but it seems you either convert it webp first to something the media player supports or you write your own gstreamer pipeline.

    👍 1
  10. 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.

  11. meson

    https://paste.opensuse.org/pastes/74fef7412d23 if you want to try it out yourself

  12. 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
  13. lovetox

    There are various examples out there

  14. lovetox

    *paintable

  15. lovetox

    Problem is most services don't use gif anymore

  16. 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.

  17. lovetox

    If it's webp then pillow may have support

  18. lovetox

    And we can draw the pictures ourself

  19. lovetox

    Not sure how animated pictures in webp work

  20. lovetox

    https://pillow.readthedocs.io/en/stable/handbook/image-file-formats.html#webp

  21. lovetox

    It's the same as gif

  22. lovetox

    Pillow gives us all frames in a list

  23. lovetox

    And we can simply draw it ourself

  24. Link Mauve

    Doesn’t that take a huge amount of memory if you keep all frames in memory at all times?

  25. 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.

  26. Link Mauve

    You would have to implement that yourself if you were to avoid using Gstreamer/ffmpeg and the GTK widgets.

  27. lovetox

    Huge memory ? What are you talking about a webp file has average 5kb

  28. meson

    > keep all frames in memory at all times? but for an animated webp/gif those aren't many and they aren't huge?

  29. lovetox

    Also it's not clear if webp even works like that

  30. Link Mauve

    Even for the animations people share from random websites?

  31. Link Mauve

    lovetox, like what?

  32. lovetox

    Why do you think you need a past frame to decide the next?

  33. Link Mauve

    Because I’ve written a WebP decoder, and I know the spec.

  34. Link Mauve

    Both GIF and WebP rely on a single previous frame in some modes.

  35. Link Mauve

    Modern animated image formats like AVIF may need more than one reference frame, including hidden frames.

  36. lovetox

    Its winging cost and benefit

  37. lovetox

    Its weighing cost and benefit

  38. meson

    https://developers.google.com/speed/webp/docs/riff_container

  39. meson

    here's a nice explanation of the webp container

  40. 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

  41. 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

  42. 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?

  43. Louis2

    I don't think dbus API can invoke menu option to appear send data out

  44. Louis2

    I need Gajim developer

  45. 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?

  46. lovetox

    Seems not to be an error with the database

  47. lovetox

    The error says you access a attribute which is not there

  48. meson

    Oh, wait, I got confused

  49. 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)

  50. 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.

  51. lovetox__

    why copy anything at all

  52. Link Mauve

    You You may also want to change the resource, otherwise they will conflict.

  53. lovetox

    you are setting up a new client

  54. Link Mauve

    lovetox__, to keep the logs for instance.

  55. lovetox

    dont copy anything

  56. Link Mauve

    And the workspaces.

  57. John Livingston

    have i to copy .local/share/gajim?

  58. John Livingston

    I want to copy just to get back my accounts and workspaces

  59. lovetox

    no workspaces are not shared

  60. lovetox

    they are not synced anymore after one day

  61. lovetox

    so it makes not much sense to copy them to beginn with

  62. lovetox

    i dont assume you have 20 workspaces setup

  63. mathieui

    lovetox, well, conversation logs would be one thing (setup time would be another, depending on the number of accounts)

  64. lovetox

    but we dont have that feature

  65. lovetox

    just setup a new client

  66. John Livingston

    > You You may also want to change the resource, otherwise they will conflict. where is the resource?

  67. John Livingston

    ok, found it

  68. 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.

  69. John Livingston

    (this does not migrate message history)

  70. meson

    lovetox, I've opened a MR for the db stuff, I'm not sure if I am on the right track though :)

  71. lovetox

    great thank, i look into it

  72. lovetox

    great thanks, i look into it

  73. lovetox

    meson, why are you doing the dance with checking if a file is previewable and if its available?

  74. lovetox

    both seems irrelevant, whatever code afterwards in the media browser follows must deal with both things anyway

  75. meson

    alright, makes sense. will get rid of it

  76. lovetox

    just as a side node, you dont need to call magic methods like that

    👍 1
  77. lovetox

    orig_path.parent.__str__()

  78. lovetox

    str(orig_path.parent)

  79. lovetox

    does exactly that, it calls the magic method on the object

  80. meson

    so you would add all messages into the filetranfer table as long as they have oob data attached?

  81. joeDoe

    scrolling up isn't loading backlog. What am I doing wrong?

  82. cal0pteryx

    joeDoe, nothing, it's not implemented

  83. joeDoe

    ack

  84. lovetox

    meson, yes

  85. lovetox

    either you decide that a message with oob is a filetransfer or not

  86. lovetox

    but it certainly does not depend on if we can preview the file or not

  87. lovetox

    filetransfer is a user decision, an intention that someone wants to send you a file

  88. lovetox

    and we store that intention in the form of a filetransfer in the database

  89. lovetox

    if a media browser later can display this or not is a different topic

  90. lovetox

    thats also why you code to insert something into the FT table needs to move into common/message

  91. lovetox

    where we receive the message. Following the logic we already know its a filetransfer, no need to do this in the preview code

  92. 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?

  93. meson

    and for the media browser we select all entries from the filetransfer table with an existing original file path?

  94. lovetox

    yes, the idea is that the filetransfer table holds possible filetransfers, not necessarily finished onces

  95. lovetox

    thats why there is also a state column

  96. lovetox

    the idea is that then some other code picks up that filetransfer and does the downloading

  97. lovetox

    this could be of course something triggert in the UI, like clicking download

  98. lovetox

    this could be of course something triggert in the UI, like clicking download in the preview widget

  99. lovetox

    my idea for the route of events would be something like

  100. 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

  101. 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

  102. meson

    thanks, now the pictures has been come a bit clearer

  103. bot

    wurstsalat pushed 1 commits to branch gajim/master fix: RosterItemExchange: Fix accessing contact subscription - https://dev.gajim.org/gajim/gajim/-/commit/abac5860313a792159fb75f7f3e08dec18dd1c80