AW: AW: TS-File not seekable
Bernhard Graaf
bernhard.graaf at gmx.de
Fri Nov 30 11:20:22 PST 2012
Hello Kris,
I'm using already Version 1.0.3 and I've seen the bugreport regarding
tsdemux.
But my problem is more the file out of dvbbasebin ! filesink (there is no
tsdemux used).
I'm more and more believe that I have a hardware problem, because if there
is a basic fault, more developers will have the same problem. So it's
something I have different to them. If you tell me, that there is no basic
fault in my code, I've try to check on other battlefields.
I thank you very much for your time and inform you about the results!
Bernhard
-----Ursprüngliche Nachricht-----
Von: gstreamer-devel-bounces+bernhard.graaf=gmx.de at lists.freedesktop.org
[mailto:gstreamer-devel-bounces+bernhard.graaf=gmx.de at lists.freedesktop.org]
Im Auftrag von Krzysztof Konopko
Gesendet: Freitag, 30. November 2012 19:52
An: gstreamer-devel at lists.freedesktop.org
Betreff: Re: AW: TS-File not seekable
Hi Bernhard,
You mentioned another program using tsdemux. AFAIK there were some fixes
around these issues in tsdemux and they're included in GStreamer-1.0.3.
Could you try it?
Kris
On 30/11/12 18:19, Bernhard Graaf wrote:
> Hi Kris,
>
> Don't work as expected. The pipe with using 'gst_parse_launch' is running
> well, but the result is the same. Normal playing not a problem but seeking
> has a problem.
> In the meantime I've got an error message: 'GStreamer-CRITICAL **:
> gst_segment_do_seek: assertion `segment->format == format' failed'.
> If I do the same seeking with other files (f.e. with 'gst-launch' on
command
> line), I have no problems with that. So the ts-file has a problem.
>
> I've also tried to reduce the pipe (dvbbasebin ! queue ! filesink) without
> any additional parameter, but the result is the same.
>
> I've no idea where to search to fix it. I've also no idea where the
> different is between command line and gst_parse_launch. There should be a
> different because of different results.
>
> Any additional ideas? Could the DVB-Card be the problem (Conexant
> CX24123/CX24109 Chipset)?
> You make me happy if you have any ideas to fix it!
>
> Regards
> Bernhard
>
>
> -----Ursprüngliche Nachricht-----
> Von: gstreamer-devel-bounces+bernhard.graaf=gmx.de at lists.freedesktop.org
>
[mailto:gstreamer-devel-bounces+bernhard.graaf=gmx.de at lists.freedesktop.org]
> Im Auftrag von Bernhard Graaf
> Gesendet: Freitag, 30. November 2012 10:56
> An: krzysztof.konopko at youview.com; 'Discussion of the development of and
> with GStreamer'
> Betreff: AW: TS-File not seekable
>
> Hi Kris,
>
> Thanks a lot for your answer.
> I'll check it with using 'gst_parse_launch'. That's a good idea.
>
> For the problem I have:
> The timing information of the TS-File seams to be corrupt, because in a
> second program (using tsdemux or playbin) the playback is hanging after
try
> to seek using gst_element_seek. If I open another file (generated by
> gst-launch) its OK. Therefore I believe that there is a problem with the
> file not with the seeking program.
>
> Thanks again. I will follow your idea and give you the result of my test.
>
> Bernhard
>
>
> -----Ursprüngliche Nachricht-----
> Von: gstreamer-devel-bounces+bernhard.graaf=gmx.de at lists.freedesktop.org
>
[mailto:gstreamer-devel-bounces+bernhard.graaf=gmx.de at lists.freedesktop.org]
> Im Auftrag von Krzysztof Konopko
> Gesendet: Freitag, 30. November 2012 10:38
> An: gstreamer-devel at lists.freedesktop.org
> Betreff: Re: TS-File not seekable
>
> Hi Bernhard,
>
> What do you mean by "different results" and "problem with seeking"?
> Could you be more specific? Does your program produce non empty file?
>
> Why do you need tsparse if you writing to a file? Are you going to
> handle some messages from tsparse?
>
> In the first instance you don't have to force EOS in your app. Just stop
> your program on the command line by pressing Ctrl+C and the default
> signal handler will do the job. You can improve it later.
>
> You can learn more about your program behaviour if you set GST_DEBUG
> variable when running it, e. g.:
>
> GST_DEBUG=4 ./your-app
>
> See gst-launch-1.0 manual to learn more about debugging levels.
>
> I'd recommend making your app simpler so you can evolve it later. Use
> gst_parse_launch() instead of gst_element_factory_make(). Less code,
> less oportunity to make a mistake and you can always refer to any
> element in the pipe by its name (use 'name' property):
>
> GError *error;
> GstElement *dvb_pipe = gst_parse_launch ("dvbbasebin name=dvb"
> " ! queue ! tsparse "
> " ! filesink qos=TRUE",
> &error);
>
> if (!dvb_pipe) {
> g_printerr ("Failed to create the pipeline: %s\n",
> error ? error->message : "(unknown error)");
> return FALSE;
> }
>
> dvb_bus = gst_pipeline_get_bus (GST_PIPELINE (dvb_pipe));
> gst_bus_add_watch (dvb_bus, dvb_bus_call, NULL);
> gst_object_unref (dvb_bus);
>
> Return gboolean instead of int unless you have a good reason to return
int.
>
> You can use g_object_set() to set multiple properties:
> dvb_source = gst_bin_get_by_name (GST_BIN (dvb_pipe), "dvb");
>
> g_object_set (G_OBJECT (dvb_source),
> "adapter", atoi(argv[3]),
> "frontend", atoi(argv[6]),
> "frequency", atoi(freq),
> "program_numbers", argv[7],
> "polarity", argv[9],
> "symbol-rate", atoi(argv[5]),
> NULL);
>
> Cheers,
> Kris
>
> On 30/11/12 08:03, Bernhard Graaf wrote:
>> I've made some test to finish the pipe:
>>
>> Direct call of 'g_main_loop_quit (loop)' ore parsing message with
>> 'gst_element_send_event (dvb_pipe, gst_event_new_eos())' and handle the
>> loop_quit in the message loop function, but all with the same result.
>>
>> My question is now: Where is the different between gst-launch and my own
>> program in the ts-file results? What do gst-launch more then I do?
>>
>>
>>
>> If someone could help me, I will be very happy!
>>
>>
>>
>> Thanks a lot
>>
>> Bernhard
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>>
>>
>>
>> Hi @ all,
>>
>>
>>
>> I've an issue with my own program using dvbbasebin:
>>
>> The pipe: gst-launch-1.0 dvbbasebin adapter=1 frequency=12544000
>> program-numbers="17501" polarity="h" symbol-rate=22000 ! queue ! tsparse
!
>> filesink location=test_ts.mpg
>>
>> Results a file that has no problem with seeking
>>
>> But my own program:
>>
>>
>>
>>
>>
>>
**************************************************************************
>>
>> #include <stdio.h>
>>
>> #include <unistd.h>
>>
>> #include <sys/types.h>
>>
>> #include <sys/stat.h>
>>
>> #include <fcntl.h>
>>
>> #include <stdlib.h>
>>
>> #include <string.h>
>>
>> #include <errno.h>
>>
>> #include <gst/gst.h>
>>
>> #include <glib.h>
>>
>> #include <syslog.h>
>>
>> #include <sys/time.h>
>>
>> #include <sys/select.h>
>>
>>
>>
>>
>>
>> GstElement *dvb_pipe, *dvb_source, *dvb_sink, *dvb_queue, *dvb_parse;
>>
>> GstBus *dvb_bus;
>>
>> GMainLoop *loop;
>>
>>
>>
>> static gboolean
>>
>> dvb_bus_call (GstBus *tmp_bus,
>>
>> GstMessage *msg,
>>
>> gpointer data)
>>
>> {
>>
>>
>>
>> char tmp_str[254];
>>
>>
>>
>> switch (GST_MESSAGE_TYPE (msg)) {
>>
>>
>>
>> case GST_MESSAGE_EOS:
>>
>> g_print ("End of stream\n");
>>
>> g_main_loop_quit (loop);
>>
>> break;
>>
>>
>>
>> case GST_MESSAGE_ERROR: {
>>
>> gchar *debug;
>>
>> GError *error;
>>
>>
>>
>> gst_message_parse_error (msg, &error, &debug);
>>
>> g_free (debug);
>>
>>
>>
>> sprintf(tmp_str, "Error: %s\n", error->message);
>>
>> g_printerr ("%s\n", tmp_str);
>>
>> syslog(LOG_ERR, "%s\n",tmp_str);
>>
>> g_error_free (error);
>>
>> g_main_loop_quit (loop);
>>
>>
>>
>> break;
>>
>> }
>>
>> default:
>>
>> break;
>>
>> }
>>
>>
>>
>> return TRUE;
>>
>> }
>>
>>
>>
>>
>>
>> int init_gst_tv()
>>
>> {
>>
>>
>>
>> gst_init (0, NULL);
>>
>>
>>
>> dvb_pipe = gst_pipeline_new ("DVB-Streamer");
>>
>> dvb_source = gst_element_factory_make ("dvbbasebin", "dvb-source");
>>
>> dvb_queue = gst_element_factory_make ("queue", "dvb-queue");
>>
>> dvb_parse = gst_element_factory_make ("tsparse", "dvb-parse");
>>
>> dvb_sink = gst_element_factory_make ("filesink", "dvb-sink");
>>
>>
>>
>>
>>
>> if (!dvb_pipe || !dvb_source || !dvb_queue || !dvb_parse || !dvb_sink)
>>
>> {
>>
>> g_printerr ("One element could not be created. Exiting.\n");
>>
>> syslog(LOG_ERR, "Ein Pipe-Element nicht erstellt -->
>> Programmabbruch\n");
>>
>> if(!dvb_pipe) g_printerr("DVB-Pipeline not created\n");
>>
>> else if(!dvb_source) g_printerr("DVB-Source not created\n");
>>
>> else if(!dvb_queue) g_printerr("DVB-Queue not created\n");
>>
>> else if(!dvb_parse) g_printerr("DVB-Parse not created\n");
>>
>> else if(!dvb_sink) g_printerr("DVB-Sink not created\n");
>>
>> return -1;
>>
>> }
>>
>>
>>
>> dvb_bus = gst_pipeline_get_bus (GST_PIPELINE (dvb_pipe));
>>
>> gst_bus_add_watch (dvb_bus, dvb_bus_call, NULL);
>>
>> gst_object_unref (dvb_bus);
>>
>>
>>
>> gst_bin_add_many (GST_BIN (dvb_pipe), dvb_source, dvb_queue, dvb_parse,
>> dvb_sink, NULL);
>>
>> gst_element_link_many (dvb_source, dvb_queue, dvb_parse, dvb_sink,
> NULL);
>>
>>
>>
>> g_object_set (G_OBJECT (dvb_sink), "qos", TRUE, NULL);
>>
>>
>>
>> return 1;
>>
>> }
>>
>>
>>
>> int main (int argc, char **argv)
>>
>> {
>>
>>
>>
>>
>>
>> char tmp_str[254], freq[40], file_name[254], rec_pids[25];
>>
>> char np_name[254];
>>
>> int pid = 0;
>>
>> int fd;
>>
>>
>>
>> sprintf(freq,"%s000", argv[4]);
>>
>> sprintf(file_name, "test.mpg");
>>
>>
>>
>> loop = g_main_loop_new (NULL, FALSE);
>>
>>
>>
>> init_gst_tv();
>>
>>
>>
>> g_object_set (G_OBJECT (dvb_source), "adapter", atoi(argv[3]), NULL);
>>
>> g_object_set (G_OBJECT (dvb_source), "frontend", atoi(argv[6]), NULL);
>>
>> g_object_set (G_OBJECT (dvb_source), "frequency", atoi(freq), NULL);
>>
>> g_object_set (G_OBJECT (dvb_source), "program_numbers", argv[7], NULL);
>>
>> g_object_set (G_OBJECT (dvb_source), "polarity", argv[9], NULL);
>>
>> g_object_set (G_OBJECT (dvb_source), "symbol-rate", atoi(argv[5]),
> NULL);
>>
>> g_object_set (G_OBJECT (dvb_sink), "location", file_name, NULL);
>>
>>
>>
>>
>>
>> gst_element_set_state (dvb_pipe, GST_STATE_PLAYING);
>>
>>
>>
>> g_print ("Running...\n");
>>
>> g_main_loop_run (loop);
>>
>>
>>
>> gst_element_set_state (dvb_pipe, GST_STATE_NULL);
>>
>>
>>
>> g_print ("Deleting pipeline\n");
>>
>> gst_object_unref (GST_OBJECT (dvb_pipe));
>>
>>
>>
>> return 1;
>>
>> }
>>
>>
>
****************************************************************************
>> *
>>
>>
>>
>> Is the result not seekable!
>>
>>
>>
>> Something missing to generate a seekable ts-file?
>>
>>
>>
>> Thanks a lot and sorry for this long mail!
>>
>> Bernhard
>>
>>
>>
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list