After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 605997 - gst_clock_id_wait_async:getting callback even if the pipeline is paused or output window is closed!
gst_clock_id_wait_async:getting callback even if the pipeline is paused or ou...
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-04 06:48 UTC by sreerenj
Modified: 2010-01-04 15:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
example code for testing callback: (5.31 KB, text/plain)
2010-01-04 06:48 UTC, sreerenj
Details

Description sreerenj 2010-01-04 06:48:00 UTC
Created attachment 150768 [details]
example code for testing callback:

I captured the GstClockID of the pipeline in streaming-server using,

  id=gst_clock_new_periodic_id(media->media->pipeline->clock,start_time,interval);

And  then setted up the asynchronous  callback using the following.

 gst_clock_id_wait_async(id,(GstClockCallback *)TickCallback,"Tick
 sending");*

 but  evenif i "stopped" or "paused" the client side player , i am
 getting the callback " TickCallback" in the server side on specified
 intervals!!!!!!!
 
I setted up these settings in
 *gst-rtsp-server/gst/rtsp-server/rtsp-client.c* ...inside the
 *handle_play()* function.



But for checking the issue i am attaching an example clock.c here
 
which has been compiled with ,

 gcc  -lpthread -Wall $(pkg-config --cflags  --libs gstreamer-0.10) clock.c


and run with ./a.out video.mp4 (mp4 conatins mpeg4 video and aac audio)


if the choice you entered is "1" , the pipeline will moves to "PAUSE" state.But even if the pipeline is in PAUSED state  or output window for video is closed,i am getting the callback message "Inside callback function TickCallback" in regular intervals of 9 seconds.And whatever be the "start time" i specified with id, getting many number of callbacks initially!!!
Comment 1 Wim Taymans 2010-01-04 12:18:04 UTC
That is normal behaviour, a clock is allowed to keep running when the pipeline is paused. If you don't want the ticks in paused, simply ignore them.
Comment 2 sreerenj 2010-01-04 12:27:54 UTC
But even we changed the state of pipeline to NULL,,still getting the callback.If we want to konw the amount of data being trasmitted, what we should do? (suppose we changed the rate of playback to twice the normal rate).And suppose the network is slow, still the callback is going(even if i specified the clock as the running pipeline's clock???
Comment 3 sreerenj 2010-01-04 12:33:21 UTC
And in initial case, when the pipeline is just begining to run, the callback is calling continuously even i specified the the star time of clock id to a particular value!
Comment 4 Wim Taymans 2010-01-04 15:44:45 UTC
I don't know what you want to do but the current position is usually requested with a position query. If you want to measure the amount of time spent in playing, you can calculate the running time of the pipeline (when in PLAYING).

For the timeouts, you need to specify a start time relative to the current time of the clock. Again, I don't know what you are doing but it sounds like you are doing something wrong.

In general, you usually don't want to deal with the clock from an application unless you understand how things work (see docs/design/part-synchronisation.txt).