How to operate on GstMapInfo
dingoegret
sephvelut at gmail.com
Fri Mar 17 09:13:25 UTC 2017
Okay so there is definitely a difference with the returned data from
gstreamer and returned data from say the
char* file_path = "resources/sample3.wav";
std::ifstream file_stream(file_path);
const size_t chunk_size = 16384;
std::vector<char> chunk(chunk_size);
std::streamsize bytes_read = file_stream.rdbuf()->sgetn(&chunk[0],
chunk.size());
because I am sending the "resources/sample3.wav" to gstreamer, retrieving
16kb of data via GstAdapter and changing the gconstpointer to a vector
size = 16384;
gconstpointer data = gst_adapter_map (adapter, size);
char* temp = const_cast<char*>(reinterpret_cast<const
char*>(static_cast<const unsigned char*>(data)));
std::vector<char> new_chunk(temp, temp + size);
new_chunk == chunk //false..
my pipeline isnt doing anything to the sample3.wav file. All I am doing is
gst_element_link_many(udpsrc, rtpL16depay, appsink, NULL);
g_signal_connect(appsink, "new-sample", G_CALLBACK (new_sample), NULL);
and I'm sending the sample3.wav via the gst-launch command
sudo gst-launch-1.0 filesrc location=~/gstreamer/resources/sample3.wav !
wavparse ! audioconvert ! rtpL16pay ! udpsink port=5000
I'm confused why the bytes of audio data come out differently in gstreamer
from the bytes of audio data coming out from the file stream reader
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-operate-on-GstMapInfo-tp4682202p4682275.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
More information about the gstreamer-devel
mailing list