Google
  Web www.spinics.net

[Openh323-devel] API changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Hi,

There's been a lot of API changes and additions recently, most of which
look really neat and make sense.  The H.264 plugin in particular looks
great and I'm currently trying to test it out myself.  There's one
particular change I'm curious about though.  The commit on the 16th
changes opalpluginmgr.cxx to populate options from the input format to
the output format -- I had done the same thing to my own version several
months back, although reverted shortly thereafter.

Previously, media options that were sent to to the encoder had to be set
on the 'YUV420P' media format, which was the input format of the format
pair, and media options being sent to the decoder were set on the other
video format (eg H.263, MPEG4, H.264, etc.).  Switching the options from
the input format to the output format only reverses the situation, it
doesn't really fix the ambiguity problem.  It doesn't make any sense to
set options on the YUV format that affect the operation of the video codec.

Ideally, I think it would make more sense to always set your
encoding/decoding options on the media format you are encoding/decoding
with.  I've attached and submitted to the tracker a patch that adds this
- I haven't tested it, as either this change or the new one in CVS
require non-trivial modifications to my application, but I'm curious
what others think of it as a proof-of-concept.  One drawback I can see
is that unless one maintains two copies of the video media format, neat
features like encoding to one frame-size and decoding to another won't
work, although I doubt anyone really does this.  There are likely other
problems I can't think of right now.

Josh



--- opalpluginmgr-old.cxx	2007-06-22 16:33:06.000000000 -0400
+++ opalpluginmgr.cxx	2007-06-22 16:38:45.000000000 -0400
@@ -1140,7 +1140,9 @@
     PluginCodec_ControlDefn * ctl = GetCodecControl(_codec, SET_CODEC_OPTIONS_CONTROL);
     if (ctl != NULL) {
       PStringArray list;
-      const OpalMediaFormat & fmt = GetOutputFormat();
+      // Always use the video format options, not YUV
+      const OpalMediaFormat & fmt = (_isEncoder ? GetOutputFormat() : 
+                                     GetInputFormat());
       for (PINDEX i = 0; i < fmt.GetOptionCount(); i++) {
         const OpalMediaOption & option = fmt.GetOption(i);
         list += option.GetName();
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openh323-devel mailing list
Openh323-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openh323-devel

[Open H.323]     [IETF SIP]     [Gnu Gatekeeper]     [Asterisk PBX]     [Fedora Linux]     [Gimp]     [Yosemite News]     [Yosemite Photos]     [Yosemite Campsites]     [ISDN Cause Codes]

Add to Google Powered by Linux