Writing a Video Sink and using hardware decoders.

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

Writing a Video Sink and using hardware decoders.

Daniel Laird

I am new to gstreamer and am writing my first plugin.

The hardware I am running on is the NXP PNX8X3X hardware.  This has an embedded video decoder (most usual video codecs) and a closed video pipe.

 

This means I am looking to write a gstreamer plugin that allows the following:

FileSrc- > Demux (qtdemux or other) -> My plugin.

 

This would seem to suggest that my plugin is a Video Sink, however my plugin is also a Codec and Decoder as well.  Is this possible?

Or do I need to split the plugin into a  Codec/Decoder and a Video Sink?

 

Many thanks

Daniel Laird


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Writing a Video Sink and using hardware decoders.

Edward Hervey
Hi,

On Fri, 2009-01-30 at 10:29 +0100, Daniel James Laird wrote:

> I am new to gstreamer and am writing my first plugin.
>
> The hardware I am running on is the NXP PNX8X3X hardware.  This has an
> embedded video decoder (most usual video codecs) and a closed video
> pipe.
>
>  
>
> This means I am looking to write a gstreamer plugin that allows the
> following:
>
> FileSrc- > Demux (qtdemux or other) -> My plugin.
>
>  
>
> This would seem to suggest that my plugin is a Video Sink, however my
> plugin is also a Codec and Decoder as well.  Is this possible?
>
> Or do I need to split the plugin into a  Codec/Decoder and a Video
> Sink?

  It would be better to have separate decoders and videosinks, since
this would allow a greater range of gstreamer-based application to run
on your device, or to insert elements between your decoder and sink.

  You can still write a non-raw sink using GstBaseSink. The only thing
you will have to properly handle is the synchronization/clocking.

  I don't think we have non-raw sinks in gst-plugins- though to serve as
examples.

>
>  
>
> Many thanks
>
> Daniel Laird
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [gst-embedded] Writing a Video Sink and using hardware decoders.

Daniel Laird
Many thanks for the reply,
we are having similar discussions internally as well.

My question back would be

Could I do the following?
filesrc -> demux -> My plugin (Codec/Decoder) -> FakeSink

This would mean I am more like the standard model.  However the Fakesink does very little just satisfies the standard gstreamer model.  But it means that the closed video pipe (that's handles avsync etc, hides all datapointers etc is all left as it is).
I just feed my Codec/Decoder plugin with encoded video (write to the device (+ metadata like timestamps)) and everytime I decode a frame I output something to keep the FakeSink (effectively /dev/null) happy.

Daniel Laird  

-----Original Message-----
From: Edward Hervey [mailto:[hidden email]]
Sent: 2009 Jan 30 10:25
To: Discussion of the development of GStreamer
Cc: [hidden email]
Subject: Re: [gst-embedded] [gst-devel] Writing a Video Sink and using hardware decoders.

Hi,

On Fri, 2009-01-30 at 10:29 +0100, Daniel James Laird wrote:

> I am new to gstreamer and am writing my first plugin.
>
> The hardware I am running on is the NXP PNX8X3X hardware.  This has an
> embedded video decoder (most usual video codecs) and a closed video
> pipe.
>
>  
>
> This means I am looking to write a gstreamer plugin that allows the
> following:
>
> FileSrc- > Demux (qtdemux or other) -> My plugin.
>
>  
>
> This would seem to suggest that my plugin is a Video Sink, however my
> plugin is also a Codec and Decoder as well.  Is this possible?
>
> Or do I need to split the plugin into a  Codec/Decoder and a Video
> Sink?

  It would be better to have separate decoders and videosinks, since
this would allow a greater range of gstreamer-based application to run
on your device, or to insert elements between your decoder and sink.

  You can still write a non-raw sink using GstBaseSink. The only thing
you will have to properly handle is the synchronization/clocking.

  I don't think we have non-raw sinks in gst-plugins- though to serve as
examples.

>
>  
>
> Many thanks
>
> Daniel Laird
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gstreamer-embedded mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-embedded

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [gst-embedded] Writing a Video Sink and using hardware decoders.

Felipe Contreras
On Fri, Jan 30, 2009 at 12:45 PM, Daniel James Laird
<[hidden email]> wrote:

> Many thanks for the reply,
> we are having similar discussions internally as well.
>
> My question back would be
>
> Could I do the following?
> filesrc -> demux -> My plugin (Codec/Decoder) -> FakeSink
>
> This would mean I am more like the standard model.  However the Fakesink does very little just satisfies the standard gstreamer model.  But it means that the closed video pipe (that's handles avsync etc, hides all datapointers etc is all left as it is).
> I just feed my Codec/Decoder plugin with encoded video (write to the device (+ metadata like timestamps)) and everytime I decode a frame I output something to keep the FakeSink (effectively /dev/null) happy.

If you do that you'll loose A/V sync. Whatever sync you choose on the
pipeline must receive proper timestamps. It's OK to write a dec+sink
elements, that's what we use in Maemo, but they need to act as sinks
(inherit from basesink) so that they handle pre-rolling and A/V sink,
etc.

--
Felipe Contreras

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel