Appsrc link with android screen record

JYbob jinyoung.noh at lge.com
Wed Jul 9 18:43:51 PDT 2014


Hi, long time no see.

Before asking, I solved many issues from this site. Thank you again.

Now days, I'm linking appsrc and android screen record(
http://androidxref.com/4.4.3_r1.1/xref/frameworks/av/cmds/screenrecord/screenrecord.cpp
<http://androidxref.com/4.4.3_r1.1/xref/frameworks/av/cmds/screenrecord/screenrecord.cpp> 
) 

Screen record is fast enough to capture screen, I think.
So I have integrated the screen record source to gstreamer source.

what I want is push h264stream to appsrc.
So I deleted muxer values of screenrecord source in my code.(beacase I don't
need muxing) 


After intergrate the screen record, I got a debug message.
my pipeline was :
"appsrc name=videosrc do-timestamp=true ! h264parse ! queue ! decodebin !
filesink location=sample.yuv"


0:00:04.599273682  2796 0xb75d3ac0 WARN               h264parse
gsth264parse.c:957:gst_h264_parse_handle_frame:<h264parse0> no SPS/PPS yet,
nal Type: 5 Slice IDR, Size: 12909 will be dropped
 
I think "no SPS/PPS yet" means header data of the h264stream is not pushed
to gstreamer appsrc. 

In the screenrecord,

        if ((flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) != 0) {
  	    //Must change	
	    printf("Got codec config buffer (%u bytes); ignoring\n", size);
		
            size = 0;
        }
if got a BUFFER_FLAG_CODECCONFIG, ignore the data(not pushed appsrc).

So, My ask is BUFFER_FLAG_CODECCONFIG is related to SPS/PPS?

To push SPS/PPS parameter, what do i do?



Briefly, My source code flow is :

In ther appsrc callback function,

err = encoder->dequeueOutputBuffer(&bufIndex, &offset, &size, &ptsUsec,
            &flags, kTimeout);

After dequeing outputbuffer,

GstMemory *mem = gst_memory_new_wrapped (0, buffers[bufIndex]->data(),size,
0,  size, NULL, g_free);
push data to appsrc.

Except BUFFER_FLAG_CODECCONFIG data,

        if ((flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) != 0) {
  	    //Must change	
	    printf("Got codec config buffer (%u bytes); ignoring\n", size);
		
            size = 0;
        }




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Appsrc-link-with-android-screen-record-tp4667883.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list