MPEG3Plugin problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

MPEG3Plugin problem

Andreas.Raab
Hi Guys -

Looks like a declaration in MPEG3Plugin is screwed up:

MPEG3Plugin>>primitiveMPEG3EndOfVideo: fileHandle stream: aNumber
        | file result |

        "int mpeg3_end_of_video(mpeg3_t *file, int stream)"
        self var: #file type: ''.

translates to:

EXPORT(sqInt) primitiveMPEG3EndOfVideo(void) {
         file;

which (for the obvious reasons) doesn't work. Can somebody provide a
quick fix?

Thanks,
   - Andreas
Reply | Threaded
Open this post in threaded view
|

Re: MPEG3Plugin problem

johnmci
The one I have reads this below, what is the copy you have from vmmaker?

ls 11/4/2000 13:58



primitiveMPEG3EndOfVideo: fileHandle stream: aNumber
        | file result |

        "int mpeg3_end_of_video(mpeg3_t *file, int stream)"
        self var: #file declareC: 'mpeg3_t * file'.
        self primitive: 'primitiveMPEG3EndOfVideo'
                parameters: #(Oop SmallInteger).

        file := self mpeg3tValueOf: fileHandle.
        file = nil ifTrue: [^0].
        aNumber < 0 ifTrue: [interpreterProxy success: false. ^nil].
        aNumber >= (self cCode: 'result = mpeg3_total_vstreams(file)')  
ifTrue: [
                interpreterProxy success: false.  ^0 ].


        self cCode: 'result = mpeg3_end_of_video(file,aNumber)'.
        ^result asOop: Boolean


On 25-Mar-06, at 8:11 PM, Andreas Raab wrote:

> primitiveMPEG3EndOfVideo

--
========================================================================
===
John M. McIntosh <[hidden email]> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===

Reply | Threaded
Open this post in threaded view
|

Re: MPEG3Plugin problem

Andreas.Raab
Thanks for the help. BTW, mine (from VMMaker3.8b5-64B freshly loaded
from SqueakMap) is  "tpr 12/29/05 17:07". How come yours is different?

Cheers,
   - Andreas

John M McIntosh wrote:

> The one I have reads this below, what is the copy you have from vmmaker?
>
> ls 11/4/2000 13:58
>
>
>
> primitiveMPEG3EndOfVideo: fileHandle stream: aNumber
>     | file result |
>
>     "int mpeg3_end_of_video(mpeg3_t *file, int stream)"
>     self var: #file declareC: 'mpeg3_t * file'.
>     self primitive: 'primitiveMPEG3EndOfVideo'
>         parameters: #(Oop SmallInteger).
>
>     file := self mpeg3tValueOf: fileHandle.
>     file = nil ifTrue: [^0].
>     aNumber < 0 ifTrue: [interpreterProxy success: false. ^nil].
>     aNumber >= (self cCode: 'result = mpeg3_total_vstreams(file)')
> ifTrue: [
>         interpreterProxy success: false.  ^0 ].
>
>
>     self cCode: 'result = mpeg3_end_of_video(file,aNumber)'.
>     ^result asOop: Boolean
>
>
> On 25-Mar-06, at 8:11 PM, Andreas Raab wrote:
>
>> primitiveMPEG3EndOfVideo
>
> --
> ===========================================================================
> John M. McIntosh <[hidden email]> 1-800-477-2659
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
Reply | Threaded
Open this post in threaded view
|

Re: MPEG3Plugin problem

Andreas.Raab
Here is another one:

   Mpeg3Plugin.c: In function `primitiveMPEG3Open':
   Mpeg3Plugin.c:724: too few arguments to function `mpeg3_open'

primitiveMPEG3Open usen "mpeg3_open(storage)" but libmpeg.h only
declares "mpeg3_open(char*path, int size)"

Any ideas?

Cheers,
   - Andreas
Reply | Threaded
Open this post in threaded view
|

Re: MPEG3Plugin problem

johnmci
See the

JMMMpegaddBufferOffsetting.1.cs
JMMMpegBuffer.1.cs
JMMMpegBufferTest.1.cs
JMMMpegPluginBuffer.1.cs

in the cross directory for the mpeg plugin

http://macos.tuwien.ac.at:9009/194731242.asHtml


On 25-Mar-06, at 9:08 PM, Andreas Raab wrote:

> Here is another one:
>
>   Mpeg3Plugin.c: In function `primitiveMPEG3Open':
>   Mpeg3Plugin.c:724: too few arguments to function `mpeg3_open'
>
> primitiveMPEG3Open usen "mpeg3_open(storage)" but libmpeg.h only  
> declares "mpeg3_open(char*path, int size)"
>
> Any ideas?
>
> Cheers,
>   - Andreas

--
========================================================================
===
John M. McIntosh <[hidden email]> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===

Reply | Threaded
Open this post in threaded view
|

Re: MPEG3Plugin problem

timrowledge
In reply to this post by Andreas.Raab

On 25-Mar-06, at 9:03 PM, Andreas Raab wrote:

> Thanks for the help. BTW, mine (from VMMaker3.8b5-64B freshly  
> loaded from SqueakMap) is  "tpr 12/29/05 17:07". How come yours is  
> different?
In the 'official' vmmm 3.8-64 bit development image on my machine, I  
have a copy of the method corresponding to what John pasted in.  Same  
in the copy of VMMaker-tpr.43.mcz on disk.

Now an interesting thing appears to happen with SM, something I  
hadn't ever thought to look at until now. The file you upload to be a  
package file is not renamed to match the package name - so the file  
you get by downloading VMMaker 3.8b5-64 is named http://
map.squeak.org/accountbyid/4340a66e-2296-48b7-9aa8-5305d303752f/files/
VMMaker-tpr.43.mcz !! Argh! Not good at all. An excellent way to  
confuse me.

However, if I fetch the file and open it up I find correct looking  
code again -
primitiveMPEG3EndOfVideo: fileHandle stream: aNumber
        | file result |

        "int mpeg3_end_of_video(mpeg3_t *file, int stream)"
        self var: #file declareC: 'mpeg3_t * file'.
        self var: #file type: 'mpeg3_t * '.
        self primitive: 'primitiveMPEG3EndOfVideo'
                parameters: #(Oop SmallInteger).
etc.

How you got something wrong in that way (missing decl) beats me. If  
it were simple truncation lots of other stuff would have gone wrong.  
Not to mention that John would have found the problem when building  
Sophie VMs.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful random insult:- "Body by Fisher -- brains by Mattel."


Reply | Threaded
Open this post in threaded view
|

Re: MPEG3Plugin problem

Andreas.Raab
In reply to this post by johnmci
I can (almost) compile it with these changes but it ends with an error
in the linker that "sqFilenameFromStringOpen" is undefined. Any ideas
how to fix this?
Cheers,
   - Andreas

John M McIntosh wrote:

> See the
>
> JMMMpegaddBufferOffsetting.1.cs
> JMMMpegBuffer.1.cs
> JMMMpegBufferTest.1.cs
> JMMMpegPluginBuffer.1.cs
>
> in the cross directory for the mpeg plugin
>
> http://macos.tuwien.ac.at:9009/194731242.asHtml
>
>
> On 25-Mar-06, at 9:08 PM, Andreas Raab wrote:
>
>> Here is another one:
>>
>>   Mpeg3Plugin.c: In function `primitiveMPEG3Open':
>>   Mpeg3Plugin.c:724: too few arguments to function `mpeg3_open'
>>
>> primitiveMPEG3Open usen "mpeg3_open(storage)" but libmpeg.h only
>> declares "mpeg3_open(char*path, int size)"
>>
>> Any ideas?
>>
>> Cheers,
>>   - Andreas
>
> --
> ===========================================================================
> John M. McIntosh <[hidden email]> 1-800-477-2659
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ===========================================================================
>
>
Reply | Threaded
Open this post in threaded view
|

Re: MPEG3Plugin problem

Andreas.Raab
In reply to this post by timrowledge
tim Rowledge wrote:
> How you got something wrong in that way (missing decl) beats me. If it
> were simple truncation lots of other stuff would have gone wrong. Not to
> mention that John would have found the problem when building Sophie VMs.

How strange! I can send you the version that I downloaded
(VMMaker-tpr.43.mcz; UUID: 17f39176-eafa-420e-b938-38e7ab5a6577); my
version clearly doesn't have that declaration.

Cheers,
   - Andreas


Reply | Threaded
Open this post in threaded view
|

Re: MPEG3Plugin problem

timrowledge

On 25-Mar-06, at 11:02 PM, Andreas Raab wrote:

> tim Rowledge wrote:
>> How you got something wrong in that way (missing decl) beats me.  
>> If it were simple truncation lots of other stuff would have gone  
>> wrong. Not to mention that John would have found the problem when  
>> building Sophie VMs.
>
> How strange! I can send you the version that I downloaded (VMMaker-
> tpr.43.mcz; UUID: 17f39176-eafa-420e-b938-38e7ab5a6577); my version  
> clearly doesn't have that declaration.

Don't worry about it. I expect I fumbled something somewhere in  
uploading or sacrificing chickens of the wrong sort.

Since I had never seen any reference to the assorted jmmmpeg files  
John mentioned (John..... don't do that!) it is probably time to  
incorporate them and make another test package anyway.


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful Latin Phrases:- Magister Mundi sum! = I am the Master of the  
Universe!