SOLVED: rtpjitterbuffer problem

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

SOLVED: rtpjitterbuffer problem

killerrats
Administrator
This post was updated on .
rtspsrc name=source
! rtph264depay ! h264parse ! tee name=vtee ! queue !
mux.video splitmuxsink async-handling=true max-size-bytes=10485760
max-files=360 muxer=avimux location=E:/cmdVideoSplit/video%06d.avi name=mux
source.
! rtpmp4gdepay ! aacparse ! tee name=atee ! queue !
mux.audio_0


I have the following pipeline but when i use the signal from splitmuxsink
"format-location". If i return a filename the pipeline will error out and
quit program. The error will give rtpjitterbuffer too big,reset skew. anyone
know why that would be. I'm linking them together myself in my application
not in command prompt.

any ideas?



-----
------------------------------
Gstreamer 1.14.1
------------------------------
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.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: rtpjitterbuffer problem

killerrats
Administrator
This post was updated on .

okay I think i figured out that the problem is when I go to return the next
file in the signal "format-location". The difference between them is in
bold. If i use the working_splitmux_cb method then could there be a memory
leak on that one. if there is what is the better way of doing it.

gchar* videoPipeline::*notWorking_splitmux_cb*(GstElement* element, guint
fragment_id, gpointer user_data)
{
std::string root = "", file = "", filePath = "";
unsigned __int64 sizeOfFile = 0;
std::string temp = "video%04d.avi";
char* newFile = new char[strlen(temp.c_str())];

strcpy(newFile, temp.c_str());
newFile = g_strdup_printf(newFile, fragment_id);

temp = std::string(newFile);
delete[] newFile;
return g_strdup_printf("%s", temp.c_str());
}

gchar* videoPipeline::*working_splitmux_cb*(GstElement* element, guint
fragment_id, gpointer user_data)
{
unsigned __int64 sizeOfFile = 0;
std::string temp = "video%04d.avi";
char* newFile = new char[strlen(temp.c_str())];

strcpy(newFile, temp.c_str());
newFile = g_strdup_printf(newFile, fragment_id);

return g_strdup_printf("%s", newFile);
}




-----
------------------------------
Gstreamer 1.14.1
------------------------------
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.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

AW: rtpjitterbuffer problem

Thornton, Keith
Hi,
from your code example I can't see what you are doing differently from just setting splitmuxsink location directly to <path>/video%04d.avi and letting splitmuxsink increment the fragment number.
Regards

-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von killerrats
Gesendet: Dienstag, 26. Juni 2018 01:25
An: [hidden email]
Betreff: Re: rtpjitterbuffer problem

okay I think i figured out that the problem is when I go to return the next file in the signal "format-location". The difference between them is in bold. If i use the working_splitmux_cb method then could there be a memory leak on that one. if there is what is the better way of doing it.

gchar* videoPipeline::*notWorking_splitmux_cb*(GstElement* element, guint fragment_id, gpointer user_data) {
        std::string root = "", file = "", filePath = "";
        unsigned __int64 sizeOfFile = 0;
        std::string temp = "video%04d.avi";
        char* newFile = new char[strlen(temp.c_str())];

        strcpy(newFile, temp.c_str());
        newFile = g_strdup_printf(newFile, fragment_id);

        *temp = std::string(newFile);*
        *delete[] newFile;*
        return g_strdup_printf("%s", newFile);
}

gchar* videoPipeline::*working_splitmux_cb*(GstElement* element, guint fragment_id, gpointer user_data) {
        unsigned __int64 sizeOfFile = 0;
        std::string temp = "video%04d.avi";
        char* newFile = new char[strlen(temp.c_str())];

        strcpy(newFile, temp.c_str());
        newFile = g_strdup_printf(newFile, fragment_id);
       
        return g_strdup_printf("%s", newFile);
}




-----
------------------------------
Gstreamer 1.14.1
------------------------------
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-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: rtpjitterbuffer problem

killerrats
Administrator
notWorking_splitmux_cb assign the char array to the string variable and then
return the string variable. I realize the return was suppose to do this
return g_strdup_printf("%s", temp.c_str()); made a mistake in the method.

In the working_splitmux_cb return g_strdup_printf("%s", newFile); works fine
but I don't delete the char array so will that make a memory leak?



-----
------------------------------
Gstreamer 1.14.1
------------------------------
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.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: AW: rtpjitterbuffer problem

killerrats
Administrator

I even tried another approach but found out that when I go to delete array or g_free it will error out.



gchar* videoPipeline::NextFile_splitmux_cb(GstElement* element, guint fragment_id,gpointer user_data)
{
printf("\r\nSetup new File\r\n");
std::string filePath = "";
std::string temp = "video05%d.avi";
gchar* name;
name = g_strdup_printf(g_strdup_printf("%s", temp.c_str()), fragment_id);

filePath = std::string(name);
g_free(name);
return g_strdup_printf("%s", filePath);
}
------------------------------
Gstreamer 1.14.1
------------------------------
Windows


Sent from the GStreamer-devel mailing list archive at Nabble.com.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
------------------------------
Gstreamer 1.16.2
------------------------------
Windows
Reply | Threaded
Open this post in threaded view
|

Re: AW: rtpjitterbuffer problem

killerrats
Administrator
This post was updated on .
In reply to this post by killerrats
Okay I finally was able to get it to work..

std::string videoPipeline::nextVid(std::string videoFormat, guint nextIndex)
{
        return g_strdup_printf(g_strdup_printf("%s", videoFormat.c_str()),
nextIndex);

}

gchar* videoPipeline::NextFile_splitmux_cb(GstElement* element, guint
fragment_id,gpointer user_data)
{
     return g_strdup_printf("%s", nextVid("video06%d.avi", fragment_id));
}



-----
------------------------------
Gstreamer 1.14.1
------------------------------
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.16.2
------------------------------
Windows