'segment->format == format' assertion failing in gstsegment when playing WM content

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

'segment->format == format' assertion failing in gstsegment when playing WM content

Andreas Schuler
Hi all,

I am having some trouble playing back Windows Media content.

The setup is somewhat unique but necessary for my application:
  • 2 fakesrc components, which are injecting encoded audio and video data
  • Sources are connected to capsfilters, on which I am setting the correct input caps (see below)
  • Caps filters are connected to a multiqueue
  • Queue is connected to two decoding bins
  • Standard audio and video rendering tails (i.e. convert filters, rendering sinks etc.) are connected to decoding bin source pads
This setup actually works fine for XVID/MP3 encoded content but I didn't have any luck getting it to play with WM content. The caps I have for audio and video are as follows:

audio/x-wma, channels=(int)2, rate=(int)32000, wmaversion=(int)2, bitrate=(int)32000, codec_data=(buffer)008800001f0000000000, block_align=(int)768, depth=(int)16
video/x-wmv, width=(int)720, height=(int)496, framerate=(fraction)24/1, wmvversion=(int)2, codec_data=(buffer)baf8ad00, format=(fourcc)WMV2

I have the same content in a regular WMV file, which is playing back fine when using the playbin. I verified the caps with that setup (the only difference appears to be the order of some of the fields and the video framerate [the actual value is 23.97fps]):

audio/x-wma, wmaversion=(int)2, bitrate=(int)32000, depth=(int)16, rate=(int)32000, channels=(int)2, block_align=(int)768, codec_data=(buffer)008800001f0000000000
video/x-wmv, wmvversion=(int)2, framerate=(fraction)25/1, width=(int)720, height=(int)496, codec_data=(buffer)baf8ad00, format=(fourcc)WMV2



When trying to play the content using the setup mention above I get a lot of the following messages from gstsegment.c (702):

