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 587877 - File not playing with Playbin.where as playback fine with gst-launch-0.10 filesrc ! MyFilter
File not playing with Playbin.where as playback fine with gst-launch-0.10 fil...
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.22
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-07-06 11:20 UTC by Sriram
Modified: 2010-02-18 12:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Sriram 2009-07-06 11:20:37 UTC
Please describe the problem:
I am Implementing a filter which takes the data and demultiplex it, decodes and renders data. My requirement is all above three (Demultiplex, Decoding, Rendering) should be happen in one filter. For that i am implemented one filter and i am able to successfully test with following command

gst-launch-0.10 filesrc location=/home/sample_mpeg4.mp4 ! myfilter
log:
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 5196977559 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
FREEING pipeline ...


Issue is when same file playing with playbin means following command

gst-launch-0.10 playbin uri=file:///home/sample_mpeg4.mp4

Log:
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

then pipeline is hanging.

what can be the Issue ? What playbin is expecting from myfilter point of view ?
Please anyone help me to solve this problem.


Steps to reproduce:



Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Tim-Philipp Müller 2009-07-06 11:46:06 UTC
Do you think there is a bug in playbin here? What makes you think that exactly?

Bugzilla is not really the right place to get help with correctly writing a decoder/demuxer/filter that's recognised properly by playbin. The gstreamer-devel mailing list might be better suited for that.

