[libannodex-dev] anxrip, anx_read() and the network

Ben Martin monkeyiq at users.sourceforge.net
Sun Sep 18 22:16:31 EST 2005


On Sun, 2005-09-18 at 07:57 +1000, Silvia.Pfeiffer at csiro.au wrote:
> Hi Ben,
> 
> you don't use the "Range Retrieval Request" for this, but rather the HTTP "Accept" header with a value of "text/x-cmml". Read the details on http://annodex.net/TR/draft-pfeiffer-annodex-02.txt, in section "6.1.2  HTTP 'Accept' header field interpretation".
> 
> Cheers,
> Silvia.
> 

Excellent...</burns>

For future web searchers:
$ curl -H "Accept: text/x-cmml" \
-L  http://media.annodex.net/ffdemo/media/sciweb/index.anx
Works nicely as advertised.

There are two uses of the word "class" in cmml.h which forbids clean C++
usage by default.

The above referenced document also has a typeo at the top of page 25.
Accpet: text/x-cmml; q=1, application/x-annodex; q=0.5
--^^--

I notice that there are two structures for clips and headers,
eg CMML_Clip and AnxClip
In the head case the structs are fairly identical though there are some
perks in the time stuff for the Clip structs. I now have a little
FerrisAnxClip struct which proxies between either, handy to be able to
use the same method to handle Anx and CMML metadata, I'm not quite sure
as to why the clip struct is different between the two. Also the
location of start_time/end_time in CMML_Clip forbids just casting it to
an AnxClip*.

Perhaps I should have started out ripping the CMML from the Anx instead
of using the annodex API for local files.

Anyways picking on the same file again I now have nice CMML xfer only
semantics for listing.
$ fls -0  http://media.aidabrowser.com/medium/CSIRO/sciweb/index.anx
astronomy               33      45      00-4-5.anx#startspeech  Our astronomers track the Galileo space probing station in Tidbinbilla.
atmospheric             45      61      cleaner.anx#startspeech Atmospheric researchers look into ways of keeping the air clean.
credits         88      0       http://www.csiro.au/    Contact CSIRO for more information on our research.
intro           0       33      http://www.csiro.au/    Welcome to CSIRO, the Commonwealth Scientific and Industrial Research Organisation of Australia.
landwater               61      79      99-5-4.anx#startspeech  Land and water research helps improve our environment.
outro           79      88      http://www.csiro.au/    We hope you enjoy these interviews!

Unfortunately I still cache a start-end range chunk like this
into /tmp/?? which means a full chunk download before viewing. I'm not
sure if trying to insert a pipe instead of a temp file will buy much
here because it places demands on the viewer and libannodex.

$ fcat http://media.aidabrowser.com/medium/CSIRO/sciweb/index.anx/astronomy | vlc -

Thanks for the info on the Accept header, now I can release libferris
(and its search indexing) onto unsuspecting anx files on the net ;)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.annodex.net/pipermail/libannodex-dev/attachments/20050918/80c2ccdc/attachment.pgp


More information about the libannodex-dev mailing list