Help Needed : H264 SPS Extraction

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

Help Needed : H264 SPS Extraction

Vikas Malhotra
Hello everybody,

I am trying to write a H264 decoder plugin. My decoder needs SPS NAL Unit to construct the decoder API.
I am new to GStreamer Source. So, I am not sure how to retrieve SPS NAL Units in my decoder plugin.

Please help me solve my problem.

Thankyou

--

--------------------------------------
Vikas
Bachelor of Engineering
Computer Science and Engineering


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Help Needed : H264 SPS Extraction

pritesh kumar-3
if u are trying to play h264 content from mp4 file  , u can look for codec data inside setcaps function in ur decoder plugin .
 
have a look at ffmpeg decoder plugin . src

On Fri, May 4, 2012 at 11:38 AM, Vikas Malhotra <[hidden email]> wrote:
Hello everybody,

I am trying to write a H264 decoder plugin. My decoder needs SPS NAL Unit to construct the decoder API.
I am new to GStreamer Source. So, I am not sure how to retrieve SPS NAL Units in my decoder plugin.

Please help me solve my problem.

Thankyou

--

--------------------------------------
Vikas
Bachelor of Engineering
Computer Science and Engineering


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: [gmail] Help Needed : H264 SPS Extraction

Marc Leeman
In reply to this post by Vikas Malhotra
> I am new to GStreamer Source. So, I am not sure how to retrieve SPS NAL
> Units in my decoder plugin.
>
> Please help me solve my problem.

See:

http://bit.ly/KjiZQV


--
  greetz, marc
harvey 2.6.29.1 #1 PREEMPT Mon Apr 6 22:33:31 CDT 2009 GNU/Linux

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help Needed : H264 SPS Extraction

Vikas Malhotra
In reply to this post by Vikas Malhotra

if u are trying to play h264 content from mp4 file  , u can look for codec
data inside setcaps function in ur decoder plugin .

have a look at ffmpeg decoder plugin . src

 
Thankyou for your quick reply. Yes  i am trying to play an MP4 file with h264 content.  have coded to search for "codec_data" in setcaps function in my decoder as follows:


  if (gst_structure_has_name (structure, "video/x-h264")) {

  // has a codec_data
  if ((value = gst_structure_get_value (structure, "codec_data"))) {
    GstBuffer *buffer;
    gint i, len;
    guint8 *data;
    guint size, num_sps, num_pps;
    guint nal_length_size;

    buffer = gst_value_get_buffer (value);
    data = GST_BUFFER_DATA (buffer);
    size = GST_BUFFER_SIZE (buffer);
    ....
    ....

But i am getting NULL in "value" variable i.e. my decoder is unable to find "codec_data" in caps structure.

I have checked with qtdemux also, it adds the required "codec_data" to the caps structure.
But somehow my code is not able to retrieve the same.

Please help me.

Thankyou

 
On Fri, May 4, 2012 at 11:38 AM, Vikas Malhotra <[hidden email]>wrote:

> Hello everybody,
>
> I am trying to write a H264 decoder plugin. My decoder needs SPS NAL Unit
> to construct the decoder API.
> I am new to GStreamer Source. So, I am not sure how to retrieve SPS NAL
> Units in my decoder plugin.
>
> Please help me solve my problem.
>
> Thankyou
>
> --
>
> --------------------------------------
> Vikas
> Bachelor of Engineering
> Computer Science and Engineering
> <http://www.vikaspec.co.cc/>
>
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120504/be556ab3/attachment-0001.htm>

------------------------------

Message: 3
Date: Fri, 4 May 2012 08:38:47 +0200
From: Marc Leeman <[hidden email]>
Subject: Re: [gmail] Help Needed : H264 SPS Extraction
To: Discussion of the development of and with GStreamer
       <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="iso-8859-15"

> I am new to GStreamer Source. So, I am not sure how to retrieve SPS NAL
> Units in my decoder plugin.
>
> Please help me solve my problem.

See:

http://bit.ly/KjiZQV


 
 Thanks for your reply. I have coded the required thing in setcaps to retrieve "codec_data" in my decoder which would provide me with SPS units but somehow my setcaps function is not able to retrieve the "codec_data" in caps structure.

Please help.

Thankyou
--
 greetz, marc
harvey 2.6.29.1 #1 PREEMPT Mon Apr 6 22:33:31 CDT 2009 GNU/Linux


_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel