[DVDnav-discuss] Using libdvdnav on ARM Based NAS
John
boilerjt at gmail.com
Tue Dec 9 16:40:19 CET 2008
I'll backtrack through the SVN, but I'm pretty sure it's not an endian
issue. My NAS is little endian and it does read some of the DVD correctly.
In porting other applications to this ARM based NAS, there were usually
memory alignment issues that were a problem. For example, the last one I
worked on had alignment issues casting a const char * to uint32_t and vice
versa. I don't know if this is a similar issue here. For reference, here
is the code that had to be changed to get another application working:
uint32_t STRTOINT32( const char* s )
{
#if defined( MP4V2_INTSTRING_ALIGNMENT )
// it seems ARM integer instructions require 4-byte alignment so we
// manually copy string-data into the integer before performing ops
uint32_t tmp;
memcpy( &tmp, s, sizeof(tmp) );
return MP4V2_NTOHL( tmp );
#else
return MP4V2_NTOHL(*(uint32_t *)s);
#endif
}
void INT32TOSTR( uint32_t i, char* s )
{
#if defined( MP4V2_INTSTRING_ALIGNMENT )
// it seems ARM integer instructions require 4-byte alignment so we
// manually copy string-data into the integer before performing ops
uint32_t tmp = MP4V2_HTONL( i );
memcpy( s, &tmp, sizeof(tmp) );
#else
*(uint32_t *)s = MP4V2_HTONL(i);
#endif
s[4] = 0;
}
On Tue, Dec 9, 2008 at 2:52 AM, Nico Sabbi <Nicola.Sabbi at poste.it> wrote:
> On Tuesday 09 December 2008 05:03:38 John wrote:
> > I think I am beginning to understand what is going on, but not why
> > it happens. For reference, here is the output I get from the menus
> > example from libdvdnav 4.1.3 from my DNS-323 NAS when getting the
> > information from a DVD:
> >
>
> > *All but one of these Zero check errors occur in the
> > ifoRead_VTS_ATTRIBUTES function in dvd_reader.c. From what I can
> > gather, this function extracts the audio information from the DVD.
> > In looking at some of the data that is shown in the output above
> > where there should have been zeros read, I see numerous references
> > to 0x656e and 0x6672 which are the ascii values for "en" and "fr".
> > This DVD does have English and French audio soundtracks and this
> > would be valid information for other properties in the
> > vts_attributes_t structure that was filled when the DVD was read.
> > It appears to me that the base memory address when the VTS
> > attributes were read from the DVD was incorrect. I do not see
> > these errors when using the same version on my Ubuntu Hardy setup
> > and I am having difficulty finding where this incorrect base memory
> > address could be have occurred on the NAS (armv5tejl). Any ideas?
> >
>
> try to backtrack in svn to before I removed the _ENDIAN macros in
> dvdread. I may have made some mistake, although I consider the
> code correct
> _______________________________________________
> DVDnav-discuss mailing list
> DVDnav-discuss at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss
>
More information about the DVDnav-discuss
mailing list