Multifilesink How to Generate New file after a force key unit event

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Multifilesink How to Generate New file after a force key unit event

Harish Sakhare
Hello All,


           
          I am sending a video stream using a C920 HD camera as an MP2TSstream. For storing streaming in different files I used "Multifilesink" element. For every press of button Record ON I have to generate new file to store recording. So set property of "next-file" element of multifilesink is,

g_object_set(G_OBJECT(data->multifilesink), "next-file", 3, NULL);
3 = GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT  New file after a force key unit event

I have no idea hopw to send force key unit event so that it can generate new file when newly press record button. Plz any one know how to solve it.

I will appreciate any help for my problem
Reply | Threaded
Open this post in threaded view
|

Re: Multifilesink How to Generate New file after a force key unit event

Sagar
Hi,
 were you able to solev this problem? Even I am not able to get hold of any code for this GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT

moderators help please....
Reply | Threaded
Open this post in threaded view
|

Re: Multifilesink How to Generate New file after a force key unit event

Sebastian Dröge-3
On Mi, 2016-03-02 at 22:37 -0800, Sagar wrote:
> Hi, 
>  were you able to solev this problem? Even I am not able to get hold
> of any code for this *GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT*

Set the "next-file" property to key-unit-event (i.e. 3).

See gst-inspect-1.0 or
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-multifilesink.html#GstMultiFileSink--next-file

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multifilesink How to Generate New file after a force key unit event

Sagar
how can I manually trigger *GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT* ?
Reply | Threaded
Open this post in threaded view
|

Re: Multifilesink How to Generate New file after a force key unit event

Sebastian Dröge-3
On Mi, 2016-03-02 at 23:39 -0800, Sagar wrote:
> how can I manually trigger *GST_MULTI_FILE_SINK_NEXT_KEY_UNIT_EVENT*
> ?

You don't, it's a property and not an event. If you want to manually
trigger keyunit events, take a look at the libgstvideo API. Like
gst_video_event_new_upstream_force_key_unit() and the downstream
variant of that. Depending on what exactly you want to do.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multifilesink How to Generate New file after a force key unit event

Sagar
Actually I am trying to remove silence from input video pipeline and then chop the audio into small .pcm files

Till now I am able to create on single non silent .pcm file. but when i try to use multifilesink thinking about its max-file-duration it is not working for pcm/raw audio stream. because of which I am planning to make this separating/creating new file bases on event which i can trigger after long silence.

I tried using         gst_video_event_new_downstream_force_key_unit(time,NULL, NULL, NULL, TRUE, 1);  but I am getting compilation error undefined reference to `gst_video_event_new_downstream_force_key_unit'

do you have any views on this problem scenario ?
Reply | Threaded
Open this post in threaded view
|

Re: Multifilesink How to Generate New file after a force key unit event

Sebastian Dröge-3
On Do, 2016-03-03 at 01:35 -0800, Sagar wrote:

> I tried using * gst_video_event_new_downstream_force_key_unit(time,NULL,
> NULL, NULL, TRUE, 1);*  but I am getting compilation error */undefined
> reference to `gst_video_event_new_downstream_force_key_unit'/*

You have to link to libgstvideo, e.g. by using the gstreamer-video-1.0
pkg-config file.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multifilesink How to Generate New file after a force key unit event

Sagar
thanks