gstreamer endianess

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

gstreamer endianess

Mattias Barthel
Hi,

I am trying to get a simple pipeline working from a Ps3(CELL CPU) to an
Intel desktop using udpsink/udpsrc.

I have noticed that various variables of integer storage size are
incorrect in the header of a buffer on the recieving side .

I have seen that many plugins have some endianess property. Could this
be used for this?

Is gstreamer endianess safe?


Mattias

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer endianess

Wim Taymans
On Tue, 2008-05-20 at 17:27 +0200, Mattias Barthel wrote:
> Hi,
>
> I am trying to get a simple pipeline working from a Ps3(CELL CPU) to an
> Intel desktop using udpsink/udpsrc.

Using RTP? what payload type?

>
> I have noticed that various variables of integer storage size are
> incorrect in the header of a buffer on the recieving side .

What variables?

>
> I have seen that many plugins have some endianess property. Could this
> be used for this?

Normally not, what plugin has such an endianness property?

>
> Is gstreamer endianess safe?

Pretty much yes, it runs on both little endian and big endian machines
for many years now.

Wim

>
>
> Mattias
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer endianess

Mattias Barthel
Wim Taymans wrote:

> On Tue, 2008-05-20 at 17:27 +0200, Mattias Barthel wrote:
>  
>> Hi,
>>
>> I am trying to get a simple pipeline working from a Ps3(CELL CPU) to an
>> Intel desktop using udpsink/udpsrc.
>>    
>
> Using RTP? what payload type?
>  
Yes, using rtptheoradepay
>  
>> I have noticed that various variables of integer storage size are
>> incorrect in the header of a buffer on the recieving side .
>>    
>
> What variables?
>  
Using header and then ident. The ident variable is not being well
understood if I dont place a ntohl call on the Intel machine.

>  
>> I have seen that many plugins have some endianess property. Could this
>> be used for this?
>>    
>
> Normally not, what plugin has such an endianness property?
>
>  
>> Is gstreamer endianess safe?
>>    
>
> Pretty much yes, it runs on both little endian and big endian machines
> for many years now.
>
>  

Maybe thats what you meant but
has it been tested between different machines as well?
> Wim
>
>  
>
Mattias

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer endianess

Wim Taymans
On Tue, 2008-05-20 at 17:52 +0200, Mattias Barthel wrote:

> Wim Taymans wrote:
> > On Tue, 2008-05-20 at 17:27 +0200, Mattias Barthel wrote:
> >  
> >> Hi,
> >>
> >> I am trying to get a simple pipeline working from a Ps3(CELL CPU) to an
> >> Intel desktop using udpsink/udpsrc.
> >>    
> >
> > Using RTP? what payload type?
> >  
> Yes, using rtptheoradepay
> >  
> >> I have noticed that various variables of integer storage size are
> >> incorrect in the header of a buffer on the recieving side .
> >>    
> >
> > What variables?
> >  
> Using header and then ident. The ident variable is not being well
> understood if I dont place a ntohl call on the Intel machine.

All RTP headers are big endian and from looking at the theora payloader
code it seems that those are indeed generated as big endian (maybe that
explains why a ntohl is needed on the intel machine). What depayloader
are you using?

> >  
> >> I have seen that many plugins have some endianess property. Could this
> >> be used for this?
> >>    
> >
> > Normally not, what plugin has such an endianness property?
> >
> >  
> >> Is gstreamer endianess safe?
> >>    
> >
> > Pretty much yes, it runs on both little endian and big endian machines
> > for many years now.
> >
> >  
>
> Maybe thats what you meant but
> has it been tested between different machines as well?

Yep, and most of the payloaders/depayloaders are also tested against
other implementations (mostly live555, and quicktime server).

Wim

> > Wim
> >
> >  
> >
> Mattias
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer endianess

Mattias Barthel
Wim Taymans wrote:

>>
>> Using header and then ident. The ident variable is not being well
>> understood if I dont place a ntohl call on the Intel machine.
>>    
>
> All RTP headers are big endian and from looking at the theora payloader
> code it seems that those are indeed generated as big endian (maybe that
> explains why a ntohl is needed on the intel machine). What depayloader
> are you using?
>  
Im using rtptheorapay.
If the integers are coming in big endian byte order, how can that even
be expected to work
without a ntohl?
I am confused.

Mattias
>  


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gstreamer endianess

Wim Taymans
On Tue, 2008-05-20 at 18:17 +0200, Mattias Barthel wrote:

> Wim Taymans wrote:
> >>
> >> Using header and then ident. The ident variable is not being well
> >> understood if I dont place a ntohl call on the Intel machine.
> >>    
> >
> > All RTP headers are big endian and from looking at the theora payloader
> > code it seems that those are indeed generated as big endian (maybe that
> > explains why a ntohl is needed on the intel machine). What depayloader
> > are you using?
> >  
> Im using rtptheorapay.
> If the integers are coming in big endian byte order, how can that even
> be expected to work
> without a ntohl?
> I am confused.

The receiver is responsible for unpacking the values from the RTP
headers and storing them in the native endianness of the CPU, which
might involve byte swapping. gstrtptheoradepay, for example, does that.

Wim

>
> Mattias
> >  
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel