SOLVED: relinking branch for recording

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

SOLVED: relinking branch for recording

killerrats
This post was updated on .
I was connected to a live camera stream to then write to a file. one branch
of the tee has a fakesink and the other has a muxer and filesink. I let it
unlink and relink the branch for the writing happen every 8-10 seconds. I
get to a point where the relinking and linking has an error. I got about 153
times relink the branch. the error is:

qtmux gstqtmux.c:2780:gst_qt_mux_start_file:<muxer> error: Downstream is not
seekable - will not be able to create a playable file

the whole stream stopped totally. is there a limit on the number of times to
unlink and link the branch?



-----
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

AW: relinking branch for recording

Thornton, Keith
Hi,
My question is why are you doing that, What are you trying to achieve. Maybe there is a better way of doing it.
Gruesse

-----Urspr√ľngliche Nachricht-----
Von: gstreamer-devel <[hidden email]> Im Auftrag von killerrats
Gesendet: Dienstag, 28. Januar 2020 04:07
An: [hidden email]
Betreff: relinking branch for recording

I was connected to a live camera stream to then write to a file. one branch of the tee has a fakesink and the other has a muxer and filesink. I let it unlink and relink the branch for the writing happen every 8-10 seconds. I get to a point where the relinking and linking has an error. I got about 153 times relink the branch. the error is:

qtmux gstqtmux.c:2780:gst_qt_mux_start_file:<muxer> error: Downstream is not seekable - will not be able to create a playable file

the whole stream stopped totally. is there a limit on the number of times to unlink and link the branch?



-----
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&amp;data=02%7C01%7C%7Ccc0fb0e516d148e3e12708d7a3a8b1be%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637157817238027480&amp;sdata=E7cs2Q%2B7gjM38b%2FKO6hg8wQO5IdtVJoy9QsX8ZDdoaU%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&amp;data=02%7C01%7C%7Ccc0fb0e516d148e3e12708d7a3a8b1be%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637157817238037474&amp;sdata=tr1v6G36uReOrc%2B2YT6qGyKuk5%2FtEA4Ej4b34EI86Ok%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: relinking branch for recording

killerrats
its a way to write to a different file each time. I just needed to know if
there is a certain thing i have to do to make it work right. it seems to be
random to how many times i wrote to files. so definitely not the number of
times to unlink and link the branch. neither is a limit to write to some
many files. it seems to have no data going through the pipeline for some
reason.

could the queue's be drained and the bus sees that to be an error?



-----
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

AW: AW: relinking branch for recording

Thornton, Keith
Hi,
have you looked into using splitmuxsink?
Gruesse

-----Urspr√ľngliche Nachricht-----
Von: gstreamer-devel <[hidden email]> Im Auftrag von killerrats
Gesendet: Dienstag, 28. Januar 2020 09:44
An: [hidden email]
Betreff: Re: AW: relinking branch for recording

its a way to write to a different file each time. I just needed to know if there is a certain thing i have to do to make it work right. it seems to be random to how many times i wrote to files. so definitely not the number of times to unlink and link the branch. neither is a limit to write to some many files. it seems to have no data going through the pipeline for some reason.

could the queue's be drained and the bus sees that to be an error?



-----
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
--
Sent from: https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fgstreamer-devel.966125.n4.nabble.com%2F&amp;data=02%7C01%7C%7C84a33591086b4d79c0a708d7a3d6dcc6%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637158015524651171&amp;sdata=1V7rjTMnv0uUeyeKQwmjD0%2BWnhQmIWcWyqHNg%2FuaBfk%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fgstreamer-devel&amp;data=02%7C01%7C%7C84a33591086b4d79c0a708d7a3d6dcc6%7C28042244bb514cd680347776fa3703e8%7C1%7C0%7C637158015524651171&amp;sdata=z5tJC%2F9XbIOGykfZ5AxsRqg6p96hBBx0uGB8oK4o0k0%3D&amp;reserved=0
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: AW: relinking branch for recording

killerrats
yep. I currently am using it but I had to modify the plugin because the
queue's didn't seem to work right for buffering. The problem I'm facing is
that splitmuxsink seems to get to a point where it will stop all of the
sudden. then i have to stop the pipeline and start it again. Sometimes i
won't be able to null the pipeline and i have to quit the application. I
don't really understand why that is. so i thought i would try to figure out
how to link and relink the branch for writing.

I'm just trying to figure out why it does this problem of not buffering or
there is no connnection or what.



-----
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.3
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: relinking branch for recording

killerrats
This post was updated on .
In reply to this post by killerrats

source ! depay ! parse ! tee name=tee ! queue ! fakesink 
tee. ! queue ! queue ! muxer ! filesink.okay 

i think i figured out that I can put a queue in front of the tee branch and then block that src pad.I set the queue's to have max-size-buffers = 0 max-size-bytes = 0 and max-size-time = 0. this way when i block it will keep the remaining continuous flow of video to then be recorded instead of losing it. if that is true. If there is audio involved then will change a little but for the most part will work good.

steps:
1: block pad
2. in blocked pad signal method will eos through the recording
3. unlink elements
4. relink the elements
5. unblock pad    
    a. gst_pad_remove_probe(pad, GST_PAD_PROBE_INFO_ID(info));     
    b. return GST_PAD_PROBE_DROP;

void StoppingTheBranch(gpointer pointer)
{
      bool result = true;
      GstElement* elemeent = nullptr;
      GstPad* srcPad = nullptr;
      GstPadProbeType BlockType = GST_PAD_PROBE_TYPE_IDLE;

      elemeent = gst_bin_get_by_name(GST_BIN(pipe->pPipedata->pipeline), [BLOCKING ELEMENT]);
			
      srcPad = gst_element_get_static_pad(elemeent, "src");
      pipe->pPipedata->probe_v = gst_pad_add_probe(srcPad, BlockType,
      pad_block_cb, pointer, nullptr);
			
}
static GstPadProbeReturn pad_block_cb(GstPad * pad, GstPadProbeInfo* info, gpointer user_data)
{
	try
	{
        	g_print("\r\nBlocked src pad\r\n");
			
		1. eos through sink pad
		2. unlink
		3. relink to this src pad
		4. unblock by removing probe and return GST_PAD_PROBE_DROP;
			
	}
	catch (...)
	{
	}

	End:
	{
	return result;
	}
}
----- ------------------------------ Gstreamer 1.14.3 ------------------------------ Windows -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list gstreamer-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.14.3
------------------------------
Windows