| 1 | #cxx . . $ `<file>/examples/ogg_rewriter/main.cc`/include <gstreamermm.h>cxx . . $ `<file>/gstreamer/gstreamermm.h`/ |
| 2 | #include <glibmm/main.h> |
| 3 | #include <iostream> |
| 4 | #include <stdlib.h> |
| 5 | |
| 6 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Glibcxx . . $ Glib/::MainLoopcxx . . $ Glib/MainLoop#> mainloopcxx . . $ mainloop.; |
| 7 | |
| 8 | bool on_bus_messagecxx . . $ on_bus_message(f80753751e77bf04).(const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buscxx . . $ Gst/Bus#>& /* bus */, |
| 9 | const Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Messagecxx . . $ Gst/Message#>& message) |
| 10 | { |
| 11 | switch(message->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).get_message_typecxx . . $ Gst/Message#get_message_type(97914d44a9bd21bb).()) { |
| 12 | case Gstcxx . . $ Gst/::MESSAGE_EOScxx . . $ Gst/MESSAGE_EOS.: |
| 13 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9). <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "End of stream" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 14 | mainloopcxx . . $ mainloop.->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).quitcxx . . $ Glib/MainLoop#quit(49f6e7a06ebc5aa8).(); |
| 15 | return false; |
| 16 | case Gstcxx . . $ Gst/::MESSAGE_ERRORcxx . . $ Gst/MESSAGE_ERROR.: |
| 17 | { |
| 18 | stdcxx . . $ std/::cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Error." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 19 | mainloopcxx . . $ mainloop.->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).quitcxx . . $ Glib/MainLoop#quit(49f6e7a06ebc5aa8).(); |
| 20 | return false; |
| 21 | } |
| 22 | default: |
| 23 | break; |
| 24 | } |
| 25 | |
| 26 | return true; |
| 27 | } |
| 28 | |
| 29 | int maincxx . . $ main(afcd3168fc1188a4).(int argc, char** argv) |
| 30 | { |
| 31 | Gstcxx . . $ Gst/::initcxx . . $ Gst/init(22930d6ef54703eb).(argc, argv); |
| 32 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Pipelinecxx . . $ Gst/Pipeline#> pipelinecxx . . $ Glib/RefPtr#RefPtr(49f6e7a06ebc5aa8).; |
| 33 | |
| 34 | if(argc < 3) |
| 35 | { |
| 36 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Usage: " <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). argv[0] <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). " <input ogg file> <output ogg file>" <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 37 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 38 | } |
| 39 | |
| 40 | #ifndef GSTREAMERMM_DISABLE_DEPRECATED |
| 41 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::FileSrccxx . . $ Gst/FileSrc#> filesrc = Gstcxx . . $ Glib/RefPtr#RefPtr(b50b0f543100b439).::FileSrccxx . . $ Gst/FileSrc#::createcxx . . $ Gst/FileSrc#create(c38e35eb3f591174).(); |
| 42 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::FileSinkcxx . . $ Gst/FileSink#> filesink = Gstcxx . . $ Glib/RefPtr#RefPtr(b50b0f543100b439).::FileSinkcxx . . $ Gst/FileSink#::createcxx . . $ Gst/FileSink#create(31d78999cef96de9).(); |
| 43 | #else |
| 44 | Glib::RefPtr<Gst::Element> filesrc = Gst::ElementFactory::create_element("filesrc"); |
| 45 | Glib::RefPtr<Gst::Element> filesink = Gst::ElementFactory::create_element("filesink"); |
| 46 | #endif |
| 47 | |
| 48 | if(!filesrc || !filesink) |
| 49 | { |
| 50 | stdcxx . . $ std/::cerrcxx . . $ std/cerr. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "The FileSrc or FileSink element could not be created." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 51 | return EXIT_FAILUREcxx . . $ `<external>/10696550936717951914/stdlib.h:92:9`!; |
| 52 | } |
| 53 | |
| 54 | #ifndef GSTREAMERMM_DISABLE_DEPRECATED |
| 55 | filesrc->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).property_locationcxx . . $ Gst/FileSrc#property_location(ee255b09b2ef680a).() =cxx . . $ Glib/PropertyProxy#`operator=`(96d6f65396a143d8). argvcxx . . $ Glib/ustring#ustring(85c52e162fed56f9).[1]; |
| 56 | filesink->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).property_locationcxx . . $ Gst/FileSink#property_location(ee255b09b2ef680a).() =cxx . . $ Glib/PropertyProxy#`operator=`(96d6f65396a143d8). argvcxx . . $ Glib/ustring#ustring(85c52e162fed56f9).[2]; |
| 57 | #else |
| 58 | filesrc->set_property<Glib::ustring>("location", argv[1]); |
| 59 | filesink->set_property<Glib::ustring>("location", argv[2]); |
| 60 | #endif |
| 61 | |
| 62 | mainloopcxx . . $ mainloop. =cxx . . $ Glib/RefPtr#`operator=`(b66de19e2ab7ce1f). Glibcxx . . $ Glib/::MainLoopcxx . . $ Glib/MainLoop#::createcxx . . $ Glib/MainLoop#create(748caac81bf5da26).(); |
| 63 | pipeline =cxx . . $ Glib/RefPtr#`operator=`(b66de19e2ab7ce1f). Gstcxx . . $ Gst/::Pipelinecxx . . $ Gst/Pipeline#::createcxx . . $ Gst/Pipeline#create(4db98da4abd65927).("rewriter"cxx . . $ Glib/ustring#ustring(85c52e162fed56f9).); |
| 64 | |
| 65 | Glibcxx . . $ Glib/::RefPtrcxx . . $ Glib/RefPtr#<Gstcxx . . $ Gst/::Buscxx . . $ Gst/Bus#> bus = pipelinecxx . . $ Glib/RefPtr#RefPtr(b50b0f543100b439).->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).get_buscxx . . $ Gst/Pipeline#get_bus(ada66d6ded80d30d).(); |
| 66 | bus->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).add_watchcxx . . $ Gst/Bus#add_watch(125cf56d22b1e63d).(sigccxx . . $ sigc/slot#slot(edcd8b2679e9bd1a).::ptr_funcxx . . $ sigc/ptr_fun(1a86a404afb7766).(&on_bus_messagecxx . . $ on_bus_message(f80753751e77bf04).)); |
| 67 | |
| 68 | pipeline->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).addcxx . . $ Gst/Bin#add(25e1dc1b4b432bb3).(filesrccxx . . $ Glib/RefPtr#RefPtr(11a1ac667024f826).)->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).addcxx . . $ Gst/Bin#add(25e1dc1b4b432bb3).(filesinkcxx . . $ Glib/RefPtr#RefPtr(11a1ac667024f826).); |
| 69 | |
| 70 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Setting to PLAYING." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 71 | pipeline->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).set_statecxx . . $ Gst/Element#set_state(17bf573d41f9253f).(Gstcxx . . $ Gst/::STATE_PLAYINGcxx . . $ Gst/STATE_PLAYING.); |
| 72 | filesrc->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).linkcxx . . $ Gst/Element#link(52e71ea9673343b3).(filesinkcxx . . $ Glib/RefPtr#RefPtr(11a1ac667024f826).); |
| 73 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Running." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 74 | mainloopcxx . . $ mainloop.->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).runcxx . . $ Glib/MainLoop#run(49f6e7a06ebc5aa8).(); |
| 75 | |
| 76 | stdcxx . . $ std/::coutcxx . . $ std/cout. <<cxx . . $ std/`operator<<`(efaf8c13fc75f3c7). "Returned. Setting state to NULL." <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 77 | pipeline->cxx . . $ Glib/RefPtr#`operator->`(5a2a78a048fb49a8).set_statecxx . . $ Gst/Element#set_state(17bf573d41f9253f).(Gstcxx . . $ Gst/::STATE_NULLcxx . . $ Gst/STATE_NULL.); |
| 78 | |
| 79 | return EXIT_SUCCESScxx . . $ `<external>/10696550936717951914/stdlib.h:93:9`!; |
| 80 | } |