CRITICAL **: file E:\devel-release\src_releases\gstreamer\gst\gstsegment.c: line 702: assertion `segment->format == format' failed

Enabling the debug output reveals the following from the dshow audio decoder:

dshowaudiodec : received new segment from 0:00:00.000000000 to 99:99:99.999999999
dshowaudiodec : chain (size 768)=> pts 0:00:00.000000000 stop 0:00:00.192000000
dshowaudiodec : this buffer has a DISCONT flag (0:00:00.000000000), flushing
dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000 stop 0:00:00.320000000
dshowaudiodec : buffer is out of segment, start 0:00:00.128000000 stop 0:00:00.256000000
dshowaudiodec : buffer is out of segment, start 0:00:00.256000000 stop 0:00:00.320000000
dshowaudiodec : chain (size 768)=> pts 0:00:00.320000000 stop 0:00:00.512000000
dshowaudiodec : buffer is out of segment, start 0:00:00.320000000 stop 0:00:00.448000000
dshowaudiodec : buffer is out of segment, start 0:00:00.448000000 stop 0:00:00.512000000
dshowaudiodec : chain (size 768)=> pts 0:00:00.512000000 stop 0:00:00.704000000
dshowaudiodec : buffer is out of segment, start 0:00:00.512000000 stop 0:00:00.640000000
dshowaudiodec : buffer is out of segment, start 0:00:00.640000000 stop 0:00:00.704000000
dshowaudiodec : chain (size 768)=> pts 0:00:00.704000000 stop 0:00:00.896000000
dshowaudiodec : buffer is out of segment, start 0:00:00.704000000 stop 0:00:00.832000000
dshowaudiodec : buffer is out of segment, start 0:00:00.832000000 stop 0:00:00.896000000

The video decoder is showing a similar picture:

dshowvideodec : new segment received => start=0:00:00.000000000 stop=99:99:99.999999999
dshowvideodec : chain (size 1749)=> pts 0:00:00.009000000 stop 0:00:00.010000000
dshowvideodec : this buffer has a DISCONT flag (0:00:00.009000000), flushing
dshowvideodec : buffer is out of segment, start 0:00:00.009000000 stop 0:00:00.010000000
dshowvideodec : chain (size 2972)=> pts 0:00:02.411000000 stop 0:00:02.412000000
dshowvideodec : buffer is out of segment, start 0:00:02.411000000 stop 0:00:02.412000000
dshowvideodec : chain (size 3735)=> pts 0:00:02.445000000 stop 0:00:02.446000000
dshowvideodec : buffer is out of segment, start 0:00:02.445000000 stop 0:00:02.446000000
dshowvideodec : chain (size 3500)=> pts 0:00:02.478000000 stop 0:00:02.479000000
dshowvideodec : buffer is out of segment, start 0:00:02.478000000 stop 0:00:02.479000000
dshowvideodec : chain (size 5141)=> pts 0:00:02.545000000 stop 0:00:02.546000000
dshowvideodec : buffer is out of segment, start 0:00:02.545000000 stop 0:00:02.546000000
dshowvideodec : chain (size 7849)=> pts 0:00:02.578000000 stop 0:00:02.579000000
dshowvideodec : buffer is out of segment, start 0:00:02.578000000 stop 0:00:02.579000000
dshowvideodec : chain (size 5101)=> pts 0:00:02.611000000 stop 0:00:02.612000000
dshowvideodec : buffer is out of segment, start 0:00:02.611000000 stop 0:00:02.612000000
dshowvideodec : chain (size 7712)=> pts 0:00:02.645000000 stop 0:00:02.646000000
dshowvideodec : buffer is out of segment, start 0:00:02.645000000 stop 0:00:02.646000000


I understand that the problem appears to be that the "format" in GstSegment is not of type GST_FORMAT_TIME when "gst_segment_clip" is called in gstdshowaudiocodec.c. The question is why. Can anyone point me in the right direction on this one?

Thanks,

Andreas


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: 'segment->format == format' assertion failing in gstsegment when playing WM content

Felipe Contreras
On Tue, May 6, 2008 at 1:41 AM, Andreas Schuler <[hidden email]> wrote:

> Hi all,
>
> I am having some trouble playing back Windows Media content.
>
> The setup is somewhat unique but necessary for my application:
>
> 2 fakesrc components, which are injecting encoded audio and video data
> Sources are connected to capsfilters, on which I am setting the correct
> input caps (see below)
> Caps filters are connected to a multiqueue
> Queue is connected to two decoding bins
> Standard audio and video rendering tails (i.e. convert filters, rendering
> sinks etc.) are connected to decoding bin source pads This setup actually
> works fine for XVID/MP3 encoded content but I didn't have any luck getting
> it to play with WM content. The caps I have for audio and video are as
> follows:
>
> audio/x-wma, channels=(int)2, rate=(int)32000, wmaversion=(int)2,
> bitrate=(int)32000, codec_data=(buffer)008800001f0000000000,
> block_align=(int)768, depth=(int)16
>  video/x-wmv, width=(int)720, height=(int)496, framerate=(fraction)24/1,
> wmvversion=(int)2, codec_data=(buffer)baf8ad00, format=(fourcc)WMV2
>
> I have the same content in a regular WMV file, which is playing back fine
> when using the playbin. I verified the caps with that setup (the only
> difference appears to be the order of some of the fields and the video
> framerate [the actual value is 23.97fps]):
>
> audio/x-wma, wmaversion=(int)2, bitrate=(int)32000, depth=(int)16,
> rate=(int)32000, channels=(int)2, block_align=(int)768,
> codec_data=(buffer)008800001f0000000000
> video/x-wmv, wmvversion=(int)2, framerate=(fraction)25/1, width=(int)720,
> height=(int)496, codec_data=(buffer)baf8ad00, format=(fourcc)WMV2
>
>
>
> When trying to play the content using the setup mention above I get a lot of
> the following messages from gstsegment.c (702):
>
> CRITICAL **: file E:\devel-release\src_releases\gstreamer\gst\gstsegment.c:
> line 702: assertion `segment->format == format' failed
>
> Enabling the debug output reveals the following from the dshow audio
> decoder:
>
> dshowaudiodec : received new segment from 0:00:00.000000000 to
> 99:99:99.999999999
> dshowaudiodec : chain (size 768)=> pts 0:00:00.000000000 stop
> 0:00:00.192000000
>  dshowaudiodec : this buffer has a DISCONT flag (0:00:00.000000000),
> flushing
> dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000 stop
> 0:00:00.320000000
> dshowaudiodec : buffer is out of segment, start 0:00:00.128000000 stop
> 0:00:00.256000000
>  dshowaudiodec : buffer is out of segment, start 0:00:00.256000000 stop
> 0:00:00.320000000
> dshowaudiodec : chain (size 768)=> pts 0:00:00.320000000 stop
> 0:00:00.512000000
> dshowaudiodec : buffer is out of segment, start 0:00:00.320000000 stop
> 0:00:00.448000000
>  dshowaudiodec : buffer is out of segment, start 0:00:00.448000000 stop
> 0:00:00.512000000
> dshowaudiodec : chain (size 768)=> pts 0:00:00.512000000 stop
> 0:00:00.704000000
> dshowaudiodec : buffer is out of segment, start 0:00:00.512000000 stop
> 0:00:00.640000000
>  dshowaudiodec : buffer is out of segment, start 0:00:00.640000000 stop
> 0:00:00.704000000
> dshowaudiodec : chain (size 768)=> pts 0:00:00.704000000 stop
> 0:00:00.896000000
> dshowaudiodec : buffer is out of segment, start 0:00:00.704000000 stop
> 0:00:00.832000000
>  dshowaudiodec : buffer is out of segment, start 0:00:00.832000000 stop
> 0:00:00.896000000
>
> The video decoder is showing a similar picture:
>
> dshowvideodec : new segment received => start=0:00:00.000000000
> stop=99:99:99.999999999
>  dshowvideodec : chain (size 1749)=> pts 0:00:00.009000000 stop
> 0:00:00.010000000
> dshowvideodec : this buffer has a DISCONT flag (0:00:00.009000000), flushing
> dshowvideodec : buffer is out of segment, start 0:00:00.009000000 stop
> 0:00:00.010000000
>  dshowvideodec : chain (size 2972)=> pts 0:00:02.411000000 stop
> 0:00:02.412000000
> dshowvideodec : buffer is out of segment, start 0:00:02.411000000 stop
> 0:00:02.412000000
> dshowvideodec : chain (size 3735)=> pts 0:00:02.445000000 stop
> 0:00:02.446000000
>  dshowvideodec : buffer is out of segment, start 0:00:02.445000000 stop
> 0:00:02.446000000
> dshowvideodec : chain (size 3500)=> pts 0:00:02.478000000 stop
> 0:00:02.479000000
> dshowvideodec : buffer is out of segment, start 0:00:02.478000000 stop
> 0:00:02.479000000
>  dshowvideodec : chain (size 5141)=> pts 0:00:02.545000000 stop
> 0:00:02.546000000
> dshowvideodec : buffer is out of segment, start 0:00:02.545000000 stop
> 0:00:02.546000000
> dshowvideodec : chain (size 7849)=> pts 0:00:02.578000000 stop
> 0:00:02.579000000
>  dshowvideodec : buffer is out of segment, start 0:00:02.578000000 stop
> 0:00:02.579000000
> dshowvideodec : chain (size 5101)=> pts 0:00:02.611000000 stop
> 0:00:02.612000000
> dshowvideodec : buffer is out of segment, start 0:00:02.611000000 stop
> 0:00:02.612000000
>  dshowvideodec : chain (size 7712)=> pts 0:00:02.645000000 stop
> 0:00:02.646000000
> dshowvideodec : buffer is out of segment, start 0:00:02.645000000 stop
> 0:00:02.646000000
>
>
> I understand that the problem appears to be that the "format" in GstSegment
> is not of type GST_FORMAT_TIME when "gst_segment_clip" is called in
> gstdshowaudiocodec.c. The question is why. Can anyone point me in the right
> direction on this one?