You should probably supply either the source code of your filter or at least a full debug log.
Comment 2 Sriram 2009-07-06 12:06:13 UTC
(In reply to comment #1)
> Do you think there is a bug in playbin here? What makes you think that exactly?
> 
> Bugzilla is not really the right place to get help with correctly writing a
> decoder/demuxer/filter that's recognised properly by playbin. The
> gstreamer-devel mailing list might be better suited for that.
> 
> You should probably supply either the source code of your filter or at least a
> full debug log.
> 

Thank you for your suggestion. Here i am not suspecting the playbin. But i need what kind of information playbin requires.

I will post my doubt  in gstreamer-devel mailing list ....

Thank u once again 
Comment 3 Tim-Philipp Müller 2009-07-06 12:38:34 UTC
Some issues to check:

 - your element needs to have a rank >= GST_RANK_MARGINAL
   (when you do gst_element_register())

 - your element's klass description string needs to include
   the right keywords (gst_element_details_set*())

 - the pad template of your element's sink pad needs to
   contain the right caps, so playbin/decodebin can see
   that it supports the type

On a side note, your manual pipeline should error out with a not-linked internal flow error (since there's no sink connected to your filter); if it doesn't do that, you are probably not passing the flow return value from pad_push() upstream by returning it in your chain function.
Comment 4 Sriram 2009-07-06 13:45:19 UTC
      Nice to See your replay. I need this kind of reply so that i can provide more observations. Here i am giving my details. So please check it replay me back.
 
>  - your element needs to have a rank >= GST_RANK_MARGINAL
>    (when you do gst_element_register())

     This is not at all issue. Because i am giving filter Rank 300.
> 
>  - your element's klass description string needs to include
>    the right keywords (gst_element_details_set*())

     This i am giving as Codec/Demuxer/Decoder/Render. My filter able to detect by playbin/decodebin so this one also will not cause the issue.

>   - the pad template of your element's sink pad needs to
>    contain the right caps, so playbin/decodebin can see
>    that it supports the type

     Pad Template: I am using only one Sinkpad that also allows all kind of inputs.


> On a side note, your manual pipeline should error out with a not-linked
> internal flow error (since there's no sink connected to your filter); if it
> doesn't do that, you are probably not passing the flow return value from
> pad_push() upstream by returning it in your chain function.

  Actually here i dont need any sink elements of PC. Because my filter have its own hardware components(Sound Card and Display).
  And one more thing i am not using chain based model here. I am using Active pull model for file reading.

 Please reply me if u need any other information.

Thanking You




Comment 5 Tim-Philipp Müller 2009-07-13 08:44:11 UTC
Could you provide information that suggests that this is actually a bug in GStreamer and not your element?
Comment 6 Sriram 2009-07-14 04:12:07 UTC
(In reply to comment #5)
> Could you provide information that suggests that this is actually a bug in
> GStreamer and not your element?
> 

Once again Here i am not suspecting the gstreamer.. Please dont think this bug from gstreamer point of view .. but i need from playbin point of view what it requires .. or else please suggest me for any reference ... 

And one more thing here i am changed my filter architecture.. Previously i am using only one filter for doing all(Demuxing,Decoding,Rendering). But now i have both AudioSink and Video Sink elements in Chain. Here sink elements i am added for Gstreamer supporting...
So Now I have 3follwing Filters
1. MyDemuxer      Codec/Demuxer With Rank 300
2. MyAudioSink    Sink/Audio    with Rank 300
3. MyVideoSink    Sink/Video    with Rank 300

with this filters Follwing chain working fine.

gst-launch-0.10 filesrc location=/home/sample_mpeg4.mp4 ! MyDemuxer name=demux {demux.audio_00 ! MyAudioSink }  {demux.video_00 ! MyVideoSink }

where as same thing is not fine with Playbin...????

My other Observations:

When i am testing my chain with -m option i mean (gst-launch-0.10 -m filesrc..) & (gst-launch-0.10 -m Playbin....)
here i am giving debug log:

1.gst-launch-0.10 -m filesrc
Setting pipeline to PAUSED ...

Pipeline is PREROLLED ...
#2  "MyVideoSink"  old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
#3  "MyAudioSink"  old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
#4  "demux"  old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
#5  "filesrc0"  old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
#6  "pipeline0"  old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_PAUSED;
#7  "MyVideoSink"  old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
#8  "MyAudioSink"  old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
#9  "demux"  old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
#10  "filesrc0"  old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
#11  "pipeline0"  old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
Setting pipeline to PLAYING ...

#12  "pipeline0" (new-clock): GstMessageNewClock, clock=(GstClock)"\(GstSystemClock\)\ GstSystemClock";
New clock: GstSystemClock

#14  "MyVideoSink"  old-state=(GstState)GST_STATE_PAUSED, new-state=(GstState)GST_STATE_PLAYING, pending-state=(GstState)GST_STATE_VOID_PENDING;
#15  "MyAudioSink"  old-state=(GstState)GST_STATE_PAUSED, new-state=(GstState)GST_STATE_PLAYING, pending-state=(GstState)GST_STATE_VOID_PENDING;
#16  "demux"  old-state=(GstState)GST_STATE_PAUSED, new-state=(GstState)GST_STATE_PLAYING, pending-state=(GstState)GST_STATE_VOID_PENDING;
#17  "filesrc0"  old-state=(GstState)GST_STATE_PAUSED, new-state=(GstState)GST_STATE_PLAYING, pending-state=(GstState)GST_STATE_VOID_PENDING;
#18  "pipeline0"  old-state=(GstState)GST_STATE_PAUSED, new-state=(GstState)GST_STATE_PLAYING, pending-state=(GstState)GST_STATE_VOID_PENDING;

#20  "pipeline0" (eos): no message details
Got EOS  "pipeline0".
Execution ended after 5206245933 ns.
Setting pipeline to PAUSED ...

FREEING pipeline ...



2. gst-launch-0.10 -m Playbin
Pipeline is PREROLLING ...
 #0  "playbin0"         old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_PAUSED;
 #4  "test"             old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_PAUSED;
 #6  "fakesink"         old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
 #7  "typefind"         old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
 #8  "decodebin0"       old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_PAUSED;
 #11  "MyDemuxer"    old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
 #14  "MyDemuxer"    old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
 #15  "typefind"        old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
 #16  "source"          old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_PAUSED;
 #17  "source"          old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
 
^C
    Caught interrupt -- handling interrupt.
    
 #18  "playbin0" (application): GstLaunchInterrupt, message=(string)"Pipeline\ interrupted";
    
    Interrupt: Stopping pipeline ...
    
    ERROR: pipeline doesn't want to preroll.
    
Setting pipeline to NULL ...
^C

Please Let me know if u need any information regrading this ....

Thanks & Regards,
Sriram
Comment 7 Tim-Philipp Müller 2010-02-18 12:40:24 UTC
Please use the mailing list for support.

There's no indication that there's a bug here, so closing this.

For what it's worth, the old playbin element doesn't handle non-raw sinks. You will need to use the playbin2 element for that.