In TI8148 we have use the following command for both encoding to linux and decode from linux system..For streaming we have use the following C code in TI8148...
#GSTREAMER APPLICATION PROGRAM
#include<stdio.h>
#include <unistd.h>
#include<stdlib.h>
main()
{
int i,j,k;
printf("Stop the matrix application launcher before running any gstreamer pipeline\n");
system("/etc/init.d/matrix-
system("echo 0 > /sys/devices/platform/vpss/graphics0/enabled");
system("echo 0 > /sys/devices/platform/vpss/graphics1/enabled");
system("echo 0 > /sys/devices/platform/vpss/graphics2/enabled");
printf("\n\n Setup READY..........\n");
if(fork()==0)
{
printf("Video source start\n");
system("gst-launch-0.10 -v v4l2src ! image/jpeg, width=1024, height=768 ! omx_mjpegdec ! omx_h264enc force-idr-period=60 ! tcpserversink host=192.168.0.130 port=5000");
}
else
{
sleep(30);
printf("\n\n\n\n\nReceive start\n");
system("gst-launch -v tcpclientsrc host=192.168.0.126 port=5000 ! h264parse ! omx_h264dec ! omx_scaler ! video/x-raw-yuv,width=800,height=480 ! omx_ctrl display-mode=OMX_DC_MODE_1080_60 display-device=LCD ! omx_videosink sync=false display-device=LCD");
}
}
In linux laptop we have use the following command for both decoding and encode video to TI8148 EVM using gstreamer...
gst-launch-0.10 -v tcpclientsrc host=192.168.0.130 port=5000 ! h264parse ! ffdec_h264 ! autovideosink . -v v4l2src ! video/x-raw-yuv, width=320, height=240 ! ffmpegcolorspace ! jpegenc ! tcpserversink host=192.168.0.126 port=5000
In linux system we can see the streaming....But we got the following error in TI8148-EVM while decode video from linux system...
root@dm814x-evm:/media# ./gstream1
Stop the matrix application launcher before running any gstreamer pipeline
Stopping Matrix GUI application.
VPSS_GRPX : please open fb1 node first.
VPSS_GRPX : please open fb2 node first.
Setup READY..........
Video source start
Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = image/jpeg, width=(int)1024, height=(int)768, framerate=(fraction)30/1
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = image/jpeg, width=(int)1024, height=(int)768, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = image/jpeg, width=(int)1024, height=(int)768, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstOmxMJPEGDec:omxmjpegdec0.GstPad:sink: caps = image/jpeg, width=(int)1024, height=(int)768, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstOmxMJPEGDec:omxmjpegdec0.GstPad:sink: caps = image/jpeg, width=(int)1024, height=(int)768, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstOmxMJPEGDec:omxmjpegdec0.GstPad:src: caps = video/x-raw-yuv-strided, width=(int)1024, height=(int)768, format=(fourcc)NV12, rowstride=(int)10e
/GstPipeline:pipeline0/GstOmxH264Enc:omxh264enc0.GstPad:sink: caps = video/x-raw-yuv-strided, width=(int)1024, height=(int)768, format=(fourcc)NV12, rowstride=(int)102e
/GstPipeline:pipeline0/GstOmxH264Enc:omxh264enc0.GstPad:src: caps = video/x-h264, width=(int)1024, height=(int)768, framerate=(fraction)30/1, stream-format=(string)bytu
/GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0.GstPad:sink: caps = video/x-h264, width=(int)1024, height=(int)768, framerate=(fraction)30/1, stream-format=(stru
Receive start
Assertion at Line no: 1239 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlod
Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlosd
ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe
Assertion at Line no: 1239 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlod
Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlosd
ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe
Assertion at Line no: 1239 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlod
Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlosd
ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe
Assertion at Line no: 1239 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlod
Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlosd
ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe
Assertion at Line no: 1239 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlod
Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlosd
ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe
Assertion at Line no: 1239 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlod
Assertion at Line no: 761 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlosd
Caught SIGSEGV accessing address 0xe
ServiceMgr_rxThreadFxn: bind() failed with errno = 98
Spinning. Please run 'gdb gst-launch 1383' to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
Assertion at Line no: 500 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlosd
Assertion at Line no: 695 in /swcoe/sdk/cm/netra/arago-tmp/work/dm814x-evm-none-linux-gnueabi/ti-syslink-2_20_02_20-r1j/syslink_2_20_02_20/packages/ti/syslink/ipc/hlosd
ServiceMgr_stop: MessageQ_put failed: status = 0xfffffffe