What about the timestamps? Are those ok?

--
Felipe Contreras

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: 'segment->format == format' assertion failing in gstsegment when playing WM content

Andreas Schuler
I have compared log entries like the following to the samples I am feeding the pipeline:

"dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000 stop 0:00:00.320000000"

This line is produced by the following statement (from gstdshowaudiodec.c):

GST_CAT_DEBUG_OBJECT (dshowaudiodec_debug, adec, "chain (size %d)=> pts %"
      GST_TIME_FORMAT " stop %" GST_TIME_FORMAT,
      GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)),
      GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer) +
          GST_BUFFER_DURATION (buffer)));

Those timestamps are matching from what I can tell and therefore look ok to me.



It is possible that I am not setting all necessary data on the GstBuffer in the fakesrc. The following fields get set at the moment:
  • GST_BUFFER_DATA
  • GST_BUFFER_SIZE
  • GST_BUFFER_TIMESTAMP
  • GST_BUFFER_DURATION
  • GST_BUFFER_FLAG_DISCONT (if present in source sample)
  • GST_BUFFER_FLAG_PREROLL (if present in source sample)

It is also worth mentioning that my fakesrc has the "is-live" property set to TRUE.

Thanks,

Andreas


On Tue, May 6, 2008 at 1:43 AM, Felipe Contreras <[hidden email]> wrote:
On Tue, May 6, 2008 at 1:41 AM, Andreas Schuler <[hidden email]> wrote:
> Hi all,
>
> I am having some trouble playing back Windows Media content.
>
> The setup is somewhat unique but necessary for my application:
>
> 2 fakesrc components, which are injecting encoded audio and video data
> Sources are connected to capsfilters, on which I am setting the correct
> input caps (see below)
> Caps filters are connected to a multiqueue
> Queue is connected to two decoding bins
> Standard audio and video rendering tails (i.e. convert filters, rendering
> sinks etc.) are connected to decoding bin source pads This setup actually
> works fine for XVID/MP3 encoded content but I didn't have any luck getting
> it to play with WM content. The caps I have for audio and video are as
> follows:
>
> audio/x-wma, channels=(int)2, rate=(int)32000, wmaversion=(int)2,
> bitrate=(int)32000, codec_data=(buffer)008800001f0000000000,
> block_align=(int)768, depth=(int)16
>  video/x-wmv, width=(int)720, height=(int)496, framerate=(fraction)24/1,
> wmvversion=(int)2, codec_data=(buffer)baf8ad00, format=(fourcc)WMV2
>
> I have the same content in a regular WMV file, which is playing back fine
> when using the playbin. I verified the caps with that setup (the only
> difference appears to be the order of some of the fields and the video
> framerate [the actual value is 23.97fps]):
>
> audio/x-wma, wmaversion=(int)2, bitrate=(int)32000, depth=(int)16,
> rate=(int)32000, channels=(int)2, block_align=(int)768,
> codec_data=(buffer)008800001f0000000000
> video/x-wmv, wmvversion=(int)2, framerate=(fraction)25/1, width=(int)720,
> height=(int)496, codec_data=(buffer)baf8ad00, format=(fourcc)WMV2
>
>
>
> When trying to play the content using the setup mention above I get a lot of
> the following messages from gstsegment.c (702):
>
> CRITICAL **: file E:\devel-release\src_releases\gstreamer\gst\gstsegment.c:
> line 702: assertion `segment->format == format' failed
>
> Enabling the debug output reveals the following from the dshow audio
> decoder:
>
> dshowaudiodec : received new segment from 0:00:00.000000000 to
> 99:99:99.999999999
> dshowaudiodec : chain (size 768)=> pts 0:00:00.000000000 stop
> 0:00:00.192000000
>  dshowaudiodec : this buffer has a DISCONT flag (0:00:00.000000000),
> flushing
> dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000 stop
> 0:00:00.320000000
> dshowaudiodec : buffer is out of segment, start 0:00:00.128000000 stop
> 0:00:00.256000000
>  dshowaudiodec : buffer is out of segment, start 0:00:00.256000000 stop
> 0:00:00.320000000
> dshowaudiodec : chain (size 768)=> pts 0:00:00.320000000 stop
> 0:00:00.512000000
> dshowaudiodec : buffer is out of segment, start 0:00:00.320000000 stop
> 0:00:00.448000000
>  dshowaudiodec : buffer is out of segment, start 0:00:00.448000000 stop
> 0:00:00.512000000
> dshowaudiodec : chain (size 768)=> pts 0:00:00.512000000 stop
> 0:00:00.704000000
> dshowaudiodec : buffer is out of segment, start 0:00:00.512000000 stop
> 0:00:00.640000000
>  dshowaudiodec : buffer is out of segment, start 0:00:00.640000000 stop
> 0:00:00.704000000
> dshowaudiodec : chain (size 768)=> pts 0:00:00.704000000 stop
> 0:00:00.896000000
> dshowaudiodec : buffer is out of segment, start 0:00:00.704000000 stop
> 0:00:00.832000000
>  dshowaudiodec : buffer is out of segment, start 0:00:00.832000000 stop
> 0:00:00.896000000
>
> The video decoder is showing a similar picture:
>
> dshowvideodec : new segment received => start=0:00:00.000000000
> stop=99:99:99.999999999
>  dshowvideodec : chain (size 1749)=> pts 0:00:00.009000000 stop
> 0:00:00.010000000
> dshowvideodec : this buffer has a DISCONT flag (0:00:00.009000000), flushing
> dshowvideodec : buffer is out of segment, start 0:00:00.009000000 stop
> 0:00:00.010000000
>  dshowvideodec : chain (size 2972)=> pts 0:00:02.411000000 stop
> 0:00:02.412000000
> dshowvideodec : buffer is out of segment, start 0:00:02.411000000 stop
> 0:00:02.412000000
> dshowvideodec : chain (size 3735)=> pts 0:00:02.445000000 stop
> 0:00:02.446000000
>  dshowvideodec : buffer is out of segment, start 0:00:02.445000000 stop
> 0:00:02.446000000
> dshowvideodec : chain (size 3500)=> pts 0:00:02.478000000 stop
> 0:00:02.479000000
> dshowvideodec : buffer is out of segment, start 0:00:02.478000000 stop
> 0:00:02.479000000
>  dshowvideodec : chain (size 5141)=> pts 0:00:02.545000000 stop
> 0:00:02.546000000
> dshowvideodec : buffer is out of segment, start 0:00:02.545000000 stop
> 0:00:02.546000000
> dshowvideodec : chain (size 7849)=> pts 0:00:02.578000000 stop
> 0:00:02.579000000
>  dshowvideodec : buffer is out of segment, start 0:00:02.578000000 stop
> 0:00:02.579000000
> dshowvideodec : chain (size 5101)=> pts 0:00:02.611000000 stop
> 0:00:02.612000000
> dshowvideodec : buffer is out of segment, start 0:00:02.611000000 stop
> 0:00:02.612000000
>  dshowvideodec : chain (size 7712)=> pts 0:00:02.645000000 stop
> 0:00:02.646000000
> dshowvideodec : buffer is out of segment, start 0:00:02.645000000 stop
> 0:00:02.646000000
>
>
> I understand that the problem appears to be that the "format" in GstSegment
> is not of type GST_FORMAT_TIME when "gst_segment_clip" is called in
> gstdshowaudiocodec.c. The question is why. Can anyone point me in the right
> direction on this one?

What about the timestamps? Are those ok?

--
Felipe Contreras

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: 'segment->format == format' assertion failing in gstsegment when playing WM content

Wim Taymans
On Tue, 2008-05-06 at 09:05 -0500, Andreas Schuler wrote:

You need to force fakesrc into producing time-based data (it produces
byte based formats by default). Unfortunatly this is not possible yet.

Wim

> I have compared log entries like the following to the samples I am
> feeding the pipeline:
>
> "dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000 stop
> 0:00:00.320000000"
>
> This line is produced by the following statement (from
> gstdshowaudiodec.c):
>
> GST_CAT_DEBUG_OBJECT (dshowaudiodec_debug, adec, "chain (size %d)=>
> pts %"
>       GST_TIME_FORMAT " stop %" GST_TIME_FORMAT,
>       GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP
> (buffer)),
>       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer) +
>           GST_BUFFER_DURATION (buffer)));
>
> Those timestamps are matching from what I can tell and therefore look
> ok to me.
>
>
>
> It is possible that I am not setting all necessary data on the
> GstBuffer in the fakesrc. The following fields get set at the moment:
>       * GST_BUFFER_DATA
>       * GST_BUFFER_SIZE
>       * GST_BUFFER_TIMESTAMP
>       * GST_BUFFER_DURATION
>       * GST_BUFFER_FLAG_DISCONT (if present in source sample)
>       * GST_BUFFER_FLAG_PREROLL (if present in source sample)
>
> It is also worth mentioning that my fakesrc has the "is-live" property
> set to TRUE.
>
> Thanks,
>
> Andreas
>
>
> On Tue, May 6, 2008 at 1:43 AM, Felipe Contreras
> <[hidden email]> wrote:
>        
>         On Tue, May 6, 2008 at 1:41 AM, Andreas Schuler
>         <[hidden email]> wrote:
>         > Hi all,
>         >
>         > I am having some trouble playing back Windows Media content.
>         >
>         > The setup is somewhat unique but necessary for my
>         application:
>         >
>         > 2 fakesrc components, which are injecting encoded audio and
>         video data
>         > Sources are connected to capsfilters, on which I am setting
>         the correct
>         > input caps (see below)
>         > Caps filters are connected to a multiqueue
>         > Queue is connected to two decoding bins
>         > Standard audio and video rendering tails (i.e. convert
>         filters, rendering
>         > sinks etc.) are connected to decoding bin source pads This
>         setup actually
>         > works fine for XVID/MP3 encoded content but I didn't have
>         any luck getting
>         > it to play with WM content. The caps I have for audio and
>         video are as
>         > follows:
>         >
>         > audio/x-wma, channels=(int)2, rate=(int)32000,
>         wmaversion=(int)2,
>         > bitrate=(int)32000, codec_data=(buffer)008800001f0000000000,
>         > block_align=(int)768, depth=(int)16
>         >  video/x-wmv, width=(int)720, height=(int)496,
>         framerate=(fraction)24/1,
>         > wmvversion=(int)2, codec_data=(buffer)baf8ad00,
>         format=(fourcc)WMV2
>         >
>         > I have the same content in a regular WMV file, which is
>         playing back fine
>         > when using the playbin. I verified the caps with that setup
>         (the only
>         > difference appears to be the order of some of the fields and
>         the video
>         > framerate [the actual value is 23.97fps]):
>         >
>         > audio/x-wma, wmaversion=(int)2, bitrate=(int)32000,
>         depth=(int)16,
>         > rate=(int)32000, channels=(int)2, block_align=(int)768,
>         > codec_data=(buffer)008800001f0000000000
>         > video/x-wmv, wmvversion=(int)2, framerate=(fraction)25/1,
>         width=(int)720,
>         > height=(int)496, codec_data=(buffer)baf8ad00,
>         format=(fourcc)WMV2
>         >
>         >
>         >
>         > When trying to play the content using the setup mention
>         above I get a lot of
>         > the following messages from gstsegment.c (702):
>         >
>         > CRITICAL **: file E:\devel-release\src_releases\gstreamer
>         \gst\gstsegment.c:
>         > line 702: assertion `segment->format == format' failed
>         >
>         > Enabling the debug output reveals the following from the
>         dshow audio
>         > decoder:
>         >
>         > dshowaudiodec : received new segment from 0:00:00.000000000
>         to
>         > 99:99:99.999999999
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.000000000
>         stop
>         > 0:00:00.192000000
>         >  dshowaudiodec : this buffer has a DISCONT flag
>         (0:00:00.000000000),
>         > flushing
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000
>         stop
>         > 0:00:00.320000000
>         > dshowaudiodec : buffer is out of segment, start
>         0:00:00.128000000 stop
>         > 0:00:00.256000000
>         >  dshowaudiodec : buffer is out of segment, start
>         0:00:00.256000000 stop
>         > 0:00:00.320000000
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.320000000
>         stop
>         > 0:00:00.512000000
>         > dshowaudiodec : buffer is out of segment, start
>         0:00:00.320000000 stop
>         > 0:00:00.448000000
>         >  dshowaudiodec : buffer is out of segment, start
>         0:00:00.448000000 stop
>         > 0:00:00.512000000
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.512000000
>         stop
>         > 0:00:00.704000000
>         > dshowaudiodec : buffer is out of segment, start
>         0:00:00.512000000 stop
>         > 0:00:00.640000000
>         >  dshowaudiodec : buffer is out of segment, start
>         0:00:00.640000000 stop
>         > 0:00:00.704000000
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.704000000
>         stop
>         > 0:00:00.896000000
>         > dshowaudiodec : buffer is out of segment, start
>         0:00:00.704000000 stop
>         > 0:00:00.832000000
>         >  dshowaudiodec : buffer is out of segment, start
>         0:00:00.832000000 stop
>         > 0:00:00.896000000
>         >
>         > The video decoder is showing a similar picture:
>         >
>         > dshowvideodec : new segment received =>
>         start=0:00:00.000000000
>         > stop=99:99:99.999999999
>         >  dshowvideodec : chain (size 1749)=> pts 0:00:00.009000000
>         stop
>         > 0:00:00.010000000
>         > dshowvideodec : this buffer has a DISCONT flag
>         (0:00:00.009000000), flushing
>         > dshowvideodec : buffer is out of segment, start
>         0:00:00.009000000 stop
>         > 0:00:00.010000000
>         >  dshowvideodec : chain (size 2972)=> pts 0:00:02.411000000
>         stop
>         > 0:00:02.412000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.411000000 stop
>         > 0:00:02.412000000
>         > dshowvideodec : chain (size 3735)=> pts 0:00:02.445000000
>         stop
>         > 0:00:02.446000000
>         >  dshowvideodec : buffer is out of segment, start
>         0:00:02.445000000 stop
>         > 0:00:02.446000000
>         > dshowvideodec : chain (size 3500)=> pts 0:00:02.478000000
>         stop
>         > 0:00:02.479000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.478000000 stop
>         > 0:00:02.479000000
>         >  dshowvideodec : chain (size 5141)=> pts 0:00:02.545000000
>         stop
>         > 0:00:02.546000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.545000000 stop
>         > 0:00:02.546000000
>         > dshowvideodec : chain (size 7849)=> pts 0:00:02.578000000
>         stop
>         > 0:00:02.579000000
>         >  dshowvideodec : buffer is out of segment, start
>         0:00:02.578000000 stop
>         > 0:00:02.579000000
>         > dshowvideodec : chain (size 5101)=> pts 0:00:02.611000000
>         stop
>         > 0:00:02.612000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.611000000 stop
>         > 0:00:02.612000000
>         >  dshowvideodec : chain (size 7712)=> pts 0:00:02.645000000
>         stop
>         > 0:00:02.646000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.645000000 stop
>         > 0:00:02.646000000
>         >
>         >
>         > I understand that the problem appears to be that the
>         "format" in GstSegment
>         > is not of type GST_FORMAT_TIME when "gst_segment_clip" is
>         called in
>         > gstdshowaudiocodec.c. The question is why. Can anyone point
>         me in the right
>         > direction on this one?
>        
>        
>         What about the timestamps? Are those ok?
>        
>         --
>         Felipe Contreras
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: 'segment->format == format' assertion failing in gstsegment when playing WM content

