splitmuxsink Filename with Datetime

Armin Erkert armin.erkert at rolmail.net
Thu Feb 23 08:06:38 UTC 2023


Hi,

I can find the a wrapper and I tryed to add a SignalHandler with


public delegate void MyDelegateNewFormat(object sender, GLib.SignalArg args);

....

splitElement.AddSignalHandler("format-location", new  
MyDelegateNewFormat(NewFormat));

.....

static void NewFormat(object sender, GLib.SignalArgs args)
{
}

But running this Error

System.ArgumentException: Object of type 'System.EventArgs' cannot be  
converted to type 'GLib.SignalArgs'.
    at System.RuntimeType.TryChangeType(Object value, Binder binder,  
CultureInfo culture, Boolean needsSpecialCast)
    at System.RuntimeType.CheckValue(Object value, Binder binder,  
CultureInfo culture, BindingFlags invokeAttr)
    at System.Reflection.MethodBase.CheckArguments(Object[]  
parameters, Binder binder, BindingFlags invokeAttr, CultureInfo  
culture, Signature sig)
    at System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object  
obj, BindingFlags invokeAttr, Binder binder, Object[] parameters,  
CultureInfo culture)
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj,  
BindingFlags invokeAttr, Binder binder, Object[] parameters,  
CultureInfo culture)
    at System.Delegate.DynamicInvokeImpl(Object[] args)
    at System.Delegate.DynamicInvoke(Object[] args)
    at GLib.Signal.ClosureInvokedCB(Object o, ClosureInvokedArgs args)
    at GLib.SignalClosure.Invoke(ClosureInvokedArgs args)
    at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr  
return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr  
invocation_hint, IntPtr marshal_data)
PushData
    at GLib.ExceptionManager.RaiseUnhandledException(Exception e,  
Boolean is_terminal)
    at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr  
return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr  
invocation_hint, IntPtr marshal_data)



Zitat von Steve McFarlin via gstreamer-devel  
<gstreamer-devel at lists.freedesktop.org>:

> I am not familiar with the C# API, but the C api has the  
> format-location signal.
> Maybe there is a wrapper over this in the C# API.
>
> https://gstreamer.freedesktop.org/documentation/multifile/splitmuxsink.html?gi-language=c#splitmuxsink::format-location
>
> - steve
>
>> On Feb 22, 2023, at 3:40 AM, Armin Erkert via gstreamer-devel  
>> <gstreamer-devel at lists.freedesktop.org> wrote:
>>
>>
>>
>> Hi,
>>
>> it's possible for splitmuxsink to generate filenames with the  
>> actual DateTime ?
>> Or has anyone an example how I can do it in my C# Application?
>>
>> Regards Armin
>>
>>





More information about the gstreamer-devel mailing list