Yet another attempt. This time I took some of your suggestions and advice and implemented it. See files for full framework and patches for each individual file. Main thing to notice is that I changed up the directory structure. And the same notes as before apply (
e.g. only compiles under debug configurations) also a new note to add the included Makefile doesn't compile -- I used straight xcode project for compilation.<br><br>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.
<br><br><div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><span class="q"><blockquote type="cite">With VLCMediaControl, I was trying to follow the MediaControlAPI Architecture (
<a href="http://wiki.videolan.org/MediaControlAPI" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://wiki.videolan.org/MediaControlAPI</a> ). Although the class implementation doesn't actually use any of the mediacontrol APIs. It does try to mimic the way it works.
<br></blockquote><div><br></div></span><div>Ok. I don't really like the fact of being able to do the same thing using a different API. What about some shortcut in existing classes?</div></div></div></blockquote><div><br>
Not implemented in this rendition of changes. But I will add to the TODO list.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><div><span class="q"><blockquote type="cite">Your comment about MVC, I'm not sure if I quite understand. I thought I was implementing the class in an MVC fashion, can you point out a clearer example so that it may help me out.
<br></blockquote><div><br></div></span><div>I was a bit lost with the MediaControl thing.</div><div><br></div><div>Tell me if I am wrong?</div><div><br></div><div>Model is VLCMedia</div><div>View is VLCVideoView</div><div>
Control is VLCMediaPlayer</div><div><br></div><div>In libvlc we do have:</div><div>Model libvlc_media_t</div><div>View libvlc_drawable_t</div><div>Control libvlc_media_instance_t</div></div></div></blockquote><div><br>You're right.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><span class="q"><blockquote type="cite">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. <a href="http://centerstageproject.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">centerstageproject.com</a>) 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.
<br></blockquote><div><br></div></span><div>True enough. Isn't</div><div><br></div><div>[aMediaPlayer initWithMedia: aMedia];</div><div>[aMediaPlayer setVideoView: aVideoView];</div><div>[aMediaPlayer play];</div><div>
<br></div><div>Simple enough?</div></div></div></blockquote><div><br>Yeah it is. But if we want to go that simplistic, wouldn't we just integrate the VLCMediaPlayer's methods into VLCMedia it self? <br><br>[aMedia initWithURL:@"~/Movies/test.avi"];
<br>[aMedia setVideoView:aVideoView];<br>[aMedia play]<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><span class="q">
<blockquote type="cite">> libvlc_media_instance_stop should be implemented in core. <br><br>It should but what would it do? Other than pausing the playback and setting it's state to STOPPED.<br></blockquote><div><br>
</div></span><div>it should STOP the input (close the vout and such...), not pause... Not a big deal though.</div></div></div></blockquote><div><br>On TODO list. <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><div><span class="q"><blockquote type="cite">> do we need all this classes?<br><br>No, I don't think we need all the classes. However, I wanted to try to stay true to your original implementation. <br>
<br>We can get rid of things like VLCPlaylist. I think the core implementation, such as Library, MediaList, MediaInstance and MediaDescriptors are a definite.<br></blockquote><div><br></div></span><div>Ok. I got your point. I was a bit septical about introducing too much complexity in the framework, but it seems to work fine. Yet we now need the VLCMediaListPlayer class.
</div><div><br></div><div>VLCMediaListPlayer would be a subclass of the VLCMediaPlayer;</div><div><br></div><div>[aMediaListPlayer initWithMediaList: aMediaList];</div><div>[aMediaListPlayer setVideoView: aVideoView];</div>
<div>[aMediaPlayer play];</div></div></div></blockquote><div><br>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?
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><span class="q"><blockquote type="cite">> I would suggest you to send (small) patches with your modification.
<br>I'll work on that this afternoon and resubmit.<br><br>One of the major changes that I did make was a structural change to how the headers are stored in the framework. Instead of VLC.framework/Headers/VLC/VLC*.h it's
VLC.framework/Headers/VLC*.h<br></blockquote><div><br></div></span><div>I missed that one... Headers/VLC/*.h are the exported headers. Header in Headers/*.h are the private one. So I think this one is not valid.</div></div>
</div></blockquote><div><br>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. The interfaces are declared in the same spot that they are implemented. We should implement a VLCInternal header file or something of the sort. We need to declare the interfaces (like [VLCMedia setLength]) but implement them in a public place.
<br></div><br>- Enrique<br></div>