Andreas Schuler
I see. I have heard of the GstAppSrc but haven't found any documentation for it yet. It appears as if that component would be better suited to deal with my use case.

  • What version of GStreamer contains this new GstAppSrc component?
  • Can anyone point me to an example showing how to use the GstAppSrc?
  • Does anyone have any suggestions as to what else I could try?
  • How difficult is it to make the fakesrc produce time-based data? I have so far stayed away from compiling GStreamer on my Windows machine, but I am willing to give OABuild a try.

What I am trying to do basically is the following:
In my application I have the encoded raw audio and video samples. I would like to feed them to a GStreamer pipeline for playback and I would prefer not having to write my own plugin.

Are there any better ways to accomplish what I am trying to do? And if the only way is to write my own source plugin, can you give me any pointers? I am not looking for source code, just some hints that get me started quickly and on the right track.

Thanks for all your help.

Andreas

On Tue, May 6, 2008 at 9:33 AM, Wim Taymans <[hidden email]> wrote:
On Tue, 2008-05-06 at 09:05 -0500, Andreas Schuler wrote:

You need to force fakesrc into producing time-based data (it produces
byte based formats by default). Unfortunatly this is not possible yet.

Wim

> I have compared log entries like the following to the samples I am
> feeding the pipeline:
>
> "dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000 stop
> 0:00:00.320000000"
>
> This line is produced by the following statement (from
> gstdshowaudiodec.c):
>
> GST_CAT_DEBUG_OBJECT (dshowaudiodec_debug, adec, "chain (size %d)=>
> pts %"
>       GST_TIME_FORMAT " stop %" GST_TIME_FORMAT,
>       GST_BUFFER_SIZE (buffer), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP
> (buffer)),
>       GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer) +
>           GST_BUFFER_DURATION (buffer)));
>
> Those timestamps are matching from what I can tell and therefore look
> ok to me.
>
>
>
> It is possible that I am not setting all necessary data on the
> GstBuffer in the fakesrc. The following fields get set at the moment:
>       * GST_BUFFER_DATA
>       * GST_BUFFER_SIZE
>       * GST_BUFFER_TIMESTAMP
>       * GST_BUFFER_DURATION
>       * GST_BUFFER_FLAG_DISCONT (if present in source sample)
>       * GST_BUFFER_FLAG_PREROLL (if present in source sample)
>
> It is also worth mentioning that my fakesrc has the "is-live" property
> set to TRUE.
>
> Thanks,
>
> Andreas
>
>
> On Tue, May 6, 2008 at 1:43 AM, Felipe Contreras
> <[hidden email]> wrote:
>
>         On Tue, May 6, 2008 at 1:41 AM, Andreas Schuler
>         <[hidden email]> wrote:
>         > Hi all,
>         >
>         > I am having some trouble playing back Windows Media content.
>         >
>         > The setup is somewhat unique but necessary for my
>         application:
>         >
>         > 2 fakesrc components, which are injecting encoded audio and
>         video data
>         > Sources are connected to capsfilters, on which I am setting
>         the correct
>         > input caps (see below)
>         > Caps filters are connected to a multiqueue
>         > Queue is connected to two decoding bins
>         > Standard audio and video rendering tails (i.e. convert
>         filters, rendering
>         > sinks etc.) are connected to decoding bin source pads This
>         setup actually
>         > works fine for XVID/MP3 encoded content but I didn't have
>         any luck getting
>         > it to play with WM content. The caps I have for audio and
>         video are as
>         > follows:
>         >
>         > audio/x-wma, channels=(int)2, rate=(int)32000,
>         wmaversion=(int)2,
>         > bitrate=(int)32000, codec_data=(buffer)008800001f0000000000,
>         > block_align=(int)768, depth=(int)16
>         >  video/x-wmv, width=(int)720, height=(int)496,
>         framerate=(fraction)24/1,
>         > wmvversion=(int)2, codec_data=(buffer)baf8ad00,
>         format=(fourcc)WMV2
>         >
>         > I have the same content in a regular WMV file, which is
>         playing back fine
>         > when using the playbin. I verified the caps with that setup
>         (the only
>         > difference appears to be the order of some of the fields and
>         the video
>         > framerate [the actual value is 23.97fps]):
>         >
>         > audio/x-wma, wmaversion=(int)2, bitrate=(int)32000,
>         depth=(int)16,
>         > rate=(int)32000, channels=(int)2, block_align=(int)768,
>         > codec_data=(buffer)008800001f0000000000
>         > video/x-wmv, wmvversion=(int)2, framerate=(fraction)25/1,
>         width=(int)720,
>         > height=(int)496, codec_data=(buffer)baf8ad00,
>         format=(fourcc)WMV2
>         >
>         >
>         >
>         > When trying to play the content using the setup mention
>         above I get a lot of
>         > the following messages from gstsegment.c (702):
>         >
>         > CRITICAL **: file E:\devel-release\src_releases\gstreamer
>         \gst\gstsegment.c:
>         > line 702: assertion `segment->format == format' failed
>         >
>         > Enabling the debug output reveals the following from the
>         dshow audio
>         > decoder:
>         >
>         > dshowaudiodec : received new segment from 0:00:00.000000000
>         to
>         > 99:99:99.999999999
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.000000000
>         stop
>         > 0:00:00.192000000
>         >  dshowaudiodec : this buffer has a DISCONT flag
>         (0:00:00.000000000),
>         > flushing
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.128000000
>         stop
>         > 0:00:00.320000000
>         > dshowaudiodec : buffer is out of segment, start
>         0:00:00.128000000 stop
>         > 0:00:00.256000000
>         >  dshowaudiodec : buffer is out of segment, start
>         0:00:00.256000000 stop
>         > 0:00:00.320000000
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.320000000
>         stop
>         > 0:00:00.512000000
>         > dshowaudiodec : buffer is out of segment, start
>         0:00:00.320000000 stop
>         > 0:00:00.448000000
>         >  dshowaudiodec : buffer is out of segment, start
>         0:00:00.448000000 stop
>         > 0:00:00.512000000
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.512000000
>         stop
>         > 0:00:00.704000000
>         > dshowaudiodec : buffer is out of segment, start
>         0:00:00.512000000 stop
>         > 0:00:00.640000000
>         >  dshowaudiodec : buffer is out of segment, start
>         0:00:00.640000000 stop
>         > 0:00:00.704000000
>         > dshowaudiodec : chain (size 768)=> pts 0:00:00.704000000
>         stop
>         > 0:00:00.896000000
>         > dshowaudiodec : buffer is out of segment, start
>         0:00:00.704000000 stop
>         > 0:00:00.832000000
>         >  dshowaudiodec : buffer is out of segment, start
>         0:00:00.832000000 stop
>         > 0:00:00.896000000
>         >
>         > The video decoder is showing a similar picture:
>         >
>         > dshowvideodec : new segment received =>
>         start=0:00:00.000000000
>         > stop=99:99:99.999999999
>         >  dshowvideodec : chain (size 1749)=> pts 0:00:00.009000000
>         stop
>         > 0:00:00.010000000
>         > dshowvideodec : this buffer has a DISCONT flag
>         (0:00:00.009000000), flushing
>         > dshowvideodec : buffer is out of segment, start
>         0:00:00.009000000 stop
>         > 0:00:00.010000000
>         >  dshowvideodec : chain (size 2972)=> pts 0:00:02.411000000
>         stop
>         > 0:00:02.412000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.411000000 stop
>         > 0:00:02.412000000
>         > dshowvideodec : chain (size 3735)=> pts 0:00:02.445000000
>         stop
>         > 0:00:02.446000000
>         >  dshowvideodec : buffer is out of segment, start
>         0:00:02.445000000 stop
>         > 0:00:02.446000000
>         > dshowvideodec : chain (size 3500)=> pts 0:00:02.478000000
>         stop
>         > 0:00:02.479000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.478000000 stop
>         > 0:00:02.479000000
>         >  dshowvideodec : chain (size 5141)=> pts 0:00:02.545000000
>         stop
>         > 0:00:02.546000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.545000000 stop
>         > 0:00:02.546000000
>         > dshowvideodec : chain (size 7849)=> pts 0:00:02.578000000
>         stop
>         > 0:00:02.579000000
>         >  dshowvideodec : buffer is out of segment, start
>         0:00:02.578000000 stop
>         > 0:00:02.579000000
>         > dshowvideodec : chain (size 5101)=> pts 0:00:02.611000000
>         stop
>         > 0:00:02.612000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.611000000 stop
>         > 0:00:02.612000000
>         >  dshowvideodec : chain (size 7712)=> pts 0:00:02.645000000
>         stop
>         > 0:00:02.646000000
>         > dshowvideodec : buffer is out of segment, start
>         0:00:02.645000000 stop
>         > 0:00:02.646000000
>         >
>         >
>         > I understand that the problem appears to be that the
>         "format" in GstSegment
>         > is not of type GST_FORMAT_TIME when "gst_segment_clip" is
>         called in
>         > gstdshowaudiocodec.c. The question is why. Can anyone point
>         me in the right
>         > direction on this one?
>
>
>         What about the timestamps? Are those ok?
>
>         --
>         Felipe Contreras
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Replay of.wav file

sreejesh-2

Hi All,

 

How can I continuously replay a .wav file.

I have the following pipeline to play a .wav file.

 

Gst-launch filesrc location=myaudio.wav ! decodebin ! osssink

 

The above pipeline stops after getting EOS. But I wanted to repeat the playback.

 

Please help.

 

Thanks & Regards

Sreejesh R B


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

RE : Replay of.wav file

Albert Costa
Hi,
I'm not sure this is possible from command line. But if you write your own application and create and handle your pipeline yourself, here are the guidelines:
 
When you create and start your pipeline, connect a signal for the "segment done" message like this:
g_signal_connect (commonBus, "message::segment-done", (GCallback) reloop_call, pipeline);
 
In your callback, check the right message and then send an event to get back to beginning of file:
static void reloop_call (GstBus * bus, GstMessage * message, GstElement * pipeline)
{
GstEvent* seek_event;
switch (message->type) {
case GST_MESSAGE_SEGMENT_DONE:
g_log(G_LOG_DOMAIN_VSA, G_LOG_LEVEL_INFO, "Segment done message received");
seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
(GstSeekFlags) (GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH),
GST_SEEK_TYPE_SET, (GstClockTime) 0,
GST_SEEK_TYPE_SET, -1);
gst_element_send_event (pipeline, seek_event);
break;
default:
g_assert_not_reached ();
break;
}
}

Regards,
Al

Sreejesh <[hidden email]> a écrit :
Hi All,
 
How can I continuously replay a .wav file.
I have the following pipeline to play a .wav file.
 
Gst-launch filesrc location=myaudio.wav ! decodebin ! osssink
 
The above pipeline stops after getting EOS. But I wanted to repeat the playback.
 
Please help.
 
Thanks & Regards
Sreejesh R B
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

__________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

Reply | Threaded
Open this post in threaded view
|

Re: Replay of.wav file

sreejesh-2

Albert,

 

Thanks for the detailed help.

I will try this out.

 

Regards

Sreejesh R B


From: Albert Costa [mailto:[hidden email]]
Sent: Wednesday, May 07, 2008 1:02 PM
To: [hidden email]; [hidden email]
Subject: RE : [gst-devel] Replay of.wav file

 

Hi,

I'm not sure this is possible from command line. But if you write your own application and create and handle your pipeline yourself, here are the guidelines:

 

When you create and start your pipeline, connect a signal for the "segment done" message like this:

g_signal_connect (commonBus, "message::segment-done", (GCallback) reloop_call, pipeline);

 

In your callback, check the right message and then send an event to get back to beginning of file:

static void reloop_call (GstBus * bus, GstMessage * message, GstElement * pipeline)

{

GstEvent* seek_event;

switch (message->type) {

case GST_MESSAGE_SEGMENT_DONE:

g_log(G_LOG_DOMAIN_VSA, G_LOG_LEVEL_INFO, "Segment done message received");

seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,

(GstSeekFlags) (GST_SEEK_FLAG_SEGMENT | GST_SEEK_FLAG_FLUSH),

GST_SEEK_TYPE_SET, (GstClockTime) 0,

GST_SEEK_TYPE_SET, -1);

gst_element_send_event (pipeline, seek_event);

break;

default:

g_assert_not_reached ();

break;

}

}


Regards,

Al


Sreejesh <[hidden email]> a écrit :

Hi All,

 

How can I continuously replay a .wav file.

I have the following pipeline to play a .wav file.

 

Gst-launch filesrc location=myaudio.wav ! decodebin ! osssink

 

The above pipeline stops after getting EOS. But I wanted to repeat the playback.

 

Please help.

 

Thanks & Regards

Sreejesh R B

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

 

 __________________________________________________
Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités
http://mail.yahoo.fr Yahoo! Mail


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel