I with gstreamer v4l2 video display and video recording, but I will not be opened by gplay recorded video, but on the Windows can play, I doubt is my pipeline EOS has been added at the end of the massage
I know CTRL+C can stop but can't play by gplay ,windows player can .so i think i should add EOS message in pipeline bus ,but i don't know how to add ,
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
gst_bus_add_watch (bus, callback, NULL);
gboolean callback()
{
GstMessage *msg;
g_print(".");
//if(--counter ==0){
if(2==2){
sleep(15);
g_print(" display over\n");
GST_MESSAGE_TYPE(msg)=GST_MESSAGE_EOS;
//g_print(" %s\n",GST_MESSAGE_TYPE(msg));
printf("ppp\n");
//gst_element_set_state(pipeline,GST_STATE_READY);
//printf("READY\n");
gst_element_send_event(pipeline,gst_event_new_eos());
gst_element_set_state(pipeline,GST_STATE_PAUSED);
printf("EOS\n");
g_main_loop_quit(loop);
return FALSE;
}
return TRUE;
}
So please help me how to add EOS to pipeline ,and i can play by gplay or gst-launch ,thanks a lot
Hi
The -e
option forces EOS on sources before shutting the pipeline down. This is useful when we write to files and want to shut down by killing gst-launch using CTRL+C or with the kill command
Regards