Maybe I got your idea. The GSOC project should define and implement WriterPlugin, EncoderPlugin, and then BMediaBufferEncoder and BMediaEncoder, and some works in MediaAddOn and MediaServer. Is it right? -chico 2009/3/21 Stephan Assmus <superstippi@xxxxxx> > Hi, > > > BMediaDecoder is decodering the data of video or audio, and convert > > them > > to frames or chunks, and then put them into buffer. But I don't clearly > > know where and when to use BMediaEncoder. If we add this feature in > > MediaKit, developers will easily convert buffer data to whatever kind of > > audio or video. Or users save some video as audio, and then the format of > > the file will be changed. Do you have some ideas about where and when to > > use it? > > I've looked through the BeBook descriptions of BMediaDecoder and > BMediaEncoder and these classes seem to be symetrical. Unlike BMediaFile and > BMediaTrack, these classes operate on pure media buffers, which could be > anything, not just media files. The important thing to note here is that you > cannot use the classes as they are. Instead, you have to write subclasses, > in which you implement the virtual methods, for example GetNextChunk() in > the case of BMediaDecoder. So how can these classes be used? One example: > You have a situation not supported by BMediaFile and BMediaTrack, like > receiving a media stream over the network, or you have created your own > stream format for which no extractor exists. You would write your own chunk > extractor and you could then use a BMediaDecoder for the sole purpose of > reusing the existing decoder plugins. But you could control where the data > is coming from that you feed the decoder plugin. BMediaDecoder is therefor a > bridge for using the system wid > e installed decoder plugins. BMediaEncoder would be the very same thing > just for encoding buffers. > > So even though BMediaEncoder is unimplemented, implementing it does not > automatically implement encoding support in the Media Kit. Indeed, you > couldn't even start implementing it, since it relies on the plugins, for > which no classes have been designed yet. These correspond to the Reader and > Decoder classes. The GSoC project should mainly be about designing the > Writer and Encoder classes which plugins must implement. Then the > media_addon_server needs to be extended to manage these objects and then > classes like BMediaEncoder can be implemented to use them, just like > BMediaDecoder does now interface with the plugin manager to get a Decoder > instance. > > Best regards, > -Stephan > > >