Multifilesink messages and unclear doc

Mathieu Duponchelle mathieu at centricular.com
Fri Jun 14 20:45:02 UTC 2019


On 6/14/19 10:16 PM, pisymbol . wrote:
> So the doc is flat out wrong. But after digging into source this worked for you Googlers:
>
> Register a message handler on your bus:
>
>      bus = pipeline.get_bus()
>      bus.add_watch(GLib.PRIORITY_DEFAULT, on_message)
>
> Then in on_message do:
>
>   def on_message(bus, message):
>         if message.type == Gst.MessageType.ELEMENT:
>             if message.src.name.startswith("multifilesink"):
>                 msg_struct = message.get_structure()
>                 print(msg_struct.get_string('filename')) # Prints out the current capture file
>
> Need MOAR doc! :-)

Note that ideally, we would standardize the documentation for custom messages
emitted by elements, but that needs doing :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190614/01447949/attachment.html>


More information about the gstreamer-devel mailing list