PnaCL _ development of video media player plugin in chrome

481 views
Skip to first unread message

George varghese

unread,
Feb 19, 2016, 1:00:52 AM2/19/16
to Native-Client-Discuss
Hi,

I am trying to develop a media player in chrome. I listed here my requirement,

1. Play video file from html. Is it a file or live data 
2. I want to play/pause/stop from html.

For this need any permission for video play in chrome navigator, is required?

For this purpose , I passed the objecturl to the nativemodule, remaining things Idon't know, which function of MediaStreamVideoTrack,I called for play it?

so please guide me for fulfill my requirement..

I am waiting for your reply.

Regards,
George

George varghese

unread,
Feb 21, 2016, 10:43:54 PM2/21/16
to Native-Client-Discuss
Hi,

Can anybody answer to my question. I am waiting for your reply.

Regards,
George

Victor Khimenko

unread,
Feb 23, 2016, 5:48:39 AM2/23/16
to Native Client Discuss
On Mon, Feb 22, 2016 at 4:43 AM, George varghese <geor...@gmail.com> wrote:
Hi,

Can anybody answer to my question. I am waiting for your reply.


I don't think anybody would do that because you question is kinda "How To Draw an Owl" meme ( http://knowyourmeme.com/memes/how-to-draw-an-owl ) in reverse. I know how to draw an oval or two - how do a draw an owl? Such questions is unlikely to be answered.

Could you write a video player in pNaCl? Sure - but that involves a lot of steps and pieces.

