[vlc-devel] VLC.framework Changes/Modifications

Pierre d'Herbemont pdherbemont at free.fr
Tue Oct 9 23:00:18 CEST 2007

On Oct 9, 2007, at 1:14 AM, Enrique Osuna wrote:

> Also, I had to do a quick hack to the core's media_descriptor  
> struct.  I added a p_user_data field so that I could store, from  
> within Cocoa, a pointer referencing back the VLCMedia object it's  
> associated with.  Otherwise, we'd have to recreate that object  
> every time we wanted to manipulate a media_descriptor -- or we  
> would have to maintain a local copy of generated media descriptors.

We've talked about that on IRC. As we've seen we just need to track  
the media_descriptor's destruction.

>> My initial thoughts were to do that, however, I wanted to create a  
>> mechanism that allowed for other programmers to use this framework  
>> and use the VLCMediaPlayer instance for playback strictly.  I know  
>> there are a few projects out there ( e.g. centerstageproject.com)  
>> that have their own playlist manager if you will and would want to  
>> use VLC just as a playback engine versus a playlist manipulation one.
> True enough. Isn't
> [aMediaPlayer initWithMedia: aMedia];
> [aMediaPlayer setVideoView: aVideoView];
> [aMediaPlayer play];
> Simple enough?
> Yeah it is.  But if we want to go that simplistic, wouldn't we just  
> integrate the VLCMediaPlayer's methods into VLCMedia it self?
> [aMedia initWithURL:@"~/Movies/test.avi"];
> [aMedia setVideoView:aVideoView];
> [aMedia play]

I better like the MVC abstraction you've just wrote. But if we want  
shortcut, what about implementing the -play and -setMedia: to the  
VideoView: We can play the same VLCMedia in multiple VideoView, but  
we can't really play multiple VLCMedia in one VLCVideoView.

>> [aMediaListPlayer initWithMediaList: aMediaList];
> [aMediaListPlayer setVideoView: aVideoView];
> [aMediaPlayer play];
> I know we talked about this the other night, but how much different  
> would this implementation be as compared to VLCMediaControl?  If I  
> remember correctly, VLCMediaListPlayer should just be a wrapper  
> around the core's implementation?


> Private headers are stored in Headers/Internal and public are  
> stored in Headers/Public.


> Also, I need to fix the some of the private binding categories.

What do you mean?

> The interfaces are declared in the same spot that they are  
> implemented.

Do you mean the @interface VLCxxx (Private)? They should be placed  
along with their VLCxxx.m file, as they should be really considered  
as 'private' function, belonging to that class.

> We should implement a VLCInternal header file or something of the  
> sort.

Yes, for -[VLCMedia setLength]. We may also want a  
VLCLibVLCBridging.h header.

> We need to declare the interfaces (like [VLCMedia setLength]) but  
> implement them in a public place.

I don't get the 'implement in a public place' problem. -setLenght:  
should be defined internally, and the implementation should go in  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20071009/1468aa0c/attachment.html>

More information about the vlc-devel mailing list