[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mtvp-sdk
Subject:    Re: SIH question
From:       Tristan Savatier <tristan () mpegtv ! com>
Date:       1998-09-14 20:48:49
[Download RAW message or body]

To subscribers of the mtvp-sdk@mpegtv.com mailing list:

Andrew V. Shuvalov wrote:
> 
> To subscribers of the mtvp-sdk@mpegtv.com mailing list:
> 
> Hi,
> 
>    Looks like function SIH_init() in the example sample_sih.c, line 104
> is never called.
> The string "SIH_init with ..." is never printed.
> But everything still works.

It is called.  Otherwise the STREAM_HANDLER structure would not be
allocated.

Unless you send a COM_SIH_INIT, SIH_init() is called just before the
first
stream is opened.

I just tested:

$ ./simple_player file:/mou/mpg/avseq04.mpg

_init(): loading custom SIH handler
SIH_probe_url: URL file:/mou/mpg/avseq04.mpg can be opened by this
handler
SIH plugin linked successfully, handler_id = 5
SIH_init with "file:/mou/mpg/avseq04.mpg"
SIH_open_url calls open("/mou/mpg/avseq04.mpg", O_RDONLY)
SIH_fd returns 12
received A2G_COM_SIH_FEEDBACK from handler_id = 5, size = 26, data =
"file:/mou/mpg/avseq04.mpg"
SIH_lseek calls lseek(12, 0L, 0), returns 0
SIH_size calls fstat(12, ...), returns 0, size = 40348604
SIH_cntl: data = "testing COM_SIH_CNTL", size = 21
<snip>

The sample SIH only handles URL of the form "file:...",
so if you pass to simple_player just a file name
(without file:), the plugin will not be used.

Instead, the default file handler (built-in) will be used.
The default file handler tries to open the URL as a file
even if it does not start with file:, i.e. as a last resort.

I think that's what you observed...

-t
___________________________________________________________
To unsubscribe, send a mailto:mtvp-sdk-request@mpegtv.com
with no subject and "unsubscribe" in the body.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic