Hi, jwillcox and here

Since B1014614 had landed at the end of October, I am back to work on B969395 
where I want to follow what B101614 is done to access Android HW Video 
acceleration through standard MediaCodec API directly instead of using lower 
level undocumented native mediacodec api.



But, I had some problems when using generated MediaCodec.h .cpp in 
/media/webrtc/signaling.

I include MediaCodec.h in WebrtcMediaCodecVP8VideoCodec.cpp under 
media/webrtc/signaling/src/media-conduit directory and use some API implemented 
in MediaCodec.cpp.

When I try to build it, compiler gives me some errors related to "internal 
string" roles breaks shown as bellows:

---------------------------------
     0:09.17 In file included from ../../../../dist/include/nsAString.h:11:0,

0:09.17                  from ../../../../dist/include/nsSubstring.h:10,

0:09.17                  from ../../../../dist/include/nsString.h:12,

0:09.17                  from ../../../../dist/include/nsGeoPosition.h:12,

0:09.17                  from ../../../../dist/include/AndroidJavaWrappers.h:13,

0:09.17                  from ../../../../dist/include/MediaCodec.h:9,

0:09.17                  from 
/home/luq/Dev/firefox/src/src/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp:12:

0:09.17 ../../../../dist/include/nsStringFwd.h:15:2: error: #error Internal 
string headers are not available from external-linkage code.

0:09.18 In file included from ../../../../dist/include/nsAString.h:23:0,

0:09.18                  from ../../../../dist/include/nsSubstring.h:10,

0:09.18                  from ../../../../dist/include/nsString.h:12,

0:09.18                  from ../../../../dist/include/nsGeoPosition.h:12,

0:09.18                  from ../../../../dist/include/AndroidJavaWrappers.h:13,

0:09.18                  from ../../../../dist/include/MediaCodec.h:9,

0:09.18                  from 
/home/luq/Dev/firefox/src/src/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp:12:

0:09.18 ../../../../dist/include/nsTSubstring.h:12:2: error: #error Cannot use 
internal string classes without MOZILLA_INTERNAL_API defined. Use the frozen 
header nsStringAPI.h instead.

0:09.18 In file included from ../../../../dist/include/nsAString.h:28:0,

0:09.18                  from ../../../../dist/include/nsSubstring.h:10,

0:09.18                  from ../../../../dist/include/nsString.h:12,

0:09.18                  from ../../../../dist/include/nsGeoPosition.h:12,

0:09.18                  from ../../../../dist/include/AndroidJavaWrappers.h:13,

0:09.18                  from ../../../../dist/include/MediaCodec.h:9,

0:09.18                  from 
/home/luq/Dev/firefox/src/src/media/webrtc/signaling/src/media-conduit/WebrtcMediaCodecVP8VideoCodec.cpp:12:

0:09.18 ../../../../dist/include/nsTSubstring.h:12:2: error: #error Cannot use 
internal string classes without MOZILLA_INTERNAL_API defined. Use the frozen 
header nsStringAPI.h instead.
---------------------------------

And I try to resolve it by following
    "XPCOM glue", 
https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Glue
    "Migrating from Internal Linkage to Frozen Linkage", 
https://developer.mozilla.org/en-US/docs/Migrating_from_Internal_Linkage_to_Frozen_Linkage
, but I couldn't get any hints from those docs.

So, could you please guide me how can I use MediaCodec related API directly in 
my case?

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1014614

[2] https://bugzilla.mozilla.org/show_bug.cgi?id=969395

BR,
Lu Qiang
_______________________________________________
mobile-firefox-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/mobile-firefox-dev

Reply via email to