Hi,
What is the Use Case for the Video Player ?
By Use Case I mean, what real-world scenario triggered this requirement.
Depending on the Use Case, I can envision two possible implementations:
a)
100% integration with cocos2d-x Scene Graph
eg: To be able to scale, translate, rotate, change the Z order, run actions to the VideoPlayer node.
And in order to do so, probably we will need to do the decoding in software by an existing video decoder library.
Pros: Portable, super easy to integrate
Cons: Slow (no hardware decoder), complex to implement, possible sync issues, we need to implement our own controls (play, pause, fullscreen, letterbox, volume, etc.)
b) A simple API that plays video by wrapping the OS API to play video.
Pros: Quick to implement for one platforms (eg: iOS), fast (uses hardware decoder on iOS).
Cons: Not portable, each platform should implement the wrapper.
Which route to take depends on the Use Case.
But as I mentioned, implementing something like a) could be very expensive (development time-wise).
If the Use Case is something like:
Company XXX asked us to have a Video Player in cocos2d-x to play video on Android TVs, then I would go with b) and add that feature in "extensions".