> Hi,
> 
> august wrote
> > I'm sure you have thought about this more than I have, but wouldn't it
> > make sense to have the same low-level, but generic api for encoding as
> > well as decoding?
> 
> Maybe it would make sense, but it wasn't necessary for achieving my goals.
> 
> Actually the "level" is similar for encoding and decoding, because
> gmerlin-avdecoder exports pretty much exactly what a gmerlin input plugin
> needs, so
> the i_avdec.so is also a simple wrapper, like the encoding plugins.
> 
> The only difference is, that the gmerlin-avdecoder plugin uses the
> gmerlin-avdecoder library, while e.g. the gmerlin ogg encoder plugin uses
> libogg/libtheora/libvorbis etc. directly.

> 
> It was a pragmatic decision. Ideally one would not need an extra decoding
> library, but all available decoding libs sucked badly at the time
> I started the avdecoder. The reason for putting the whole decoding stuff
> into a single library was that all the formats share *lots* of code.

I guess that is what I don't understand.  Why treat encoding differently
than decoding?

> > It seems almost crucial to me that the encoding libs should be away from
> > the display, audio/video output, and capture libs, no?
> 
> Well they are somewhat separated because they are *plugins*, so an
> encoding plugin will never need libalsa for example. Also, all GUI related
> stuff is split off in libgmerlin_gtk. Only some plain Xlib stuff is in
> libgmerlin, because that's shared between the X11 output plugin, the X11
> grabber and lemuria.
> 
> One issue could be that all plugins need the (somewhat large) libgmerlin.
> But any splitting here would mean a huge  maintenance burdon.

It's not a problem to me if the plugins are optional.

Maybe I am just looking for symmetry where it is not actually there, but
my dream is to have some API like gavl/gmerlin_avdecoder as a
gavl/gmerlin_avencoder .

Something like:
-------------------------------------------------------
bgav_t  *outfile;

bgav_open(outfile, video_format, audio_format);

// do some setup stuff...
bgav_endocode_params encode_params;
encode_params.bitrate=2000;
encode_params.iframe=30;
encode_params.quality=0.4;

bgav_set_encoding_params(outfile, encode_params);


while( imaginary_loop ) {
        //  generate audio/video in loop
        bgav_write_audio(outfile, audio_frame, audio_stream);
        bgav_write_video(outfile, video_frame, video_stream);
}

// do some followup, shut things down

bgav_close(outfile);

------------------------------------------------


I assume that can be done with gmerlin in some other way.  I've been
looking into the source and doku for a while now, and admit I am slow,
 but any suggestions on where to look or how I could do that using the
 gmerlin plugin encoders?

thanks -august.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Gmerlin-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gmerlin-general

Reply via email to