Fixed negotiation problem (set property caps in decode audio capsfilter) 35/45935/1
authorGilbok Lee <gilbok.lee@samsung.com>
Wed, 12 Aug 2015 10:43:21 +0000 (19:43 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Wed, 12 Aug 2015 10:43:21 +0000 (19:43 +0900)
Change-Id: I352504a3152754fcbdcab4b61a3b938234f81e58
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
packaging/libmm-transcode.spec
transcode/mm_transcode_seek.c

index b54050b..303857f 100644 (file)
@@ -1,7 +1,7 @@
 Name:       libmm-transcode
 Summary:    Multimedia Framework Video Transcode Library
 Version:    0.9
-Release:    6
+Release:    7
 Group:      System/Libraries
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
index cb18df9..302be8d 100755 (executable)
@@ -382,7 +382,9 @@ _mm_cb_transcode_bus(GstBus * bus, GstMessage * message, gpointer userdata)
                GstState State_Old, State_New, State_Pending;
                gst_message_parse_state_changed (message, &State_Old, &State_New, &State_Pending);
 
-               debug_log("[Source: %s] [State: %d -> %d]", GST_OBJECT_NAME(GST_OBJECT_CAST(GST_ELEMENT(GST_MESSAGE_SRC (message)))), State_Old, State_New);
+               debug_log("[Source: %s] [State: %d -> %d]",
+                       GST_OBJECT_NAME(GST_OBJECT_CAST(GST_ELEMENT(GST_MESSAGE_SRC (message)))),
+                       State_Old, State_New);
 
                if (State_Old == GST_STATE_NULL && State_New == GST_STATE_READY) {
                        debug_log("[Set State: Pause]");
@@ -532,16 +534,13 @@ _mm_transcode_audio_capsfilter(GstCaps *caps, handle_s *handle)
                                "channels", G_TYPE_INT, 1, NULL);
        } else if(!strcmp(handle->property->aenc, AACENC)) {
                caps = gst_caps_new_simple("audio/x-raw",
-                               "width", G_TYPE_INT, 16,
-                               "depth", G_TYPE_INT, 16,
                                "rate", G_TYPE_INT, 44100,
                                "channels", G_TYPE_INT, 1, NULL);
-               gst_caps_set_simple (caps, "bitrate", GST_TYPE_INT_RANGE, 22050, 96000, NULL);
-               debug_log("gst_caps_set_simple");
        }
+
        TRANSCODE_FREE(handle->property->audiodecodename);
-       g_object_set(G_OBJECT(handle->encodebin->encbin), ACAPS, caps, NULL);
-       debug_log("%s audiocaps: %s", handle->property->aenc, gst_caps_to_string(caps));
+       g_object_set(G_OBJECT(handle->decoder_audp->audflt), "caps", caps, NULL);
+       debug_log("%s audiocaps: %s", "audio decoder capsfilter", gst_caps_to_string(caps));
 }
 
 int