Could you use existing Chrome video player for your needs? Not if you want to use pNaCl (there are no interface to do that) - but there are low-level PPAPI interfaces (and it's easy to find them in Google: for example here - https://chromium.googlesource.com/chromium/src/+/master/ppapi/examples/media_stream_video ).

It's highly unlikely that anyone would write LOC program and/or article of 100'000 words which would answer you questions - but if you ask smaller, more focused questions - then it's possible.

George varghese

unread,
Feb 23, 2016, 6:45:24 AM2/23/16
to Native-Client-Discuss
Thank you for your reply. 

Have any other third party video player for pnacl?, please suggest any?

Regards,
George

George varghese

unread,
Mar 7, 2016, 3:53:01 AM3/7/16
to Native-Client-Discuss
Hi All,

Have any existing chrome video player for do this?. if have, should support the rtsp..

if anybody know about it? please help me.

Regards,
George

George varghese

unread,
Mar 8, 2016, 11:31:34 PM3/8/16
to Native-Client-Discuss
Hi All,

For the development of media player plugin, I have been selected the below items,

1. SDL for the media player playback
2. ffmpeg for rtsp video streaming.

I downloaded the sdl2 library for compatible of pnacl toolchain. I integrated into my app,

I am getting the below error,

Please note the pepper version is 47.

Please see the make file,

DEPS = ppapi_simple_cpp nacl_io
LIBS = SDL2_test SDL2 ppapi_simple SDL2main SDL2 $(DEPS) ppapi_gles2 ppapi_cpp ppapi pthread nacl_io
CFLAGS := -Wall -I$(NACL_SDK_ROOT)/SDL/include/SDL2
SOURCES = sdlgkmediastreamvideo.cc
PNACL_LDFLAGS += -L$(NACL_SDK_ROOT)/SDL/lib -Wl,-uPSUserMainGet


After that I got the below error,

C:\nacl_sdk\pepper_47\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: error: C:/nacl_sdk/pepper_47/lib/pnacl/Release/libppapi_simple_cpp.a: multiple definition of 'pp::CreateModule()'
C:\nacl_sdk\pepper_47\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: pnacl/Release/sdlgkmediastreamvideo.o: previous definition here
C:/nacl_sdk/pepper_47/lib/pnacl/Release/libppapi_simple.a: error: undefined reference to 'PSUserMainGet'
Makefile:150: recipe for target 'pnacl/Release/GKNewMediaPluginSDL_unstripped.bc' failed
make: *** [pnacl/Release/GKNewMediaPluginSDL_unstripped.bc] Error 1

Then I commented below code in my c file,

namespace pp {

Module* CreateModule() {
  return new GKMediaStreamModule();
}


Again building , I got the below error,

make[1]: Leaving directory 'C:/nacl_sdk/pepper_47/src/nacl_io'
  LINK pnacl/Release/GKNewMediaPluginSDL_unstripped.bc 
C:/nacl_sdk/pepper_47/toolchain/win_pnacl/le32-nacl/lib/libppapi_stub.a: error: undefined reference to 'PPP_InitializeModule'
C:/nacl_sdk/pepper_47/toolchain/win_pnacl/le32-nacl/lib/libppapi_stub.a: error: undefined reference to 'PPP_ShutdownModule'
C:/nacl_sdk/pepper_47/toolchain/win_pnacl/le32-nacl/lib/libppapi_stub.a: error: undefined reference to 'PPP_GetInterface'
make: *** [pnacl/Release/GKNewMediaPluginSDL_unstripped.bc] Error 1
Makefile:150: recipe for target 'pnacl/Release/GKNewMediaPluginSDL_unstripped.bc' failed


If anybody is got the same error, please reply

Regards,
George

George varghese

unread,
Mar 9, 2016, 2:46:37 AM3/9/16
to Native-Client-Discuss
Hi All,

When I updated the pepper version 47 to 49, the source code was buildable.

When I loading it to the browser, I getting the below error in console..

PpapiPluginStart: No AT_SYSINFO item found in auxv, so cannot start PPAPI.  Is the IRT library not present?

How can I resolve it?

Regards,
George 

George varghese

unread,
Mar 9, 2016, 7:59:41 AM3/9/16
to Native-Client-Discuss
Hi,

When I updated the pepper version 47 to 49 and integrated the SDL libraries, then compiling , seems that below error,

make[1]: Leaving directory 'C:/nacl_sdk/pepper_49/src/nacl_io'
  LINK pnacl/Release/GKNewMediaPluginSDL_unstripped.bc 
C:\nacl_sdk\pepper_49\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: error: C:/nacl_sdk/pepper_49/lib/pnacl/Release/libppapi_cpp.a: multiple definition of 'PPP_InitializeModule'
C:\nacl_sdk\pepper_49\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: C:/nacl_sdk/pepper_49/lib/pnacl/Release/libppapi_simple_real.a: previous definition here
C:\nacl_sdk\pepper_49\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: error: C:/nacl_sdk/pepper_49/lib/pnacl/Release/libppapi_cpp.a: multiple definition of 'PPP_ShutdownModule'
C:\nacl_sdk\pepper_49\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: C:/nacl_sdk/pepper_49/lib/pnacl/Release/libppapi_simple_real.a: previous definition here
C:\nacl_sdk\pepper_49\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: error: C:/nacl_sdk/pepper_49/lib/pnacl/Release/libppapi_cpp.a: multiple definition of 'PPP_GetInterface'
C:\nacl_sdk\pepper_49\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: C:/nacl_sdk/pepper_49/lib/pnacl/Release/libppapi_simple_real.a: previous definition here
C:\nacl_sdk\pepper_49\toolchain\win_pnacl\bin\le32-nacl-ld.gold.exe: warning: LLVM gold plugin: Linking two modules of different data layouts: 'C:/nacl_sdk/pepper_49/SDL/lib/libSDL2.a' is 'e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32' whereas 'ld-temp.o' is 'e-p:32:32-i64:64-n32'

but pexe is generated into the pnacl release folder. When load to the chrome browser, seems that the below error,

PpapiPluginStart: No AT_SYSINFO item found in auxv, so cannot start PPAPI.  Is the IRT library not present?


If anybody know about this, please reply.

Regards,
George
 

George varghese

unread,
Mar 14, 2016, 5:08:19 AM3/14/16
to Native-Client-Discuss
Hi,

I shall add here more details for understand the issue more clearly,

I build the sdl source code, https://www.libsdl.org/download-2.0.php, 2.0.4

Please see the make file ,

DEPS = ppapi_simple_cpp nacl_io 
LIBS = SDL2_test SDL2 ppapi_simple SDL2main SDL2 $(DEPS) ppapi_gles2 ppapi_cpp ppapi pthread 

CFLAGS = -Wall -I$(NACL_SDK_ROOT)/SDL/include/SDL2
SOURCES = sdlgkmediastreamvideo.cc
PNACL_LDFLAGS += -L$(NACL_SDK_ROOT)/SDL/lib 
define LINKER_RULE
all: $(1).pexe 
$(1)_x86_32.nexe : $(1).bc
$(call LOG,TRANSLATE,$$@,$(PNACL_TRANSLATE) --allow-llvm-bitcode-input -arch x86-32 $$^ -o $$@)
$(1)_x86_64.nexe : $(1).bc
$(call LOG,TRANSLATE,$$@,$(PNACL_TRANSLATE) --allow-llvm-bitcode-input -arch x86-64 $$^ -o $$@)
$(1)_arm.nexe : $(1).bc
$(call LOG,TRANSLATE,$$@,$(PNACL_TRANSLATE) --allow-llvm-bitcode-input -arch arm $$^ -o $$@)
$(1).pexe: $(1).bc
$(call LOG,FINALIZE,$$@,$(PNACL_FINALIZE) -o $$@ $$^)
$(1).bc: $(2) $(foreach dep,$(4),$(STAMPDIR)/$(dep).stamp)
$(call LOG,LINK,$$@,$(PNACL_LINK) -o $$@ $(2) $(PNACL_LDFLAGS) $(foreach path,$(5),-L$(path)/pnacl/$(CONFIG)) -L./lib $(foreach lib,$(3),-l$(lib)) $(6))
endef
$(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep))))
$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
ifeq ($(CONFIG),Release)
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
endif
$(eval $(call NMF_RULE,$(TARGET),))

Regards,
George

Aaron Michaux

unread,
May 26, 2016, 6:57:47 PM5/26/16
to Native-Client-Discuss
I get precisely the same problem. After /finally/ getting SDL and testgles2.c to compile, and figuring out how to serve the pexe with an nmf file, I get:

   PpapiPluginStart: No AT_SYSINFO item found in auxv, so cannot start PPAPI.  Is the IRT library not present?

From what I understand, it is because the SDL container isn't set up correctly: there's some security feature that is preventing it from running. Gleaned that from here: http://permalink.gmane.org/gmane.comp.security.nativeclient.general/4178

Would dearly love to know how to correctly serve an SDL application in pNaCl.
Reply all
Reply to author
Forward
0 new messages