Re: [Ekiga-devel-list] [Win32] Last version of libav-9

2013-09-25 Thread Thierry Simonnet

  
  
Le 24/09/2013 16:51, Eugen Dedu a
  écrit :

On 24/09/13 16:36, Thierry Simonnet wrote:
  
  Here is a quick patch based on
avcodec_decode_video2. I need to check

better my job.


austerlitz:~/win32 diff -u
src/opal/plugins/video/common/dyna.cxx

src/opal/plugins/video/common/dyna.cxx.new

--- src/opal/plugins/video/common/dyna.cxx  2013-09-24

16:28:35.0 +0200

+++ src/opal/plugins/video/common/dyna.cxx.new  2013-09-24

15:22:33.0 +0200

@@ -217,14 +217,14 @@

  #endif



-FFMPEGLibrary::FFMPEGLibrary(CodecID codec)

+FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec)

  {

    m_codec = codec;

-  if (m_codec==CODEC_ID_H264)

+  if (m_codec==AV_CODEC_ID_H264)

    snprintf( m_codecString, sizeof(m_codecString), "H264");

-  if (m_codec==CODEC_ID_H263P)

+  if (m_codec==AV_CODEC_ID_H263P)

    snprintf( m_codecString, sizeof(m_codecString),
"H263+");

-  if (m_codec==CODEC_ID_MPEG4)

+  if (m_codec==AV_CODEC_ID_MPEG4)

    snprintf( m_codecString, sizeof(m_codecString),
"MPEG4");

    m_isLoadedOK = false;

  }

@@ -268,12 +268,12 @@

    return true;

  }


-AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)

+AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id)

  {

    return avcodec_find_encoder(id);

  }


-AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)

+AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id)

  {

    WaitAndSignal m(processLock);

  
  
  Ok for the above, cf.
  http://www.libav.org/releases/libav-9.9.release:
  
  "All CODEC_ID_* symbols now carry AV_ prefixes. Non-prefixed codec
  IDs are deprecated."
  
  
  @@ -311,11 +311,28 @@

  int FFMPEGLibrary::AvcodecEncodeVideo(AVCodecContext *ctx,
BYTE *buf,

int buf_size, const AVFrame *pict)

  {

    int res;

+//TS

+  AVPacket avpkt;

+  av_init_packet(avpkt);

+  avpkt.data = ""

+  avpkt.size = buf_size;

+

+  int gotPacket = 0;

+  res = avcodec_encode_video2(ctx, avpkt, pict,
gotPacket);

+  if (res  0) {

+   PTRACE(1, m_codecString, "Encoder failed");

+   return res;

+  }

+  if (gotPacket)

+   return avpkt.size;

+

+  PTRACE(3, m_codecString, "Encoder returned no data");


-  res = avcodec_encode_video(ctx, buf, buf_size, pict);

+  return 0;

+//TS  res = avcodec_encode_video(ctx, buf, buf_size, pict);


-  PTRACE(6, m_codecString, "DYNA\tEncoded into "  res
 " bytes, max

"  buf_size);

-  return res;

+//TS  PTRACE(6, m_codecString, "DYNA\tEncoded into " 
res  " bytes,

max "  buf_size);

+//TS  return res;

  }


  int FFMPEGLibrary::AvcodecDecodeVideo(AVCodecContext *ctx,
AVFrame

*pict, int *got_picture_ptr, BYTE *buf, int buf_size)

  
  
  I do not have time right now to check the above, I would like to
  know if you are sure about this change.
  
  
  Anyway, I will take care once libav 9.9 appears on debian, thank
  you very much!
  

It is necessary with avcodev-55.
Need also to change win32/Makefile to add avcodec-55.dll
First tests using windows are OK.
This minimal patch doesn't handle plugin codec flags.

I don't think it is really useful if the aim is using branc #12 of
opal/ptlib.


  
  On 09/24/2013 09:19 AM, Eugen Dedu wrote:

On 24/09/13 09:11, Thierry Simonnet
  wrote:
  
  Le 23/09/2013 15:08, Eugen Dedu a
écrit :

On 20/09/13 15:57, Thierry Simonnet
  wrote:
  
  Hello,


I noticed that avcodec_encode_video doesn't exist any
more in the

last 

Re: [Ekiga-devel-list] [Win32] Last version of libav-9

2013-09-24 Thread Thierry Simonnet

  
  
Le 23/09/2013 15:08, Eugen Dedu a
  crit:

On 20/09/13 15:57, Thierry Simonnet wrote:
  
  Hello,


I noticed that avcodec_encode_video doesn't exist any more in
the last version

of libav-9. It is replaced, of course, by
avcodec_encode_video2. It impacts

  
  
  Please be more precise: what version of libav? With which version
  it worked?
  

I use trunk version of libav.
It doesn't work since last week.

  
  opal 3.10.12 (for me), and especially dyna
mechanism.

I will have a look next week (if there is no patch from opal).

  
  



-- 
  
  
  
  
  
  
  
  
  
  
  
  
  Thierry
  Simonnet
  ESIEE-Paris
   Par
  respect pour
  lenvironnement, nimprimez ce mail que si ncessaire
  
  

  

___
ekiga-devel-list mailing list
ekiga-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/ekiga-devel-list

Re: [Ekiga-devel-list] [Win32] Last version of libav-9

2013-09-24 Thread Thierry Simonnet
Here is a quick patch based on avcodec_decode_video2. I need to check
better my job.

austerlitz:~/win32 diff -u src/opal/plugins/video/common/dyna.cxx
src/opal/plugins/video/common/dyna.cxx.new
--- src/opal/plugins/video/common/dyna.cxx  2013-09-24
16:28:35.0 +0200
+++ src/opal/plugins/video/common/dyna.cxx.new  2013-09-24
15:22:33.0 +0200
@@ -217,14 +217,14 @@
 #endif
 
 
-FFMPEGLibrary::FFMPEGLibrary(CodecID codec)
+FFMPEGLibrary::FFMPEGLibrary(AVCodecID codec)
 {
   m_codec = codec;
-  if (m_codec==CODEC_ID_H264)
+  if (m_codec==AV_CODEC_ID_H264)
   snprintf( m_codecString, sizeof(m_codecString), H264);
-  if (m_codec==CODEC_ID_H263P)
+  if (m_codec==AV_CODEC_ID_H263P)
   snprintf( m_codecString, sizeof(m_codecString), H263+);
-  if (m_codec==CODEC_ID_MPEG4)
+  if (m_codec==AV_CODEC_ID_MPEG4)
   snprintf( m_codecString, sizeof(m_codecString), MPEG4);
   m_isLoadedOK = false;
 }
@@ -268,12 +268,12 @@
   return true;
 }
 
-AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum CodecID id)
+AVCodec *FFMPEGLibrary::AvcodecFindEncoder(enum AVCodecID id)
 {
   return avcodec_find_encoder(id);
 }
 
-AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum CodecID id)
+AVCodec *FFMPEGLibrary::AvcodecFindDecoder(enum AVCodecID id)
 {
   WaitAndSignal m(processLock);
 
@@ -311,11 +311,28 @@
 int FFMPEGLibrary::AvcodecEncodeVideo(AVCodecContext *ctx, BYTE *buf,
int buf_size, const AVFrame *pict)
 {
   int res;
+//TS
+  AVPacket avpkt;
+  av_init_packet(avpkt);
+  avpkt.data = buf;
+  avpkt.size = buf_size;
+
+  int gotPacket = 0;
+  res = avcodec_encode_video2(ctx, avpkt, pict, gotPacket);
+  if (res  0) {
+   PTRACE(1, m_codecString, Encoder failed);
+   return res;
+  }
+  if (gotPacket)
+   return avpkt.size;
+ 
+  PTRACE(3, m_codecString, Encoder returned no data);
 
-  res = avcodec_encode_video(ctx, buf, buf_size, pict);
+  return 0;
+//TS  res = avcodec_encode_video(ctx, buf, buf_size, pict);
 
-  PTRACE(6, m_codecString, DYNA\tEncoded into   res   bytes, max
  buf_size);
-  return res;
+//TS  PTRACE(6, m_codecString, DYNA\tEncoded into   res   bytes,
max   buf_size);
+//TS  return res;
 }
 
 int FFMPEGLibrary::AvcodecDecodeVideo(AVCodecContext *ctx, AVFrame
*pict, int *got_picture_ptr, BYTE *buf, int buf_size)



On 09/24/2013 09:19 AM, Eugen Dedu wrote:
 On 24/09/13 09:11, Thierry Simonnet wrote:
 Le 23/09/2013 15:08, Eugen Dedu a écrit :
 On 20/09/13 15:57, Thierry Simonnet wrote:
 Hello,

 I noticed that avcodec_encode_video doesn't exist any more in the
 last version
 of libav-9. It is replaced, of course,  by avcodec_encode_video2. 
 It impacts

 Please be more precise: what version of libav?  With which version
 it worked?
 I use trunk version of libav.

 Ah!  I will take a look later.

 It doesn't work since last week.

 opal 3.10.12 (for me), and especially dyna mechanism.
 I will have a look next week (if there is no patch from opal).




-- 

Thierry Simonnet

ESIEE-Paris

Par respect pour l’environnement, n’imprimez ce mail que si nécessaire


___
ekiga-devel-list mailing list
ekiga-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/ekiga-devel-list

Re: [Ekiga-devel-list] [Win32] Last version of libav-9

2013-09-23 Thread Eugen Dedu

On 20/09/13 15:57, Thierry Simonnet wrote:

Hello,

I noticed that avcodec_encode_video doesn't exist any more in the last version
of libav-9. It is replaced, of course,  by avcodec_encode_video2.  It impacts


Please be more precise: what version of libav?  With which version it 
worked?



opal 3.10.12 (for me), and especially dyna mechanism.
I will have a look next week (if there is no patch from opal).


--
Eugen
___
ekiga-devel-list mailing list
ekiga-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/ekiga-devel-list


[Ekiga-devel-list] [Win32] Last version of libav-9

2013-09-20 Thread Thierry Simonnet

  
  
Hello,

I noticed that avcodec_encode_video doesn't exist any more in the
last version of libav-9. It is replaced, of course, by
avcodec_encode_video2. It impacts opal 3.10.12 (for me), and
especially dyna mechanism.
I will have a look next week (if there is no patch from opal).

Best regards 
-- 
  
  
  
  
  
  
  
  
  
  
  
  
  Thierry
  Simonnet
  ESIEE-Paris
   Par
  respect pour
  lenvironnement, nimprimez ce mail que si ncessaire
  
  

  

___
ekiga-devel-list mailing list
ekiga-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/ekiga-devel-list